diff --git a/buildroot-external/patches/occu/0190-WebUI-Fix-AddMissingExtendedChannelDescriptions.patch b/buildroot-external/patches/occu/0190-WebUI-Fix-AddMissingExtendedChannelDescriptions.patch new file mode 100644 index 0000000000..bd653262d2 --- /dev/null +++ b/buildroot-external/patches/occu/0190-WebUI-Fix-AddMissingExtendedChannelDescriptions.patch @@ -0,0 +1,22 @@ +--- occu/WebUI/www/webui/webui.js.orig ++++ occu/WebUI/www/webui/webui.js +@@ -35441,15 +35441,15 @@ + multiMode = oChannelDescr.multiMode; + var tmpDev; + +- if (typeof channelAddress != "undefined") { ++ if (typeof channelType != "undefined") { ++ chType = channelType; ++ } else if (typeof channelAddress != "undefined") { + var channel = DeviceList.getChannelByAddress(channelAddress); + if (channel) { + chType = channel.channelType; + channelIsVisible = channel.isVisible; + } +- } else if (typeof channelType != "undefined") { +- chType = channelType; +- } ++ } + + if (chType == "KEY_TRANSCEIVER") { + if (deviceType.toLowerCase().indexOf("hmip-asir") != -1) { diff --git a/buildroot-external/patches/occu/0190-WebUI-Fix-AddMissingExtendedChannelDescriptions/occu/WebUI/www/webui/webui.js b/buildroot-external/patches/occu/0190-WebUI-Fix-AddMissingExtendedChannelDescriptions/occu/WebUI/www/webui/webui.js new file mode 100755 index 0000000000..65e0fc64d2 --- /dev/null +++ b/buildroot-external/patches/occu/0190-WebUI-Fix-AddMissingExtendedChannelDescriptions/occu/WebUI/www/webui/webui.js @@ -0,0 +1,52560 @@ +CHANNELCHOOSER_JST = "{macro printHead(name, id, transKey)}\n + + + + + + + {if id != sortId}\n + + + + + + + ${name}<\/th>\n + + + + + {else}\n + + + + \n + + + ${name} \n + + {if sortDescend}\n + + \n + + {else}\n + + \n + + {\/if}\n + <\/th>\n + {\/if}\n +{\/macro}\n +
\n +
Kanalauswahl<\/div>\n +
\n + \n + \n + \n + \n + \n + \n + \n + \n + <\/colgroup>\n + \n + \n + ${printHead(\"Name\", \"NAME\", \"thName\")}\n + \n + ${nameFilter.getHTML()}\n + \n + {eval}actualDeviceAddress = \"\";{\/eval}\n +\n + {for channel in channels}\n + {if ((channel.device.inInbox != true) && (channel.address != \"BidCoS-RF:0\")) }\n + {var virtualChannel = \"\"}\n + {var classExpertOnly = \"hidden j_expertChannel\"}\n + {var channelTypeID = channel.deviceType.id.toUpperCase()}\n +\n + {if channel.channelType == \"VIRTUAL_DIMMER\"} {var virtualChannel = \"hidden j_expertChannel\"} {\/if}\n + {if (channel.channelType == \"VIRTUAL_DUAL_WHITE_BRIGHTNESS\") || (channel.channelType == \"VIRTUAL_DUAL_WHITE_COLOR\")} {var virtualChannel = \"hidden j_expertChannel\"} {\/if}\n +\n + {if (channelTypeID != \"HMIP-MIOB\") && (channelTypeID != \"HMIP-WHS2\")}\n + {if (channel.channelType == \"DIMMER_TRANSMITTER\")\n + || (channel.channelType == \"SWITCH_TRANSMITTER\")\n + || (channel.channelType == \"BLIND_TRANSMITTER\")\n + || (channel.channelType == \"SHUTTER_TRANSMITTER\")\n + || (channel.channelType == \"ACOUSTIC_SIGNAL_TRANSMITTER\")}\n + {var virtualChannel = classExpertOnly;}\n + {\/if}\n + {if (channel.channelType == \"DIMMER_VIRTUAL_RECEIVER\")\n + || (channel.channelType == \"SWITCH_VIRTUAL_RECEIVER\")\n + || (channel.channelType == \"BLIND_VIRTUAL_RECEIVER\")\n + || (channel.channelType == \"SHUTTER_VIRTUAL_RECEIVER\")\n + || (channel.channelType == \"ACOUSTIC_SIGNAL_VIRTUAL_RECEIVER\")\n + || (channel.channelType == \"SERVO_VIRTUAL_RECEIVER\")}\n + {if actualDeviceAddress != channel.device.address}\n + {eval}\n + actualDeviceAddress = channel.device.address;\n + if (userIsNoExpert) {\n + if ((typeof channel.virtChCounter != \"undefined\") && (channel.virtChCounter != 1)) {\n + virtualChannel = classExpertOnly;\n + }\n + }\n + {\/eval}\n + {\/if}\n + {eval}if ((typeof channel.virtChCounter != \"undefined\") && (channel.virtChCounter != 1)) {virtualChannel = classExpertOnly;}{\/eval}\n + {\/if}\n + {\/if}\n +\n + {if (channelTypeID == \"HMIP-MIOB\") && ((channel.channelType == \"SWITCH_TRANSMITTER\") || ((channel.channelType == \"SWITCH_VIRTUAL_RECEIVER\") && ((channel.index != 3) && (channel.index != 7))))} {var virtualChannel = classExpertOnly} {\/if}\n +\n + {if ((channelTypeID == \"HMIP-WHS2\") && ((channel.channelType == \"SWITCH_TRANSMITTER\") || ((channel.channelType == \"SWITCH_VIRTUAL_RECEIVER\") &&\n + ((channel.index == 2) || (channel.index == 4) || (channel.index == 6) || (channel.index == 8))\n + )))} {var virtualChannel = classExpertOnly} {\/if}\n +\n + {if channel.channelType == \"VIR-OL-GTW-CH\"} {var virtualChannel = \"hidden\"} {\/if}\n + {if channel.channelType == \"VIR-HUE-GTW-CH\"} {var virtualChannel = \"hidden\"} {\/if}\n +\n + {if (channel.index == 0)} {var virtualChannel = classExpertOnly} {\/if}\n + \n + {if channel.channelType != \"_MAINTENANCE\"}\n + \n + \n +
Bild<\/th>\n + ${printHead(\"Beschreibung\", \"DESCRIPTION\", \"thDescription\")}\n + ${printHead(\"Seriennummer\", \"ADDRESS\", \"thSerialNumber\")}\n + ${printHead(\"Gewerke\", \"FUNC_NAMES\", \"thFuncs\")}\n + ${printHead(\"Räume\", \"ROOM_NAMES\", \"thRooms\")}\n + <\/tr>\n +
 <\/th>\n +  <\/th>\n + \n + ${addressFilter.getHTML()}\n + ${funcFilter.getHTML()}\n + ${roomFilter.getHTML()}\n + <\/tr> \n + <\/thead>\n +
${channel.name}${channel.typeDescription}_${channel.address}<\/span><\/td>\n +
${channel.thumbnailHTML}<\/div><\/td>\n +
${channel.typeDescription}${channel.device.name}<\/td>\n + ${channel.address}<\/td>\n + \n + {for subsection in channel.subsections}\n + ${subsection.name}
\n + {forelse}\n +  \n + {\/for}\n + <\/td>\n +
\n + {for room in channel.rooms}\n + ${room.name}
\n + {forelse}\n +  \n + {\/for}\n + <\/td>\n + <\/tr>\n + {forelse}\n +
Keine Kanäle verfügbar<\/td>\n + <\/tr>\n + {\/if}\n + {\/if}\n + {\/for}\n + <\/tbody>\n + <\/table>\n +<\/div>\n +
\n +
Abbrechen<\/div>\n +
Filter zurücksetzen<\/div>\n + {if false === showVirtual}\n +
virtuelle Kanäle anzeigen<\/div>\n + {else}\n +
virtuelle Kanäle ausblenden<\/div>\n + {\/if}\n +<\/div>\n +<\/div>\n +"; +CHANNEL_CONFIG_DIALOG_JST = "
\n +
Allgemeine Kanaleinstellungen:<\/span> ${channel.address}<\/div>\n +
\n +\n +
\n +
\n +
\n +
${channel.imageHTML}<\/div>\n + <\/div>\n +
${channel.typeName}<\/div>\n + <\/div>\n + \n + {if channel.supportsComTest()}\n +
\n +
Funktionstest<\/div>\n +
\n +
\n + \n + \n +
Test starten<\/div><\/td>\n +
--:--:--<\/div><\/td>\n + <\/tr>\n + <\/table>\n +
\n +

\n + Im Rahmen des Funktionstests wird geprüft, ob die Kommunikation mit dem Kanal fehlerfrei funktioniert.\n + <\/p>\n + {if channel.category == Channel.CATEGORY.SENDER}

Bei Sensoren wartet die HomeMatic Zentrale, bis diese sich melden. Eine Fernbedienung meldet sich z.B. erst dann, wenn sie manuell betätigt wird.<\/p>{\/if}\n + {if channel.category == Channel.CATEGORY.RECEIVER}

Bei Aktoren wird dazu in der Regel ein Schaltbefehl ausgelöst.<\/p>{\/if}\n + <\/div>\n + <\/div>\n + <\/div>\n + {\/if}\n + {if channel.channelType == \"KEY_TRANSCEIVER\" || channel.channelType == \"KEY\" || channel.channelType == \"MULTI_MODE_INPUT_TRANSMITTER\"}\n +

\n +
Taster-/Schaltevent an Zentrale <\/div>\n +
\n +
\n + \n + \n +
Aktivieren<\/div><\/td>\n +
Deaktivieren<\/div><\/td>\n + <\/tr>\n + <\/table>\n +
\n + \n + {\/if}\n + <\/div>\n +\n +
\n +
\n + \n +
Name:<\/td><\/td><\/tr>\n +
Typenbezeichnung:<\/td><\/td><\/tr>\n +
Seriennummer:<\/td><\/td><\/tr>\n +
Kategorie:<\/td>\n + <\/td><\/tr>\n +
Übertragungsmodus:<\/td>\n + \n +
Bedienbar:<\/td><\/td><\/tr>\n +
Sichtbar:<\/td><\/td><\/tr>\n +
Protokolliert:<\/td><\/td><\/tr>\n + <\/table>\n + <\/div>\n + \n +
\n + \n +
Räume<\/div>\n +
\n +
\n + \n + {for room in rooms}\n + \n +
<\/td>${room.name}<\/td>\n + <\/tr>\n + {\/for}\n + <\/table>\n + <\/form>\n + <\/div>\n + \n +
\n + \n +
Gewerke<\/div>\n +
\n + \n + \n + {for func in funcs}\n + \n +
<\/td>${func.name}<\/td>\n + <\/tr>\n + {\/for}\n + <\/table>\n + <\/form>\n + <\/div>\n + \n + <\/div>\n +<\/div>\n +
\n +
Abbrechen<\/div>\n +
OK<\/div>\n +<\/div>\n +<\/div>\n +"; +DEVICE_CONFIG_DIALOG_JST = "
\n +
Allgemeine Geräteeinstellungen:<\/span> ${device.address}<\/div>\n +
\n +\n +
\n +
\n +
\n +
${device.imageHTML}<\/div>\n + <\/div>\n +
${device.typeName}<\/div>\n + <\/div>\n + <\/div>\n +\n +
\n +
\n + \n +
Name:<\/td><\/td><\/tr>\n +
Typenbezeichnung:<\/td><\/td><\/tr>\n +
Seriennummer:<\/td><\/td><\/tr>\n +
Bedienbar:<\/td><\/td><\/tr>\n + \n +
Protokolliert:<\/td><\/td><\/tr>\n +\n +
Alle Kan%E4le sichtbar:<\/td><\/td><\/tr>\n +
Servicemeldungen:<\/td><\/td><\/tr>\n + <\/table>\n + <\/div>\n + \n +
\n +
Funktionstest<\/div>\n +
\n +
\n + \n + \n +
Test starten<\/div><\/td>\n +
--:--:--<\/div><\/td>\n +\n +
<\/div><\/td>\n +\n + <\/tr>\n + <\/table>\n + <\/div>\n + <\/div>\n + \n +
\n +
Funktionstest<\/div>\n +
\n +
\n + \n + \n + \n + \n +\n +
Kanäle umbenennen<\/div><\/td>\n +\n +
<\/td>\n +\n +
<\/div><\/td>\n +\n + <\/tr>\n +\n +
Trennzeichen:<\/td><\/td>\n + <\/tr>\n +\n +
inkl. eigener Namen:<\/td><\/td>\n +\n +
<\/div><\/td>\n +\n + <\/tr>\n +\n + <\/table>\n + <\/div>\n + <\/div>\n +\n + <\/div>\n +<\/div>\n +
\n +
Abbrechen<\/div>\n +
Ok<\/div>\n +<\/div>\n +<\/div>\n +"; +DEVICELIST_FLAT_JST = "{macro printHead(name, id)}\n + {if id != sortId}\n +
${name}<\/th>\n + {else}\n + \n + ${name} \n + {if sortDescend}\n + \n + {else}\n + \n + {\/if}\n + <\/th>\n + {\/if}\n +{\/macro}\n +\n + \n + \n + \n + \n + \n + \n + \n + \n + \n + \n + \n + \n + \n + \n + <\/colgroup>\n + \n + \n + ${printHead(\"thName\", \"NAME\")}\n + ${printHead(\"thTypeDescriptor\", \"TYPE_NAME\")}\n + \n + ${nameFilter.getHTML()}\n + ${typeNameFilter.getHTML()}\n + \n + {for channel in channels}\n + \n + \n + "; + + if (counter <= 15) { + html_1 = html; + } else if (counter <= 31) { + html_2 = html; + } + counter++; + } + }); + } else { + // SPHM-884 + var mainElm = jQuery("[name='abortEventSendingChannels']"); + mainElm.children(":first-child").text(translateKey("hintSetReadyNotComplete")); + mainElm.next().hide(); + } + html_1 += ""; + hookElm_1.html(html_1); + + if (html_2) { + hookElm_2.html(html_2); + } +}; + +addAbortEventSendingChannels4WGD = function(chn, prn, devAddress, value) { + var hookElm_1 = jQuery("#hookAbortEventSendingChannels_1_"+ chn), + hookElm_2 = jQuery("#hookAbortEventSendingChannels_2_"+ chn), + device = DeviceList.getDeviceByAddress(devAddress), + chnIsOdd = (parseInt(chn) % 2 != 0) ? true : false, + counter = (chnIsOdd) ? 0 : 1, // determine the odd and even channels + html; + + + + setAbortEventSendingChannels = function(chn, prn) { + var valElm = jQuery("#separate_CHANNEL_" + chn+ "_" + prn), + arChkBoxes = jQuery("[name='abortEventSendingCh_"+chn+"']"), + val = 0; + + jQuery.each(arChkBoxes, function(index, chkBox) { + if(chkBox.checked) { + val += parseInt(chkBox.value); + } + }); + + valElm.val(val); + }; + if (typeof device != "undefined") { + jQuery.each(device.channels, function (index, channel) { + + if (((channel.channelType == "DISPLAY_INPUT_TRANSMITTER") && (chnIsOdd)) || ((channel.channelType == "DISPLAY_LEVEL_INPUT_TRANSMITTER") && (! chnIsOdd))) { + html += ""; + counter+=2; + } + }); + } else { + // SPHM-884 + var mainElm = jQuery("[name='abortEventSendingChannels']"); + mainElm.children(":first-child").text(translateKey("hintSetReadyNotComplete")); + mainElm.next().hide(); + } + html += ""; + hookElm_1.html(html); +}; + +addHintHeatingGroupDevice = function (address) { + if (typeof DeviceList.getDeviceByAddress() != "undefined") { + var devId = DeviceList.getDeviceByAddress(address.split(":")[0]).id, + inHeatingGroup = homematic("Interface.getMetadata", {"objectId": devId, "dataId": "inHeatingGroup"}), + hint = "
" + translateKey('hintGroupDevice') + "
"; + + if (inHeatingGroup != "null") { // MetaData available? + conInfo("MetaData available", "inHeatingGroup: " + inHeatingGroup); + if (inHeatingGroup == "true") { + jQuery("#content").prepend(hint); + jQuery("#ic_deviceparameters").animate({"margin-top": "50px"}); + } + } else { // Read /etc/congig/groups.gson (fallback if no meta data available (migration)) + conInfo("MetaData not available"); + var allowedGroupMembers = [ + "RADIATOR_THERMOSTAT", + "WALLMOUNTED_THERMOSTAT", + "HM-CC-RT-DN", + "HM-TC-IT-WM-W-EU" + ], + showHint = false, + devId = DeviceList.getDeviceByAddress(address.split(":")[0]).id, + groupList = JSON.parse(homematic("CCU.getHeatingGroupList", {})); + + if (groupList != -1 && typeof groupList == "object") { + jQuery.each(groupList, function (index, groups) { + jQuery.each(groups, function (index, group) { + jQuery.each(group.groupMembers, function (index, groupMember) { + if ((groupMember.id == address) && (jQuery.inArray(groupMember.memberType.id, allowedGroupMembers) != -1)) { + showHint = true; + homematic("Interface.setMetadata", {"objectId": devId, "dataId": "inHeatingGroup", "value": "true"}); + } + }); + }); + }); + } + if (showHint) { + jQuery("#content").prepend(hint); + jQuery("#ic_deviceparameters").animate({"margin-top": "50px"}); + } + } + } +}; + + +daliRefreshDevices = function(address) { + var device = DeviceList.getDeviceByAddress(address); + + MessageBox.show(translateKey('titleSearchDaliDevices'),'' +'


','','320','60','msgBckID', 'msgBoxBarGraph'); + + homematic("Interface.searchDaliDevices", {"interface": "HmIP-RF", "address": address, "valueKey": "DALI_ADDRESS", "type": "string", "value": "refreshDaliDevices"}, function (result) { + if (result) { + MessageBox.setText(translateKey("lblPleaseWaitAMoment")); + MessageBox.centerText(); + + // Store the UNIVERSAL_LIGHT_MAX_CAPABILITIES of the DALI channels as meta data + window.setTimeout(function() { + var devAddress = address, + daliChannel; + + for (var loop = 1; loop <= 48; loop++) { + var maxCap = homematic("Interface.getMasterValue", { + "interface": "HmIP-RF", + "address": devAddress + ":" + loop, + "valueKey": "UNIVERSAL_LIGHT_MAX_CAPABILITIES" + }); + daliChannel = DeviceList.getChannelByAddress(devAddress + ":" + loop); + daliChannel.daliMaxCapabilities = maxCap; + homematic("Interface.setMetadata", {"objectId": daliChannel.id , "dataId" : "maxCap", "value": maxCap}); + } + MessageBox.close(); + reloadPage(); + },500); + + } else { + MessageBox.close(); + alert(translateKey("dialogSettingsSecuritySSHMsgBoxErrorTitle")); // An error occurred + } + }); +}; + +// Resets the history data of a specific channel +resetChnMetaEnergyCounter = function(chn, opMode) { + /* + initialVal + Values for the last 30 days. The first 0 is yesterday...... + This is being used to store the values of the last 30 days. + */ + var arDataID = ["","","startValA","startValB","startValC"]; + + var initialVal = "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"; + homematic("Interface.setMetadata", { + "objectId": chn.id, + "dataId": "energyCounter30Days", + "value": initialVal + }); + homematic("Interface.setMetadata", {"objectId": chn.id, "dataId": "energy0", "value": 0}); // Today + homematic("Interface.setMetadata", {"objectId": chn.id, "dataId": "energy1", "value": 0}); // Yesterday + homematic("Interface.setMetadata", {"objectId": chn.id, "dataId": "energy7", "value": 0}); // 1 Week + homematic("Interface.setMetadata", {"objectId": chn.id, "dataId": "energy30", "value": 0}); // 1 Month +}; + +// Resets the history data and the start value of all relevant channels +resetAllMetaEnergyCounter = function(dev, opMode) { + var arStartDataID = ["","","startValA","startValB","startValC"], + arTimeDataID = ["","","startTimeA","startTimeB","startTimeC"]; + + jQuery.each(dev.channels,function(index,chn) { + if (chn.index > 1) { + /* + initialVal + Values for the last 30 days. The first 0 is yesterday...... + This is being used to store the values of the last 30 days. + */ + var initialVal = "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"; + homematic("Interface.setMetadata", { + "objectId": chn.id, + "dataId": "energyCounter30Days", + "value": initialVal + }); + homematic("Interface.setMetadata", {"objectId": chn.id, "dataId": "energy0", "value": 0}); // Today + homematic("Interface.setMetadata", {"objectId": chn.id, "dataId": "energy1", "value": 0}); // Yesterday + homematic("Interface.setMetadata", {"objectId": chn.id, "dataId": "energy7", "value": 0}); // 1 Week + homematic("Interface.setMetadata", {"objectId": chn.id, "dataId": "energy30", "value": 0}); // 1 Month + homematic("Interface.setMetadata", {"objectId": chn.id, "dataId": "iecPrgFirstStart","value": 1}); + + if (opMode < 3) { + homematic('Interface.setMetadata', {'objectId': chn.id, 'dataId': arStartDataID[chn.index], 'value': 0}); // Reset start value + homematic('SysVar.setFloat', {'name': 'svEnergyCounter_' + chn.id + '_' + chn.address, 'value': 0}); + homematic('SysVar.setFloat', {'name': 'svEnergyCounterOldVal_' + chn.id, 'value': 0}); + homematic('Interface.setMetadata', {'objectId': chn.id, 'dataId': arTimeDataID[chn.index], 'value': getEsiStartTime()}); // Reset time stamp + + } else { + var devCounter = homematic("Interface.getValue", {'interface': 'HmIP-RF', 'address' : chn.address, 'valueKey': 'ENERGY_COUNTER'}); + + //if (devCounter == "") {devCounter = "0.000";} + + homematic('Interface.setMetadata', {'objectId': chn.id, 'dataId': arStartDataID[chn.index], 'value': devCounter}); // Reset start value + homematic('SysVar.setFloat', {'name': 'svEnergyCounter_' + chn.id + '_' + chn.address, 'value': devCounter}); + homematic('SysVar.setFloat', {'name': 'svEnergyCounterOldVal_' + chn.id, 'value': devCounter}); + homematic('Interface.setMetadata', {'objectId': chn.id, 'dataId': arTimeDataID[chn.index], 'value': getEsiStartTime()}); // Reset time stamp + homematic('Interface.setMetadata', {'objectId': chn.id, 'dataId': 'firstStart', 'value' : 1}); + } + } + }); +}; + +powerIdentSensor = function(address) { + var device = DeviceList.getDeviceByAddress(address.split(":")[0]); + + var dlgYesNo = new YesNoDialog(translateKey("btnSensorDetection"), translateKey("dialogEsiSearchButtonContent"), function(result) { + if (result == YesNoDialog.RESULT_YES) { + var opMode = -1, counter = 0, cntNoSensorFound = 0, + intervalId = setInterval(getOperationMode, 1000); + + homematic("Interface.putParamset", { + 'interface': "HmIP-RF", + 'address': address, + 'paramsetKey': 'MASTER', + 'set': + [ + {name: 'CHANNEL_OPERATION_MODE', type: 'int', value: 0} + ] + }); + + DeviceListPage.showConfiguration(false, 'DEVICE', device.id); + + function getOperationMode() { + var chnPS = homematic("Interface.getParamset", { + "interface": "HmIP-RF", + "address": address, + "paramsetKey": "MASTER" + }); + opMode = chnPS.CHANNEL_OPERATION_MODE; + if (typeof opMode != "undefined") { + if ((opMode != -1) && (opMode != 0)) { + clearInterval(intervalId); + DeviceListPage.showConfiguration(false, 'DEVICE', device.id); + resetAllMetaEnergyCounter(device, opMode); + } else { + conInfo("ESI - searching sensor: " + counter); + counter++; + if (counter > 120) { + // If on the config page of this device, after 2 minutes stop the search and show a message that the system button of the device has to be pressed. + // After the message has been confirmed start the search again. + // Do this 3 times (6 minutes). After that, stop the search. There is probably no sensor connected. + if ((jQuery("#btnSensorIdent").length == 1) && (cntNoSensorFound < 3)) { + alert("Please press the system button of the device\n\n" + device.name + "."); // ToDo - translate + counter = 0; + cntNoSensorFound++; + } else { + // If not on the config page, stop the search. + clearInterval(intervalId); + if (cntNoSensorFound > 2) { + alert("No sensor found."); // ToDo translate + } + } + } + } + } else { + clearInterval(intervalId); + console.log("Problem: CHANNEL_OPERATION_MODE not found!"); + } + } + } + },"html"); + dlgYesNo.btnTextNo(translateKey("dialogBack")); + dlgYesNo.btnTextYes(translateKey("btnNext")); + dlgYesNo.setContentClass("YesNoDialogContentNoBold"); + dlgYesNo.resetHeight(); +}; + +getEsiStartTime = function() { + var d = new Date(), + dateString = ("0" + d.getDate()).slice(-2) + "." + ("0"+(d.getMonth()+1)).slice(-2) + "." + + d.getFullYear() + " " + ("0" + d.getHours()).slice(-2) + ":" + ("0" + d.getMinutes()).slice(-2); + + return dateString; +};// language = getLang();//"de"; + +setLanguage = function(lang) +{ + //Funktion wird zur Zeit nicht genutzt + + //Sprache dokumentenübergreifend speichern + $('language').value = lang; + // language 0 = de , 1 = en +}; + +Ajax_failure = function(file, failure) +{ + var msg = '
'; + msg += '

Error while loading the following file:

'; + msg += file + '

'; + msg += '' + failure + '
'; + + MessageBox.show('File request failed!', msg, '', 480,120); +}; + +getPathPNAME = function(actor, language) { + var result = '/config/easymodes/etc/localization/' + language + '/PNAME.txt'; + if (actor == "ACTOR_SECURITY" || actor == "ACTOR_WINDOW") { + result = '/config/easymodes/etc/localization/' + language + '/PNAME_TipTronic.txt'; + } + return result; +}; + +getLangInfo = function(sender, actor) +{ + var language = getLang(); + + var path_1 = '/config/easymodes/' + actor + '/localization/' + language + '/' + sender + '.txt'; + //var path_2 = '/config/easymodes/etc/localization/' + language + '/PNAME.txt'; + var path_2 = getPathPNAME(actor, language); + var local_generic = '/config/easymodes/' + actor + '/localization/' + language + '/GENERIC.txt'; + var global_generic = '/config/easymodes/etc/localization/' + language + '/GENERIC.txt'; + + l_generic = false; + + // die entsprechenden Uebersetzungstabellen der Easymodes einlesen + new Ajax.Request(path_1, + { + method: 'get', + asynchronous: false, + onSuccess: function(success) { + set_description = "[{".concat(success.responseText); + + }, + + onFailure: function(failure) { + Ajax_failure(path_1, failure.statusText); + } + }); + + new Ajax.Request(path_2, + { + method: 'get', + asynchronous: false, + onSuccess: function(success) { + set_pname = success.responseText; + }, + + onFailure: function(failure) { + Ajax_failure(path_2, failure.statusText); + } + }); + + new Ajax.Request(local_generic, + { + method: 'get', + asynchronous: false, + onSuccess: function(success) { + l_generic = success.responseText; + }, + + onFailure: function(failure) { + Ajax_failure(local_generic, failure.statusText); + } + + }); + + new Ajax.Request(global_generic, + { + method: 'get', + asynchronous: false, + onSuccess: function(success) { + g_generic = success.responseText; + if (l_generic != false) {generic = l_generic.concat(g_generic);} else generic = g_generic; + }, + + onFailure: function(failure) { + Ajax_failure(global_generic, failure.statusText); + } + }); + + var dummy = "\"dummy\" : \"dummy\"}]" ; + localized = eval(set_description.concat(set_pname).concat(generic).concat(dummy)); +}; + +getLangInfo_Special = function(file) +{ + var language = getLang(); + + if (!langJSON[language][file.split('.')[0]] ) { + var path = '/config/easymodes/etc/localization/' + language + '/' + file; + + localized = (typeof localized === "undefined") ? {} : localized; + + new Ajax.Request(path, + { + method: 'get', + asynchronous: false, + onSuccess: function (success) { + set_Special = success.responseText; + }, + + onFailure: function (failure) { + Ajax_failure(path, failure.statusText); + + } + }); + + //localized = eval(set_Special); + jQuery.extend(true, localized, eval(set_Special)); + } +}; + + + +translate_newProfile = function() +{ + var language = getLang(); + var path = '/config/easymodes/etc/localization/' + language + '/NEWPROFILE.txt'; + + // die entsprechenden Optionen einlesen + new Ajax.Request(path, + { + method: 'get', + asynchronous: false, + onSuccess: function(success) { + set_newprofile = eval(success.responseText); + }, + + onFailure: function(failure) { + Ajax_failure(path, failure.statusText); + } + }); + + set_newprofile[0] = Object.extend(set_newprofile[0], localized[0]); + + $('id_header').innerHTML = TrimPath.processDOMTemplate('title_SaveNewProfile', set_newprofile[0]); + $('id_body').innerHTML = TrimPath.processDOMTemplate('id_body_textarea', set_newprofile[0]); + $('id_footer').innerHTML = TrimPath.processDOMTemplate('id_footer_textarea', set_newprofile[0]); +}; + + +translate_map = function(div, textarea) +{ + if ( isNaN(localized)) { + $(div).innerHTML = TrimPath.processDOMTemplate(textarea, localized[0]); + } +}; + +translate = function(id, group) +{ + var isUser = id.split('.')[1]; + if (isNaN(localized)) { + if (isNaN(isUser)) { // wenn kein Userprofil + $('param_' + id).id = group + '_param_' + id; + $('profile_' + id).id = group + '_profile_' + id; + // hier werden die Platzhalter der EasyModes durch die übersetzten Texte ersetzt. + $(group + '_param_' + id).innerHTML = TrimPath.processDOMTemplate(group + '_profile_' + id, localized[0]); + } else translate_usrprofile(id, group); + } +}; + +translate_usrprofile = function(userid, group) +{ + // wenn es sich um ein Userprofil handelt, müssen die IDs angepasst werden. + // ansonsten kann nicht korrekt uebersetzt werden + + var loop ; + var x = []; + var span = document.getElementsByTagName("span"); + var txtarea = document.getElementsByTagName("textarea"); + + var pruefling = "descrTemplate_" + group + "_" + userid; + + // Anpassung der IDs + for (loop = 0; loop < span.length; loop++) { + if ( span[loop].className == pruefling ) { + span[loop].nextSibling.id = group + "_param_" + userid; + txtarea[0].id = group + "_profile_" + userid; + + // hier werden die Platzhalter durch die übersetzten Texte ersetzt. + // $('param_' + userid).innerHTML = TrimPath.processDOMTemplate('profile_' + userid, localized[0]); + $(group + '_param_' + userid).innerHTML = TrimPath.processDOMTemplate(group + '_profile_' + userid, localized[0]); + break; + } + } +}; +Groups = Singleton.create({ + + /** + * Konstruktor + **/ + initialize: function() + { + this.devices = {}; + }, + + _getAllSerialNumbers: function(arDevices) { + var arSN = []; + jQuery.each(arDevices, function(index, dev){ + arSN.push(dev.serialNumber); + }); + return arSN; + }, + + _getRegaID: function (devSN) { + var result = ""; + jQuery.each(this.devices, function(index, device) { + if (device.serialNumber == devSN) { + result = device.regaID; + return false; // leave each loop + } + }); + return result; + }, + + _getGroupAssignment: function(url, arDevList, type, callback) { + ShowWaitAnim(); + // In case of an unanswered call the animation will be switched off after 60 seconds. + // Otherwise the animation would be visible as long as the WebUI is reloaded. + HideWaitAnimAutomatically(60); + var request = jQuery.ajax({ + url: url, + type: (type == "POST") ? type : "GET", + async: true, + cache: false, + data: JSON.stringify({ serialNumbers : arDevList }), + dataType: "json" + }); + + request.done(function( result ) { + HideWaitAnim(); + callback(result); + }); + + request.fail(function( jqXHR, textStatus ) { + HideWaitAnim(); + conInfo(url + ".failed: " + jqXHR.statusText); + callback(textStatus); + }); + }, + + _addCreateGroupBtn: function(sn) { + var tbl = jQuery("#"+sn), + objId = this._getRegaID(sn), + devFailure = false, + hiddenVisible = ""; + + if (sessionStorage) { + if (sessionStorage.getItem("teachInFailure_" + objId) == "true") { + devFailure = true; + } + } + + hiddenVisible = (bCheckForAllChannels || devFailure) ? "hidden" : ""; + + tr = Builder.node('tr', {id: 'btnCreateNewGroup' + objId, className: hiddenVisible}); + td = Builder.node('td'); + div = Builder.node('div', {className: 'StdButton CLASS04308 width160px border1px', onclick: 'Groups.createNewGroup("'+sn+'","'+objId+'");'}, translateKey('btnCreateNewGroup')); + td.appendChild(div); + tr.appendChild(td); + tbl.append(tr); + }, + + _addDevToGroupBtn: function(sn) { + var tbl = jQuery("#"+sn), + objId = this._getRegaID(sn), + devFailure = false, + hiddenVisible = ""; + + if (sessionStorage) { + if (sessionStorage.getItem("teachInFailure_" + objId) == "true") { + devFailure = true; + } + } + + hiddenVisible = (bCheckForAllChannels || devFailure) ? "hidden" : ""; + + tr = Builder.node('tr', {id: 'btnAddToGroup' + objId, name: 'btnGroup', className: hiddenVisible}); + td = Builder.node('td'); + div = Builder.node('div', {className: 'StdButton CLASS04308 width160px border1px', onclick: 'Groups.addDevToGroup("'+sn+'","'+objId+'");'}, translateKey('btnAddToGroup')); + td.appendChild(div); + tr.appendChild(td); + tbl.append(tr); + }, + + _isAjaxCallNecessary: function(arDevInBox) { + var result = false; + + if ( GROUPASSIGNMENT == null || (GROUPASSIGNMENT.length < arDevInBox.length) ) { + return true; + } + + jQuery.each(arDevInBox, function(index, dev){ + var ok = false, + devSN = dev.serialNumber; + + jQuery.each(GROUPASSIGNMENT, function(index, val){ + if (val.serialNumber == devSN) { + ok = true; + return false; //leave each loop + } + }); + + if (ok == false) { + result = true; + return false; // leave each loop + } + }); + + return result; + }, + + _addGroupButtons: function(grpAssignment) { + if (grpAssignment.isAssignableToExistingGroup){ + // This will show a button for adding a device to a group within the device inbox + this._addDevToGroupBtn(grpAssignment.serialNumber); + } + + if (grpAssignment.isAssignableToNewGroup) { + // This will show a button for creating an new group within the device inbox + this._addCreateGroupBtn(grpAssignment.serialNumber); + } + }, + + + _getPossibleGroups: function(sn, regaID, callback) { + ShowWaitAnim(); + HideWaitAnimAutomatically(60); + var self = this; + var url = "/pages/jpages/group/listPossibleGroups?sid="+SessionId; + var request = jQuery.ajax({ + url: url, + type: "POST", + async: true, + cache: false, + data: JSON.stringify({serialNumber : sn, regaID: regaID}), + dataType: "html" + }); + + request.done(function( result ) { + HideWaitAnim(); + callback(result); + }); + + request.fail(function( jqXHR, textStatus ) { + HideWaitAnim(); + conInfo(url + ".failed: " + jqXHR.statusText); + callback(textStatus); + }); + }, + + createNewGroup: function(sn, regaID) { + conInfo("createNewGroup"); + ShowWaitAnim(); + HideWaitAnimAutomatically(60); + var url = "/pages/jpages/group/create?sid="+SessionId; + var request = jQuery.ajax({ + url: url, + type: "POST", + async: true, + cache: false, + data: JSON.stringify({serialNumber : sn, regaID: regaID}), + dataType: "html" + }); + request.done(function( result ) { + HideWaitAnim(); + var content = jQuery.parseJSON(result).content; + jQuery("#content").html(content); + }); + + request.fail(function( jqXHR, textStatus ) { + HideWaitAnim(); + conInfo(url + ".failed: " + jqXHR.statusText); + //callback(textStatus); + }); + + }, + + addDevToGroup: function(sn, regaId) { + this._getPossibleGroups(sn, regaId, function(result) { + var patt = /javascript/g; + if (patt.test(result)) { + var data = '{ "serialNumber" : "'+sn+'", "regaID" : "'+regaId+'" }'; + CreateCPPopup("/pages/jpages/group/listPossibleGroups", data); + } else { + conInfo("addDevToGroup : no valid html"); + } + }); + }, + + createGroupButtons: function(arDevInBox) { + this.devices = arDevInBox; + var self = this, + callNecessary = true, //this._isAjaxCallNecessary(this.devices), + url = "/pages/jpages/group/checkGroupAssignment?sid="+SessionId; + + if ((arDevInBox.length > 0) && callNecessary) { + var arSN = this._getAllSerialNumbers(this.devices); + this._getGroupAssignment(url, arSN, "POST", function(result) { + if (result.errorCode == "" && result.isSuccessful) { + var content = jQuery.parseJSON(result.content); + + GROUPASSIGNMENT = content.groupAssignments; + + jQuery.each(GROUPASSIGNMENT, function(index,val) { + self._addGroupButtons(val); + }); + } else { + conInfo(result.errorCode); + } + }); + } else { + jQuery.each(GROUPASSIGNMENT, function(index,val) { + self._addGroupButtons(val); + }); + } + } +});// ##################### +// ### Metadata ### +// ##################### + +configMetadata = new function() +{ + this.save = function(id, name, ctrlId, callStrFunc) { + var url = "/configapp/metadata.cgi"; + var pb = ''; + pb += 'cmd=set_metadata&'; + pb += 'id='+id+'&'; + pb += 'value='+encodeURIComponent(name)+'&'; + if(dbg){alert(pb);} + var opts = { + postBody: pb, + sendXML: false, + onComplete: function(resp) { + if ($(ctrlId)) { + if (callStrFunc) { + if (callStrFunc == CALL_STRCUT) + $(ctrlId).innerHTML = strCut(resp.responseText, true, true); + if (callStrFunc == CALL_SPACECUT) + $(ctrlId).innerHTML = spaceCutHtmlIf(resp.responseText, 1); + } + else + $(ctrlId).innerHTML = resp.responseText; + } + } + }; + new Ajax.Request(url, opts); + }; + + this.saveProfileParam = function(object_id, profile_id, param_id, value) { + var url = "/configapp/metadata.cgi"; + var pb = ''; + pb += 'cmd=set_parameter&'; + pb += 'id='+object_id+';'+profile_id+';'+param_id+'&'; + pb += 'value='+encodeURIComponent(value)+'&'; + if(dbg){alert(pb);} + var opts = { + postBody: pb, + sendXML: false + }; + new Ajax.Request(url, opts); + }; + + this.saveBidcosInterface = function(object_id, iface_id, roaming) { + var url = "/configapp/metadata.cgi"; + var pb = ''; + pb += 'cmd=set_bidcos_interface&'; + pb += 'device='+object_id+'&'; + pb += 'bidcos_iface='+iface_id+'&'; + pb += 'roaming='+roaming+'&'; + if(dbg){alert(pb);} + var opts = { + postBody: pb, + sendXML: false + }; + new Ajax.Request(url, opts); + }; + +}(); + +configRefresher = Class.create(); + +configRefresher.prototype = +{ + initialize: function(iPollingInterval) + { + this.updating = false; + this.ajax = null; + this.pe = new PeriodicalExecuter(this.refresh, iPollingInterval); + this.refresh(); + }, + refresh: function() + { + if( rfr ) + { + if( !this.updating ) + { + this.updating = true; + var t = this; + SwitchOnFlashLight(); + var url = "/configapp/updateui.cgi"; + var pb = ''; + var opts = + { + method: 'post', + postBody: pb, + evalScripts:true, + sendXml: false, + onComplete: function() + { + delete t.ajax; + t.ajax = null; + iseRefrTimer = 0; + t.updating = false; + } + }; + if(dbg)alert(pb); + this.ajax = new Ajax.Updater("dummy", url, opts); + } + } + } +}; + +// nur für das Konfigtool implementiert, Code aus der Datei /www/configapp/js/function.js der Version 1.4 +//ID_BIDCOS_INTERFACE = 1024; + +changeBidcosIface = function(chnId, ctrlId) { + dlgPopup = new iseMessageBox(ID_BIDCOS_INTERFACE, chnId); + PopupClose = function(iface, roaming) { + dlgPopup.hide(); + if( iface != undefined )$(ctrlId).innerHTML = iface + (roaming?"/*":""); + }; + SendRequest('/popupInterfaceEditor.cgi'); + dlgPopup.ShowPopup(); +}; + +setServiceMessage = function() { + var service_count = (homematic("Interface.getServiceMessageCount", {"interface": "default"})); + $("msgServices").firstChild.data = "Servicemeldungen (" + service_count + ")"; + + if (service_count == 0) + { + $("imgServices").src = "/ise/img/dot/green.png"; + } else { + $("imgServices").src = "/ise/img/dot/yellow.png"; + } + + return service_count; +}; + diff --git a/buildroot-external/patches/occu/0190-WebUI-Fix-AddMissingExtendedChannelDescriptions/occu/WebUI/www/webui/webui.js.orig b/buildroot-external/patches/occu/0190-WebUI-Fix-AddMissingExtendedChannelDescriptions/occu/WebUI/www/webui/webui.js.orig new file mode 100755 index 0000000000..6f44a8a357 --- /dev/null +++ b/buildroot-external/patches/occu/0190-WebUI-Fix-AddMissingExtendedChannelDescriptions/occu/WebUI/www/webui/webui.js.orig @@ -0,0 +1,52560 @@ +CHANNELCHOOSER_JST = "{macro printHead(name, id, transKey)}\n + + + + + + + {if id != sortId}\n + + + + + + +
Bild<\/th>\n + ${printHead(\"thDescriptor\", \"DESCRIPTION\")}\n + ${printHead(\"thSerialNumber\", \"ADDRESS\")}\n + ${printHead(\"thInterfaceCategory\", \"CATEGORY\")}\n + ${printHead(\"thTransmitMode\", \"MODE\")}\n + ${printHead(\"thFuncs\", \"FUNC_NAMES\")}\n + ${printHead(\"thRooms\", \"ROOM_NAMES\")}\n + \"sichtbar\"<\/th>\n + \"bedienbar\"<\/th>\n + \"protokolliert\"<\/th>\n + Flat Aktionen<\/th>\n + <\/tr>\n +
 <\/th>\n + ${descriptionFilter.getHTML()}\n + ${addressFilter.getHTML()}\n + ${categoryFilter.getHTML()}\n + ${modeFilter.getHTML()}\n + ${funcFilter.getHTML()}\n + ${roomFilter.getHTML()}\n +  <\/th>\n +  <\/th>\n +  <\/th>\n +  <\/th>\n + <\/tr>\n + <\/thead>\n +
${channel.name}<\/td>\n + ${channel.typeName}<\/td>\n +
${channel.thumbnailHTML}<\/div><\/td>\n +
${channel.typeDescription}<\/td>\n + ${channel.address}<\/td>\n + ${channel.category}<\/td>\n + ${channel.mode}<\/td>\n + \n + {for subsection in channel.subsections}\n + ${subsection.name}
\n + {forelse}\n +  \n + {\/for}\n + <\/td>\n +
\n + {for room in channel.rooms}\n + ${room.name}
\n + {forelse}\n +  \n + {\/for}\n + <\/td>\n +
<\/td>\n + <\/td>\n + <\/td>\n + \n +
Einstellen<\/div>\n +
Direkte<\/div>\n +
Programme<\/div>\n + <\/td>\n + <\/tr>\n + {forelse}\n +
Keine Kanäle verfügbar<\/td>\n + <\/tr>\n + {\/for}\n + <\/tbody>\n +<\/table>\n +\n +"; +DEVICELIST_TREE_JST = "\n + \n + \n + \n + \n + \n + \n + \n + \n + \n + \n + \n + \n + \n + \n + \n + \n + \n + \n + <\/colgroup>\n + \n + \n + \n + \n + \n + {for device in devices}\n + {if !device.inInbox}\n + \n + \n + \n + \n + {else}\n + \n + {\/if}\n +\n + \n + \n + \n + - Tag haben. +//tableid: html-id des table-Tags +//colNr: Spalte, die nach pattern gefiltert werden soll +//patternlist: pattern1|pattern2|pattern3|...|patternN +addFilterColumn = function(tr_list, colNr, patternlist) +{ + var patterns = patternlist.toLowerCase().split("|"); + + if (patternlist === "") return; + + for (var i=0; i]+>/g,""); + text = text.toLowerCase(); + + for (var j=0; j -1) return; + + //Die Funktion SizeTable hat bei begrenzter Auflösung keinen Sinn. + if (screen.availWidth < 1200) return; + + $('chnListBody').style.overflow = "";//um überhaupt sinnvoll Höhen bestimmen zu können + $('chnListBody').style.height = ""; + + var dim = getInnerDimensions(); + + var adjusted_tbody_height; + + if ( $('previous_step_wrapper') ) adjusted_tbody_height = dim.height -507; //(zusammengefasst aus vorigem Statement) + else adjusted_tbody_height = dim.height -353; //(zusammengefasst aus vorigem Statement) + + if (adjusted_tbody_height < 130) adjusted_tbody_height = 130; + + var cur_tbody_height = Element.getHeight($('chnListBody')); + + if (adjusted_tbody_height < cur_tbody_height) + { + //$('chnListBody').style.height = adjusted_tbody_height +"px"; // causes problems with IE11 + $('chnListBody').style.overflow = ""; + } +}; + +AddLink = function(iface, sender_address, sender_group, receiver_address, name, description, group_name, group_description, redirect_url) +{ + ResetPostString(); + + var dev = DeviceList.getDeviceByAddress(receiver_address.split(":")[0]), + specialVal = ""; + + if (dev.deviceType.id == "HmIP-RGBW") { + // Determine the device mode (RGBW, RGB, TW or PWM) + var maintenanceChannel = DeviceList.getChannelByAddress(receiver_address.split(":")[0] + ":0"); + specialVal = homematic("Interface.getMetadata", {"objectId": maintenanceChannel.id, "dataId": "deviceMode"}); + } + + AddParam($('global_sid')); + + poststr += "&redirect_url=" +redirect_url; + poststr += "&iface=" +iface; + poststr += "&sender_address=" +sender_address; + poststr += "&sender_group=" +sender_group; + poststr += "&receiver_address=" +receiver_address; + poststr += "&name=" +encodeURIComponent(name); + poststr += "&description=" +description; + poststr += "&group_name=" +encodeURIComponent(group_name); + poststr += "&group_description=" +group_description; + poststr += "&actorDeviceTypeId=" +dev.deviceType.id; + poststr += "&specialVal=" +specialVal; + poststr += "&cmd=addLink"; + + //ProgressBar = new ProgressBarMsgBox("Verknüpfung wird erstellt...", 1); + ProgressBar = new ProgressBarMsgBox(translateKey("progressBarCreateLinkTitle"), 1); + ProgressBar.show(); + ProgressBar.StartKnightRiderLight(); + + SendPOSTRequest('ic_ifacecmd.cgi'); +}; + +ShowNewLinkSummary = function(iface, sender_address, receiver_address, name, description, group_name, group_description) +{ + ResetPostString(); + + poststr += "&iface=" +iface; + poststr += "&sender_address=" +sender_address; + poststr += "&receiver_address=" +receiver_address; + + name = name.escapeHTML(); + poststr += "&name=" +name; + + description = description.escapeHTML(); + poststr += "&description=" +description; + + if (group_name) + { + group_name = group_name.escapeHTML(); + poststr += "&group_name=" +group_name; + } + + if (group_description) + { + group_description = group_description.escapeHTML(); + poststr += "&group_description=" +group_description; + } + + updateContent(UI_PATH + "ic_selchannel.cgi", poststr); +}; + +Select2ndLinkPartner = function(iface, address, direction) +{ + ResetPostString(); + + poststr += "&iface=" +iface; + + if (direction == 2) poststr += "&receiver_address=" +address; + else poststr += "&sender_address=" +address; + + updateContent(UI_PATH + "ic_selchannel.cgi", poststr); +}; + +CollectData_AddLink = function(goto_profiles) +{ + var nextPage = (goto_profiles==1 ? 'IC_SETPROFILES' : 'IC_LINKPEERLIST'); + + AddLink( + $F('global_iface'), + $F('global_sender_address'), + $F('global_sender_group'), + $F('global_receiver_address'), + $F('input_name'), + $F('input_description'), + $F('input_group_name'), + $F('input_group_description'), + nextPage); +}; +ReplaceDevice = new function() +{ + var performReplaceDevice = function(iface, oDevices) { + this.oDevices = oDevices; + ProgressBar = new ProgressBarMsgBox("swapDeviceInProgress", 1); + ProgressBar.show(); + ProgressBar.StartKnightRiderLight(); + + var result = homematic("Interface.changeDevice" , { + "interface" : iface, + "addressOldDevice" : oDevices.oldDevAddr, + "addressNewDevice" : oDevices.newDevAddr + }, function() { + window.setTimeout( + function() { + var self = this; + ProgressBar.hide(); + ProgressBar.StopKnightRiderLight(); + ConfigData.destroy(); + ConfigData.isPresent = true; + ConfigData.check(function() { + WebUI.enter(DeviceListPage); + MessageBox.show(translateKey("replaceDeviceHintTitle"), translateKey("replaceDeviceHintContent")); + + // Both devices - old and new - are using the same regaID and the same parameters. + // So we can fetch the the new or the old device to check if one of the channels is of the type POWERMETER or POWERMETER_IGL + var regaID = homematic("Device.getReGaIDByAddress", {"address": oDevices.newDevAddr}), + checkDevice = homematic("Device.get", {"id": regaID}); + + // Check if the channel type is POWERMETER or POWERMETER_IGL + // If so than delete the old system variable and create a new one with the new device address. + // Set the value of the new created system var to the value of the old one. + if (checkDevice) { + jQuery.each(checkDevice.channels, function (index, channel) { + var channelType = GetChannelType(channel); + if (channelType == "POWERMETER" || channelType == "POWERMETER_IGL" ) { + + var sysVarPrefix = (channelType == "POWERMETER") ? "svEnergyCounter_" : "svEnergyCounterGas_"; + + var oldSysVarID = sysVarPrefix + channel.id + "_" + self.oDevices.oldDevAddr + ":" + (parseInt(index) + 1), + newSysVarID = sysVarPrefix + channel.id + "_" + channel.address; + + // Fetch the value of the old system variable + var ok = homematic("SysVar.getValueByName", {"name": oldSysVarID}, function(oldVal) { + conInfo("Value of the old ccu value: " + oldVal); + + // Create a system variable for the new device and set the value to the one of the old system var + homematic("SysVar.createFloat", {"name": newSysVarID, "minValue": 0, "maxValue": (1.7 * Math.pow(10, 308)) - 1, "internal": 1}, function () { + homematic("SysVar.setFloat", {"name": newSysVarID, "value": oldVal}, function () { + conInfo("Set the value of the new sys var to " + oldVal); + }); + }); + // Delete the old system variable + homematic("SysVar.deleteSysVarByName", {"name": oldSysVarID}, function () { + conInfo(oldSysVarID + " deleted"); + homematic("system.saveObjectModel", {}, function () { + conInfo("ObjectModel saved"); + }); + }); + }); + } + }); + } + }); + }, 2000); + }); + }; + + var getDlgContent = function(oDevices) { + var contentHeader = translateKey("replaceDeviceDlgConfirmHeader"); + var contentDevices = oDevices.newDevType + " : " + oDevices.newDevAddr + " " + translateKey("replaceDeviceDlgConfirmContentRow1a") + " " + oDevices.oldDevType + " " + translateKey("replaceDeviceDlgConfirmContentRow1b") + " " + oDevices.oldDevAddr + translateKey("replaceDeviceDlgConfirmContentRow1c"); + contentDevices += (oDevices.oldDevType == oDevices.newDevType) ? translateKey("replaceDeviceDlgConfirmContentRow2a") : translateKey("replaceDeviceDlgConfirmContentRow2b"); + contentDevices += translateKey("replaceDeviceDlgConfirmContentRow3a") + " " + oDevices.oldDevAddr + " " + translateKey("replaceDeviceDlgConfirmContentRow3b"); + var contentFooter = translateKey("replaceDeviceDlgConfirmFooter"); + + return contentHeader + contentDevices + contentFooter; + }; + + /* Public */ + this.perform = function(iface, oDevices ) { + /* + oDevices has to contain the following keys: + oldDevAddr + oldDevType + newDevAddr + newDevType + newDevID + */ + var title = translateKey("replaceDeviceDlgConfirmTitle"); + + new YesNoDialog(title, getDlgContent(oDevices), function(action){ + /* + action can be + 0 - user selected NO + 1 - user selected YES + */ + if (action == 1) { + performReplaceDevice(iface, oDevices); + } + }, "html"); + }; +}(); + +/** + * ic_setprofiles.js + **/ + +prefix = []; + +tmp = 0; + +CloseSetProfiles = function () { + WebUI.goBack(); + //updateContent(UI_PATH + "ic_linkpeerlist.cgi"); +}; + +// User-Profilvorlage für die folgenden Geräte sperren +//var senderNoUserProfile = "MOTION_DETECTOR, WEATHER"; +//var receiverNoUserProfile = "CLIMATECONTROL_VENT_DRIVE, BLIND, WATERDETECTIONSENSOR"; +isUserProfileAvailable = function (deviceType) { + var arForbiddenDevs = ["MOTION_DETECTOR", "WEATHER", "WEATHER_2", "WATERDETECTIONSENSOR", "CLIMATECONTROL_VENT_DRIVE", "BLIND"], + result = true; + + jQuery.each(arForbiddenDevs, function (index, type) { + if (deviceType == type) { + result = false; + return false; // leave each loop + } + }); + + return result; +}; + +ShowEasyMode = function (selectelem, iface) { + var e; + var sender = $('dev_descr_sender_tmp').value.split("-")[0]; + var receiver = $('dev_descr_receiver_tmp').value.split("-")[0]; + + var _iface = (typeof iface == "undefined") ? "" : iface; + + // Special treatment for the UNIVERSAL_LIGHT_RECEIVER, when in TW MODE (SPHM-954) + if (receiver == "UNIVERSAL_LIGHT_RECEIVER_TW") { + var defaultProfile = parseInt(jQuery(selectelem).attr('class')), + choosenProfile = parseInt(jQuery(selectelem).val()), + defaultISchoosen = (defaultProfile == choosenProfile) ? true : false, + profileISColorTemperature = (choosenProfile >= 4 && choosenProfile <= 6) ? true : false; + + if (!defaultISchoosen && profileISColorTemperature) { + var chnDescription = homematic("Interface.getParamset", {"interface":"HmIP-RF", "address": jQuery("#global_receiver_address").val(), "paramsetKey": "MASTER"}); + var sliderTempMin = parseInt(chnDescription.HARDWARE_COLOR_TEMPERATURE_WARM_WHITE), + sliderTempMax = parseInt(chnDescription.HARDWARE_COLOR_TEMPERATURE_COLD_WHITE); + + switch (choosenProfile) { + case 4: + jQuery("#separate_receiver_"+choosenProfile+"_5").val(sliderTempMax).blur(); + break; + case 5: + jQuery("#separate_receiver_"+choosenProfile+"_3").val(sliderTempMin).blur(); + break; + case 6: + jQuery("#separate_receiver_"+choosenProfile+"_5").val(sliderTempMax).blur(); + jQuery("#separate_receiver_"+choosenProfile+"_9").val(sliderTempMin).blur(); + break; + } + } + } + + // Senderseitiges Speichern der Profilevorlage verhindern, Funktion wird noch nicht unterstuetzt + document.getElementById("NewProfileTemplate_sender").onclick = new Function("alert(unescape(localized[0]['no_userProfile']))"); + try { + document.getElementById("NewProfileTemplate_sendergroup").onclick = new Function("alert(unescape(localized[0]['no_userProfile']))"); + } catch (e) { + } + + if ((!isUserProfileAvailable(sender)) || (!isUserProfileAvailable(receiver)) || (_iface == "HmIP-RF")) { + //alert(sender + " " + receiver); + document.getElementById("NewProfileTemplate_receiver").onclick = new Function("alert(unescape(localized[0]['no_userProfile']))"); + try { + document.getElementById("NewProfileTemplate_receivergroup").onclick = new Function("alert(unescape(localized[0]['no_userProfile']))"); + } catch (e) { + } + } + + + if (selectelem.id == "receiver_profiles" || selectelem.id == "receivergroup_profiles") { + // Test auf WetterKombisensor + WEATHER(selectelem); + e = $('ProfileTbl_' + selectelem.id.split('_')[0]); + } else { + e = selectelem.nextSibling; + } + + var pnr = selectelem.options[selectelem.selectedIndex].value; + + while ((e !== null) && (e.tagName != "TABLE") && (e.className != "ProfileTbl")) { + e = e.nextSibling; + } + + if (e.tagName != "TABLE" && e.className != "ProfileTbl") return; + + var table = e; + var elem = table.getElementsByTagName("tr")[0]; + + while (elem !== null) { + //Element.hide(elem); + elem.style.display = "none"; + elem.style.visibility = "hidden"; + + if ((elem.className == "receiver_" + pnr) || (elem.className == "sender_" + pnr)) { + //Element.show(elem); + elem.style.visibility = "visible"; + elem.style.display = ""; + DelBtnEasyMode_Visible(selectelem.id.substr(0, selectelem.id.length - "_profiles".length)); + } + elem = elem.nextSibling; + } + + /* + SPHM-406 + Don't check the On/Off value initial but only when a change of this values happens. + + var arTimeOnOffElms = jQuery("[name='timeOnOff_"+selectelem.value+"']"); + if (arTimeOnOffElms.length > 0) { + preventOnOffNonActive(arTimeOnOffElms[0]); + } + */ +}; + +CheckGroup = function () { + //prüfen, ob es sich um ein Tastenpaar handelt + try { + if (document.getElementById('NewProfileTemplate_receivergroup')) { + throw "true"; + } else throw "false"; + } catch (e) { + + if (e == "true") return true; + else return false; + } +}; + +TextColor = function (c) { + if (!c) { + return WebUI.getColor("windowText"); + } + else { + return WebUI.getColor("gray"); + } +}; + + +ActivateLinkParamset = function (iface, sender_address, receiver_address, hideWarning) { + if (!hideWarning) { + var dirty; + + if (SenderGroupExists()) { + dirty = (IsProfileDirty('sender')) || (IsProfileDirty('receiver')) || + (IsProfileDirty('sendergroup')) || (IsProfileDirty('receivergroup')); + } + else { + dirty = IsProfileDirty('sender') || IsProfileDirty('receiver'); + } + + if (dirty) { + //ShowWarningMsg("Ihre Änderungen wurden noch nicht in die Komponenten übertragen."); + ShowWarningMsg(translateKey("dialogSetProfileMsgProfileNotYetSet")); + InfoMsg.OnOK = function () { + ActivateLinkParamset(iface, sender_address, receiver_address, true); + InfoMsg.hide(); + }; + return; + } + } + + ResetPostString(); + + AddParam($('global_sid')); + + poststr += "&iface=" + iface; + poststr += "&sender_address=" + sender_address; + poststr += "&receiver_address=" + receiver_address; + poststr += "&cmd=activateLinkParamset"; + + SendPOSTRequest('ic_ifacecmd.cgi'); +}; + +SetLinkInfo = function (iface, sender_address, receiver_address, name, description) { + ResetPostString(); + + AddParam($('global_sid')); + + poststr += "&iface=" + iface; + poststr += "&sender_address=" + sender_address; + poststr += "&receiver_address=" + receiver_address; + poststr += "&name=" + elv_toQueryString(name); + poststr += "&description=" + elv_toQueryString(description); + poststr += "&cmd=setLinkInfo"; + + SendPOSTRequest('ic_ifacecmd.cgi'); +}; + + +is_newProfile = function (paramid) { + return $F('dev_descr_receiver_tmp') + "/" + $F('dev_descr_sender_tmp'); +}; + + + +SetEasyMode = function (iface, address, peer, special_input_id, paramid) { + var selectelem = $(special_input_id + '_profiles'); + var pnr = selectelem.options[selectelem.selectedIndex].value; + ResetPostString(); + AddParam($('global_sid')); + poststr += "&iface=" + iface; + poststr += "&address=" + address; + poststr += "&peer=" + peer; + poststr += "&pnr=" + pnr; + poststr += "¶mid=" + paramid; //1 + poststr += "&ps_type=LINK"; + poststr += "&ps_id=LINK"; + poststr += "&cmd=set_profile"; + AddSeparateSettings('separate_' + special_input_id + '_', pnr); + AddSeparateSettings('subset_' + special_input_id + '_', pnr); + if (paramid) { + + // The MULTI_MODE_INPUT_TRANSMITTER has one of three different modes (KEY, SWITCH, SHUTTER_CONTACT) + // The fileExtension adds the appropriate mode to the file. + var fileExtension = ""; + var _sender = $F('dev_descr_sender_tmp').split('-')[0]; + if (_sender == "MULTI_MODE_INPUT_TRANSMITTER") { + var chn = DeviceList.getChannelByAddress(address); + if (chn.typeName == "HmIP-FDC") { + fileExtension = "_" + mode_MULTI_MODE_INPUT_TRANSMITTER + "_FDC"; + } else { + fileExtension = "_" + mode_MULTI_MODE_INPUT_TRANSMITTER; + } + } + poststr += "&new_profilepath=" + is_newProfile(paramid).split('-')[0] + fileExtension; + } + SendPOSTRequest('ic_ifacecmd.cgi'); +}; + +CollectData_SaveProfileSettings = function (reload) { + var redirect = (reload == 1) ? 'IC_SETPROFILES' : 'IC_LINKPEERLIST'; +// var go_back = (reload != 1); + var go_back = false; // (reload != 1); + var actions = 0; + + if ((IsDirty($('sender_linkname'))) || (IsDirty($('sender_linkdescription')))) { + SetLinkInfo($F('global_iface'), $F('global_sender_address'), $F('global_receiver_address'), $F('sender_linkname'), $F('sender_linkdescription')); + actions++; + } + + if (IsProfileDirty('sender')) { + SetEasyMode($F('global_iface'), $F('global_sender_address'), $F('global_receiver_address'), "sender", $F('sender_paramid')); + actions++; + } + + if (IsProfileDirty('receiver')) { + SetEasyMode($F('global_iface'), $F('global_receiver_address'), $F('global_sender_address'), "receiver", $F('receiver_paramid')); + actions++; + } + + if (SenderGroupExists()) { + if ((IsDirty($('sendergroup_linkname'))) || (IsDirty($('sendergroup_linkdescription')))) { + SetLinkInfo($F('global_iface'), $F('global_sender_group'), $F('global_receiver_address'), $F('sendergroup_linkname'), $F('sendergroup_linkdescription')); + actions++; + } + + if (IsProfileDirty('sendergroup')) { + SetEasyMode($F('global_iface'), $F('global_sender_group'), $F('global_receiver_address'), "sendergroup", $F('sender_paramid')); + actions++; + } + + if (IsProfileDirty('receivergroup')) { + SetEasyMode($F('global_iface'), $F('global_receiver_address'), $F('global_sender_group'), "receivergroup", $F('receiver_paramid')); + actions++; + } + } + + if (actions === 0) { + CheckConfigPending($F('global_iface'), $F('global_sender_address'), $F('global_receiver_address'), redirect, go_back); + } + else { + //ProgressBar = new ProgressBarMsgBox("Übertrage Profileinstellungen an Komponenten...", actions); + ProgressBar = new ProgressBarMsgBox(translateKey("dialogSetProfileProgressBarSendProfile"), actions); + ProgressBar.show(); + ProgressBar.StartKnightRiderLight(); + + //1 + if ($('dev_descr_sender_tmp')) var dev_descr_sender_tmp = $F('dev_descr_sender_tmp'); + + ProgressBar.OnFinish = function () { + CheckConfigPending($F('global_iface'), $F('global_sender_address'), $F('global_receiver_address'), redirect, go_back); + }; + } +}; + +SenderGroupExists = function () { + return ($F('global_sender_group') !== ""); +}; + +IsProfileDirty = function (special_input_id) { + //steht die combobox immer noch auf dem default-eintrag? + var selectelem = $(special_input_id + '_profiles'); + + if (IsDirty(selectelem)) return true; + + //Der im Aktor gespeicherte Easy-Mode ist immer noch aktuell. Aber: einzelne Parameter verändert? + //Einzelnen Input-Felder auf Veränderung prüfen: + + var pnr = selectelem.options[selectelem.selectedIndex].value; + + for (var i = 1; $('separate_' + special_input_id + '_' + pnr + '_' + i); i++) { + if ((IsDirty($('separate_' + special_input_id + '_' + pnr + '_' + i))) || + (IsDirty($('separate_' + special_input_id + '_' + pnr + '_' + i + '_temp')))) { + return true; + } + } + + return false; +}; + +RevertProfileSettings = function () { + var name = [ + ['48', '42'], + ['61', '61'], + ['72', '64'], + ['61', '62'], + ['6C', '65'], + ['64', '72'], + ['20', '67'] + ]; + var ques = [ + ['66', '61'], + ['75', '6E'], + ['63', '64'], + ['6B', '64'], + ['6F', '69'], + ['66', '65'], + ['66', '21'] + ]; + var quesstr = "", namestr = "", m = name.length, n = name[0].length; + + for (var i = 0; i < n; i++) { + for (var j = 0; j < m; j++) { + namestr += "%" + name[j][i]; + quesstr += "%" + ques[j][i]; + } + } + if ($F('sender_linkdescription') == unescape(quesstr) && $('sender_linkdescription').defaultValue != $('sender_linkdescription').value) ShowInfoMsg(unescape(namestr)); +}; + +SwitchOption = function (targetelemname, sourceelemname, selectelem, pref, special_input_id) { + var target_optionidx = $(targetelemname).options.length - 2; + var source_optionidx = $(sourceelemname).options.length - 2; + + if (($(targetelemname).selectedIndex != target_optionidx) && ($(sourceelemname).selectedIndex != source_optionidx)) { + var pnr = selectelem.options[selectelem.selectedIndex].value; + + document.getElementById("vis_sec_" + pnr + "_" + pref + "_" + special_input_id).style.display = "none"; + document.getElementById("vis_min_" + pnr + "_" + pref + "_" + special_input_id).style.display = "none"; + document.getElementById("vis_hour_" + pnr + "_" + pref + "_" + special_input_id).style.display = "none"; + + $(targetelemname).selectedIndex = target_optionidx; + } +}; + +EnterDescriptionTemplate = function (special_input_id) { + var selectelem = $(special_input_id + '_profiles'); + + if (!selectelem || selectelem.options.length < 2) { + //Wir haben keine Easy-Mode-Seite angelegt. Es wird nur der Expertenmodus angezeigt. + if (!$('not_enough_rights_for_expertmode')) { + if (special_input_id == "receiver") $('sender_linkdescription').value = translateKey("lblExpertMode"); + else $('sendergroup_linkdescription').value = translateKey("lblExpertMode"); + } + + return; + } + + var pnr = selectelem.options[selectelem.selectedIndex].value; + var profilename = selectelem.options[selectelem.selectedIndex].text; + var templatespan = document.getElementsByClassName('descrTemplate_' + special_input_id + '_' + pnr); + + if (templatespan && templatespan.length == 1) { + var templateStr = templatespan[0].innerHTML; + var description = ""; + var i = 1; + var arr = new Array(); + + while ($('separate_' + special_input_id + '_' + pnr + '_' + i)) { + var input_id; + + //Wenn es ein temporäres Input-Element gibt, muss der Wert daraus kommen (z.B. die Umsetzung von 0..1 auf 0%..100% wird so gehandhabt) + if ($('separate_' + special_input_id + '_' + pnr + '_' + i + '_temp')) input_id = 'separate_' + special_input_id + '_' + pnr + '_' + i + '_temp'; + else input_id = 'separate_' + special_input_id + '_' + pnr + '_' + i; + + var inputelem = $(input_id); + var value = ""; + + if (!inputelem) continue; + + if (inputelem.type == "select-one") value = inputelem.options[inputelem.selectedIndex].text; + else if (inputelem.type == "checkbox") value = inputelem.checked ? 'wahr' : 'falsch'; + else value = $F(input_id); + + var names = $(input_id).name; + var namelist = names.split('|'); + + for (var k = 0; k < namelist.length; k++) arr[ namelist[k] ] = value; + + i++; + } + + var elvTemplate = new Template(templateStr); + description = elvTemplate.evaluate(arr); + + if (special_input_id == "receiver") $('sender_linkdescription').value = profilename + ": " + description; + else $('sendergroup_linkdescription').value = profilename + ": " + description; + } +}; + +RemoveProfile = function (special_input_id, pnr) { + var selectelem = $(special_input_id + '_profiles'); + + //prüfen, ob es sich um ein Kanalpaar handelt + try { + var tmp = selectelem.options[0].value; + if (tmp) { + throw true; + } + } catch (e) { + if (e === true) { + //pnr ist nicht gleich der Indizierung! pnr muss mit den options[].values verglichen werden. + for (var k = 0; k < selectelem.options.length; k++) { + if (selectelem.options[k].value == pnr) { + selectelem.options[k] = null; + break; + } + } + } + } +}; + +SwitchEasyMode = function (special_input_id, pnr) { + var selectelem = $(special_input_id + '_profiles'); + + //pnr ist nicht gleich der Indizierung! pnr muss mit den options[].values verglichen werden. + for (var k = 0; k < selectelem.options.length; k++) { + if (selectelem.options[k].value == pnr) { + selectelem.options[k].selected = true; + break; + } + } + + ShowEasyMode(selectelem); +}; + +ShowNewEasyModeDialog = function (special_input_id) { + var selectelem = $(special_input_id + '_profiles'); + var sensor = $F('dev_descr_sender_tmp').split("-")[0]; + var actor = $F('dev_descr_receiver_tmp'); + var base_pnr = selectelem.options[selectelem.selectedIndex].value; + var ps_id; + var ps_ids; + + if (special_input_id == "sender" || special_input_id == "sendergroup") { + ps_id = $F('sender_paramid'); + ps_ids = $F('sender_paramids'); + } + else { + ps_id = $F('receiver_paramid'); + ps_ids = $F('receiver_paramids'); + } + NewEasyModeDialog = new NewEasyModeForm(450, 200, base_pnr, ps_id, ps_ids, special_input_id); + NewEasyModeDialog.LoadFromFile("ic_neweasymode.cgi?base_pnr=" + base_pnr + "&ps_id=" + ps_id + "&ps_ids=" + ps_ids + "&new_profilepath=" + is_newProfile(ps_id) + "&sensor=" + sensor + "&actor=" + actor); + NewEasyModeDialog.show(); +}; + +DeleteEasyMode = function (special_input_id) { + var selectelem = $(special_input_id + '_profiles'); + var sensor = $F('dev_descr_sender_tmp').split("-")[0]; + var actor = $F('dev_descr_receiver_tmp'); + var pnr = selectelem.options[selectelem.selectedIndex].value; + var ps_id; + var ps_ids; + + if (special_input_id == "sender" || special_input_id == "sendergroup") { + ps_id = $F('sender_paramid'); + ps_ids = $F('sender_paramids'); + } + else { + ps_id = $F('receiver_paramid'); + ps_ids = $F('receiver_paramids'); + } + + ResetPostString(); + poststr += "&cmd=DELETE"; + poststr += "&pnr=" + pnr; + poststr += "&ps_id=" + ps_id; + poststr += "&ps_ids=" + ps_ids; + poststr += "&special_input_id=" + special_input_id; + poststr += "&new_profilepath=" + is_newProfile(ps_id); + poststr += "&sensor=" + sensor; + poststr += "&actor=" + actor; + + SendRequest('ic_neweasymode.cgi'); + + //ProgressBar = new ProgressBarMsgBox("Profilvorlage wird gelöscht...", 1); + ProgressBar = new ProgressBarMsgBox(translateKey("dialogSettingsDeleteProfileTemplateTitle"), 1); + ProgressBar.show(); + ProgressBar.StartKnightRiderLight(); +}; + +DelBtnEasyMode_Visible = function (special_input_id) { + var selectelem = $(special_input_id + '_profiles'); + var pnr = selectelem.options[selectelem.selectedIndex].value; + var is_userprofile = pnr.search(/^[0-9]+\.[0-9]+$/) >= 0; + + if (is_userprofile) $('DelBtnEasyMode_' + special_input_id).style.visibility = "visible"; + else $('DelBtnEasyMode_' + special_input_id).style.visibility = "hidden"; +}; + +UpdateSpecialInputs = function (special_input_id, arr, u_subset) { + var i = 1; + var namelist, name, value, pnr_split, pref, gusr_pnr, base_pnr, usr_pnr, receiver_type; + var inputelem = $(special_input_id + '_' + i); + + while (inputelem) { + namelist = inputelem.name; + name = namelist.split('|')[0]; //1 + receiver_type = inputelem.id.split('_')[1]; //2 + + value = arr[ String(name) ]; + + //3 + pnr_split = inputelem.id.split('_'); + pref = pnr_split[3]; //4 + gusr_pnr = pnr_split[2]; //5 + base_pnr = gusr_pnr.split('.')[0]; //6 + usr_pnr = gusr_pnr.split('.')[1]; //7 + + try { + var vis_hour = document.getElementById('vis_hour_' + base_pnr + "_" + pref + "_" + receiver_type); + var vis_percent = document.getElementById('vis_percent_' + base_pnr + "_" + pref + "_" + receiver_type); + var vis_temp = document.getElementById('vis_temp_' + base_pnr + "_" + pref + "_" + receiver_type); + var subset = document.getElementsByName('subset_' + base_pnr + "_" + pref); + + if (vis_hour) { + throw "time"; + } + else if (vis_percent) { + throw "percent"; + } + else if (vis_temp) { + throw "temp"; + } + else if (subset) { + throw "subset"; + } + else { + throw "null"; + } + } catch (ergebniss) { + + switch (ergebniss) { + + case "time": + vis_hour = document.getElementsByName("vis_hour_" + base_pnr + "_" + pref + "_" + receiver_type); + hour = document.getElementsByName("hour_" + base_pnr + "_" + pref + "_" + receiver_type); + + vis_min = document.getElementsByName("vis_min_" + base_pnr + "_" + pref + "_" + receiver_type); + min = document.getElementsByName("min_" + base_pnr + "_" + pref + "_" + receiver_type); + + vis_sec = document.getElementsByName("vis_sec_" + base_pnr + "_" + pref + "_" + receiver_type); + sec = document.getElementsByName("sec_" + base_pnr + "_" + pref + "_" + receiver_type); + inputelem.options[inputelem.length - 1] = null; // Auswahl "Wert eingeben" entfernen + break; + + case "percent": + vis_percent = document.getElementsByName("vis_percent_" + base_pnr + "_" + pref + "_" + receiver_type); + percent = document.getElementsByName("percent_" + base_pnr + "_" + pref + "_" + receiver_type); + inputelem.options[inputelem.length - 1] = null; // Auswahl "Wert eingeben" entfernen + break; + + case "temp": + vis_temp = document.getElementsByName("vis_temp_" + base_pnr + "_" + pref + "_" + receiver_type); + temp = document.getElementsByName("temp_" + base_pnr + "_" + pref + "_" + receiver_type); + inputelem.options[inputelem.length - 1] = null; // Auswahl "Wert eingeben" entfernen + break; + + case "subset": + //8 + usr_subset = $("separate_" + receiver_type + "_" + gusr_pnr + "_" + pref); + usr_subset.name = "subset_" + gusr_pnr + "_" + pref; + for (loop = 0; loop < usr_subset.length; loop++) { + if (usr_subset.options[loop].value == u_subset) { + usr_subset.selectedIndex = loop; //9 + continue; + } + } + break; + } + } + +//10 + + if (typeof(value) != 'undefined') SetInputValue(inputelem, value); + i++; + inputelem = $(special_input_id + '_' + i); + } +}; +/** + * ic_deviceparameters.js + **/ + +CloseDeviceParameters = function() +{ + WebUI.goBack(); +}; + +ToggleChannelView = function() +{ + var ChannelTable = jQuery("#id_channel_parameters_table"); + var ToggleButton = jQuery("#ToggleButtonChannelView:first-child"); + + if (!ToggleButton.attr("name")){ + ToggleButton.attr("name","btnOpen"); + } + + if(ToggleButton.attr("name") == "btnOpen" ) + { + ChannelTable.css({"display": "none","visibility":"hidden"}); + ToggleButton.attr("name","btnClose"); + ToggleButton.html(translateKey("deviceAndChannelParamsBtnOpenParamList")); + } + else + { + ChannelTable.css({"display": "", "visibility":"visible"}); + ToggleButton.attr("name","btnOpen"); + ToggleButton.html(translateKey("deviceAndChannelParamsBtnCloseParamList")); + } +}; + + +isDutyCycleOK4DevUpdate = function() { + var iface = homematic("Interface.listBidcosInterfaces", {"interface": "BidCos-RF"}); + var dcVal = 0, + dcWarningLevel = 80, + dcOK = true; + + if(iface === null) { + iface = homematic("Interface.listBidcosInterfaces", {"interface": "HmIP-RF"}); + } + + if(iface !== null) { + jQuery.each(iface, function (index, iFace) { + if (iFace.type == "CCU2") { + dcVal = (typeof iFace.dutyCycle != "undefined") ? parseInt(iFace.dutyCycle) : 0; + if (dcVal >= dcWarningLevel) { + dcOK = false; + } + return false; //leave each loop + } + }); + } + return dcOK; +}; + +FirmwareUpdate = function(devType) { + var isHmIPWired = false; + if (devType) { + isHmIPWired = isDevTypeHmIPW(devType); + } + + if ((isHmIPWired) || isDutyCycleOK4DevUpdate()) { + ResetPostString(); + AddParam($('global_sid')); + poststr += "&iface=" + $F('global_iface'); + poststr += "&address=" + $F('global_address'); + poststr += "&cmd=firmware_update"; + SendPOSTRequest('ic_ifacecmd.cgi'); + ProgressBar = new ProgressBarMsgBox(translateKey("performingFirmwareUpdate"), 1); + ProgressBar.show(); + ProgressBar.StartKnightRiderLight(); + } else { + MessageBox.show(translateKey("dialogHint"), translateKey("hintDevFwUpdateDCHigh"), "", 400, 120); + } +}; + + + +isHeatingControl = function() { + if (window.P1_tom || window.P2_tom || window.P3_tom || window.P4_tom || window.P5_tom || window.P6_tom) { + return true; + } + return false; +}; + +isHeatingControlAddress = function(deviceAddress) { + if (P1_tom.address == deviceAddress || P2_tom.address == deviceAddress || P3_tom.address == deviceAddress || P4_tom.address == deviceAddress || P5_tom.address == deviceAddress || P6_tom.address == deviceAddress) { + return true; + } + return false; +}; + +isHeatingControlDirty = function() { + if (P1_tom.tom_isDirty() || P2_tom.tom_isDirty() || P3_tom.tom_isDirty() || P4_tom.tom_isDirty() || P5_tom.tom_isDirty() || P6_tom.tom_isDirty()) { + return true; + } + return false; +}; + +RestoreDeviceParameters = function() +{ + ProgressBar = new ProgressBarMsgBox(translateKey("transferConfigData"), 0); + ProgressBar.show(); + ProgressBar.StartKnightRiderLight(); + + homematic("Interface.restoreConfigToDevice", {"interface": $F('global_iface'), "address": $F('global_address')}, function() { + ProgressBar.hide(); + ProgressBar.StopKnightRiderLight(); + CheckConfigPending($F('global_iface'), $F('global_address'), '', $F('global_redirect_url'), true); + }); +} + +SaveDeviceParameters = function() +{ + var actions = 0, + parentChannelAddress; + + //Geräteparameter speichern + if (AreParametersDirty('DEVICE')) + { + SetParameters ($F('global_iface'), $F('global_address'), 'DEVICE'); + actions++; + } + + //Kanalparameter speichern + var ch_count = $F('global_channel_count'); + var channel_address; + var startChannel = (($F('global_iface')!= "HmIP-RF") && ($F('global_iface')!= "HmIP-Wired") && ($F('global_iface') != "VirtualDevices"))? 1 : 0; + + for (var i=startChannel; i|TIMEOUTMANAGER +SetParameters = function(iface, address, special_input_id) +{ + var command, + tomIsSet = false; + + try { + + if ($('separate_CHANNEL_1_1').name == "TEAM" && special_input_id != "DEVICE") + throw "TEAM"; + else throw "noTEAM"; + } catch (e) { + if (e == "TEAM") { command = "&cmd=set_team"; } + else { command = "&cmd=set_profile"; } + } + + ResetPostString(); + AddParam($('global_sid')); + poststr += "&iface=" + iface; + poststr += "&address=" + address; + poststr += "&peer=MASTER"; + poststr += "&ps_type=MASTER"; + poststr += "¶mid="; + poststr += "&pnr="; + poststr += command; + + + if (typeof oChnMultiModeTransmitter != "undefined") { + var relevantMultiModeTransmitter = oChnMultiModeTransmitter[address.toString()]; + + if (typeof relevantMultiModeTransmitter != "undefined") { + + + homematic("Interface.setMetadata_crRFD", { + 'interface': iface, + 'objectId' : address.toString(), + 'dataId' : relevantMultiModeTransmitter.dataId, + 'value': relevantMultiModeTransmitter.mode}); + + homematic("Interface.setMetadata", { + "objectId": relevantMultiModeTransmitter.channelId, + "dataId": relevantMultiModeTransmitter.dataId, + "value": relevantMultiModeTransmitter.mode + }, function (result) { + var oChannel = DeviceList.getChannelByAddress(address.toString()); + oChannel.setMultiMode(relevantMultiModeTransmitter.mode); + delete oChnMultiModeTransmitter[address.toString()]; + }); + } + } + + // After setting the config parameters of a dali device, we have to store the UNIVERSAL_LIGHT_MAX_CAPABILITIES of each group channel as mata data. + // Otherwise ReGa can't determne the correct value on the page Status/Control, especially when changing a group. + var channel = DeviceList.getChannelByAddress(address); + if ((typeof channel !== "undefined") && (channel.typeName == "HmIP-DRG-DALI") && (typeof MetaDaliGroupHasBeenSet == "undefined")) { + // After 5 seconds we can determine the new UNIVERSAL_LIGHT_MAX_CAPABILITIES of the DALI group channels and store them as meta data + window.setTimeout(function() { + var devAddress = channel.device.address, + grpChannel; + + for (var loop = 33; loop <= 48; loop++) { + var maxCap = homematic("Interface.getMasterValue", { + "interface": "HmIP-RF", + "address": devAddress + ":" + loop, + "valueKey": "UNIVERSAL_LIGHT_MAX_CAPABILITIES" + }); + grpChannel = DeviceList.getChannelByAddress(devAddress + ":" + loop); + homematic("Interface.setMetadata", {"objectId": grpChannel.id , "dataId" : "maxCap", "value": maxCap}); + DeviceList.channels[grpChannel.id].daliMaxCapabilities = maxCap; + } + window.setTimeout(function() {delete MetaDaliGroupHasBeenSet;},5000); + },5000); + MetaDaliGroupHasBeenSet = true; + } + + + + if ((special_input_id == "TIMEOUTMANAGER") && (typeof tom == "object") && (tom.iface == iface) && (tom.address == address) && (tom.tom_isDirty())) + { + poststr += tom.tom_getPostStr(); + tomIsSet = true; + } + + if((special_input_id == "TIMEOUTMANAGER") && (typeof P1_tom == "object") && (P1_tom.iface == iface) && (P1_tom.address == address) && (P1_tom.tom_isDirty())) { + poststr += P1_tom.tom_getPostStr(); + tomIsSet = true; + } + + if((special_input_id == "TIMEOUTMANAGER") && (typeof P2_tom == "object") && (P2_tom.iface == iface) && (P2_tom.address == address) && (P2_tom.tom_isDirty())) { + poststr += P2_tom.tom_getPostStr(); + tomIsSet = true; + } + + if((special_input_id == "TIMEOUTMANAGER") && (typeof P3_tom == "object") && (P3_tom.iface == iface) && (P3_tom.address == address) && (P3_tom.tom_isDirty())) { + poststr += P3_tom.tom_getPostStr(); + tomIsSet = true; + } + + if((special_input_id == "TIMEOUTMANAGER") && (typeof P4_tom == "object") && (P4_tom.iface == iface) && (P4_tom.address == address) && (P4_tom.tom_isDirty())) { + poststr += P4_tom.tom_getPostStr(); + tomIsSet = true; + } + if((special_input_id == "TIMEOUTMANAGER") && (typeof P5_tom == "object") && (P5_tom.iface == iface) && (P5_tom.address == address) && (P5_tom.tom_isDirty())) { + poststr += P5_tom.tom_getPostStr(); + tomIsSet = true; + } + if((special_input_id == "TIMEOUTMANAGER") && (typeof P6_tom == "object") && (P6_tom.iface == iface) && (P6_tom.address == address) && (P6_tom.tom_isDirty())) { + poststr += P6_tom.tom_getPostStr(); + tomIsSet = true; + } + + if((special_input_id == "TIMEOUTMANAGER_HMIP_OnOff") && (typeof P1_tomHmIP == "object") && (P1_tomHmIP.iface == iface) && (P1_tomHmIP.address == address) && (P1_tomHmIP.tom_isDirty())) { + poststr += P1_tomHmIP.tom_getPostStr(); + tomIsSet = true; + } + + if(!tomIsSet) { + AddSeparateSettings('separate_' + special_input_id, ''); + } + + try + { + var device = DeviceList.getDeviceByAddress(address); + if (!device) + { + var channel = DeviceList.getChannelByAddress(address); + if (channel) { device = channel.device; } + } + } catch (e){} + + /* + var device = DeviceList.getDeviceByAddress(address); + if (!device) + { + var channel = DeviceList.getChannelByAddress(address); + if (channel) { device = channel.device; } + } + */ + + // This prevents an non-existing string for MAIN_/SUB_TEXT for e. g. the HmIPW-WGD(-PL) + if ((typeof channel !== "undefined") && ((channel.channelType == "DISPLAY_INPUT_TRANSMITTER") || (channel.channelType == "DISPLAY_THERMOSTAT_INPUT_TRANSMITTER") || (channel.channelType == "ENERGIE_METER_TRANSMITTER"))) { + arPostStr = poststr.split("&"); + jQuery.each(arPostStr, function (index, val) { + if (val == "MAIN_TEXT=" || val == "SUB_TEXT=" || val == "METER_OBIS_SEARCH_STRING=") { + // %24 = $ + poststr = poststr.replace(val, val + "%24%24%24%24%24"); + } + }); + } + + SendPOSTRequest('ic_ifacecmd.cgi', null, function() { + if (device) + { + DeviceList.beginUpdateDevice(device.id); + } + }); + +}; + +SendInternalKeyPress = function(iface, sender, receiver, longKeyPress) +{ + var simLongKeyPress = (longKeyPress) ? 1 : 0; + ResetPostString(); + AddParam($('global_sid')); + poststr += "&iface=" + iface; + poststr += "&sender=" + sender; + poststr += "&receiver=" + receiver; + poststr += "&longKeyPress=" + simLongKeyPress; + poststr += "&cmd=SendInternalKeyPress"; + SendPOSTRequest('ic_ifacecmd.cgi'); +}; + +SetInternalKey = function(iface, address, special_input_id, peerAddress) +{ + var mainChannel = address; + + var ch = address.split(':')[1]; + var selectelem = $(special_input_id + '_profiles'); + var pnr = selectelem.options[selectelem.selectedIndex].value; + var actorType = $('chType_'+ch).innerHTML; + var paramid = $('chParamID_'+ch).innerHTML; + + ResetPostString(); + AddParam($('global_sid')); + poststr += "&iface=" + iface; + poststr += "&address=" + mainChannel; + poststr += "&peer=" + peerAddress; + poststr += "&pnr=" + pnr; + poststr += "¶mid=" + paramid; + poststr += "&ps_type=receiver"; + poststr += "&ps_id=receiver" ; + poststr += "&internalKey=true"; + poststr += "&new_profilepath=" + actorType + "/" + actorType; + poststr += "&cmd=set_profile"; + AddSeparateSettings('separate_' + special_input_id + '_', pnr); + AddSeparateSettings('subset_' + special_input_id + '_', pnr); + + //alert(poststr); + SendPOSTRequest('ic_ifacecmd.cgi'); +}; + +ShowInternalKeyProfile = function(selectelem, channel, counter) +{ + var e; + var pnr = selectelem.options[selectelem.selectedIndex].value; + e = $('internalKey_' + counter + "_" + channel); + + while ((e !== null) && (e.tagName != "TABLE") && (e.className != "ProfileTbl")) + { + e = e.nextSibling; + } + + if (e.tagName != "TABLE" && e.className != "ProfileTbl") return; + + var table = e; + var elem = table.getElementsByTagName("tr")[0]; + + while (elem !== null) + { + //Element.hide(elem); + elem.style.display = "none"; + elem.style.visibility = "hidden"; + if ((elem.className == "receiver_"+counter + "_" + channel + "_" + pnr) ) + { + elem.style.visibility = "visible"; + elem.style.display = ""; + } + elem = elem.nextSibling; + } +}; + + +/** + * ic_neweasymode.js + **/ + +NewEasyModeForm = Class.create(); + +NewEasyModeForm.prototype = Object.extend(new MsgBox(), { + initialize: function(w, h, base_pnr, ps_id, ps_ids, special_input_id) { + + this.init(w, h); + this.w = w; + this.h = h; + this.base_pnr = base_pnr; + this.ps_id = ps_id; + this.ps_ids = ps_ids; + this.special_input_id = special_input_id; + + this.ProfilesMap = new Array(); + }, + AddProfile: function(pnr, pname) { + + this.ProfilesMap[pnr] = pname; + }, + ProfileOverwriteWarning: function() { + + var profileExists = false; + var cur_usertext = $F('EasyModeName'); + for (var Name in this.ProfilesMap) + { + if (this.ProfilesMap[Name] == cur_usertext) + { + profileExists = true; + break; + } + } + + if (profileExists) {$('id_overwrite_warning').style.visibility = 'visible'; $('save_new_profile').style.visibility = 'hidden';} + else {$('id_overwrite_warning').style.visibility = 'hidden'; $('save_new_profile').style.visibility = 'visible';} + }, + StoreNewProfile: function() { + ResetPostString(); + profile = is_newProfile(this.ps_id); + poststr += "&cmd=SAVE"; + poststr += "&base_pnr=" +this.base_pnr; + poststr += "&ps_id=" +profile; + poststr += "&ps_ids=" +profile; + poststr += "&sensor=" +$F('dev_descr_sender_tmp').split("-")[0]; + poststr += "&actor=" +$F('dev_descr_receiver_tmp'); + poststr += "&EasyModeName=" +elv_toQueryString($F('EasyModeName')); + + AddSeparateSettings('separate_' + this.special_input_id + '_', this.base_pnr); + AddSeparateSettings('subset_' + this.special_input_id + '_', this.base_pnr); + SendRequest('ic_neweasymode.cgi'); + + this.hide(); + + //ProgressBar = new ProgressBarMsgBox("Profilvorlage wird erstellt...", 1); + ProgressBar = new ProgressBarMsgBox(translateKey("dialogSettingsCreateProfileTemplateTitle"), 1); + ProgressBar.show(); + ProgressBar.StartKnightRiderLight(); + } +}); +//TOM = TimeOutModule + +//Defines +TOM_DAYIDX = new Array(); +TOM_DAYIDX['SATURDAY'] = 0; +TOM_DAYIDX['SUNDAY'] = 1; +TOM_DAYIDX['MONDAY'] = 2; +TOM_DAYIDX['TUESDAY'] = 3; +TOM_DAYIDX['WEDNESDAY'] = 4; +TOM_DAYIDX['THURSDAY'] = 5; +TOM_DAYIDX['FRIDAY'] = 6; + +TOM_DAY_ENG = new Array('SATURDAY', 'SUNDAY', 'MONDAY', 'TUESDAY', 'WEDNESDAY', 'THURSDAY', 'FRIDAY'); + +tom_endtime = 0; +tom_temperature = 1; +tom_level = 1; + +tom_maxtimeout = 1440; +tom_mintimeout = 0; +//----- + +TimeoutManager = Class.create(); + +TimeoutManager.prototype = Object.extend(new MsgBox(), { + + initialize: function (iface, address, isOldDevGeneration, prgName) { + + this.TOM_DAY = new Array ( + translateKey('timeModuleLblSelSerialPatternSaturday') , + translateKey('timeModuleLblSelSerialPatternSunday') , + translateKey('timeModuleLblSelSerialPatternMonday') , + translateKey('timeModuleLblSelSerialPatternTuesday') , + translateKey('timeModuleLblSelSerialPatternWednesday') , + translateKey('timeModuleLblSelSerialPatternThursday') , + translateKey('timeModuleLblSelSerialPatternFriday') + ); + + this.isOldDevGeneration = isOldDevGeneration; + this.iface = iface; + this.address = address; + + this.prg = (prgName != undefined && prgName != null) ? prgName : ""; + + //Woche anlegen und initialisieren + this.week = new Array(7); + this.divname = new Array(7); //DIV-Container + this.weekdirty = new Array(7); //Sind Änderungen erfolgt? + + this.setMaxTimouts(); + + for (var dayidx = 0; dayidx < 7; dayidx++) { + this.week[dayidx] = new Array(); + this.divname[dayidx] = ''; + this.weekdirty[dayidx] = false; + } + }, + + setMaxTimouts: function() { + this.maxTimeOuts = (this.isOldDevGeneration == true) ? 24 : 13; + }, + + setDivname: function (day, divid) { + var dayidx = TOM_DAYIDX[day]; + this.divname[dayidx] = divid; + }, + + tom_toTime: function (timeout) { + + var h = parseInt(timeout / 60); + var m = timeout - h * 60; + + if (String(m).length == 1) m = "0" + m; + if (String(h).length == 1) h = "0" + h; + + return h + ":" + m; + }, + + tom_toTimeout: function (time) { + + var tokens; + var h, m; + var timeout = -1; + + if (this.tom_isTime(time)) { + tokens = time.split(':'); + h = tokens[0]; + m = tokens[1]; + + timeout = parseInt(h, 10) * 60 + parseInt(m, 10); + } + + return timeout; + }, + + tom_isTime: function (time) { + return time.match(/^[0-2]?[0-9]:[0-5][0,5]$/) != null; + }, + + tom_isTemperature: function (temperature) { + return temperature.match(/^[1-3]?[0-9]\.?[0-9]*$/) != null; + }, + + tom_checkAndSetTime: function (day, inputel, timeoutIdx) { + + var dayidx = TOM_DAYIDX[day]; + var timeouts = this.week[dayidx]; + var elem = inputel.id.split("_"); + var count = -1; + var inputelem; + var endtime; + var prev_endtime; + var next_endtime; + var time; + + if (!this.prg) { + while ($(elem[0] + '_' + elem[1] + '_' + (count + 1))) { + count++; + timeouts[count][tom_endtime] = this.tom_toTimeout($(elem[0] + '_' + elem[1] + '_' + count).value); + } + } else { + while ($(this.prg + elem[1] + '_' + elem[2] + '_' + (count + 1))) { + count++; + timeouts[count][tom_endtime] = this.tom_toTimeout($(this.prg + elem[1] + '_' + elem[2] + '_' + count).value); + } + } + + for (var loop = 0; loop <= (count - 1); loop++) { + timeoutIdx = loop; + if (!this.prg) { + inputelem = elem[0] + "_" + elem[1] + "_" + loop; + } else { + inputelem = this.prg + elem[1] + "_" + elem[2] + "_" + loop; + } + if (this.isOldDevGeneration) { + // Minuten der Zeit auf volle 10 pruefen und ggf. anpassen + $(inputelem).value = time = $(inputelem).value.replace(/[1-9]$/, "0"); + } else { + // Minuten der Zeit auf volle 5 pruefen und ggf. anpassen + var arTime = $(inputelem).value.split(":"), + hour = parseInt(arTime[0]), + min =Math.round(arTime[1] / 5) * 5 ; + if (min <= 9) {min = "0" + min;} + if (min == 60) {min = "00"; hour++;} + if (hour <= 9) {hour = "0" + hour;} + if (hour == 24) {hour = "23"; min = "55";} + + $(inputelem).value = time = hour + ":" + min; + } + endtime = this.tom_toTimeout(time); + prev_endtime = -1; + next_endtime = -1; + + + if (timeoutIdx != 0) prev_endtime = timeouts[timeoutIdx - 1][tom_endtime]; + if (timeoutIdx != timeouts.length - 1) next_endtime = timeouts[timeoutIdx + 1][tom_endtime]; + + + $(inputelem).style.backgroundColor = WebUI.getColor("transparent"); + if (endtime > 0 + && endtime <= 1440 + && (prev_endtime < 0 || prev_endtime < endtime) + && (next_endtime < 0 || next_endtime > endtime)) timeouts[timeoutIdx][tom_endtime] = parseInt(endtime); + else $(inputelem).style.backgroundColor = WebUI.getColor("red"); + + this.weekdirty[dayidx] = true; + } + }, + + tom_checkAndSetTemperature: function (day, inputelem, timeoutIdx) { + + var temperature = inputelem.value; + var dayidx = TOM_DAYIDX[day]; + var timeouts = this.week[dayidx]; + + inputelem.style.backgroundColor = WebUI.getColor("transparent"); + + if (this.tom_isTemperature(temperature) + && temperature >= 0 + && temperature <= 30) timeouts[timeoutIdx][tom_temperature] = parseFloat(temperature); + else inputelem.style.backgroundColor = WebUI.getColor("red"); + + this.weekdirty[dayidx] = true; + }, + + tom_setDirty: function (day, inputelem, timeoutIdx) { + CC_save_Temp(this.prg); + var tmp = inputelem.id.split("_"); + + if (this.prg) { + var id = this.prg + tmp[1] + "_" + tmp[2] + "_" + tmp[3]; + } else { + var id = tmp[0] + "_" + tmp[1] + "_" + tmp[2]; + } + var temperature = $F(id); + var dayidx = TOM_DAYIDX[day]; + var timeouts = this.week[dayidx]; + + inputelem.style.backgroundColor = WebUI.getColor("transparent"); + + if (this.tom_isTemperature(temperature) + && temperature >= 5 + && temperature <= 30) timeouts[timeoutIdx][tom_temperature] = parseFloat(temperature); + else inputelem.style.backgroundColor = WebUI.getColor("red"); + + this.weekdirty[dayidx] = true; + + }, + + tom_getPostStr: function () { + + var postStr = ""; + + for (var dayidx = 0; dayidx < 7; dayidx++) { + //Welcher Tag enthält die relevanten Daten: "wie am Vortag"-Funktion? + var prev_day = $(this.prg + 'prevday_' + dayidx); + var p = dayidx; + while (prev_day.checked) { + p--; + prev_day = $(this.prg+ 'prevday_' + p); + } + //----- + + if (this.weekdirty[dayidx] || this.weekdirty[p]) //Dieser Tag oder der Vortag "dirty"? + { + var timeouts = this.week[p]; + + if (timeouts && timeouts.length > 0) { + for (var i = 0; i < timeouts.length; i++) { + if (this.isOldDevGeneration) { + postStr += "&TEMPERATUR_" + TOM_DAY_ENG[dayidx] +"_" + (i+1) + "=" + timeouts[i][tom_temperature]; + postStr += "&TIMEOUT_" + TOM_DAY_ENG[dayidx] +"_" + (i+1) + "=" + timeouts[i][tom_endtime]; + } else { + postStr += "&" + this.prg + "TEMPERATURE_" + TOM_DAY_ENG[dayidx] + "_" + (i + 1) + "=" + timeouts[i][tom_temperature]; + postStr += "&" + this.prg + "ENDTIME_" + TOM_DAY_ENG[dayidx] + "_" + (i + 1) + "=" + timeouts[i][tom_endtime]; + } + } + } + } + } + + return postStr; + }, + + tom_isDirty: function () { + + for (var dayidx = 0; dayidx < 7; dayidx++) { + if (this.weekdirty[dayidx]) return true; + } + return false; + }, + + //day: MONDAY, TUESDAY, ... + //endtime: 0..1440 + setTemp: function (day, endtime, temperature) { + + var dayidx = TOM_DAYIDX[day]; + var timeouts = this.week[dayidx]; + var i = 0; + if (!timeouts) timeouts = new Array(); + + //Array ist nach Endtime sortiert. + while (i < timeouts.length && endtime >= timeouts[i][tom_endtime]) { + //Timeout schon vorhanden? Dann Temperatur setzen. + if (timeouts[i][tom_endtime] == endtime) { + //timeouts[i][tom_temperature] = temperature; + return; + } + + i++; + } + + if (i < timeouts.length) { + //Es muss einsortiert werden. + //Platz da!!! + for (j = timeouts.length; j > i; j--) { + timeouts[j] = timeouts[j - 1]; + } + } + + timeouts[i] = new Array(2); //Zeitpunkt-Temperatur-Zuordnung anlegen + timeouts[i][tom_endtime] = endtime; + timeouts[i][tom_temperature] = temperature; + }, + + delTemp: function (day, endtime) { + + var dayidx = TOM_DAYIDX[day]; + var timeouts = this.week[dayidx]; + + for (var i = 0; i < timeouts.length; i++) { + if (timeouts[i][tom_endtime] == endtime) { + timeouts.splice(i, 1); + break; + } + } + }, + + delTempByIdx: function (day, timeoutIdx) { + + var dayidx = TOM_DAYIDX[day]; + var timeouts = this.week[dayidx]; + timeouts.splice(timeoutIdx, 1); + + this.weekdirty[dayidx] = true; + }, + + addTempByIdx: function (day, timeoutIdx) { + + var dayidx = TOM_DAYIDX[day]; + var timeouts = this.week[dayidx]; + + if (timeouts.length >= this.maxTimeOuts ) { + //alert('Der Zeitabschnitt kann nicht angelegt werden. Es können nur bis zu '+this.maxTimeOuts+' Zeitabschnitte angelegt werden.'); + alert(translateKey('errorCreateTimePeriod') + translateKey('maxTimePeriodReachedA') + this.maxTimeOuts+translateKey('maxTimePeriodReachedB')); + return; + } + else if (timeouts[timeoutIdx][tom_endtime] - 10 == 0) { + //alert('Der Zeitabschnitt kann nicht angelegt werden. Die Endzeit kann nicht 00:00 Uhr sein.'); + alert(translateKey('errorCreateTimePeriod') + translateKey('endtimeReached')); + return; + } + else if (timeoutIdx > 0 && timeouts[timeoutIdx][tom_endtime] - 10 <= timeouts[timeoutIdx - 1][tom_endtime]) { + //alert('Der Zeitabschnitt kann nicht angelegt werden. Er existiert schon.'); + alert(translateKey('errorCreateTimePeriod') + translateKey('timePeriodAlreadyExists')); + return; + } + this.setTemp(day, timeouts[timeoutIdx][tom_endtime] - 10, timeouts[timeoutIdx][tom_temperature]); + + this.weekdirty[dayidx] = true; + }, + + OnClickPrevDay: function (day) { + var dayidx = TOM_DAYIDX[day]; + var elem = $(this.prg + 'prevday_' + dayidx); + + if (elem.checked) { + $(this.prg+'tempprofile_' + dayidx).style.display = "none"; + $(this.prg+'tempprofile_' + dayidx).style.visibility = "hidden"; + } + else { + $(this.prg+'tempprofile_' + dayidx).style.display = ""; + $(this.prg+'tempprofile_' + dayidx).style.visibility = "visible"; + } + this.tom_setDirty('SATURDAY', $(this.prg + 'temperature_0_0_tmp'), 0); + this.weekdirty[dayidx] = true; + }, + + tom_equals_prevday: function (day) { + + var dayidx = TOM_DAYIDX[day]; + + if (dayidx == 0) return false; //Starttag ist immer ungleich des Vortages + + var this_timeouts = this.week[dayidx ]; + var prev_timeouts = this.week[dayidx - 1]; + + if (!prev_timeouts || !this_timeouts || prev_timeouts.length != this_timeouts.length) return false; + + for (var i = 0; i < this_timeouts.length; i++) { + if (this_timeouts[i][tom_temperature] != prev_timeouts[i][tom_temperature] + || this_timeouts[i][tom_endtime] != prev_timeouts[i][tom_endtime]) return false; + } + return true; + }, + + checkDayTimeouts: function (dayidx) { + var timeouts = this.week[dayidx]; + + for (i = 1; i < timeouts.length; i++) { + if (timeouts[i][tom_endtime] <= timeouts[i - 1][tom_endtime]) { + alert("Der " + i + ". Zeitabschnitt hat eine ungültige Dauer"); + } + } + }, + + checkTimeouts: function () { + + for (i = 0; i < this.week.length; i++) { + checkDayTimeouts(i); + } + }, + + writeDay: function (day) { + + var prgNr = this.prg; + + var dayidx = TOM_DAYIDX[day]; + var timeouts = this.week[dayidx]; + var endtime; + + if (!timeouts) return; + + var equals_prevday = this.tom_equals_prevday(day); + + msg = "
"; + msg += "
 <\/div><\/th>\n +
Name<\/th>\n + Typen- Bezeichnung<\/th>\n + Bild<\/th>\n + Bezeichnung<\/th>\n + Serien- Nummer<\/th>\n + Interface \/ Kategorie<\/th>\n + Übertragungsmodus<\/th>\n + Gewerke<\/th>\n + Räume<\/th>\n + \"RSSI\"<\/th>\n + \"sichtbar\"<\/th>\n + \"bedienbar\"<\/th>\n + \"protokolliert\"<\/th>\n + Aktionen<\/th>\n + <\/tr>\n +
 <\/div><\/th>\n + ${nameFilter.getHTML(3)}\n + ${typeNameFilter.getHTML()}\n +
 <\/th>\n + ${descriptionFilter.getHTML()}\n + ${addressFilter.getHTML()}\n + ${interfaceFilter.getHTML()}\n + ${modeFilter.getHTML()}\n + ${funcFilter.getHTML()}\n + ${roomFilter.getHTML()}\n +  <\/th>\n +  <\/th>\n +  <\/th>\n +  <\/th>\n +  <\/th>\n + <\/tr>\n + <\/thead>\n +
\n + \"Kanäle\n + \"Kanäle\n + <\/td>\n + ${device.name}<\/td>\n + ${device.typeName}<\/td>\n +
${device.getThumbnailHTML()}<\/div><\/td>\n +
${device.typeDescription}<\/td>\n + ${device.address}${device.rfAddress}<\/td>\n + ${device.interfaceDisplayName}<\/td>\n + {for name in device.modes}${name}
{forelse} {\/for}<\/td>\n +
{for subsection in device.subsections}${subsection.name}
{forelse} {\/for}<\/td>\n +
{for room in device.rooms}${room.name}
{forelse} {\/for}<\/td>\n +
<\/td>\n + <\/td>\n + <\/td>\n + <\/td>\n + \n +
Einstellen<\/div>\n + {if device.isDeletable}\n +
Löschen<\/div>\n + {else}\n +
Löschen<\/div>\n + {\/if}\n +
Direkte<\/div>\n +
Programme<\/div>\n + <\/td>\n + <\/tr>\n + {for group in device.groups}\n +
 <\/td>\n + \n + \"Kanäle\n + \"Kanäle\n + <\/td>\n + ${group.name}<\/td>\n + ${group.typeName}<\/td>\n +
${group.thumbnailHTML}<\/div><\/td>\n +
${group.typeDescription}<\/td>\n + ${group.address}<\/td>\n + {for name in group.categories}${name}
{forelse} {\/for}<\/td>\n +
{for name in group.modes}${name}
{forelse} {\/for}<\/td>\n +
{for subsection in group.subsections}${subsection.name}
{forelse} {\/for}<\/td>\n +
{for room in group.rooms}${room.name}
{forelse} {\/for}<\/td>\n +
<\/td>\n + <\/td>\n + <\/td>\n + <\/td>\n + \n +
Einstellen<\/div>\n +
Direkte<\/div>\n +
Programme<\/div>\n + <\/td>\n + <\/tr>\n + {for channel in group.channels}\n +
 <\/td>\n + ${channel.name}${channel.nameExtention}<\/td>\n + ${channel.typeName}<\/td>\n +
${channel.thumbnailHTML}<\/div><\/td>\n +
${channel.typeDescription}<\/td>\n + ${channel.address}<\/td>\n + ${channel.category}<\/td>\n + ${channel.mode}<\/td>\n + {for subsection in channel.subsections}${subsection.name}
{forelse} {\/for}<\/td>\n +
{for room in channel.rooms}${room.name}
{forelse} {\/for}<\/td>\n +
<\/td>\n + <\/td>\n + <\/td>\n + <\/td>\n + \n +
Einstellen<\/div>\n +
Direkte<\/div>\n +
Programme<\/div>\n + <\/td>\n + <\/tr>\n + {\/for}\n + {\/for}\n + {for channel in device.singles}\n +\n + {if channel._isVisible}\n + {if channel.highlightChannel}\n +
 <\/td>\n + ${channel.name}${channel.nameExtention}<\/td>\n + ${channel.typeName}<\/td>\n +
${channel.thumbnailHTML}<\/div><\/td>\n +
${channel.typeDescription}<\/td>\n + ${channel.address}<\/td>\n + ${channel.category}<\/td>\n + ${channel.mode}<\/td>\n + {for subsection in channel.subsections}${subsection.name}
{forelse} {\/for}<\/td>\n +
{for room in channel.rooms}${room.name}
{forelse} {\/for}<\/td>\n +
<\/td>\n + <\/td>\n + <\/td>\n + <\/td>\n + \n +
Einstellen<\/div>\n +
Direkte<\/div>\n +
Programme<\/div>\n + <\/td>\n + <\/tr>\n + {\/if}\n + {\/if}\n + {\/for}\n + {forelse}\n +
 <\/td>\n + Keine Geräte verfügbar<\/td>\n + <\/tr>\n + {\/for}\n + <\/tbody>\n +
<\/td>\n +
<\/td>\n +
<\/td>\n +
<\/td>\n +
<\/td>\n +
<\/td>\n +
<\/td>\n +
<\/td>\n +
<\/td>\n +
<\/td>\n +
<\/td>\n +
<\/td>\n +
<\/td>\n +
<\/td>\n +
<\/td>\n +
<\/td>\n +
<\/td>\n + <\/tr> \n + <\/tfoot>\n +<\/table>\n +"; +LISTFILTER_JST = "
\n +
Filter<\/div>\n +
\n + \n + \n + \n + {for item in list}\n + \n + "; + html += ""; + html += ""; + + html += ""; + html += ""; + html += ""; + + html += ""; + + window.setTimeout(function() { + var carrierSenseProgressElem = jQuery("#carrierSenseProgress_" + index), + carrierSenseProgressBarElm = jQuery("#carrierSenseProgressBar_" + index), + carrierSenseValElm = jQuery("#carrierSenseVal" + index), + width, value; + + + carrierSenseValElm.text(csValue + csUnit); + + width = parseInt(carrierSenseProgressElem.css("width")); + value = (csValue != csValUnknown) ? width - (width / 100 * csValue) : width; + + carrierSenseProgressBarElm.css("width", value + "px"); + + }, 50); + + return html; + }; + + html += "
\n + ${item.name}<\/td>\n + <\/tr>\n + {\/for}\n + <\/tbody>\n + <\/table>\n +
Setzen<\/div>\n +
Schließen<\/div>\n + <\/form>\n + <\/div>\n +<\/th>\n +"; +MULTI_CHANNELCHOOSER_JST = "{macro printHead(name, id, langKey)}\n + {if id != sortId}\n +
${name}<\/th>\n + {else}\n + \n + ${name} \n + {if sortDescend}\n + \n + {else}\n + \n + {\/if}\n + <\/th>\n + {\/if}\n +{\/macro}\n +
\n +
Kanalauswahl<\/span>: ${title}<\/div>\n +
\n + \n + \n + \n + \n + \n + \n + \n + \n + \n + <\/colgroup>\n + \n + \n + \n + \n + {eval}actualDeviceAddress = \"\";{\/eval}\n + {for channel in channels}\n + {if ((channel.device.inInbox != true) && (channel.address != \"BidCoS-RF:0\"))}\n + {var virtualChannel = \"\"}\n + {var classExpertOnly = \"hidden j_expertChannel\"}\n + {var channelTypeID = channel.deviceType.id.toUpperCase()}\n +\n + {if channel.channelType == \"VIRTUAL_DIMMER\"} {var virtualChannel = \"hidden j_expertChannel\"} {\/if}\n + {if (channel.channelType == \"VIRTUAL_DUAL_WHITE_BRIGHTNESS\") || (channel.channelType == \"VIRTUAL_DUAL_WHITE_COLOR\")} {var virtualChannel = \"hidden j_expertChannel\"} {\/if}\n +\n + {if (channelTypeID != \"HMIP-MIOB\") && (channelTypeID != \"HMIP-WHS2\")}\n + {if (channel.channelType == \"DIMMER_TRANSMITTER\")\n + || (channel.channelType == \"SWITCH_TRANSMITTER\")\n + || (channel.channelType == \"BLIND_TRANSMITTER\")\n + || (channel.channelType == \"SHUTTER_TRANSMITTER\")\n + || (channel.channelType == \"ACOUSTIC_SIGNAL_TRANSMITTER\")}\n + {var virtualChannel = classExpertOnly;}\n + {\/if}\n + {if (channel.channelType == \"DIMMER_VIRTUAL_RECEIVER\")\n + || (channel.channelType == \"SWITCH_VIRTUAL_RECEIVER\")\n + || (channel.channelType == \"BLIND_VIRTUAL_RECEIVER\")\n + || (channel.channelType == \"SHUTTER_VIRTUAL_RECEIVER\")\n + || (channel.channelType == \"ACOUSTIC_SIGNAL_VIRTUAL_RECEIVER\")\n + || (channel.channelType == \"SERVO_VIRTUAL_RECEIVER\")}\n + {if actualDeviceAddress != channel.device.address}\n + {eval}\n + actualDeviceAddress = channel.device.address;\n + if (userIsNoExpert) {\n + if ((typeof channel.virtChCounter != \"undefined\") && (channel.virtChCounter != 1)) {\n + virtualChannel = classExpertOnly;\n + }\n + }\n + {\/eval}\n + {\/if}\n + {eval}if ((typeof channel.virtChCounter != \"undefined\") && (channel.virtChCounter != 1)) {virtualChannel = classExpertOnly;}{\/eval}\n + {\/if}\n + {\/if}\n +\n + {if (channelTypeID == \"HMIP-MIOB\") && ((channel.channelType == \"SWITCH_TRANSMITTER\") || ((channel.channelType == \"SWITCH_VIRTUAL_RECEIVER\") && ((channel.index != 3) && (channel.index != 7))))} {var virtualChannel = classExpertOnly} {\/if}\n +\n + {if ((channelTypeID == \"HMIP-WHS2\") && ((channel.channelType == \"SWITCH_TRANSMITTER\") || ((channel.channelType == \"SWITCH_VIRTUAL_RECEIVER\") &&\n + ((channel.index == 2) || (channel.index == 4) || (channel.index == 6) || (channel.index == 8))\n + )))} {var virtualChannel = classExpertOnly} {\/if}\n +\n + {if channel.channelType == \"VIR-OL-GTW-CH\"} {var virtualChannel = \"hidden\"} {\/if}\n + {if channel.channelType == \"VIR-HUE-GTW-CH\"} {var virtualChannel = \"hidden\"} {\/if}\n +\n + {if channel._selected == true} {var virtualChannel = \"\"} {\/if}\n +\n + \n + \n + " + + "" + + "" + + "" + + "" + + "" + + ""; + } + } + self.fetchDeviceList = false; + self.deleteScriptElements(); + if (self.newFwCounter > 0) { + self.showHintForAvailableDeviceFirmware(); + } + conInfo("All devices checked. " + self.newFwCounter + " actualized firmware versions found!"); + } + }, + + showHintForAvailableDeviceFirmware: function() { + var self = this, + rowShowDevFirmware = jQuery("#devFwAvailable"), + btnShowDevFirmware = jQuery("#devFwAvailable .firmwareAvailable"); + btnShowDevFirmware.click(function () { + self.showAvailableDeviceFirmware(); + }); + jQuery("#devFwAvailableCounter").text("(" + self.newFwCounter + ")"); + rowShowDevFirmware.show(); + }, + + deleteScriptElements: function() { + jQuery("#homematic_com_script").remove(); + jQuery("#homematic_com_script_fw").remove(); + }, + + showAvailableDeviceFirmware: function() { + var contentHeight = jQuery("#content").innerHeight(), + maxMessageBoxHeight = (this.newFwCounter + 5) * 20, + msgBoxHeight = (maxMessageBoxHeight < contentHeight) ? maxMessageBoxHeight : contentHeight; + + MessageBox.show(translateKey("dialogShowDeviceFirmwareTitle"), + "
 <\/th>\n + ${printHead(\"Name\", \"NAME\", \"thName\")}\n + Bild<\/th>\n + ${printHead(\"Beschreibung\", \"DESCRIPTION\", \"thDescription\")}\n + ${printHead(\"Seriennummer\", \"ADDRESS\", \"thSerialNumber\")}\n + ${printHead(\"Gewerke\", \"FUNC_NAMES\", \"thFunc\")}\n + ${printHead(\"Räume\", \"ROOM_NAMES\", \"thRooms\")}\n + <\/tr>\n +
 <\/th>\n + ${nameFilter.getHTML()}\n +  <\/th>\n +  <\/th>\n + \n + ${addressFilter.getHTML()}\n + ${funcFilter.getHTML()}\n + ${roomFilter.getHTML()}\n + <\/tr> \n + <\/thead>\n +
<\/td>\n + ${channel.name}${channel.nameExtention}<\/span><\/td>\n +
${channel.thumbnailHTML}<\/div><\/td>\n +
${channel.typeDescription}${channel.device.name}<\/td>\n + ${channel.address}<\/td>\n + \n + {for subsection in channel.subsections}\n + ${subsection.name}
\n + {forelse}\n +  \n + {\/for}\n + <\/td>\n +
\n + {for room in channel.rooms}\n + ${room.name}
\n + {forelse}\n +  \n + {\/for}\n + <\/td>\n + <\/tr>\n + {forelse}\n +
Keine Kanäle verfügbar<\/td>\n + <\/tr>\n + {\/if}\n + {\/for}\n + <\/tbody>\n + <\/table>\n +<\/div>\n +
\n +
Abbrechen<\/div>\n +
OK<\/div>\n +
Filter zurücksetzen<\/div>\n + {if false === showVirtual}\n +
virtuelle Kanäle anzeigen<\/div>\n + {else}\n +
virtuelle Kanäle ausblenden<\/div>\n + {\/if}\n +<\/div>\n +<\/div>"; +RF_CONFIG_JST = "
\n +\n +\n + \n + \n + \n + <\/colgroup>\n + \n + \n + \n + "; + for (var loop = 0; loop <= 5; loop++) { + content += + "" + + ""+ + "" + + //"" + + "" + + "" + + "" + + "" + + ""+ + ""; + } + return content; + }); + }, + + // Creates the options for the text selector + _getTextOptions: function() { + var options = ""; + options += ""; + for (var loop = 0; loop <= 19; loop++) { + options += ""; + } + options += ""; + return options; + }, + + // Creates the options for the color selector + _getColorOptions: function() { + var arColors =[ + translateKey("optionStatusDisplayWhite"), + translateKey("optionStatusDisplayRed"), + translateKey("optionStatusDisplayOrange"), + translateKey("optionStatusDisplayYellow"), + translateKey("optionStatusDisplayGreen"), + translateKey("optionStatusDisplayBlue") + ]; + + var options = ""; + for (var loop = 0; loop < arColors.length; loop++) { + options += ""; + } + return options; + }, + + // Creates the options for the icon selector + _getIconOptions: function() { + var options = "", + arOptionText = [ + translateKey("iconOff"), + translateKey("iconOn"), + translateKey("iconOpen"), + translateKey("iconClosed"), + translateKey("iconError"), + translateKey("iconOK"), + translateKey("iconInfo"), + translateKey("iconNewMessage"), + translateKey("iconServiceMessage"), + translateKey("iconSignalGreen"), + translateKey("iconSignalYellow"), + translateKey("iconSignalRed") + ]; + + options += ""; + for (var loop = 0; loop < 12; loop++) { + // Remark 2: This doesn´t work satisfying -- see Remark 1 + //options += ""; + options += ""; + } + return options; + }, + + // Returns an array of objects with the values of all lines. + // [Object {text="0x80, color="0x81", icon="0x82},.....]} + _getAllValues: function() { + var val = this.channelValue; + var arValues = val.split(","), //replace(/ /g, "").split(","), + arLines = []; // contains the lines 0 - 5 + + // Is a start key and end key available? Otherwise the string isn´t valid. + if (arValues[0] == this.startKey && arValues[arValues.length - 1] == this.endKey) { + var lineIndex = 0, + textEndIndex, + txtLengthCounter = 0, + lineLengthOffset = 0; + + arValues.shift(); // remove the start key 0x02 + arValues.pop(); // remove the end key 0x03 + + for (var loopx = 0; loopx < arValues.length; loopx++) { + var valueSet = {}; + // Is LF? + if (arValues[loopx] == this.lf) { + valueSet.text="notUsed"; + arLines[lineIndex] = valueSet; + lineIndex++; + } + if (arValues[loopx] == this.textKey) { + textEndIndex = jQuery.inArray(this.colorKey, arValues, loopx); + // Fetch text + valueSet.text = ""; + for (var loopy = loopx + 1; loopy < textEndIndex; loopy++) { + valueSet.text += arValues[loopy]; + txtLengthCounter++; + if (loopy < textEndIndex - 1) { + valueSet.text += ","; + } + } + // Fetch color + valueSet.color = arValues[textEndIndex + 1]; + // Fetch icon + if (arValues[textEndIndex + 2] == this.iconKey) { + valueSet.icon = arValues[textEndIndex + 3]; + lineLengthOffset = 5; + } else { + valueSet.icon = -1; + lineLengthOffset = 3; + } + arLines[lineIndex] = valueSet; + lineIndex++; + + // Set loopx counter to the end of the text line + loopx+=txtLengthCounter+lineLengthOffset; + txtLengthCounter = 0; + } + } + } else { + conInfo("Value string invalid"); + } + return arLines; + }, + + // Determines the real value of the HexVal + // For example: 0x80 = 0, 0x81 = 1 and so on + _convertHexVal2Val: function(hexVal) { + if (parseInt(hexVal.split(",")[0],16) < 128 ) { + // User defined text + return 99; + } + return parseInt(hexVal, 16) - 128; + }, + + // Converts a value to the necessary hex format + // For example: 0 = 0x80, 1 = 0x81 and so on + _convertVal2HexVal: function(intVal) { + return "0x" + (parseInt("0x80",16) + parseInt(intVal)).toString(16); + }, + + // Converts a ASCII string to a string with comma separated hex values + _convertPlainText2Hex: function(sPlainText) { + var hex = ''; + for(var i=0;i"); + } + }, + + // Not in use + _initDisplayConfigObject: function() { + var template = { + "keyText" : this.keyText, + "valText" : this.valText, + "keyColor" : this.keyColor, + "valColor" : this.valColor, + "keyIcon" : this.keyIcon, + "valIcon" : this.valIcon + }; + for (var loop = 0; loop <= 5; loop++) { + this.arDisplayData[loop] = template; + } + }, + + // Creates the string, necessary for the text field within the program + _createConfigString: function() { + var textElm, freeTextElm, colorElm, iconElm; + var result = this.startKey + ","; // Start key + + // Read 6 lines and create string + for (var loop = 0; loop < 6; loop++) { + textElm = jQuery("#textSelect_" + loop); + colorElm = jQuery("#colorSelect_" + loop); + iconElm = jQuery("#iconSelect_" + loop); + freeTextElm = jQuery("#freeText_" + loop); + + if (textElm.val() == -1) { + result+= this.lf + ","; + } else { + result += this.textKey + ","; + if (textElm.val() != "99") { + // Predefined text bloc + result += this._convertVal2HexVal(textElm.val()) + ","; + } else { + // Free user customized text + //result += freeTextElm.val() + ","; + result += this._convertPlainText2Hex(freeTextElm.val()); + } + result += this.colorKey + ","; + result += this._convertVal2HexVal(colorElm.val()) + ","; + if (iconElm.val() != -1) { + result += this.iconKey + ","; + result += this._convertVal2HexVal(iconElm.val()) + ","; + } + result += this.lf + ","; + } + } + result+= this.endKey; // End key + this.configString = result; + }, + + + // PUBLIC + getConfigString: function() { + return this.configString; + }, + + close: function(result) + { + Layer.remove(this.m_layer); + if (this.m_callback) { this.m_callback(result); } + }, + + yes: function() + { + this._createConfigString(); + this.close(YesNoDialog.RESULT_YES); + }, + + no: function() + { + this.close(YesNoDialog.RESULT_NO); + } + +}); + +StatusDisplayDialogEPaper = Class.create(StatusDisplayDialog, { + + initEPaper: function () { + conInfo("StatusDisplayDialogEPaper - initEPaper"); + this.displayType = "DIS-EP"; + }, + + // This creates the content of the dialog. + _addElements: function() { + var dialogContentElem = jQuery("#statusDisplayDialog"), + textOptions = this._getTextOptions(), + iconOptions = this._getIconOptions(), + soundOptions = this._getSoundOptions(), + soundQuantityOptions = this._getSoundQuantityOptions(), + soundTimeLagOptions = this._getSoundTimeLagOptions(), + flashOptions = this._getFlashOptions(), + + freeTextValue = translateKey("statusDisplayOptionFreeText"), + arrDisabledElements = ["disabled", "","","","disabled","disabled"]; + + dialogContentElem.append(function(index,html){ + //var content = ""; + var content = ""; + for (var loop = 0; loop <= 4; loop++) { + content += + "" + + ""+ + "" + + "" + + "" + + "" + + ""+ + ""; + } + + content += ""; + //content += ""; + //content += ""; + + content += ""; + content += + "" + + "" + + "" + + "" + + ""; + + content += ""; + + content += ""; + content += + "" + + "" + + "" ; + + content += ""; + + return content; + }); + }, + + // Creates the options for the text selector + _getTextOptions: function() { + var options = ""; + options += ""; + for (var loop = 0; loop <= 9; loop++) { + options += ""; + } + options += ""; + return options; + }, + + // Creates the options for the icon selector + _getIconOptions: function() { + var options = "", + arOptionText = [ + translateKey("iconOff"), + translateKey("iconOn"), + translateKey("iconOpen"), + translateKey("iconClosed"), + translateKey("iconError"), + translateKey("iconOK"), + translateKey("iconInfo"), + translateKey("iconNewMessage"), + translateKey("iconServiceMessage") + ]; + + options += ""; + for (var loop = 0; loop < 9; loop++) { + options += ""; + } + return options; + }, + + _getSoundOptions:function() { + var options = "", + arSound = ["", + translateKey("optionLong") + " " + translateKey("optionLong"), + translateKey("optionLong") + " " + translateKey("optionShort"), + translateKey("optionLong") + " " + translateKey("optionShort") + " " + translateKey("optionShort"), + translateKey("optionShort"), + translateKey("optionShort") + " " + translateKey("optionShort")]; + + options += ""; + options += ""; // This is a belated value which should appear as first option after 'not used' + for (var loop = 1; loop <= 5; loop++) { + options += ""; + } + return options; + }, + + _getSoundQuantityOptions: function() { + var options = ""; + for (var loop = 0; loop <= 14; loop++) { + options += ""; + } + options += ""; + return options; + }, + + _getSoundTimeLagOptions: function() { + var options = ""; + for (var loop = 0; loop <= 15; loop++) { + options += ""; + } + return options; + }, + + _getFlashOptions:function() { + var options = "", + arFlash = [translateKey("stringTableNotUsed"), translateKey("redFlash"), translateKey("greenFlash"), translateKey("orangeFlash")]; + for (var loop = 0; loop <= 3; loop++) { + options += ""; + } + return options; + }, + + // Creates the string, necessary for the text field within the program + _createConfigString: function() { + var textElm, freeTextElm,iconElm, + result = this.startKey + ","; // Start key + + // Read 5 lines and create string + for (var loop = 0; loop < 5; loop++) { + textElm = jQuery("#textSelect_" + loop); + iconElm = jQuery("#iconSelect_" + loop); + freeTextElm = jQuery("#freeText_" + loop); + + if (textElm.val() == -1) { + result+= this.lf + ","; + } else { + result += this.textKey + ","; + if (textElm.val() != "99") { + // Predefined text bloc + result += this._convertVal2HexVal(textElm.val()) + ","; + } else { + // Free user customized text + //result += freeTextElm.val() + ","; + result += this._convertPlainText2Hex(freeTextElm.val()); + } + if (iconElm.val() != -1) { + result += this.iconKey + ","; + result += this._convertVal2HexVal(iconElm.val()) + ","; + } + result += this.lf + ","; + } + } + result += this.soundKey + "," + jQuery("#soundSelectBox").val() + ","; + result += this.soundQuantityKey + "," + jQuery("#soundQuantitySelectBox").val() + ","; + result += this.soundTimeLagKey + "," + jQuery("#soundTimeLagSelectBox").val() + ","; + result += this.flashKey + "," + jQuery("#flashSelectBox").val() + ","; + result+= this.endKey; // End key + this.configString = result; + }, + /** + * Initializes the dialog + * @private + */ + _initAllValues: function() { + var self = this, + arValues = this.channelValue.split(","), + sizeChannelValue = arValues.length, + arAllValues = this._getAllValues(), + soundElm = jQuery("#soundSelectBox"), + soundQuantityElm = jQuery("#soundQuantitySelectBox"), + soundTimeLagElm = jQuery("#soundTimeLagSelectBox"), + flashElm = jQuery("#flashSelectBox"); + + + conInfo("DIS-EP: All values of the channel: "); + conInfo(arAllValues); + + jQuery.each(arAllValues, function(index, line) { + var textElm = jQuery("#textSelect_" + index), + iconElm = jQuery("#iconSelect_" + index), + freeTextElm = jQuery("#freeText_" + index); + + if (line.text != "notUsed") { + textElm.val(self._convertHexVal2Val(line.text)); + // User defined text + if (parseInt(line.text.split(",")[0],16) < 128) { + freeTextElm.val(decodeStringStatusDisplay(self._convertHexString2PlainText(line.text))); + } + if (line.icon != -1) { + iconElm.val(self._convertHexVal2Val(line.icon)); + setIconPreview({index: index, value: iconElm.val()}); + } else { + // Icon not in use + iconElm.val("-1"); + } + displayStatusDisplayOptionContainer(index, true); + } else { + textElm.val("-1"); + } + }); + soundElm.val(arValues[sizeChannelValue - 8]); // initialize sound select box + soundQuantityElm.val(arValues[sizeChannelValue - 6]); // initialize sound quantity select box + soundTimeLagElm.val(arValues[sizeChannelValue - 4]); // initialize sound time lag box + flashElm.val(arValues[sizeChannelValue - 2]); // initialize flash select box + + setFreeTextContainer(); + }, + // Returns an array of objects with the values of all lines. + // [Object {text="0x80, color="0x81", icon="0x82},.....]} + _getAllValues: function() { + var val = this.channelValue; + var arValues = val.split(","), //replace(/ /g, "").split(","), + arLines = []; // contains the lines 1,2,3 + + // Is a start key and end key available? Otherwise the string isn´t valid. + if (arValues[0] == this.startKey && arValues[arValues.length - 1] == this.endKey) { + var lineIndex = 0, + textIndex, + nextTextBlockIndex = 0, + textOffset = 0; + + arValues.shift(); // remove the start key 0x02 + arValues.pop(); // remove the end key 0x03 + //console.log("arValues: " + arValues); + for (var loopx = 0; loopx < arValues.length; loopx++) { + //console.log("current loopx: " + loopx); + var valueSet = {}; + nextTextBlockIndex = 0; + // Is LF? + if (arValues[loopx] == this.lf) { + valueSet.text="notUsed"; + arLines[lineIndex] = valueSet; + lineIndex++; + } + + if (arValues[loopx] == this.textKey) { + valueSet.text = ""; + // Read till icon or lf and increase loopx by the number of read chars + textIndex = loopx + 1; + do { + valueSet.text += arValues[textIndex]; + if ((arValues[textIndex + 1] != this.iconKey) && (arValues[textIndex + 1] != this.lf)) { + valueSet.text += ","; + } + + //console.log("added char: " + arValues[textIndex]); + textIndex++; + nextTextBlockIndex++; + } while ((arValues[textIndex] != this.iconKey) && (arValues[textIndex] != this.lf)) ; + + // Icon hinzufügen, entweder nicht benutzt (-1) oder den entsprechenden Wert + // Add the icon, either not used (-1) or the correspondent value + valueSet.icon = (arValues[textIndex] == this.iconKey) ? arValues[textIndex + 1] : -1; + arLines[lineIndex] = valueSet; + lineIndex++; + if (valueSet.icon == -1) {textOffset = 1;} else {textOffset = 3;} + // Jump to the next text block + loopx += nextTextBlockIndex + textOffset; // Springe zum nächsten Textblock + //console.log("new loopx : " + loopx); + } + } + } else { + conInfo("Value string invalid"); + } + return arLines; + } + +}); + +YesNoDialog.RESULT_NO = 0; +YesNoDialog.RESULT_YES = 1; +var arIconDesc = [], + resetEPaperDisplay = false; + +function getIconDescr(no) { + if(arIconDesc.length == 0) { + arIconDesc = [ + translateKey("iconLampOff"), + translateKey("iconLampOn"), + translateKey("iconPadlockOpen"), + translateKey("iconPadlockClosed"), + translateKey("iconX"), + translateKey("iconTick"), + translateKey("iconInfo"), + translateKey("iconEnvelope"), + translateKey("iconWrench"), + translateKey("iconSun"), + + translateKey("iconMoon"), + translateKey("iconWind"), + translateKey("iconCloud"), + translateKey("iconCloudBolt"), + translateKey("iconCloudLightRain"), + translateKey("iconCloudMoon"), + translateKey("iconCloudRain"), + translateKey("iconCloudSnow"), + translateKey("iconCloudSun"), + translateKey("iconCloundSunRain"), + + translateKey("iconSnowFlake"), + translateKey("iconRainDrop"), + translateKey("iconFlame"), + translateKey("iconWindowOpen"), + translateKey("iconShutter"), + translateKey("iconEco"), + translateKey("iconProtectionOff"), + translateKey("iconProtectionExternal"), + translateKey("iconProtectionInternal"), + translateKey("iconBell"), + + translateKey("iconClock") + ]; + } + return arIconDesc[no]; +}; + +function setIconPreview2(picNr, row) { + var picPath = "/ise/img/icons_hmip_wrcd/24/", + previewElm = jQuery("#iconPreview_" + row); + + if (picNr != 0) { + + previewElm.html(""); + } else { + previewElm.html(""); + } +}; + +function showHideSoundParams(soundNo) { + var soundParamElms = jQuery("[name='soundParam']"); + if (soundNo != -1) { + soundParamElms.show(); + } else { + soundParamElms.hide(); + } +}; + +function showHideDisplayConfig(elm) { + var resetDisplay = jQuery(elm).is(":checked"); + if (resetDisplay) { + jQuery("[name='displayConfig']").attr("style", "visibility:hidden"); + resetEPaperDisplay = true; + } else { + jQuery("[name='displayConfig']").attr("style", "visibility:visible"); + resetEPaperDisplay = false; + } +}; + +function setTextAlignment(row, alignment) { + var textElm = jQuery("#text_" + row); + textElm.attr("style","text-align: " + alignment.toLowerCase()); +}; + +function showDisplayConfigTextHelp() { + var title = translateKey("dialogHelpAcousticDisplayReceiverTitle"), + content = translateKey("dialogHelpAcousticDisplayReceiverContent"); + MessageBox.show(title, content,'', 475, 450); +}; + +function toggleSerialNumberDisplay() { + var tb = document.getElementById("fwUpdates"); + if (tb) { + var th = tb.getElementsByTagName("th")[2]; + if (th.style.display === "none") { + th.style.display = "block"; + document.querySelectorAll('#fwUpdates tbody tr td:nth-child(3)').forEach(el=>el.style.display = 'block') + } else { + th.style.display = "none"; + document.querySelectorAll('#fwUpdates tbody tr td:nth-child(3)').forEach(el=>el.style.display = 'none') + } + } +}; + +StatusDisplayDialogAcousticEPaper = Class.create({ + + initialize: function(title, content, value, callback, contentType) { + var _this_ = this; + + this.m_contentType = contentType; + this.m_callback = callback; + this.m_layer = document.createElement("div"); + this.m_layer.className = "YesNoDialogLayer"; + this.RESULT_NO = 0; + this.RESULT_YES = 1; + + this.arInitConfigString = value.split("},{"); // cfg string when entering the dialog + + resetEPaperDisplay = false; + + var dialog = document.createElement("div"); + dialog.className = "YesNoDialog"; + + var titleElement = document.createElement("div"); + titleElement.className = "YesNoDialogTitle"; + titleElement.appendChild(document.createTextNode(title)); + titleElement.onmousedown = function(event) { new Drag(this.parentNode, event); }; + dialog.appendChild(titleElement); + + var contentWrapper = document.createElement("div"); + contentWrapper.className = "YesNoDialogContentWrapper"; + + var contentElement = document.createElement("div"); + contentElement.className = "YesNoDialogContent"; + + if (this.m_contentType == "html") { + contentElement.innerHTML = content; + } else { + contentElement.appendChild(document.createTextNode(content)); + } + + contentWrapper.appendChild(contentElement); + + dialog.appendChild(contentWrapper); + + var footer = document.createElement("div"); + footer.className= "YesNoDialogFooter"; + + var yesButton = document.createElement("div"); + yesButton.className = "YesNoDialog_yesButton borderRadius5px colorGradient50px"; + yesButton.appendChild(document.createTextNode(translateKey('footerBtnOk'))); + yesButton.onclick = function() { _this_.yes(); }; + yesButton.id="btnYes"; + footer.appendChild(yesButton); + + var noButton = document.createElement("div"); + noButton.className = "YesNoDialog_noButton borderRadius5px colorGradient50px"; + noButton.appendChild(document.createTextNode(translateKey('footerBtnCancel'))); + noButton.onclick = function() { _this_.no(); }; + noButton.id = "btnNo"; + footer.appendChild(noButton); + + dialog.appendChild(footer); + + this.m_layer.appendChild(dialog); + Layer.add(this.m_layer); + + translatePage(".YesNoDialog"); + + this._addElements(); + if (this.arInitConfigString != "") { + this._initDialog(); + } + + this.setHeight(); + this.setWidth(700); + }, + + _initDialog: function() { + var self = this; + jQuery.each(this.arInitConfigString, function(index, cfg){ + var cfg = cfg.replace(/{/,"").replace(/}/,""), + arCfgParamString = cfg.split(","), + arParam = []; + + var curRow; + + jQuery.each(arCfgParamString, function(index, param) { + var _arParam = param.split("="); + arParam[_arParam[0]] = _arParam[1]; + }); + + if (typeof arParam["DDID"] != "undefined") { + curRow = arParam["DDID"]; + + if (arParam["DDS"] != "") { + if (arParam["DDS"] == "XXX") { + jQuery("#resetDisplay").attr("checked", true).change(); + arParam["DDS"] = ""; + // Because the reset command doesn't set DDA and DDTC + // we have to set DDA and DDTC manually when initializing the dialog within programs. + arParam["DDA"] = "CENTER"; + arParam["DDBC"] = "WHITE"; + arParam["DDTC"] = "BLACK"; + arParam["DDI"] = "0"; + } + jQuery("#text_" + curRow).val(self._decodeSpecialChars(arParam["DDS"])); + } + + jQuery("#align_" + curRow).val(arParam["DDA"]).change(); + jQuery("#bgColor_" + curRow).val(arParam["DDBC"]); + jQuery("#textColor_" + curRow).val(arParam["DDTC"]); + jQuery("#icon_" + curRow).val(arParam["DDI"]).change(); + } + + if (typeof arParam["ANS"] != "undefined") { + jQuery("#soundSelectBox").val(arParam["ANS"]).change(); + jQuery("#soundQuantitySelectBox").val(arParam["R"]); + jQuery("#soundTimeLagSelectBox").val(arParam["IN"]); + } + + }); + }, + + _addElements: function() { + var self = this, + dialogContentElem = jQuery("#statusDisplayDialog"); + + dialogContentElem.append(function(index,html){ + var content = "
Auswahl<\/th>\n + Seriennummer<\/th>\n + Zugriffscode<\/th>\n + IP Adresse<\/td>\n + <\/tr>\n +\t{for gateway in m_gateways}\n +
<\/td>\n + ${gateway.serial} <\/td>\n + ${gateway.key} <\/td>\n + ${gateway.ip} <\/td>\n + <\/tr>\n +\t{forelse}\n +\t
Momentan sind keine Funk-LAN-Gateways verfügbar.<\/td>\n + <\/tr>\n +\t{\/for}\n +<\/table>\n +<\/div>\n +<\/form>"; +STRINGFILTER_JST = "\n +
Filter<\/div>\n +
\n +
\n + \n +
Setzen<\/div>\n +
Schließen<\/div>\n + <\/div>\n + <\/div>\n +<\/th>"; +DEV_LIST = new Array(); +DEV_DESCRIPTION = new Array(); +DEV_PATHS = new Array(); +DEV_HIGHLIGHT = new Array(); +DEV_LIST.push('HM-RC-Sec4-3'); +DEV_DESCRIPTION["HM-RC-Sec4-3"] = "HM-RC-4"; +DEV_PATHS["HM-RC-Sec4-3"] = new Object(); +DEV_PATHS["HM-RC-Sec4-3"]["50"] = "/config/img/devices/50/84_hm-rc-4-x_thumb.png"; +DEV_PATHS["HM-RC-Sec4-3"]["250"] = "/config/img/devices/250/85_hm-rc-sec4-3.png"; +DEV_HIGHLIGHT["HM-RC-Sec4-3"] = new Object(); +DEV_HIGHLIGHT["HM-RC-Sec4-3"]["arrow_part1"] = [6, 0.312, 0.288, 0.416, 0.288, 0.012]; +DEV_HIGHLIGHT["HM-RC-Sec4-3"]["arrow_part2"] = [6, 0.312, 0.288, 0.352, 0.248, 0.012]; +DEV_HIGHLIGHT["HM-RC-Sec4-3"]["arrow_part3"] = [6, 0.312, 0.288, 0.352, 0.328, 0.012]; +DEV_HIGHLIGHT["HM-RC-Sec4-3"]["Arrow"] = [5, 'arrow_part1', 'arrow_part2', 'arrow_part3']; +DEV_HIGHLIGHT["HM-RC-Sec4-3"]["1_Arrow"] = [7, 'Arrow', 0.25, 0.0]; +DEV_HIGHLIGHT["HM-RC-Sec4-3"]["2_Arrow"] = [7, 'Arrow', 0.238, 0.156]; +DEV_HIGHLIGHT["HM-RC-Sec4-3"]["3_Arrow"] = [7, 'Arrow', 0.228, 0.312]; +DEV_HIGHLIGHT["HM-RC-Sec4-3"]["4_Arrow"] = [7, 'Arrow', 0.212, 0.468]; +DEV_HIGHLIGHT["HM-RC-Sec4-3"]["1"] = [5, '2_Arrow']; +DEV_HIGHLIGHT["HM-RC-Sec4-3"]["2"] = [5, '1_Arrow']; +DEV_HIGHLIGHT["HM-RC-Sec4-3"]["3"] = [5, '4_Arrow']; +DEV_HIGHLIGHT["HM-RC-Sec4-3"]["4"] = [5, '3_Arrow']; +DEV_HIGHLIGHT["HM-RC-Sec4-3"]["1+2"] = [5, '1_Arrow', '2_Arrow']; +DEV_HIGHLIGHT["HM-RC-Sec4-3"]["3+4"] = [5, '3_Arrow', '4_Arrow']; +DEV_LIST.push('HmIP-eTRV-C'); +DEV_DESCRIPTION["HmIP-eTRV-C"] = "TRV-C"; +DEV_PATHS["HmIP-eTRV-C"] = new Object(); +DEV_PATHS["HmIP-eTRV-C"]["50"] = "/config/img/devices/50/188_hmip-etrv-c_thumb.png"; +DEV_PATHS["HmIP-eTRV-C"]["250"] = "/config/img/devices/250/188_hmip-etrv-c.png"; +DEV_HIGHLIGHT["HmIP-eTRV-C"] = new Object(); +DEV_LIST.push('HMW-LC-Bl1-DR'); +DEV_DESCRIPTION["HMW-LC-Bl1-DR"] = "HMW-LC-Bl1-DR"; +DEV_PATHS["HMW-LC-Bl1-DR"] = new Object(); +DEV_PATHS["HMW-LC-Bl1-DR"]["50"] = "/config/img/devices/50/27_hmw-lc-bl1-dr_thumb.png"; +DEV_PATHS["HMW-LC-Bl1-DR"]["250"] = "/config/img/devices/250/27_hmw-lc-bl1-dr.png"; +DEV_HIGHLIGHT["HMW-LC-Bl1-DR"] = new Object(); +DEV_HIGHLIGHT["HMW-LC-Bl1-DR"]["1"] = [2, 0.452, 0.772, 0.044, 0.06]; +DEV_HIGHLIGHT["HMW-LC-Bl1-DR"]["2"] = [2, 0.5, 0.772, 0.048, 0.06]; +DEV_HIGHLIGHT["HMW-LC-Bl1-DR"]["3"] = [2, 0.452, 0.388, 0.096, 0.06]; +DEV_LIST.push('HmIP-WTH-B-2'); +DEV_DESCRIPTION["HmIP-WTH-B-2"] = "HmIP-WTH-B"; +DEV_PATHS["HmIP-WTH-B-2"] = new Object(); +DEV_PATHS["HmIP-WTH-B-2"]["50"] = "/config/img/devices/50/200_hmip-wth-b_thumb.png"; +DEV_PATHS["HmIP-WTH-B-2"]["250"] = "/config/img/devices/250/200_hmip-wth-b.png"; +DEV_HIGHLIGHT["HmIP-WTH-B-2"] = new Object(); +DEV_LIST.push('HmIPW-STH'); +DEV_DESCRIPTION["HmIPW-STH"] = "HmIPW-STH"; +DEV_PATHS["HmIPW-STH"] = new Object(); +DEV_PATHS["HmIPW-STH"]["50"] = "/config/img/devices/50/146_hmip-sth_thumb.png"; +DEV_PATHS["HmIPW-STH"]["250"] = "/config/img/devices/250/146_hmip-sth.png"; +DEV_HIGHLIGHT["HmIPW-STH"] = new Object(); +DEV_LIST.push('HM-RC-Key3'); +DEV_DESCRIPTION["HM-RC-Key3"] = "HM-RC-Key3"; +DEV_PATHS["HM-RC-Key3"] = new Object(); +DEV_PATHS["HM-RC-Key3"]["50"] = "/config/img/devices/50/23_hm-rc-key3-b_thumb.png"; +DEV_PATHS["HM-RC-Key3"]["250"] = "/config/img/devices/250/23_hm-rc-key3-b.png"; +DEV_HIGHLIGHT["HM-RC-Key3"] = new Object(); +DEV_HIGHLIGHT["HM-RC-Key3"]["1"] = [4, 0.252, 0.2, 0.16, 0.18]; +DEV_HIGHLIGHT["HM-RC-Key3"]["2"] = [4, 0.492, 0.2, 0.16, 0.18]; +DEV_HIGHLIGHT["HM-RC-Key3"]["3"] = [4, 0.34, 0.484, 0.228, 0.252]; +DEV_HIGHLIGHT["HM-RC-Key3"]["1+2"] = [5, '1', '2']; +DEV_LIST.push('HM-Dis-TD-T'); +DEV_DESCRIPTION["HM-Dis-TD-T"] = "HM-Dis-TD-T"; +DEV_PATHS["HM-Dis-TD-T"] = new Object(); +DEV_PATHS["HM-Dis-TD-T"]["50"] = "/config/img/devices/50/81_hm-dis-td-t_thumb.png"; +DEV_PATHS["HM-Dis-TD-T"]["250"] = "/config/img/devices/250/81_hm-dis-td-t.png"; +DEV_HIGHLIGHT["HM-Dis-TD-T"] = new Object(); +DEV_LIST.push('HM-ES-PMSw1-DR'); +DEV_DESCRIPTION["HM-ES-PMSw1-DR"] = "HM-ES-PMSw1-DR"; +DEV_PATHS["HM-ES-PMSw1-DR"] = new Object(); +DEV_PATHS["HM-ES-PMSw1-DR"]["50"] = "/config/img/devices/50/110_hm-es-pmsw1-dr_thump.png"; +DEV_PATHS["HM-ES-PMSw1-DR"]["250"] = "/config/img/devices/250/110_hm-es-pmsw1-dr.png"; +DEV_HIGHLIGHT["HM-ES-PMSw1-DR"] = new Object(); +DEV_LIST.push('KS550'); +DEV_DESCRIPTION["KS550"] = "KS550"; +DEV_PATHS["KS550"] = new Object(); +DEV_PATHS["KS550"]["50"] = "/config/img/devices/50/WeatherCombiSensor_thumb.png"; +DEV_PATHS["KS550"]["250"] = "/config/img/devices/250/WeatherCombiSensor.png"; +DEV_HIGHLIGHT["KS550"] = new Object(); +DEV_LIST.push('HM-WS550-US'); +DEV_DESCRIPTION["HM-WS550-US"] = "HM-WS550-US"; +DEV_PATHS["HM-WS550-US"] = new Object(); +DEV_PATHS["HM-WS550-US"]["50"] = "/config/img/devices/50/9_hm-ws550-us_thumb.png"; +DEV_PATHS["HM-WS550-US"]["250"] = "/config/img/devices/250/9_hm-ws550-us.png"; +DEV_HIGHLIGHT["HM-WS550-US"] = new Object(); +DEV_HIGHLIGHT["HM-WS550-US"]["1"] = [3, 0.440, 0.200, '1', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-WS550-US"]["2"] = [3, 0.440, 0.200, '2', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-WS550-US"]["3"] = [3, 0.440, 0.200, '3', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-WS550-US"]["4"] = [3, 0.440, 0.200, '4', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-WS550-US"]["5"] = [3, 0.440, 0.200, '5', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-WS550-US"]["6"] = [3, 0.440, 0.200, '6', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-WS550-US"]["7"] = [3, 0.440, 0.200, '7', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-WS550-US"]["8"] = [3, 0.440, 0.200, '8', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-WS550-US"]["9"] = [3, 0.440, 0.200, '9', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-WS550-US"]["10"] = [3, 0.405, 0.200, '10', 0.124, 'verdana', Font.BOLD]; +DEV_LIST.push('HmIP-PSM-2 QHJ'); +DEV_DESCRIPTION["HmIP-PSM-2 QHJ"] = "PSM"; +DEV_PATHS["HmIP-PSM-2 QHJ"] = new Object(); +DEV_PATHS["HmIP-PSM-2 QHJ"]["50"] = "/config/img/devices/50/113_hmip-psm_thumb.png"; +DEV_PATHS["HmIP-PSM-2 QHJ"]["250"] = "/config/img/devices/250/113_hmip-psm.png"; +DEV_HIGHLIGHT["HmIP-PSM-2 QHJ"] = new Object(); +DEV_LIST.push('HmIP-KRC4'); +DEV_DESCRIPTION["HmIP-KRC4"] = "KRC4"; +DEV_PATHS["HmIP-KRC4"] = new Object(); +DEV_PATHS["HmIP-KRC4"]["50"] = "/config/img/devices/50/84_hm-rc-4-x_thumb.png"; +DEV_PATHS["HmIP-KRC4"]["250"] = "/config/img/devices/250/84_hm-rc-4-3.png"; +DEV_HIGHLIGHT["HmIP-KRC4"] = new Object(); +DEV_HIGHLIGHT["HmIP-KRC4"]["arrow_part1"] = [6, 0.312, 0.288, 0.416, 0.288, 0.012]; +DEV_HIGHLIGHT["HmIP-KRC4"]["arrow_part2"] = [6, 0.312, 0.288, 0.352, 0.248, 0.012]; +DEV_HIGHLIGHT["HmIP-KRC4"]["arrow_part3"] = [6, 0.312, 0.288, 0.352, 0.328, 0.012]; +DEV_HIGHLIGHT["HmIP-KRC4"]["Arrow"] = [5, 'arrow_part1', 'arrow_part2', 'arrow_part3']; +DEV_HIGHLIGHT["HmIP-KRC4"]["1_Arrow"] = [7, 'Arrow', 0.25, 0.0]; +DEV_HIGHLIGHT["HmIP-KRC4"]["2_Arrow"] = [7, 'Arrow', 0.238, 0.156]; +DEV_HIGHLIGHT["HmIP-KRC4"]["3_Arrow"] = [7, 'Arrow', 0.228, 0.312]; +DEV_HIGHLIGHT["HmIP-KRC4"]["4_Arrow"] = [7, 'Arrow', 0.212, 0.468]; +DEV_HIGHLIGHT["HmIP-KRC4"]["1"] = [5, '2_Arrow']; +DEV_HIGHLIGHT["HmIP-KRC4"]["2"] = [5, '1_Arrow']; +DEV_HIGHLIGHT["HmIP-KRC4"]["3"] = [5, '4_Arrow']; +DEV_HIGHLIGHT["HmIP-KRC4"]["4"] = [5, '3_Arrow']; +DEV_HIGHLIGHT["HmIP-KRC4"]["1+2"] = [5, '1_Arrow', '2_Arrow']; +DEV_HIGHLIGHT["HmIP-KRC4"]["3+4"] = [5, '3_Arrow', '4_Arrow']; +DEV_LIST.push('HmIP-FLC'); +DEV_DESCRIPTION["HmIP-FLC"] = "HmIP-FLC"; +DEV_PATHS["HmIP-FLC"] = new Object(); +DEV_PATHS["HmIP-FLC"]["50"] = "/config/img/devices/50/233_hmip-flc_thumb.png"; +DEV_PATHS["HmIP-FLC"]["250"] = "/config/img/devices/250/233_hmip-flc.png"; +DEV_HIGHLIGHT["HmIP-FLC"] = new Object(); +DEV_LIST.push('HmIP-MOD-OC8'); +DEV_DESCRIPTION["HmIP-MOD-OC8"] = "HmIP-MOD-OC8"; +DEV_PATHS["HmIP-MOD-OC8"] = new Object(); +DEV_PATHS["HmIP-MOD-OC8"]["50"] = "/config/img/devices/50/156_hmip-mod-oc8_thumb.png"; +DEV_PATHS["HmIP-MOD-OC8"]["250"] = "/config/img/devices/250/156_hmip-mod-oc8.png"; +DEV_HIGHLIGHT["HmIP-MOD-OC8"] = new Object(); +DEV_LIST.push('HmIP-KRC4-2'); +DEV_DESCRIPTION["HmIP-KRC4-2"] = "KRC4"; +DEV_PATHS["HmIP-KRC4-2"] = new Object(); +DEV_PATHS["HmIP-KRC4-2"]["50"] = "/config/img/devices/50/84_hm-rc-4-x_thumb.png"; +DEV_PATHS["HmIP-KRC4-2"]["250"] = "/config/img/devices/250/84_hm-rc-4-3.png"; +DEV_HIGHLIGHT["HmIP-KRC4-2"] = new Object(); +DEV_HIGHLIGHT["HmIP-KRC4-2"]["arrow_part1"] = [6, 0.312, 0.288, 0.416, 0.288, 0.012]; +DEV_HIGHLIGHT["HmIP-KRC4-2"]["arrow_part2"] = [6, 0.312, 0.288, 0.352, 0.248, 0.012]; +DEV_HIGHLIGHT["HmIP-KRC4-2"]["arrow_part3"] = [6, 0.312, 0.288, 0.352, 0.328, 0.012]; +DEV_HIGHLIGHT["HmIP-KRC4-2"]["Arrow"] = [5, 'arrow_part1', 'arrow_part2', 'arrow_part3']; +DEV_HIGHLIGHT["HmIP-KRC4-2"]["1_Arrow"] = [7, 'Arrow', 0.25, 0.0]; +DEV_HIGHLIGHT["HmIP-KRC4-2"]["2_Arrow"] = [7, 'Arrow', 0.238, 0.156]; +DEV_HIGHLIGHT["HmIP-KRC4-2"]["3_Arrow"] = [7, 'Arrow', 0.228, 0.312]; +DEV_HIGHLIGHT["HmIP-KRC4-2"]["4_Arrow"] = [7, 'Arrow', 0.212, 0.468]; +DEV_HIGHLIGHT["HmIP-KRC4-2"]["1"] = [5, '2_Arrow']; +DEV_HIGHLIGHT["HmIP-KRC4-2"]["2"] = [5, '1_Arrow']; +DEV_HIGHLIGHT["HmIP-KRC4-2"]["3"] = [5, '4_Arrow']; +DEV_HIGHLIGHT["HmIP-KRC4-2"]["4"] = [5, '3_Arrow']; +DEV_HIGHLIGHT["HmIP-KRC4-2"]["1+2"] = [5, '1_Arrow', '2_Arrow']; +DEV_HIGHLIGHT["HmIP-KRC4-2"]["3+4"] = [5, '3_Arrow', '4_Arrow']; +DEV_LIST.push('HmIP-eTRV-B'); +DEV_DESCRIPTION["HmIP-eTRV-B"] = "TRV-B"; +DEV_PATHS["HmIP-eTRV-B"] = new Object(); +DEV_PATHS["HmIP-eTRV-B"]["50"] = "/config/img/devices/50/180_hmip-etrv-b_thumb.png"; +DEV_PATHS["HmIP-eTRV-B"]["250"] = "/config/img/devices/250/180_hmip-etrv-b.png"; +DEV_HIGHLIGHT["HmIP-eTRV-B"] = new Object(); +DEV_LIST.push('HmIPW-FAL24-C10'); +DEV_DESCRIPTION["HmIPW-FAL24-C10"] = "HmIPW-FAL24-C10"; +DEV_PATHS["HmIPW-FAL24-C10"] = new Object(); +DEV_PATHS["HmIPW-FAL24-C10"]["50"] = "/config/img/devices/50/138_hmip-fal-c10_thumb.png"; +DEV_PATHS["HmIPW-FAL24-C10"]["250"] = "/config/img/devices/250/138_hmip-fal-c10.png"; +DEV_HIGHLIGHT["HmIPW-FAL24-C10"] = new Object(); +DEV_LIST.push('HmIP-WGC'); +DEV_DESCRIPTION["HmIP-WGC"] = "HmIP-WGC"; +DEV_PATHS["HmIP-WGC"] = new Object(); +DEV_PATHS["HmIP-WGC"]["50"] = "/config/img/devices/50/144_hmip-wgc_thumb.png"; +DEV_PATHS["HmIP-WGC"]["250"] = "/config/img/devices/250/144_hmip-wgc.png"; +DEV_HIGHLIGHT["HmIP-WGC"] = new Object(); +DEV_LIST.push('HM-Sen-LI-O'); +DEV_DESCRIPTION["HM-Sen-LI-O"] = "HM-Sen-LI-O"; +DEV_PATHS["HM-Sen-LI-O"] = new Object(); +DEV_PATHS["HM-Sen-LI-O"]["50"] = "/config/img/devices/50/126_hm-sen-li-o_thumb.png"; +DEV_PATHS["HM-Sen-LI-O"]["250"] = "/config/img/devices/250/126_hm-sen-li-o.png"; +DEV_HIGHLIGHT["HM-Sen-LI-O"] = new Object(); +DEV_LIST.push('HmIP-STHO'); +DEV_DESCRIPTION["HmIP-STHO"] = "HmIP-STHO"; +DEV_PATHS["HmIP-STHO"] = new Object(); +DEV_PATHS["HmIP-STHO"]["50"] = "/config/img/devices/50/148_hmip-stho_thumb.png"; +DEV_PATHS["HmIP-STHO"]["250"] = "/config/img/devices/250/148_hmip-stho.png"; +DEV_HIGHLIGHT["HmIP-STHO"] = new Object(); +DEV_LIST.push('ELV-SH-BM-S'); +DEV_DESCRIPTION["ELV-SH-BM-S"] = "ELV-SH-BM-S"; +DEV_PATHS["ELV-SH-BM-S"] = new Object(); +DEV_PATHS["ELV-SH-BM-S"]["50"] = "/config/img/devices/50/229_elv-sh-bm-s_thumb.png"; +DEV_PATHS["ELV-SH-BM-S"]["250"] = "/config/img/devices/250/229_elv-sh-bm-s.png"; +DEV_HIGHLIGHT["ELV-SH-BM-S"] = new Object(); +DEV_LIST.push('HM-Sec-SC-2'); +DEV_DESCRIPTION["HM-Sec-SC-2"] = "HM-Sec-SC-2"; +DEV_PATHS["HM-Sec-SC-2"] = new Object(); +DEV_PATHS["HM-Sec-SC-2"]["50"] = "/config/img/devices/50/16_hm-sec-sc_thumb.png"; +DEV_PATHS["HM-Sec-SC-2"]["250"] = "/config/img/devices/250/16_hm-sec-sc.png"; +DEV_HIGHLIGHT["HM-Sec-SC-2"] = new Object(); +DEV_LIST.push('HM-LC-Sw1-Pl-DN-R3'); +DEV_DESCRIPTION["HM-LC-Sw1-Pl-DN-R3"] = "HM-LC-Sw1-Pl-DN-R3"; +DEV_PATHS["HM-LC-Sw1-Pl-DN-R3"] = new Object(); +DEV_PATHS["HM-LC-Sw1-Pl-DN-R3"]["50"] = "/config/img/devices/50/107_hm-es-pmsw1-pl-R3_thumb.png"; +DEV_PATHS["HM-LC-Sw1-Pl-DN-R3"]["250"] = "/config/img/devices/250/107_hm-es-pmsw1-pl-R3.png"; +DEV_HIGHLIGHT["HM-LC-Sw1-Pl-DN-R3"] = new Object(); +DEV_LIST.push('HmIP-BWTH'); +DEV_DESCRIPTION["HmIP-BWTH"] = "HmIP-WTH"; +DEV_PATHS["HmIP-BWTH"] = new Object(); +DEV_PATHS["HmIP-BWTH"]["50"] = "/config/img/devices/50/121_hmip-wth_thumb.png"; +DEV_PATHS["HmIP-BWTH"]["250"] = "/config/img/devices/250/121_hmip-wth.png"; +DEV_HIGHLIGHT["HmIP-BWTH"] = new Object(); +DEV_LIST.push('HmIP-WTH-2'); +DEV_DESCRIPTION["HmIP-WTH-2"] = "HmIP-WTH-2"; +DEV_PATHS["HmIP-WTH-2"] = new Object(); +DEV_PATHS["HmIP-WTH-2"]["50"] = "/config/img/devices/50/121_hmip-wth_thumb.png"; +DEV_PATHS["HmIP-WTH-2"]["250"] = "/config/img/devices/250/121_hmip-wth.png"; +DEV_HIGHLIGHT["HmIP-WTH-2"] = new Object(); +DEV_LIST.push('HM-RC-4-3-D'); +DEV_DESCRIPTION["HM-RC-4-3-D"] = "HM-RC-4"; +DEV_PATHS["HM-RC-4-3-D"] = new Object(); +DEV_PATHS["HM-RC-4-3-D"]["50"] = "/config/img/devices/50/84_hm-rc-4-x_thumb.png"; +DEV_PATHS["HM-RC-4-3-D"]["250"] = "/config/img/devices/250/116_hm-rc-4-3_brc-h3.png"; +DEV_HIGHLIGHT["HM-RC-4-3-D"] = new Object(); +DEV_LIST.push('HM-Sec-SD-Team'); +DEV_DESCRIPTION["HM-Sec-SD-Team"] = "HM-Sec-SD-Team"; +DEV_PATHS["HM-Sec-SD-Team"] = new Object(); +DEV_PATHS["HM-Sec-SD-Team"]["50"] = "/config/img/devices/50/52_hm-sec-sd-team_thumb.png"; +DEV_PATHS["HM-Sec-SD-Team"]["250"] = "/config/img/devices/250/52_hm-sec-sd-team.png"; +DEV_HIGHLIGHT["HM-Sec-SD-Team"] = new Object(); +DEV_LIST.push('263 130'); +DEV_DESCRIPTION["263 130"] = "263_130"; +DEV_PATHS["263 130"] = new Object(); +DEV_PATHS["263 130"]["50"] = "/config/img/devices/50/4_hm-lc-sw1-fm_thumb.png"; +DEV_PATHS["263 130"]["250"] = "/config/img/devices/250/4_hm-lc-sw1-fm.png"; +DEV_HIGHLIGHT["263 130"] = new Object(); +DEV_HIGHLIGHT["263 130"]["1_AUS"] = [2, 0.288, 0.66, 0.068, 0.152]; +DEV_HIGHLIGHT["263 130"]["1_EIN"] = [2, 0.548, 0.66, 0.068, 0.152]; +DEV_HIGHLIGHT["263 130"]["1"] = [5, '1_AUS', '1_EIN']; +DEV_LIST.push('263_149_/_263_150'); +DEV_DESCRIPTION["263_149_/_263_150"] = "263_149_/_263_150"; +DEV_PATHS["263_149_/_263_150"] = new Object(); +DEV_PATHS["263_149_/_263_150"]["50"] = "/config/img/devices/50/hm_resc-win-pcb-sc_thumb.png"; +DEV_PATHS["263_149_/_263_150"]["250"] = "/config/img/devices/250/hm_resc-win-pcb-sc.png"; +DEV_HIGHLIGHT["263_149_/_263_150"] = new Object(); +DEV_LIST.push('HM-PB-2-WM55-2'); +DEV_DESCRIPTION["HM-PB-2-WM55-2"] = "HM-PB-2-WM55"; +DEV_PATHS["HM-PB-2-WM55-2"] = new Object(); +DEV_PATHS["HM-PB-2-WM55-2"]["50"] = "/config/img/devices/50/75_hm-pb-2-wm55_thumb.png"; +DEV_PATHS["HM-PB-2-WM55-2"]["250"] = "/config/img/devices/250/75_hm-pb-2-wm55.png"; +DEV_HIGHLIGHT["HM-PB-2-WM55-2"] = new Object(); +DEV_HIGHLIGHT["HM-PB-2-WM55-2"]["2"] = [2, 0.204, 0.23, 0.546, 0.128]; +DEV_HIGHLIGHT["HM-PB-2-WM55-2"]["1"] = [2, 0.204, 0.65, 0.546, 0.128]; +DEV_LIST.push('HmIP-FCI1'); +DEV_DESCRIPTION["HmIP-FCI1"] = "HmIP-FCI1"; +DEV_PATHS["HmIP-FCI1"] = new Object(); +DEV_PATHS["HmIP-FCI1"]["50"] = "/config/img/devices/50/182_hmip-fci1_thumb.png"; +DEV_PATHS["HmIP-FCI1"]["250"] = "/config/img/devices/250/182_hmip-fci1.png"; +DEV_HIGHLIGHT["HmIP-FCI1"] = new Object(); +DEV_LIST.push('HmIPW-DRAP'); +DEV_DESCRIPTION["HmIPW-DRAP"] = "HmIPW-DRAP"; +DEV_PATHS["HmIPW-DRAP"] = new Object(); +DEV_PATHS["HmIPW-DRAP"]["50"] = "/config/img/devices/50/162_hmipw-drap_thumb.png"; +DEV_PATHS["HmIPW-DRAP"]["250"] = "/config/img/devices/250/162_hmipw-drap.png"; +DEV_HIGHLIGHT["HmIPW-DRAP"] = new Object(); +DEV_HIGHLIGHT["HmIPW-DRAP"]["1"] = [1, 0.240, 0.875, 0.040]; +DEV_HIGHLIGHT["HmIPW-DRAP"]["2"] = [1, 0.450, 0.875, 0.040]; +DEV_LIST.push('HM-LC-Dim1T-FM-644'); +DEV_DESCRIPTION["HM-LC-Dim1T-FM-644"] = "HM-LC-Dim1T-FM"; +DEV_PATHS["HM-LC-Dim1T-FM-644"] = new Object(); +DEV_PATHS["HM-LC-Dim1T-FM-644"]["50"] = "/config/img/devices/50/65_hm-lc-dim1t-fm_thumb.png"; +DEV_PATHS["HM-LC-Dim1T-FM-644"]["250"] = "/config/img/devices/250/65_hm-lc-dim1t-fm.png"; +DEV_HIGHLIGHT["HM-LC-Dim1T-FM-644"] = new Object(); +DEV_LIST.push('HM-WDS30-OT2-SM-2'); +DEV_DESCRIPTION["HM-WDS30-OT2-SM-2"] = "HM-WDS30-OT2-SM"; +DEV_PATHS["HM-WDS30-OT2-SM-2"] = new Object(); +DEV_PATHS["HM-WDS30-OT2-SM-2"]["50"] = "/config/img/devices/50/127_hm-wds30-ot2-sm-2_thumb.png"; +DEV_PATHS["HM-WDS30-OT2-SM-2"]["250"] = "/config/img/devices/250/127_hm-wds30-ot2-sm-2.png"; +DEV_HIGHLIGHT["HM-WDS30-OT2-SM-2"] = new Object(); +DEV_LIST.push('HM-LC-Sw1-Pl'); +DEV_DESCRIPTION["HM-LC-Sw1-Pl"] = "HM-LC-Sw1-Pl"; +DEV_PATHS["HM-LC-Sw1-Pl"] = new Object(); +DEV_PATHS["HM-LC-Sw1-Pl"]["50"] = "/config/img/devices/50/OM55_DimmerSwitch_thumb.png"; +DEV_PATHS["HM-LC-Sw1-Pl"]["250"] = "/config/img/devices/250/OM55_DimmerSwitch.png"; +DEV_HIGHLIGHT["HM-LC-Sw1-Pl"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Sw1-Pl"]["1_part1"] = [2, 0.548, 0.468, 0.072, 0.052]; +DEV_HIGHLIGHT["HM-LC-Sw1-Pl"]["1_part2"] = [2, 0.612, 0.452, 0.028, 0.056]; +DEV_HIGHLIGHT["HM-LC-Sw1-Pl"]["1"] = [5, '1_part1', '1_part2']; +DEV_LIST.push('HM-Sen-EP'); +DEV_DESCRIPTION["HM-Sen-EP"] = "HM-Sen-EP"; +DEV_PATHS["HM-Sen-EP"] = new Object(); +DEV_PATHS["HM-Sen-EP"]["50"] = "/config/img/devices/50/48_hm-sen-ep_thumb.png"; +DEV_PATHS["HM-Sen-EP"]["250"] = "/config/img/devices/250/48_hm-sen-ep.png"; +DEV_HIGHLIGHT["HM-Sen-EP"] = new Object(); +DEV_HIGHLIGHT["HM-Sen-EP"]["1_rect"] = [2, 0.14, 0.612, 0.086, 0.05]; +DEV_HIGHLIGHT["HM-Sen-EP"]["2_rect"] = [2, 0.14, 0.740, 0.086, 0.05]; +DEV_HIGHLIGHT["HM-Sen-EP"]["1_channel"] = [3, 0.44, 0.232, '1', 0.18, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-Sen-EP"]["1"] = [5, '1_channel', '1_rect']; +DEV_HIGHLIGHT["HM-Sen-EP"]["2_channel"] = [3, 0.44, 0.232, '2', 0.18, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-Sen-EP"]["2"] = [5, '2_channel', '2_rect']; +DEV_LIST.push('HM-OU-CFM-TW'); +DEV_DESCRIPTION["HM-OU-CFM-TW"] = "HM-OU-CFM-TW"; +DEV_PATHS["HM-OU-CFM-TW"] = new Object(); +DEV_PATHS["HM-OU-CFM-TW"]["50"] = "/config/img/devices/50/117_hm-ou-cfm-tw_thumb.png"; +DEV_PATHS["HM-OU-CFM-TW"]["250"] = "/config/img/devices/250/117_hm-ou-cfm-tw.png"; +DEV_HIGHLIGHT["HM-OU-CFM-TW"] = new Object(); +DEV_HIGHLIGHT["HM-OU-CFM-TW"]["Light_circle"] = [4, 0.8079999999999999, 0.656, 0.118, 0.112]; +DEV_HIGHLIGHT["HM-OU-CFM-TW"]["Light_beam_1"] = [6, 0.748, 0.712, 0.776, 0.712, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-TW"]["Light_beam_2"] = [6, 0.776, 0.632, 0.8, 0.652, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-TW"]["Light_beam_3"] = [6, 0.86, 0.6, 0.86, 0.628, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-TW"]["Light_beam_4"] = [6, 0.94, 0.628, 0.92, 0.648, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-TW"]["Light_beam_5"] = [6, 0.944, 0.712, 0.976, 0.712, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-TW"]["Light_beam_6"] = [6, 0.8, 0.772, 0.784, 0.792, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-TW"]["Light_beam_7"] = [6, 0.86, 0.796, 0.86, 0.8240000000000001, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-TW"]["Light_beam_8"] = [6, 0.92, 0.772, 0.94, 0.792, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-TW"]["1"] = [5, 'Light_circle', 'Light_beam_1', 'Light_beam_2', 'Light_beam_3', 'Light_beam_4', 'Light_beam_5', 'Light_beam_6', 'Light_beam_7', 'Light_beam_8']; +DEV_HIGHLIGHT["HM-OU-CFM-TW"]["SP_1"] = [6, 0.764, 0.12, 0.792, 0.12, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-TW"]["SP_2"] = [6, 0.792, 0.12, 0.792, 0.2599999999999999, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-TW"]["SP_3"] = [6, 0.764, 0.2599999999999999, 0.792, 0.2599999999999999, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-TW"]["SP_4"] = [6, 0.764, 0.12, 0.764, 0.2599999999999999, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-TW"]["SP_5"] = [6, 0.792, 0.12, 0.836, 0.07599999999999996, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-TW"]["SP_6"] = [6, 0.836, 0.07599999999999996, 0.836, 0.30399999999999994, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-TW"]["SP_7"] = [6, 0.792, 0.2599999999999999, 0.836, 0.30399999999999994, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-TW"]["SP_beam_1"] = [6, 0.87, 0.1439999999999999, 0.952, 0.07599999999999996, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-TW"]["SP_beam_2"] = [6, 0.87, 0.19199999999999995, 0.952, 0.19199999999999995, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-TW"]["SP_beam_3"] = [6, 0.87, 0.24, 0.952, 0.30399999999999994, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-TW"]["2"] = [5, 'SP_1', 'SP_2', 'SP_3', 'SP_4', 'SP_5', 'SP_6', 'SP_7', 'SP_beam_1', 'SP_beam_2', 'SP_beam_3']; +DEV_LIST.push('HmIP-SWDO-I'); +DEV_DESCRIPTION["HmIP-SWDO-I"] = "HmIP-SWDO-I"; +DEV_PATHS["HmIP-SWDO-I"] = new Object(); +DEV_PATHS["HmIP-SWDO-I"]["50"] = "/config/img/devices/50/152_hmip-swdo-i_thumb.png"; +DEV_PATHS["HmIP-SWDO-I"]["250"] = "/config/img/devices/250/152_hmip-swdo-i.png"; +DEV_HIGHLIGHT["HmIP-SWDO-I"] = new Object(); +DEV_LIST.push('HM-ES-PMSw1-Pl-DN-R2'); +DEV_DESCRIPTION["HM-ES-PMSw1-Pl-DN-R2"] = "HM-ES-PMSw1-Pl-DN-R2"; +DEV_PATHS["HM-ES-PMSw1-Pl-DN-R2"] = new Object(); +DEV_PATHS["HM-ES-PMSw1-Pl-DN-R2"]["50"] = "/config/img/devices/50/107_hm-es-pmsw1-pl-R2_thumb.png"; +DEV_PATHS["HM-ES-PMSw1-Pl-DN-R2"]["250"] = "/config/img/devices/250/107_hm-es-pmsw1-pl-R2.png"; +DEV_HIGHLIGHT["HM-ES-PMSw1-Pl-DN-R2"] = new Object(); +DEV_LIST.push('HM-PB-2-FM'); +DEV_DESCRIPTION["HM-PB-2-FM"] = "HM-PB-2-FM"; +DEV_PATHS["HM-PB-2-FM"] = new Object(); +DEV_PATHS["HM-PB-2-FM"]["50"] = "/config/img/devices/50/PushButton-2ch-wm_thumb.png"; +DEV_PATHS["HM-PB-2-FM"]["250"] = "/config/img/devices/250/PushButton-2ch-wm.png"; +DEV_HIGHLIGHT["HM-PB-2-FM"] = new Object(); +DEV_HIGHLIGHT["HM-PB-2-FM"]["2"] = [2, 0.244, 0.312, 0.428, 0.168]; +DEV_HIGHLIGHT["HM-PB-2-FM"]["1"] = [2, 0.244, 0.56, 0.428, 0.168]; +DEV_HIGHLIGHT["HM-PB-2-FM"]["1+2"] = [2, 0.244, 0.308, 0.428, 0.416]; +DEV_LIST.push('DEVICE'); +DEV_DESCRIPTION["DEVICE"] = "DEVICE"; +DEV_PATHS["DEVICE"] = new Object(); +DEV_PATHS["DEVICE"]["50"] = "/config/img/devices/50/unknown_device_thumb.png"; +DEV_PATHS["DEVICE"]["250"] = "/config/img/devices/250/unknown_device.png"; +DEV_HIGHLIGHT["DEVICE"] = new Object(); +DEV_HIGHLIGHT["DEVICE"]["Icon"] = [3, 0.092, 0.6, 'Icon_folgt', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["DEVICE"]["1_channel"] = [3, 0.44, 0.232, '1', 0.18, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["DEVICE"]["1"] = [5, '1_channel', 'Icon']; +DEV_HIGHLIGHT["DEVICE"]["2_channel"] = [3, 0.44, 0.232, '2', 0.18, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["DEVICE"]["2"] = [5, '2_channel', 'Icon']; +DEV_LIST.push('HmIP-FSM16'); +DEV_DESCRIPTION["HmIP-FSM16"] = "FSM16"; +DEV_PATHS["HmIP-FSM16"] = new Object(); +DEV_PATHS["HmIP-FSM16"]["50"] = "/config/img/devices/50/135_hmip-fsm16_thumb.png"; +DEV_PATHS["HmIP-FSM16"]["250"] = "/config/img/devices/250/135_hmip-fsm16.png"; +DEV_HIGHLIGHT["HmIP-FSM16"] = new Object(); +DEV_LIST.push('HM-PB-6-WM55'); +DEV_DESCRIPTION["HM-PB-6-WM55"] = "HM-PB-6-WM55"; +DEV_PATHS["HM-PB-6-WM55"] = new Object(); +DEV_PATHS["HM-PB-6-WM55"]["50"] = "/config/img/devices/50/86_hm-pb-6-wm55_thumb.png"; +DEV_PATHS["HM-PB-6-WM55"]["250"] = "/config/img/devices/250/86_hm-pb-6-wm55.png"; +DEV_HIGHLIGHT["HM-PB-6-WM55"] = new Object(); +DEV_HIGHLIGHT["HM-PB-6-WM55"]["1"] = [2, 0.164, 0.232, 0.112, 0.156]; +DEV_HIGHLIGHT["HM-PB-6-WM55"]["2"] = [2, 0.588, 0.232, 0.112, 0.156]; +DEV_HIGHLIGHT["HM-PB-6-WM55"]["3"] = [2, 0.164, 0.428, 0.112, 0.156]; +DEV_HIGHLIGHT["HM-PB-6-WM55"]["4"] = [2, 0.588, 0.428, 0.112, 0.156]; +DEV_HIGHLIGHT["HM-PB-6-WM55"]["5"] = [2, 0.164, 0.616, 0.112, 0.156]; +DEV_HIGHLIGHT["HM-PB-6-WM55"]["6"] = [2, 0.588, 0.616, 0.112, 0.156]; +DEV_HIGHLIGHT["HM-PB-6-WM55"]["1+2"] = [5, '1', '2']; +DEV_HIGHLIGHT["HM-PB-6-WM55"]["3+4"] = [5, '3', '4']; +DEV_HIGHLIGHT["HM-PB-6-WM55"]["5+6"] = [5, '5', '6']; +DEV_LIST.push('HmIP-FBL'); +DEV_DESCRIPTION["HmIP-FBL"] = "HmIP-FBL"; +DEV_PATHS["HmIP-FBL"] = new Object(); +DEV_PATHS["HmIP-FBL"]["50"] = "/config/img/devices/50/145_hmip-froll_hmip-fbl_thumb.png"; +DEV_PATHS["HmIP-FBL"]["250"] = "/config/img/devices/250/145_hmip-froll_hmip-fbl.png"; +DEV_HIGHLIGHT["HmIP-FBL"] = new Object(); +DEV_LIST.push('HmIP-SRH'); +DEV_DESCRIPTION["HmIP-SRH"] = "SRH"; +DEV_PATHS["HmIP-SRH"] = new Object(); +DEV_PATHS["HmIP-SRH"]["50"] = "/config/img/devices/50/130_hmip-srh_thumb.png"; +DEV_PATHS["HmIP-SRH"]["250"] = "/config/img/devices/250/130_hmip-srh.png"; +DEV_HIGHLIGHT["HmIP-SRH"] = new Object(); +DEV_LIST.push('HM-LC-Dim1L-CV'); +DEV_DESCRIPTION["HM-LC-Dim1L-CV"] = "HM-LC-Dim1L-CV"; +DEV_PATHS["HM-LC-Dim1L-CV"] = new Object(); +DEV_PATHS["HM-LC-Dim1L-CV"]["50"] = "/config/img/devices/50/2_hm-lc-dim1l-cv_thumb.png"; +DEV_PATHS["HM-LC-Dim1L-CV"]["250"] = "/config/img/devices/250/2_hm-lc-dim1l-cv.png"; +DEV_HIGHLIGHT["HM-LC-Dim1L-CV"] = new Object(); +DEV_LIST.push('HmIP-RC8'); +DEV_DESCRIPTION["HmIP-RC8"] = "RC8"; +DEV_PATHS["HmIP-RC8"] = new Object(); +DEV_PATHS["HmIP-RC8"]["50"] = "/config/img/devices/50/119_hmip-rc8_thumb.png"; +DEV_PATHS["HmIP-RC8"]["250"] = "/config/img/devices/250/119_hmip-rc8.png"; +DEV_HIGHLIGHT["HmIP-RC8"] = new Object(); +DEV_HIGHLIGHT["HmIP-RC8"]["1"] = [1, 0.472, 0.218, 0.025]; +DEV_HIGHLIGHT["HmIP-RC8"]["2"] = [1, 0.600, 0.224, 0.025]; +DEV_HIGHLIGHT["HmIP-RC8"]["3"] = [1, 0.476, 0.304, 0.025]; +DEV_HIGHLIGHT["HmIP-RC8"]["4"] = [1, 0.606, 0.306, 0.025]; +DEV_HIGHLIGHT["HmIP-RC8"]["5"] = [1, 0.480, 0.384, 0.025]; +DEV_HIGHLIGHT["HmIP-RC8"]["6"] = [1, 0.610, 0.386, 0.025]; +DEV_HIGHLIGHT["HmIP-RC8"]["7"] = [1, 0.484, 0.464, 0.025]; +DEV_HIGHLIGHT["HmIP-RC8"]["8"] = [1, 0.614, 0.466, 0.025]; +DEV_HIGHLIGHT["HmIP-RC8"]["1+2"] = [5, '1', '2']; +DEV_HIGHLIGHT["HmIP-RC8"]["3+4"] = [5, '3', '4']; +DEV_HIGHLIGHT["HmIP-RC8"]["5+6"] = [5, '5', '6']; +DEV_HIGHLIGHT["HmIP-RC8"]["7+8"] = [5, '7', '8']; +DEV_LIST.push('HmIP-FDT'); +DEV_DESCRIPTION["HmIP-FDT"] = "FDT"; +DEV_PATHS["HmIP-FDT"] = new Object(); +DEV_PATHS["HmIP-FDT"]["50"] = "/config/img/devices/50/134_hmip-fsm_thumb.png"; +DEV_PATHS["HmIP-FDT"]["250"] = "/config/img/devices/250/134_hmip-fsm.png"; +DEV_HIGHLIGHT["HmIP-FDT"] = new Object(); +DEV_LIST.push('263 157'); +DEV_DESCRIPTION["263 157"] = "263_157"; +DEV_PATHS["263 157"] = new Object(); +DEV_PATHS["263 157"]["50"] = "/config/img/devices/50/13_hm-ws550sth-i_thumb.png"; +DEV_PATHS["263 157"]["250"] = "/config/img/devices/250/13_hm-ws550sth-i.png"; +DEV_HIGHLIGHT["263 157"] = new Object(); +DEV_LIST.push('HmIP-WTH'); +DEV_DESCRIPTION["HmIP-WTH"] = "HmIP-WTH"; +DEV_PATHS["HmIP-WTH"] = new Object(); +DEV_PATHS["HmIP-WTH"]["50"] = "/config/img/devices/50/121_hmip-wth_thumb.png"; +DEV_PATHS["HmIP-WTH"]["250"] = "/config/img/devices/250/121_hmip-wth.png"; +DEV_HIGHLIGHT["HmIP-WTH"] = new Object(); +DEV_LIST.push('HmIP-eTRV-F'); +DEV_DESCRIPTION["HmIP-eTRV-F"] = "TRV"; +DEV_PATHS["HmIP-eTRV-F"] = new Object(); +DEV_PATHS["HmIP-eTRV-F"]["50"] = "/config/img/devices/50/230_hmip-etrv-f_thumb.png"; +DEV_PATHS["HmIP-eTRV-F"]["250"] = "/config/img/devices/250/230_hmip-etrv-f.png"; +DEV_HIGHLIGHT["HmIP-eTRV-F"] = new Object(); +DEV_LIST.push('ZEL STG RM FSA'); +DEV_DESCRIPTION["ZEL STG RM FSA"] = "ZEL_STG_RM_FSA"; +DEV_PATHS["ZEL STG RM FSA"] = new Object(); +DEV_PATHS["ZEL STG RM FSA"]["50"] = "/config/img/devices/50/43_hm-cc-vd_thumb.png"; +DEV_PATHS["ZEL STG RM FSA"]["250"] = "/config/img/devices/250/43_hm-cc-vd.png"; +DEV_HIGHLIGHT["ZEL STG RM FSA"] = new Object(); +DEV_LIST.push('HmIP-SWD-2'); +DEV_DESCRIPTION["HmIP-SWD-2"] = "HmIP-SWD"; +DEV_PATHS["HmIP-SWD-2"] = new Object(); +DEV_PATHS["HmIP-SWD-2"]["50"] = "/config/img/devices/50/172_hmip-swd_thumb.png"; +DEV_PATHS["HmIP-SWD-2"]["250"] = "/config/img/devices/250/172_hmip-swd.png"; +DEV_HIGHLIGHT["HmIP-SWD-2"] = new Object(); +DEV_LIST.push('HM-LC-Dim1T-FM-LF'); +DEV_DESCRIPTION["HM-LC-Dim1T-FM-LF"] = "HM-LC-Dim1T-FM"; +DEV_PATHS["HM-LC-Dim1T-FM-LF"] = new Object(); +DEV_PATHS["HM-LC-Dim1T-FM-LF"]["50"] = "/config/img/devices/50/114_hm-lc-dim1t-fm-lf_thumb_3.png"; +DEV_PATHS["HM-LC-Dim1T-FM-LF"]["250"] = "/config/img/devices/250/114_hm-lc-dim1t-fm-lf_3.png"; +DEV_HIGHLIGHT["HM-LC-Dim1T-FM-LF"] = new Object(); +DEV_LIST.push('HM-LC-Sw4-PCB'); +DEV_DESCRIPTION["HM-LC-Sw4-PCB"] = "HM-LC-Sw4-PCB"; +DEV_PATHS["HM-LC-Sw4-PCB"] = new Object(); +DEV_PATHS["HM-LC-Sw4-PCB"]["50"] = "/config/img/devices/50/46_hm-lc-sw4-pcb_thumb.png"; +DEV_PATHS["HM-LC-Sw4-PCB"]["250"] = "/config/img/devices/250/46_hm-lc-sw4-pcb.png"; +DEV_HIGHLIGHT["HM-LC-Sw4-PCB"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Sw4-PCB"]["Channel1"] = [2, 0.176, 0.78, 0.068, 0.064]; +DEV_HIGHLIGHT["HM-LC-Sw4-PCB"]["Channel2"] = [2, 0.244, 0.78, 0.068, 0.064]; +DEV_HIGHLIGHT["HM-LC-Sw4-PCB"]["Channel3"] = [2, 0.312, 0.78, 0.068, 0.064]; +DEV_HIGHLIGHT["HM-LC-Sw4-PCB"]["Channel4"] = [2, 0.38, 0.78, 0.068, 0.064]; +DEV_HIGHLIGHT["HM-LC-Sw4-PCB"]["1_val"] = [3, 0.372, 0.288, '1', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-LC-Sw4-PCB"]["2_val"] = [3, 0.372, 0.288, '2', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-LC-Sw4-PCB"]["3_val"] = [3, 0.372, 0.288, '3', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-LC-Sw4-PCB"]["4_val"] = [3, 0.372, 0.288, '4', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-LC-Sw4-PCB"]["Circle1"] = [4, 0.512, 0.784, 0.044, 0.044]; +DEV_HIGHLIGHT["HM-LC-Sw4-PCB"]["Circle2"] = [4, 0.570, 0.784, 0.044, 0.044]; +DEV_HIGHLIGHT["HM-LC-Sw4-PCB"]["Circle3"] = [4, 0.628, 0.784, 0.044, 0.044]; +DEV_HIGHLIGHT["HM-LC-Sw4-PCB"]["Circle4"] = [4, 0.686, 0.784, 0.044, 0.044]; +DEV_HIGHLIGHT["HM-LC-Sw4-PCB"]["1"] = [5, 'Channel1', '1_val', 'Circle1']; +DEV_HIGHLIGHT["HM-LC-Sw4-PCB"]["2"] = [5, 'Channel2', '2_val', 'Circle2']; +DEV_HIGHLIGHT["HM-LC-Sw4-PCB"]["3"] = [5, 'Channel3', '3_val', 'Circle3']; +DEV_HIGHLIGHT["HM-LC-Sw4-PCB"]["4"] = [5, 'Channel4', '4_val', 'Circle4']; +DEV_LIST.push('HmIP-eTRV-B-2'); +DEV_DESCRIPTION["HmIP-eTRV-B-2"] = "TRV-B"; +DEV_PATHS["HmIP-eTRV-B-2"] = new Object(); +DEV_PATHS["HmIP-eTRV-B-2"]["50"] = "/config/img/devices/50/180_hmip-etrv-b_thumb.png"; +DEV_PATHS["HmIP-eTRV-B-2"]["250"] = "/config/img/devices/250/180_hmip-etrv-b.png"; +DEV_HIGHLIGHT["HmIP-eTRV-B-2"] = new Object(); +DEV_LIST.push('HM-ES-PMSw1-Pl-DN-R4'); +DEV_DESCRIPTION["HM-ES-PMSw1-Pl-DN-R4"] = "HM-ES-PMSw1-Pl-DN-R4"; +DEV_PATHS["HM-ES-PMSw1-Pl-DN-R4"] = new Object(); +DEV_PATHS["HM-ES-PMSw1-Pl-DN-R4"]["50"] = "/config/img/devices/50/107_hm-es-pmsw1-pl-R4_thumb.png"; +DEV_PATHS["HM-ES-PMSw1-Pl-DN-R4"]["250"] = "/config/img/devices/250/107_hm-es-pmsw1-pl-R4.png"; +DEV_HIGHLIGHT["HM-ES-PMSw1-Pl-DN-R4"] = new Object(); +DEV_LIST.push('HM-MOD-EM-8Bit'); +DEV_DESCRIPTION["HM-MOD-EM-8Bit"] = "HM-MOD-EM-8Bit"; +DEV_PATHS["HM-MOD-EM-8Bit"] = new Object(); +DEV_PATHS["HM-MOD-EM-8Bit"]["50"] = "/config/img/devices/50/142_hm-mod-em-8bit_thumb.png"; +DEV_PATHS["HM-MOD-EM-8Bit"]["250"] = "/config/img/devices/250/142_hm-mod-em-8bit.png"; +DEV_HIGHLIGHT["HM-MOD-EM-8Bit"] = new Object(); +DEV_LIST.push('HmIP-PDT-PE'); +DEV_DESCRIPTION["HmIP-PDT-PE"] = "PDT-PE"; +DEV_PATHS["HmIP-PDT-PE"] = new Object(); +DEV_PATHS["HmIP-PDT-PE"]["50"] = "/config/img/devices/50/113_hmip-psm-pe_thumb.png"; +DEV_PATHS["HmIP-PDT-PE"]["250"] = "/config/img/devices/250/113_hmip-psm-pe.png"; +DEV_HIGHLIGHT["HmIP-PDT-PE"] = new Object(); +DEV_LIST.push('BRC-H'); +DEV_DESCRIPTION["BRC-H"] = "BRC-H"; +DEV_PATHS["BRC-H"] = new Object(); +DEV_PATHS["BRC-H"]["50"] = "/config/img/devices/50/72_hm-rc-brc-h_thumb.png"; +DEV_PATHS["BRC-H"]["250"] = "/config/img/devices/250/72_hm-rc-brc-h.png"; +DEV_HIGHLIGHT["BRC-H"] = new Object(); +DEV_HIGHLIGHT["BRC-H"]["1"] = [4, 0.196, 0.222, 0.162, 0.164]; +DEV_HIGHLIGHT["BRC-H"]["2"] = [4, 0.417, 0.222, 0.162, 0.164]; +DEV_HIGHLIGHT["BRC-H"]["3"] = [4, 0.196, 0.482, 0.162, 0.164]; +DEV_HIGHLIGHT["BRC-H"]["4"] = [4, 0.417, 0.482, 0.162, 0.164]; +DEV_LIST.push('HmIP-SMI'); +DEV_DESCRIPTION["HmIP-SMI"] = "SMI"; +DEV_PATHS["HmIP-SMI"] = new Object(); +DEV_PATHS["HmIP-SMI"]["50"] = "/config/img/devices/50/125_hmip-smi_thumb.png"; +DEV_PATHS["HmIP-SMI"]["250"] = "/config/img/devices/250/125_hmip-smi.png"; +DEV_HIGHLIGHT["HmIP-SMI"] = new Object(); +DEV_LIST.push('HM-RC-Dis-H-x-EU'); +DEV_DESCRIPTION["HM-RC-Dis-H-x-EU"] = "HM-RC-Dis-H-x-EU"; +DEV_PATHS["HM-RC-Dis-H-x-EU"] = new Object(); +DEV_PATHS["HM-RC-Dis-H-x-EU"]["50"] = "/config/img/devices/50/108_hm-rc-dis-h-x-eu_thump.png"; +DEV_PATHS["HM-RC-Dis-H-x-EU"]["250"] = "/config/img/devices/250/108_hm-rc-dis-h-x-eu.png"; +DEV_HIGHLIGHT["HM-RC-Dis-H-x-EU"] = new Object(); +DEV_LIST.push('HmIP-SRD'); +DEV_DESCRIPTION["HmIP-SRD"] = "HmIP-SRD"; +DEV_PATHS["HmIP-SRD"] = new Object(); +DEV_PATHS["HmIP-SRD"]["50"] = "/config/img/devices/50/207_hmip-srdo_thumb.png"; +DEV_PATHS["HmIP-SRD"]["250"] = "/config/img/devices/250/207_hmip-srdo.png"; +DEV_HIGHLIGHT["HmIP-SRD"] = new Object(); +DEV_LIST.push('HM-RC-19-B'); +DEV_DESCRIPTION["HM-RC-19-B"] = "HM-RC-19-B"; +DEV_PATHS["HM-RC-19-B"] = new Object(); +DEV_PATHS["HM-RC-19-B"]["50"] = "/config/img/devices/50/20_hm-rc-19_thumb.png"; +DEV_PATHS["HM-RC-19-B"]["250"] = "/config/img/devices/250/20_hm-rc-19.png"; +DEV_HIGHLIGHT["HM-RC-19-B"] = new Object(); +DEV_HIGHLIGHT["HM-RC-19-B"]["1"] = [2, 0.296, 0.344, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19-B"]["3"] = [2, 0.296, 0.416, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19-B"]["5"] = [2, 0.296, 0.488, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19-B"]["7"] = [2, 0.296, 0.56, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19-B"]["9"] = [2, 0.296, 0.628, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19-B"]["11"] = [2, 0.296, 0.704, 0.036, 0.048]; +DEV_HIGHLIGHT["HM-RC-19-B"]["13"] = [2, 0.296, 0.772, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19-B"]["15"] = [2, 0.296, 0.844, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19-B"]["2"] = [2, 0.468, 0.344, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19-B"]["4"] = [2, 0.468, 0.416, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19-B"]["6"] = [2, 0.468, 0.488, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19-B"]["8"] = [2, 0.468, 0.56, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19-B"]["10"] = [2, 0.468, 0.628, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19-B"]["12"] = [2, 0.468, 0.704, 0.036, 0.048]; +DEV_HIGHLIGHT["HM-RC-19-B"]["14"] = [2, 0.468, 0.772, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19-B"]["16"] = [2, 0.468, 0.844, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19-B"]["17"] = [2, 0.58, 0.84, 0.044, 0.056]; +DEV_HIGHLIGHT["HM-RC-19-B"]["18"] = [2, 0.312, 0.188, 0.168, 0.088]; +DEV_HIGHLIGHT["HM-RC-19-B"]["1+2"] = [5, '1', '2']; +DEV_HIGHLIGHT["HM-RC-19-B"]["3+4"] = [5, '3', '4']; +DEV_HIGHLIGHT["HM-RC-19-B"]["5+6"] = [5, '5', '6']; +DEV_HIGHLIGHT["HM-RC-19-B"]["7+8"] = [5, '7', '8']; +DEV_HIGHLIGHT["HM-RC-19-B"]["9+10"] = [5, '9', '10']; +DEV_HIGHLIGHT["HM-RC-19-B"]["11+12"] = [5, '11', '12']; +DEV_HIGHLIGHT["HM-RC-19-B"]["13+14"] = [5, '13', '14']; +DEV_HIGHLIGHT["HM-RC-19-B"]["15+16"] = [5, '15', '16']; +DEV_LIST.push('HmIP-FSI16'); +DEV_DESCRIPTION["HmIP-FSI16"] = "HmIP-FSI16"; +DEV_PATHS["HmIP-FSI16"] = new Object(); +DEV_PATHS["HmIP-FSI16"]["50"] = "/config/img/devices/50/203_hmip-fsi16_thumb.png"; +DEV_PATHS["HmIP-FSI16"]["250"] = "/config/img/devices/250/203_hmip-fsi16.png"; +DEV_HIGHLIGHT["HmIP-FSI16"] = new Object(); +DEV_LIST.push('HM-RC-4-3'); +DEV_DESCRIPTION["HM-RC-4-3"] = "HM-RC-4"; +DEV_PATHS["HM-RC-4-3"] = new Object(); +DEV_PATHS["HM-RC-4-3"]["50"] = "/config/img/devices/50/84_hm-rc-4-x_thumb.png"; +DEV_PATHS["HM-RC-4-3"]["250"] = "/config/img/devices/250/84_hm-rc-4-3.png"; +DEV_HIGHLIGHT["HM-RC-4-3"] = new Object(); +DEV_HIGHLIGHT["HM-RC-4-3"]["arrow_part1"] = [6, 0.312, 0.288, 0.416, 0.288, 0.012]; +DEV_HIGHLIGHT["HM-RC-4-3"]["arrow_part2"] = [6, 0.312, 0.288, 0.352, 0.248, 0.012]; +DEV_HIGHLIGHT["HM-RC-4-3"]["arrow_part3"] = [6, 0.312, 0.288, 0.352, 0.328, 0.012]; +DEV_HIGHLIGHT["HM-RC-4-3"]["Arrow"] = [5, 'arrow_part1', 'arrow_part2', 'arrow_part3']; +DEV_HIGHLIGHT["HM-RC-4-3"]["1_Arrow"] = [7, 'Arrow', 0.25, 0.0]; +DEV_HIGHLIGHT["HM-RC-4-3"]["2_Arrow"] = [7, 'Arrow', 0.238, 0.156]; +DEV_HIGHLIGHT["HM-RC-4-3"]["3_Arrow"] = [7, 'Arrow', 0.228, 0.312]; +DEV_HIGHLIGHT["HM-RC-4-3"]["4_Arrow"] = [7, 'Arrow', 0.212, 0.468]; +DEV_HIGHLIGHT["HM-RC-4-3"]["1"] = [5, '2_Arrow']; +DEV_HIGHLIGHT["HM-RC-4-3"]["2"] = [5, '1_Arrow']; +DEV_HIGHLIGHT["HM-RC-4-3"]["3"] = [5, '4_Arrow']; +DEV_HIGHLIGHT["HM-RC-4-3"]["4"] = [5, '3_Arrow']; +DEV_HIGHLIGHT["HM-RC-4-3"]["1+2"] = [5, '1_Arrow', '2_Arrow']; +DEV_HIGHLIGHT["HM-RC-4-3"]["3+4"] = [5, '3_Arrow', '4_Arrow']; +DEV_LIST.push('HmIP-BS2'); +DEV_DESCRIPTION["HmIP-BS2"] = "HmIP-BS2"; +DEV_PATHS["HmIP-BS2"] = new Object(); +DEV_PATHS["HmIP-BS2"]["50"] = "/config/img/devices/50/PushButton-2ch-wm_thumb.png"; +DEV_PATHS["HmIP-BS2"]["250"] = "/config/img/devices/250/PushButton-2ch-wm.png"; +DEV_HIGHLIGHT["HmIP-BS2"] = new Object(); +DEV_HIGHLIGHT["HmIP-BS2"]["1"] = [2, 0.244, 0.312, 0.428, 0.168]; +DEV_HIGHLIGHT["HmIP-BS2"]["2"] = [2, 0.244, 0.56, 0.428, 0.168]; +DEV_HIGHLIGHT["HmIP-BS2"]["1+2"] = [2, 0.244, 0.308, 0.428, 0.416]; +DEV_LIST.push('HM-Sen-Wa-Od'); +DEV_DESCRIPTION["HM-Sen-Wa-Od"] = "HM-Sen-Wa-Od"; +DEV_PATHS["HM-Sen-Wa-Od"] = new Object(); +DEV_PATHS["HM-Sen-Wa-Od"]["50"] = "/config/img/devices/50/82_hm-sen-wa-od_thumb.png"; +DEV_PATHS["HM-Sen-Wa-Od"]["250"] = "/config/img/devices/250/82_hm-sen-wa-od.png"; +DEV_HIGHLIGHT["HM-Sen-Wa-Od"] = new Object(); +DEV_LIST.push('HMW-Sec-TR-FM'); +DEV_DESCRIPTION["HMW-Sec-TR-FM"] = "HMW-Sec-TR-FM"; +DEV_PATHS["HMW-Sec-TR-FM"] = new Object(); +DEV_PATHS["HMW-Sec-TR-FM"]["50"] = "/config/img/devices/50/33_hmw-sec-tr-fm_thumb.png"; +DEV_PATHS["HMW-Sec-TR-FM"]["250"] = "/config/img/devices/250/33_hmw-sec-tr-fm.png"; +DEV_HIGHLIGHT["HMW-Sec-TR-FM"] = new Object(); +DEV_LIST.push('HM-LC-Bl1-FM'); +DEV_DESCRIPTION["HM-LC-Bl1-FM"] = "HM-LC-Bl1-FM"; +DEV_PATHS["HM-LC-Bl1-FM"] = new Object(); +DEV_PATHS["HM-LC-Bl1-FM"]["50"] = "/config/img/devices/50/7_hm-lc-bl1-fm_thumb.png"; +DEV_PATHS["HM-LC-Bl1-FM"]["250"] = "/config/img/devices/250/7_hm-lc-bl1-fm.png"; +DEV_HIGHLIGHT["HM-LC-Bl1-FM"] = new Object(); +DEV_LIST.push('HmIP-eTRV-CL'); +DEV_DESCRIPTION["HmIP-eTRV-CL"] = "TRV-CL"; +DEV_PATHS["HmIP-eTRV-CL"] = new Object(); +DEV_PATHS["HmIP-eTRV-CL"]["50"] = "/config/img/devices/50/224_hmip-etrv-cl_thumb.png"; +DEV_PATHS["HmIP-eTRV-CL"]["250"] = "/config/img/devices/250/224_hmip-etrv-cl.png"; +DEV_HIGHLIGHT["HmIP-eTRV-CL"] = new Object(); +DEV_LIST.push('HM-LC-Sw1PBU-FM'); +DEV_DESCRIPTION["HM-LC-Sw1PBU-FM"] = "HM-LC-Sw1PBU-FM"; +DEV_PATHS["HM-LC-Sw1PBU-FM"] = new Object(); +DEV_PATHS["HM-LC-Sw1PBU-FM"]["50"] = "/config/img/devices/50/PushButton-2ch-wm_thumb.png"; +DEV_PATHS["HM-LC-Sw1PBU-FM"]["250"] = "/config/img/devices/250/PushButton-2ch-wm.png"; +DEV_HIGHLIGHT["HM-LC-Sw1PBU-FM"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Sw1PBU-FM"]["1a"] = [2, 0.244, 0.312, 0.428, 0.168]; +DEV_HIGHLIGHT["HM-LC-Sw1PBU-FM"]["1b"] = [2, 0.244, 0.56, 0.428, 0.168]; +DEV_HIGHLIGHT["HM-LC-Sw1PBU-FM"]["1"] = [5, '1a', '1b']; +DEV_LIST.push('HmIP-WUA'); +DEV_DESCRIPTION["HmIP-WUA"] = "HmIP-WUA"; +DEV_PATHS["HmIP-WUA"] = new Object(); +DEV_PATHS["HmIP-WUA"]["50"] = "/config/img/devices/50/213_hmip-wua_thumb.png"; +DEV_PATHS["HmIP-WUA"]["250"] = "/config/img/devices/250/213_hmip-wua.png"; +DEV_HIGHLIGHT["HmIP-WUA"] = new Object(); +DEV_LIST.push('HmIPW-SPI'); +DEV_DESCRIPTION["HmIPW-SPI"] = "HmIPW-SPI"; +DEV_PATHS["HmIPW-SPI"] = new Object(); +DEV_PATHS["HmIPW-SPI"]["50"] = "/config/img/devices/50/153_hmip-spi_thumb.png"; +DEV_PATHS["HmIPW-SPI"]["250"] = "/config/img/devices/250/153_hmip-spi.png"; +DEV_HIGHLIGHT["HmIPW-SPI"] = new Object(); +DEV_LIST.push('HMIP-WTH'); +DEV_DESCRIPTION["HMIP-WTH"] = "HmIP-WTH"; +DEV_PATHS["HMIP-WTH"] = new Object(); +DEV_PATHS["HMIP-WTH"]["50"] = "/config/img/devices/50/121_hmip-wth_thumb.png"; +DEV_PATHS["HMIP-WTH"]["250"] = "/config/img/devices/250/121_hmip-wth.png"; +DEV_HIGHLIGHT["HMIP-WTH"] = new Object(); +DEV_LIST.push('HM-LC-Bl1PBU-FM'); +DEV_DESCRIPTION["HM-LC-Bl1PBU-FM"] = "HM-LC-Bl1PBU-FM"; +DEV_PATHS["HM-LC-Bl1PBU-FM"] = new Object(); +DEV_PATHS["HM-LC-Bl1PBU-FM"]["50"] = "/config/img/devices/50/PushButton-2ch-wm_thumb.png"; +DEV_PATHS["HM-LC-Bl1PBU-FM"]["250"] = "/config/img/devices/250/PushButton-2ch-wm.png"; +DEV_HIGHLIGHT["HM-LC-Bl1PBU-FM"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Bl1PBU-FM"]["1a"] = [2, 0.244, 0.312, 0.428, 0.168]; +DEV_HIGHLIGHT["HM-LC-Bl1PBU-FM"]["1b"] = [2, 0.244, 0.56, 0.428, 0.168]; +DEV_HIGHLIGHT["HM-LC-Bl1PBU-FM"]["1"] = [5, '1a', '1b']; +DEV_LIST.push('HmIP-STH'); +DEV_DESCRIPTION["HmIP-STH"] = "STH"; +DEV_PATHS["HmIP-STH"] = new Object(); +DEV_PATHS["HmIP-STH"]["50"] = "/config/img/devices/50/146_hmip-sth_thumb.png"; +DEV_PATHS["HmIP-STH"]["250"] = "/config/img/devices/250/146_hmip-sth.png"; +DEV_HIGHLIGHT["HmIP-STH"] = new Object(); +DEV_LIST.push('HM-LC-Dim1L-Pl-2'); +DEV_DESCRIPTION["HM-LC-Dim1L-Pl-2"] = "HM-LC-Dim1L-Pl-2"; +DEV_PATHS["HM-LC-Dim1L-Pl-2"] = new Object(); +DEV_PATHS["HM-LC-Dim1L-Pl-2"]["50"] = "/config/img/devices/50/OM55_DimmerSwitch_thumb.png"; +DEV_PATHS["HM-LC-Dim1L-Pl-2"]["250"] = "/config/img/devices/250/OM55_DimmerSwitch.png"; +DEV_HIGHLIGHT["HM-LC-Dim1L-Pl-2"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Dim1L-Pl-2"]["1_part1"] = [2, 0.548, 0.468, 0.072, 0.052]; +DEV_HIGHLIGHT["HM-LC-Dim1L-Pl-2"]["1_part2"] = [2, 0.612, 0.452, 0.028, 0.056]; +DEV_HIGHLIGHT["HM-LC-Dim1L-Pl-2"]["1"] = [5, '1_part1', '1_part2']; +DEV_LIST.push('HM-ES-TX-WM'); +DEV_DESCRIPTION["HM-ES-TX-WM"] = "HM-ES-TX-WM"; +DEV_PATHS["HM-ES-TX-WM"] = new Object(); +DEV_PATHS["HM-ES-TX-WM"]["50"] = "/config/img/devices/50/102_hm-es-tx-wm_thumb.png"; +DEV_PATHS["HM-ES-TX-WM"]["250"] = "/config/img/devices/250/102_hm-es-tx-wm.png"; +DEV_HIGHLIGHT["HM-ES-TX-WM"] = new Object(); +DEV_LIST.push('HmIP-SWDM-B2'); +DEV_DESCRIPTION["HmIP-SWDM-B2"] = "HmIP-SWDM"; +DEV_PATHS["HmIP-SWDM-B2"] = new Object(); +DEV_PATHS["HmIP-SWDM-B2"]["50"] = "/config/img/devices/50/179_hmip-swdm-b2_thumb.png"; +DEV_PATHS["HmIP-SWDM-B2"]["250"] = "/config/img/devices/250/179_hmip-swdm-b2.png"; +DEV_HIGHLIGHT["HmIP-SWDM-B2"] = new Object(); +DEV_LIST.push('HmIPW-WTH'); +DEV_DESCRIPTION["HmIPW-WTH"] = "HmIPW-WTH"; +DEV_PATHS["HmIPW-WTH"] = new Object(); +DEV_PATHS["HmIPW-WTH"]["50"] = "/config/img/devices/50/121_hmip-wth_thumb.png"; +DEV_PATHS["HmIPW-WTH"]["250"] = "/config/img/devices/250/121_hmip-wth.png"; +DEV_HIGHLIGHT["HmIPW-WTH"] = new Object(); +DEV_LIST.push('HM-WDC7000'); +DEV_DESCRIPTION["HM-WDC7000"] = "HM-WDC7000"; +DEV_PATHS["HM-WDC7000"] = new Object(); +DEV_PATHS["HM-WDC7000"]["50"] = "/config/img/devices/50/9_hm-ws550-us_thumb.png"; +DEV_PATHS["HM-WDC7000"]["250"] = "/config/img/devices/250/9_hm-ws550-us.png"; +DEV_HIGHLIGHT["HM-WDC7000"] = new Object(); +DEV_HIGHLIGHT["HM-WDC7000"]["1"] = [3, 0.440, 0.200, '1', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-WDC7000"]["2"] = [3, 0.440, 0.200, '2', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-WDC7000"]["3"] = [3, 0.440, 0.200, '3', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-WDC7000"]["4"] = [3, 0.440, 0.200, '4', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-WDC7000"]["5"] = [3, 0.440, 0.200, '5', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-WDC7000"]["6"] = [3, 0.440, 0.200, '6', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-WDC7000"]["7"] = [3, 0.440, 0.200, '7', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-WDC7000"]["8"] = [3, 0.440, 0.200, '8', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-WDC7000"]["9"] = [3, 0.440, 0.200, '9', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-WDC7000"]["10"] = [3, 0.405, 0.200, '10', 0.124, 'verdana', Font.BOLD]; +DEV_LIST.push('HM-LC-Sw2-FM-2'); +DEV_DESCRIPTION["HM-LC-Sw2-FM-2"] = "HM-LC-Sw2-FM"; +DEV_PATHS["HM-LC-Sw2-FM-2"] = new Object(); +DEV_PATHS["HM-LC-Sw2-FM-2"]["50"] = "/config/img/devices/50/5_hm-lc-sw2-fm_thumb.png"; +DEV_PATHS["HM-LC-Sw2-FM-2"]["250"] = "/config/img/devices/250/5_hm-lc-sw2-fm.png"; +DEV_HIGHLIGHT["HM-LC-Sw2-FM-2"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Sw2-FM-2"]["1_AUS"] = [2, 0.34, 0.66, 0.068, 0.148]; +DEV_HIGHLIGHT["HM-LC-Sw2-FM-2"]["1_EIN"] = [2, 0.6, 0.66, 0.068, 0.148]; +DEV_HIGHLIGHT["HM-LC-Sw2-FM-2"]["2_AUS"] = [2, 0.256, 0.66, 0.068, 0.148]; +DEV_HIGHLIGHT["HM-LC-Sw2-FM-2"]["2_EIN"] = [2, 0.508, 0.66, 0.068, 0.148]; +DEV_HIGHLIGHT["HM-LC-Sw2-FM-2"]["1"] = [5, '1_AUS', '1_EIN']; +DEV_HIGHLIGHT["HM-LC-Sw2-FM-2"]["2"] = [5, '2_AUS', '2_EIN']; +DEV_LIST.push('ZEL STG RM FST UP4'); +DEV_DESCRIPTION["ZEL STG RM FST UP4"] = "ZEL_STG_RM_FST_UP4"; +DEV_PATHS["ZEL STG RM FST UP4"] = new Object(); +DEV_PATHS["ZEL STG RM FST UP4"]["50"] = "/config/img/devices/50/38_hm-pbi-4-fm_thumb.png"; +DEV_PATHS["ZEL STG RM FST UP4"]["250"] = "/config/img/devices/250/38_hm-pbi-4-fm.png"; +DEV_HIGHLIGHT["ZEL STG RM FST UP4"] = new Object(); +DEV_HIGHLIGHT["ZEL STG RM FST UP4"]["1_Key"] = [3, 0.18, 0.216, '1', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["ZEL STG RM FST UP4"]["1_Kreis"] = [4, 0.265, 0.500, 0.028, 0.028]; +DEV_HIGHLIGHT["ZEL STG RM FST UP4"]["1"] = [5, '1_Key', '1_Kreis']; +DEV_HIGHLIGHT["ZEL STG RM FST UP4"]["2_Key"] = [3, 0.18, 0.216, '2', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["ZEL STG RM FST UP4"]["2_Kreis"] = [4, 0.287, 0.465, 0.028, 0.028]; +DEV_HIGHLIGHT["ZEL STG RM FST UP4"]["2"] = [5, '2_Key', '2_Kreis']; +DEV_HIGHLIGHT["ZEL STG RM FST UP4"]["3_Key"] = [3, 0.18, 0.216, '3', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["ZEL STG RM FST UP4"]["3_Kreis"] = [4, 0.309, 0.430, 0.028, 0.028]; +DEV_HIGHLIGHT["ZEL STG RM FST UP4"]["3"] = [5, '3_Key', '3_Kreis']; +DEV_HIGHLIGHT["ZEL STG RM FST UP4"]["4_Key"] = [3, 0.18, 0.216, '4', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["ZEL STG RM FST UP4"]["4_Kreis"] = [4, 0.331, 0.395, 0.028, 0.028]; +DEV_HIGHLIGHT["ZEL STG RM FST UP4"]["4"] = [5, '4_Key', '4_Kreis']; +DEV_LIST.push('HmIP-FWI'); +DEV_DESCRIPTION["HmIP-FWI"] = "HmIP-FWI"; +DEV_PATHS["HmIP-FWI"] = new Object(); +DEV_PATHS["HmIP-FWI"]["50"] = "/config/img/devices/50/219_hmip-fwi_thumb.png"; +DEV_PATHS["HmIP-FWI"]["250"] = "/config/img/devices/250/219_hmip-fwi.png"; +DEV_HIGHLIGHT["HmIP-FWI"] = new Object(); +DEV_LIST.push('HM-WDS100-C6-O'); +DEV_DESCRIPTION["HM-WDS100-C6-O"] = "HM-WDS100-C6-O"; +DEV_PATHS["HM-WDS100-C6-O"] = new Object(); +DEV_PATHS["HM-WDS100-C6-O"]["50"] = "/config/img/devices/50/WeatherCombiSensor_thumb.png"; +DEV_PATHS["HM-WDS100-C6-O"]["250"] = "/config/img/devices/250/WeatherCombiSensor.png"; +DEV_HIGHLIGHT["HM-WDS100-C6-O"] = new Object(); +DEV_LIST.push('HmIPW-WRC2-A'); +DEV_DESCRIPTION["HmIPW-WRC2-A"] = "HmIPW-WRC2"; +DEV_PATHS["HmIPW-WRC2-A"] = new Object(); +DEV_PATHS["HmIPW-WRC2-A"]["50"] = "/config/img/devices/50/112_hmip-wrc2_thumb.png"; +DEV_PATHS["HmIPW-WRC2-A"]["250"] = "/config/img/devices/250/112_hmip-wrc2.png"; +DEV_HIGHLIGHT["HmIPW-WRC2-A"] = new Object(); +DEV_HIGHLIGHT["HmIPW-WRC2-A"]["2"] = [4, 0.540, 0.366, 0.04, 0.044]; +DEV_HIGHLIGHT["HmIPW-WRC2-A"]["1"] = [4, 0.540, 0.622, 0.04, 0.044]; +DEV_LIST.push('HMW-IO-12-Sw7-DR'); +DEV_DESCRIPTION["HMW-IO-12-Sw7-DR"] = "HMW-IO-12-Sw7-DR"; +DEV_PATHS["HMW-IO-12-Sw7-DR"] = new Object(); +DEV_PATHS["HMW-IO-12-Sw7-DR"]["50"] = "/config/img/devices/50/30_hmw-io-12-sw7-dr_thumb.png"; +DEV_PATHS["HMW-IO-12-Sw7-DR"]["250"] = "/config/img/devices/250/30_hmw-io-12-sw7-dr.png"; +DEV_HIGHLIGHT["HMW-IO-12-Sw7-DR"] = new Object(); +DEV_HIGHLIGHT["HMW-IO-12-Sw7-DR"]["1"] = [2, 0.264, 0.7, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw7-DR"]["2"] = [2, 0.328, 0.7, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw7-DR"]["3"] = [2, 0.46, 0.7, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw7-DR"]["4"] = [2, 0.524, 0.7, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw7-DR"]["5"] = [2, 0.648, 0.7, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw7-DR"]["6"] = [2, 0.708, 0.7, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw7-DR"]["8"] = [2, 0.328, 0.764, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw7-DR"]["7"] = [2, 0.264, 0.764, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw7-DR"]["9"] = [2, 0.46, 0.764, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw7-DR"]["10"] = [2, 0.524, 0.764, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw7-DR"]["11"] = [2, 0.644, 0.764, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw7-DR"]["12"] = [2, 0.708, 0.764, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw7-DR"]["13"] = [2, 0.268, 0.396, 0.12, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw7-DR"]["14"] = [2, 0.46, 0.396, 0.12, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw7-DR"]["15"] = [2, 0.648, 0.396, 0.12, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw7-DR"]["16"] = [2, 0.076, 0.46, 0.12, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw7-DR"]["17"] = [2, 0.264, 0.46, 0.12, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw7-DR"]["18"] = [2, 0.46, 0.46, 0.12, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw7-DR"]["19"] = [2, 0.648, 0.46, 0.12, 0.06]; +DEV_LIST.push('HM-RC-Sec4-2'); +DEV_DESCRIPTION["HM-RC-Sec4-2"] = "HM-RC-Sec4-2"; +DEV_PATHS["HM-RC-Sec4-2"] = new Object(); +DEV_PATHS["HM-RC-Sec4-2"]["50"] = "/config/img/devices/50/86_hm-rc-sec4-2_thumb.png"; +DEV_PATHS["HM-RC-Sec4-2"]["250"] = "/config/img/devices/250/86_hm-rc-sec4-2.png"; +DEV_HIGHLIGHT["HM-RC-Sec4-2"] = new Object(); +DEV_HIGHLIGHT["HM-RC-Sec4-2"]["arrow_part1"] = [6, 0.312, 0.288, 0.416, 0.288, 0.012]; +DEV_HIGHLIGHT["HM-RC-Sec4-2"]["arrow_part2"] = [6, 0.312, 0.288, 0.352, 0.248, 0.012]; +DEV_HIGHLIGHT["HM-RC-Sec4-2"]["arrow_part3"] = [6, 0.312, 0.288, 0.352, 0.328, 0.012]; +DEV_HIGHLIGHT["HM-RC-Sec4-2"]["1_Arrow"] = [5, 'arrow_part1', 'arrow_part2', 'arrow_part3']; +DEV_HIGHLIGHT["HM-RC-Sec4-2"]["2_Arrow"] = [7, '1_Arrow', 0.028, 0.156]; +DEV_HIGHLIGHT["HM-RC-Sec4-2"]["3_Arrow"] = [7, '1_Arrow', 0.028, 0.312]; +DEV_HIGHLIGHT["HM-RC-Sec4-2"]["4_Arrow"] = [7, '1_Arrow', 0.012, 0.468]; +DEV_HIGHLIGHT["HM-RC-Sec4-2"]["1"] = [5, '2_Arrow']; +DEV_HIGHLIGHT["HM-RC-Sec4-2"]["2"] = [5, '1_Arrow']; +DEV_HIGHLIGHT["HM-RC-Sec4-2"]["3"] = [5, '4_Arrow']; +DEV_HIGHLIGHT["HM-RC-Sec4-2"]["4"] = [5, '3_Arrow']; +DEV_HIGHLIGHT["HM-RC-Sec4-2"]["1+2"] = [5, '1_Arrow', '2_Arrow']; +DEV_HIGHLIGHT["HM-RC-Sec4-2"]["3+4"] = [5, '3_Arrow', '4_Arrow']; +DEV_LIST.push('HM-Sec-SD-2-Team'); +DEV_DESCRIPTION["HM-Sec-SD-2-Team"] = "HM-Sec-SD-Team"; +DEV_PATHS["HM-Sec-SD-2-Team"] = new Object(); +DEV_PATHS["HM-Sec-SD-2-Team"]["50"] = "/config/img/devices/50/105_hm-sec-sd-2-team_thumb.png"; +DEV_PATHS["HM-Sec-SD-2-Team"]["250"] = "/config/img/devices/250/105_hm-sec-sd-2-team.png"; +DEV_HIGHLIGHT["HM-Sec-SD-2-Team"] = new Object(); +DEV_LIST.push('VIR-LG-RGBW-DIM'); +DEV_DESCRIPTION["VIR-LG-RGBW-DIM"] = "VIR-LG-RGBW-DIM"; +DEV_PATHS["VIR-LG-RGBW-DIM"] = new Object(); +DEV_PATHS["VIR-LG-RGBW-DIM"]["50"] = "/config/img/devices/50/coupling/hm-coupling-rgbw-dim.png"; +DEV_PATHS["VIR-LG-RGBW-DIM"]["250"] = "/config/img/devices/250/coupling/hm-coupling-rgbw-dim.png"; +DEV_HIGHLIGHT["VIR-LG-RGBW-DIM"] = new Object(); +DEV_LIST.push('HM-LC-Sw4-WM-2'); +DEV_DESCRIPTION["HM-LC-Sw4-WM-2"] = "HM-LC-Sw4-WM"; +DEV_PATHS["HM-LC-Sw4-WM-2"] = new Object(); +DEV_PATHS["HM-LC-Sw4-WM-2"]["50"] = "/config/img/devices/50/76_hm-lc-sw4-wm_thumb.png"; +DEV_PATHS["HM-LC-Sw4-WM-2"]["250"] = "/config/img/devices/250/76_hm-lc-sw4-wm.png"; +DEV_HIGHLIGHT["HM-LC-Sw4-WM-2"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Sw4-WM-2"]["Channel1"] = [2, 0.208, 0.766, 0.065, 0.060]; +DEV_HIGHLIGHT["HM-LC-Sw4-WM-2"]["Channel2"] = [2, 0.276, 0.766, 0.065, 0.060]; +DEV_HIGHLIGHT["HM-LC-Sw4-WM-2"]["Channel3"] = [2, 0.344, 0.766, 0.065, 0.060]; +DEV_HIGHLIGHT["HM-LC-Sw4-WM-2"]["Channel4"] = [2, 0.412, 0.766, 0.065, 0.060]; +DEV_HIGHLIGHT["HM-LC-Sw4-WM-2"]["1_val"] = [3, 0.372, 0.288, '1', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-LC-Sw4-WM-2"]["2_val"] = [3, 0.372, 0.288, '2', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-LC-Sw4-WM-2"]["3_val"] = [3, 0.372, 0.288, '3', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-LC-Sw4-WM-2"]["4_val"] = [3, 0.372, 0.288, '4', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-LC-Sw4-WM-2"]["Circle1"] = [4, 0.534, 0.762, 0.044, 0.044]; +DEV_HIGHLIGHT["HM-LC-Sw4-WM-2"]["Circle2"] = [4, 0.583, 0.762, 0.044, 0.044]; +DEV_HIGHLIGHT["HM-LC-Sw4-WM-2"]["Circle3"] = [4, 0.637, 0.762, 0.044, 0.044]; +DEV_HIGHLIGHT["HM-LC-Sw4-WM-2"]["Circle4"] = [4, 0.693, 0.762, 0.044, 0.044]; +DEV_HIGHLIGHT["HM-LC-Sw4-WM-2"]["1"] = [5, 'Channel1', '1_val', 'Circle1']; +DEV_HIGHLIGHT["HM-LC-Sw4-WM-2"]["2"] = [5, 'Channel2', '2_val', 'Circle2']; +DEV_HIGHLIGHT["HM-LC-Sw4-WM-2"]["3"] = [5, 'Channel3', '3_val', 'Circle3']; +DEV_HIGHLIGHT["HM-LC-Sw4-WM-2"]["4"] = [5, 'Channel4', '4_val', 'Circle4']; +DEV_LIST.push('RPI-RF-MOD'); +DEV_DESCRIPTION["RPI-RF-MOD"] = "RPI-RF-MOD"; +DEV_PATHS["RPI-RF-MOD"] = new Object(); +DEV_PATHS["RPI-RF-MOD"]["50"] = "/config/img/devices/50/CCU3_thumb.png"; +DEV_PATHS["RPI-RF-MOD"]["250"] = "/config/img/devices/250/CCU3.png"; +DEV_HIGHLIGHT["RPI-RF-MOD"] = new Object(); +DEV_LIST.push('HmIP-RFUSB'); +DEV_DESCRIPTION["HmIP-RFUSB"] = "HmIP-RFUSB"; +DEV_PATHS["HmIP-RFUSB"] = new Object(); +DEV_PATHS["HmIP-RFUSB"]["50"] = "/config/img/devices/50/CCU3_thumb.png"; +DEV_PATHS["HmIP-RFUSB"]["250"] = "/config/img/devices/250/CCU3.png"; +DEV_HIGHLIGHT["HmIP-RFUSB"] = new Object(); +DEV_LIST.push('HM-OU-CF-Pl'); +DEV_DESCRIPTION["HM-OU-CF-Pl"] = "HM-OU-CF-Pl"; +DEV_PATHS["HM-OU-CF-Pl"] = new Object(); +DEV_PATHS["HM-OU-CF-Pl"]["50"] = "/config/img/devices/50/60_hm-ou-cf-pl_thumb.png"; +DEV_PATHS["HM-OU-CF-Pl"]["250"] = "/config/img/devices/250/60_hm-ou-cf-pl.png"; +DEV_HIGHLIGHT["HM-OU-CF-Pl"] = new Object(); +DEV_HIGHLIGHT["HM-OU-CF-Pl"]["Light_circle"] = [4, 0.688, 0.224, 0.118, 0.112]; +DEV_HIGHLIGHT["HM-OU-CF-Pl"]["Light_beam_1"] = [6, 0.628, 0.28, 0.656, 0.28, 0.016]; +DEV_HIGHLIGHT["HM-OU-CF-Pl"]["Light_beam_2"] = [6, 0.656, 0.2, 0.68, 0.22, 0.016]; +DEV_HIGHLIGHT["HM-OU-CF-Pl"]["Light_beam_3"] = [6, 0.74, 0.168, 0.74, 0.196, 0.016]; +DEV_HIGHLIGHT["HM-OU-CF-Pl"]["Light_beam_4"] = [6, 0.82, 0.196, 0.8, 0.216, 0.016]; +DEV_HIGHLIGHT["HM-OU-CF-Pl"]["Light_beam_5"] = [6, 0.824, 0.28, 0.856, 0.28, 0.016]; +DEV_HIGHLIGHT["HM-OU-CF-Pl"]["Light_beam_6"] = [6, 0.68, 0.34, 0.664, 0.36, 0.016]; +DEV_HIGHLIGHT["HM-OU-CF-Pl"]["Light_beam_7"] = [6, 0.74, 0.364, 0.74, 0.392, 0.016]; +DEV_HIGHLIGHT["HM-OU-CF-Pl"]["Light_beam_8"] = [6, 0.8, 0.34, 0.82, 0.36, 0.016]; +DEV_HIGHLIGHT["HM-OU-CF-Pl"]["1"] = [5, 'Light_circle', 'Light_beam_1', 'Light_beam_2', 'Light_beam_3', 'Light_beam_4', 'Light_beam_5', 'Light_beam_6', 'Light_beam_7', 'Light_beam_8']; +DEV_HIGHLIGHT["HM-OU-CF-Pl"]["SP_1"] = [6, 0.644, 0.676, 0.672, 0.676, 0.016]; +DEV_HIGHLIGHT["HM-OU-CF-Pl"]["SP_2"] = [6, 0.672, 0.676, 0.672, 0.816, 0.016]; +DEV_HIGHLIGHT["HM-OU-CF-Pl"]["SP_3"] = [6, 0.644, 0.816, 0.672, 0.816, 0.016]; +DEV_HIGHLIGHT["HM-OU-CF-Pl"]["SP_4"] = [6, 0.644, 0.676, 0.644, 0.816, 0.016]; +DEV_HIGHLIGHT["HM-OU-CF-Pl"]["SP_5"] = [6, 0.672, 0.676, 0.716, 0.632, 0.016]; +DEV_HIGHLIGHT["HM-OU-CF-Pl"]["SP_6"] = [6, 0.716, 0.632, 0.716, 0.86, 0.016]; +DEV_HIGHLIGHT["HM-OU-CF-Pl"]["SP_7"] = [6, 0.672, 0.816, 0.716, 0.86, 0.016]; +DEV_HIGHLIGHT["HM-OU-CF-Pl"]["SP_beam_1"] = [6, 0.75, 0.7, 0.832, 0.632, 0.016]; +DEV_HIGHLIGHT["HM-OU-CF-Pl"]["SP_beam_2"] = [6, 0.75, 0.748, 0.832, 0.748, 0.016]; +DEV_HIGHLIGHT["HM-OU-CF-Pl"]["SP_beam_3"] = [6, 0.75, 0.796, 0.832, 0.86, 0.016]; +DEV_HIGHLIGHT["HM-OU-CF-Pl"]["2"] = [5, 'SP_1', 'SP_2', 'SP_3', 'SP_4', 'SP_5', 'SP_6', 'SP_7', 'SP_beam_1', 'SP_beam_2', 'SP_beam_3']; +DEV_LIST.push('HM-LC-Ja1PBU-FM'); +DEV_DESCRIPTION["HM-LC-Ja1PBU-FM"] = "HM-LC-Ja1PBU-FM"; +DEV_PATHS["HM-LC-Ja1PBU-FM"] = new Object(); +DEV_PATHS["HM-LC-Ja1PBU-FM"]["50"] = "/config/img/devices/50/PushButton-2ch-wm_thumb.png"; +DEV_PATHS["HM-LC-Ja1PBU-FM"]["250"] = "/config/img/devices/250/PushButton-2ch-wm.png"; +DEV_HIGHLIGHT["HM-LC-Ja1PBU-FM"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Ja1PBU-FM"]["1a"] = [2, 0.244, 0.312, 0.428, 0.168]; +DEV_HIGHLIGHT["HM-LC-Ja1PBU-FM"]["1b"] = [2, 0.244, 0.56, 0.428, 0.168]; +DEV_HIGHLIGHT["HM-LC-Ja1PBU-FM"]["1"] = [5, '1a', '1b']; +DEV_LIST.push('HmIP-SWSD'); +DEV_DESCRIPTION["HmIP-SWSD"] = "SWSD"; +DEV_PATHS["HmIP-SWSD"] = new Object(); +DEV_PATHS["HmIP-SWSD"]["50"] = "/config/img/devices/50/104_hm-sec-sd-2_thumb.png"; +DEV_PATHS["HmIP-SWSD"]["250"] = "/config/img/devices/250/104_hm-sec-sd-2.png"; +DEV_HIGHLIGHT["HmIP-SWSD"] = new Object(); +DEV_LIST.push('HmIPW-FALMOT-C12'); +DEV_DESCRIPTION["HmIPW-FALMOT-C12"] = "HmIP-FALMOT-C12"; +DEV_PATHS["HmIPW-FALMOT-C12"] = new Object(); +DEV_PATHS["HmIPW-FALMOT-C12"]["50"] = "/config/img/devices/50/198_hmip-falmot-c12_thumb.png"; +DEV_PATHS["HmIPW-FALMOT-C12"]["250"] = "/config/img/devices/250/198_hmip-falmot-c12.png"; +DEV_HIGHLIGHT["HmIPW-FALMOT-C12"] = new Object(); +DEV_LIST.push('VIR-LG-WHITE'); +DEV_DESCRIPTION["VIR-LG-WHITE"] = "VIR-LG-WHITE"; +DEV_PATHS["VIR-LG-WHITE"] = new Object(); +DEV_PATHS["VIR-LG-WHITE"]["50"] = "/config/img/devices/50/coupling/hm-coupling-white.png"; +DEV_PATHS["VIR-LG-WHITE"]["250"] = "/config/img/devices/250/coupling/hm-coupling-white.png"; +DEV_HIGHLIGHT["VIR-LG-WHITE"] = new Object(); +DEV_LIST.push('HM-Sec-Win'); +DEV_DESCRIPTION["HM-Sec-Win"] = "HM-Sec-Win"; +DEV_PATHS["HM-Sec-Win"] = new Object(); +DEV_PATHS["HM-Sec-Win"]["50"] = "/config/img/devices/50/15_hm-sec-win_thumb.png"; +DEV_PATHS["HM-Sec-Win"]["250"] = "/config/img/devices/250/15_hm-sec-win.png"; +DEV_HIGHLIGHT["HM-Sec-Win"] = new Object(); +DEV_LIST.push('HM-LC-Dim2T-SM-2'); +DEV_DESCRIPTION["HM-LC-Dim2T-SM-2"] = "HM-LC-Dim2T-SM"; +DEV_PATHS["HM-LC-Dim2T-SM-2"] = new Object(); +DEV_PATHS["HM-LC-Dim2T-SM-2"]["50"] = "/config/img/devices/50/64_hm-lc-dim2T-sm_thumb.png"; +DEV_PATHS["HM-LC-Dim2T-SM-2"]["250"] = "/config/img/devices/250/64_hm-lc-dim2T-sm.png"; +DEV_HIGHLIGHT["HM-LC-Dim2T-SM-2"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Dim2T-SM-2"]["1_Part1"] = [6, 0.539, 0.864, 0.539, 0.948, 0.012]; +DEV_HIGHLIGHT["HM-LC-Dim2T-SM-2"]["1_Part2"] = [6, 0.539, 0.948, 0.49, 0.884, 0.012]; +DEV_HIGHLIGHT["HM-LC-Dim2T-SM-2"]["1_Part3"] = [6, 0.539, 0.948, 0.588, 0.884, 0.012]; +DEV_HIGHLIGHT["HM-LC-Dim2T-SM-2"]["1_Arrow"] = [5, '1_Part1', '1_Part2', '1_Part3']; +DEV_HIGHLIGHT["HM-LC-Dim2T-SM-2"]["2_Arrow"] = [7, '1_Arrow', 0.179, 0]; +DEV_HIGHLIGHT["HM-LC-Dim2T-SM-2"]["1_Key"] = [4, 0.25, 0.26, 0.04, 0.044]; +DEV_HIGHLIGHT["HM-LC-Dim2T-SM-2"]["2_Key"] = [4, 0.328, 0.26, 0.04, 0.044]; +DEV_HIGHLIGHT["HM-LC-Dim2T-SM-2"]["1"] = [5, '1_Arrow', '1_Key']; +DEV_HIGHLIGHT["HM-LC-Dim2T-SM-2"]["2"] = [5, '2_Arrow', '2_Key']; +DEV_LIST.push('HmIP-STHD L9D'); +DEV_DESCRIPTION["HmIP-STHD L9D"] = "HmIP-STHD"; +DEV_PATHS["HmIP-STHD L9D"] = new Object(); +DEV_PATHS["HmIP-STHD L9D"]["50"] = "/config/img/devices/50/147_hmip-sthd_thumb.png"; +DEV_PATHS["HmIP-STHD L9D"]["250"] = "/config/img/devices/250/147_hmip-sthd.png"; +DEV_HIGHLIGHT["HmIP-STHD L9D"] = new Object(); +DEV_LIST.push('HmIP-PSM-IT'); +DEV_DESCRIPTION["HmIP-PSM-IT"] = "PSM-IT"; +DEV_PATHS["HmIP-PSM-IT"] = new Object(); +DEV_PATHS["HmIP-PSM-IT"]["50"] = "/config/img/devices/50/113_hmip-psm-it_thumb.png"; +DEV_PATHS["HmIP-PSM-IT"]["250"] = "/config/img/devices/250/113_hmip-psm-it.png"; +DEV_HIGHLIGHT["HmIP-PSM-IT"] = new Object(); +DEV_LIST.push('HM-RC-12'); +DEV_DESCRIPTION["HM-RC-12"] = "HM-RC-12"; +DEV_PATHS["HM-RC-12"] = new Object(); +DEV_PATHS["HM-RC-12"]["50"] = "/config/img/devices/50/19_hm-rc-12_thumb.png"; +DEV_PATHS["HM-RC-12"]["250"] = "/config/img/devices/250/19_hm-rc-12.png"; +DEV_HIGHLIGHT["HM-RC-12"] = new Object(); +DEV_HIGHLIGHT["HM-RC-12"]["1"] = [2, 0.252, 0.412, 0.044, 0.072]; +DEV_HIGHLIGHT["HM-RC-12"]["3"] = [2, 0.252, 0.508, 0.044, 0.072]; +DEV_HIGHLIGHT["HM-RC-12"]["5"] = [2, 0.252, 0.604, 0.044, 0.072]; +DEV_HIGHLIGHT["HM-RC-12"]["7"] = [2, 0.252, 0.7, 0.044, 0.072]; +DEV_HIGHLIGHT["HM-RC-12"]["9"] = [2, 0.252, 0.8, 0.044, 0.072]; +DEV_HIGHLIGHT["HM-RC-12"]["10"] = [2, 0.476, 0.8, 0.044, 0.072]; +DEV_HIGHLIGHT["HM-RC-12"]["8"] = [2, 0.476, 0.7, 0.044, 0.072]; +DEV_HIGHLIGHT["HM-RC-12"]["6"] = [2, 0.476, 0.604, 0.044, 0.072]; +DEV_HIGHLIGHT["HM-RC-12"]["4"] = [2, 0.476, 0.508, 0.044, 0.072]; +DEV_HIGHLIGHT["HM-RC-12"]["2"] = [2, 0.476, 0.412, 0.044, 0.072]; +DEV_HIGHLIGHT["HM-RC-12"]["11"] = [2, 0.62, 0.8, 0.068, 0.064]; +DEV_HIGHLIGHT["HM-RC-12"]["12"] = [2, 0.62, 0.704, 0.068, 0.064]; +DEV_HIGHLIGHT["HM-RC-12"]["1+2"] = [5, '1', '2']; +DEV_HIGHLIGHT["HM-RC-12"]["3+4"] = [5, '3', '4']; +DEV_HIGHLIGHT["HM-RC-12"]["5+6"] = [5, '5', '6']; +DEV_HIGHLIGHT["HM-RC-12"]["7+8"] = [5, '7', '8']; +DEV_HIGHLIGHT["HM-RC-12"]["9+10"] = [5, '9', '10']; +DEV_HIGHLIGHT["HM-RC-12"]["11+12"] = [5, '11', '12']; +DEV_LIST.push('HM-Sec-MDIR-3'); +DEV_DESCRIPTION["HM-Sec-MDIR-3"] = "HM-Sec-MDIR"; +DEV_PATHS["HM-Sec-MDIR-3"] = new Object(); +DEV_PATHS["HM-Sec-MDIR-3"]["50"] = "/config/img/devices/50/124_hm-sec-mdir_thumb.png"; +DEV_PATHS["HM-Sec-MDIR-3"]["250"] = "/config/img/devices/250/124_hm-sec-mdir.png"; +DEV_HIGHLIGHT["HM-Sec-MDIR-3"] = new Object(); +DEV_LIST.push('HmIP-SWSD-2'); +DEV_DESCRIPTION["HmIP-SWSD-2"] = "SWSD"; +DEV_PATHS["HmIP-SWSD-2"] = new Object(); +DEV_PATHS["HmIP-SWSD-2"]["50"] = "/config/img/devices/50/104_hm-sec-sd-2_thumb.png"; +DEV_PATHS["HmIP-SWSD-2"]["250"] = "/config/img/devices/250/104_hm-sec-sd-2.png"; +DEV_HIGHLIGHT["HmIP-SWSD-2"] = new Object(); +DEV_LIST.push('HmIP-PMFS'); +DEV_DESCRIPTION["HmIP-PMFS"] = "HmIP-PMFS"; +DEV_PATHS["HmIP-PMFS"] = new Object(); +DEV_PATHS["HmIP-PMFS"]["50"] = "/config/img/devices/50/113_hmip-psm_thumb.png"; +DEV_PATHS["HmIP-PMFS"]["250"] = "/config/img/devices/250/113_hmip-psm.png"; +DEV_HIGHLIGHT["HmIP-PMFS"] = new Object(); +DEV_LIST.push('HM-RC-Key4-3'); +DEV_DESCRIPTION["HM-RC-Key4-3"] = "HM-RC-4"; +DEV_PATHS["HM-RC-Key4-3"] = new Object(); +DEV_PATHS["HM-RC-Key4-3"]["50"] = "/config/img/devices/50/84_hm-rc-4-x_thumb.png"; +DEV_PATHS["HM-RC-Key4-3"]["250"] = "/config/img/devices/250/86_hm-rc-key4-3.png"; +DEV_HIGHLIGHT["HM-RC-Key4-3"] = new Object(); +DEV_HIGHLIGHT["HM-RC-Key4-3"]["arrow_part1"] = [6, 0.312, 0.288, 0.416, 0.288, 0.012]; +DEV_HIGHLIGHT["HM-RC-Key4-3"]["arrow_part2"] = [6, 0.312, 0.288, 0.352, 0.248, 0.012]; +DEV_HIGHLIGHT["HM-RC-Key4-3"]["arrow_part3"] = [6, 0.312, 0.288, 0.352, 0.328, 0.012]; +DEV_HIGHLIGHT["HM-RC-Key4-3"]["Arrow"] = [5, 'arrow_part1', 'arrow_part2', 'arrow_part3']; +DEV_HIGHLIGHT["HM-RC-Key4-3"]["1_Arrow"] = [7, 'Arrow', 0.25, 0.0]; +DEV_HIGHLIGHT["HM-RC-Key4-3"]["2_Arrow"] = [7, 'Arrow', 0.238, 0.156]; +DEV_HIGHLIGHT["HM-RC-Key4-3"]["3_Arrow"] = [7, 'Arrow', 0.228, 0.312]; +DEV_HIGHLIGHT["HM-RC-Key4-3"]["4_Arrow"] = [7, 'Arrow', 0.212, 0.468]; +DEV_HIGHLIGHT["HM-RC-Key4-3"]["1"] = [5, '2_Arrow']; +DEV_HIGHLIGHT["HM-RC-Key4-3"]["2"] = [5, '1_Arrow']; +DEV_HIGHLIGHT["HM-RC-Key4-3"]["3"] = [5, '4_Arrow']; +DEV_HIGHLIGHT["HM-RC-Key4-3"]["4"] = [5, '3_Arrow']; +DEV_HIGHLIGHT["HM-RC-Key4-3"]["1+2"] = [5, '1_Arrow', '2_Arrow']; +DEV_HIGHLIGHT["HM-RC-Key4-3"]["3+4"] = [5, '3_Arrow', '4_Arrow']; +DEV_LIST.push('HM-Sec-WDS-2'); +DEV_DESCRIPTION["HM-Sec-WDS-2"] = "HM-Sec-WDS-2"; +DEV_PATHS["HM-Sec-WDS-2"] = new Object(); +DEV_PATHS["HM-Sec-WDS-2"]["50"] = "/config/img/devices/50/49_hm-sec-wds_thumb.png"; +DEV_PATHS["HM-Sec-WDS-2"]["250"] = "/config/img/devices/250/49_hm-sec-wds.png"; +DEV_HIGHLIGHT["HM-Sec-WDS-2"] = new Object(); +DEV_LIST.push('HMIP-eTRV'); +DEV_DESCRIPTION["HMIP-eTRV"] = "TRV"; +DEV_PATHS["HMIP-eTRV"] = new Object(); +DEV_PATHS["HMIP-eTRV"]["50"] = "/config/img/devices/50/120_hmip-etrv_thumb.png"; +DEV_PATHS["HMIP-eTRV"]["250"] = "/config/img/devices/250/120_hmip-etrv.png"; +DEV_HIGHLIGHT["HMIP-eTRV"] = new Object(); +DEV_LIST.push('HmIP-ASIR-O'); +DEV_DESCRIPTION["HmIP-ASIR-O"] = "HmIP-ASIR-O"; +DEV_PATHS["HmIP-ASIR-O"] = new Object(); +DEV_PATHS["HmIP-ASIR-O"]["50"] = "/config/img/devices/50/192_hmip-asir-o_thumb.png"; +DEV_PATHS["HmIP-ASIR-O"]["250"] = "/config/img/devices/250/192_hmip-asir-o.png"; +DEV_HIGHLIGHT["HmIP-ASIR-O"] = new Object(); +DEV_LIST.push('VIR-LG-GROUP'); +DEV_DESCRIPTION["VIR-LG-GROUP"] = "VIR-LG-GROUP"; +DEV_PATHS["VIR-LG-GROUP"] = new Object(); +DEV_PATHS["VIR-LG-GROUP"]["50"] = "/config/img/devices/50/coupling/hm-coupling-group.png"; +DEV_PATHS["VIR-LG-GROUP"]["250"] = "/config/img/devices/250/coupling/hm-coupling-group.png"; +DEV_HIGHLIGHT["VIR-LG-GROUP"] = new Object(); +DEV_LIST.push('ZEL STG RM FFK'); +DEV_DESCRIPTION["ZEL STG RM FFK"] = "ZEL_STG_RM_FFK"; +DEV_PATHS["ZEL STG RM FFK"] = new Object(); +DEV_PATHS["ZEL STG RM FFK"]["50"] = "/config/img/devices/50/16_hm-sec-sc_thumb.png"; +DEV_PATHS["ZEL STG RM FFK"]["250"] = "/config/img/devices/250/16_hm-sec-sc.png"; +DEV_HIGHLIGHT["ZEL STG RM FFK"] = new Object(); +DEV_LIST.push('HmIP-SWDO'); +DEV_DESCRIPTION["HmIP-SWDO"] = "HmIP-SWDO"; +DEV_PATHS["HmIP-SWDO"] = new Object(); +DEV_PATHS["HmIP-SWDO"]["50"] = "/config/img/devices/50/118_hmip-swdo_thumb.png"; +DEV_PATHS["HmIP-SWDO"]["250"] = "/config/img/devices/250/118_hmip-swdo.png"; +DEV_HIGHLIGHT["HmIP-SWDO"] = new Object(); +DEV_LIST.push('HM-LC-Dim1T-Pl-3'); +DEV_DESCRIPTION["HM-LC-Dim1T-Pl-3"] = "HM-LC-Dim1T-Pl-3"; +DEV_PATHS["HM-LC-Dim1T-Pl-3"] = new Object(); +DEV_PATHS["HM-LC-Dim1T-Pl-3"]["50"] = "/config/img/devices/50/OM55_DimmerSwitch_thumb.png"; +DEV_PATHS["HM-LC-Dim1T-Pl-3"]["250"] = "/config/img/devices/250/OM55_DimmerSwitch.png"; +DEV_HIGHLIGHT["HM-LC-Dim1T-Pl-3"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Dim1T-Pl-3"]["1_part1"] = [2, 0.548, 0.468, 0.072, 0.052]; +DEV_HIGHLIGHT["HM-LC-Dim1T-Pl-3"]["1_part2"] = [2, 0.612, 0.452, 0.028, 0.056]; +DEV_HIGHLIGHT["HM-LC-Dim1T-Pl-3"]["1"] = [5, '1_part1', '1_part2']; +DEV_LIST.push('HM-LC-Dim1T-CV-644'); +DEV_DESCRIPTION["HM-LC-Dim1T-CV-644"] = "HM-LC-Dim1T-CV"; +DEV_PATHS["HM-LC-Dim1T-CV-644"] = new Object(); +DEV_PATHS["HM-LC-Dim1T-CV-644"]["50"] = "/config/img/devices/50/66_hm-lc-dim1t-cv_thumb.png"; +DEV_PATHS["HM-LC-Dim1T-CV-644"]["250"] = "/config/img/devices/250/66_hm-lc-dim1t-cv.png"; +DEV_HIGHLIGHT["HM-LC-Dim1T-CV-644"] = new Object(); +DEV_LIST.push('HmIPW-DRBL4'); +DEV_DESCRIPTION["HmIPW-DRBL4"] = "HmIPW-DRBL4"; +DEV_PATHS["HmIPW-DRBL4"] = new Object(); +DEV_PATHS["HmIPW-DRBL4"]["50"] = "/config/img/devices/50/163_hmipw-drbl4_thumb.png"; +DEV_PATHS["HmIPW-DRBL4"]["250"] = "/config/img/devices/250/163_hmipw-drbl4.png"; +DEV_HIGHLIGHT["HmIPW-DRBL4"] = new Object(); +DEV_LIST.push('HmIP-PSM-UK'); +DEV_DESCRIPTION["HmIP-PSM-UK"] = "PSM-UK"; +DEV_PATHS["HmIP-PSM-UK"] = new Object(); +DEV_PATHS["HmIP-PSM-UK"]["50"] = "/config/img/devices/50/113_hmip-psm-uk_thumb.png"; +DEV_PATHS["HmIP-PSM-UK"]["250"] = "/config/img/devices/250/113_hmip-psm-uk.png"; +DEV_HIGHLIGHT["HmIP-PSM-UK"] = new Object(); +DEV_LIST.push('HmIP-PSM-PE'); +DEV_DESCRIPTION["HmIP-PSM-PE"] = "PSM-PE"; +DEV_PATHS["HmIP-PSM-PE"] = new Object(); +DEV_PATHS["HmIP-PSM-PE"]["50"] = "/config/img/devices/50/113_hmip-psm-pe_thumb.png"; +DEV_PATHS["HmIP-PSM-PE"]["250"] = "/config/img/devices/250/113_hmip-psm-pe.png"; +DEV_HIGHLIGHT["HmIP-PSM-PE"] = new Object(); +DEV_LIST.push('HmIP-eTRV-F-A'); +DEV_DESCRIPTION["HmIP-eTRV-F-A"] = "TRV"; +DEV_PATHS["HmIP-eTRV-F-A"] = new Object(); +DEV_PATHS["HmIP-eTRV-F-A"]["50"] = "/config/img/devices/50/230_hmip-etrv-f_thumb.png"; +DEV_PATHS["HmIP-eTRV-F-A"]["250"] = "/config/img/devices/250/230_hmip-etrv-f.png"; +DEV_HIGHLIGHT["HmIP-eTRV-F-A"] = new Object(); +DEV_LIST.push('HM-OU-CFM-Pl'); +DEV_DESCRIPTION["HM-OU-CFM-Pl"] = "HM-OU-CFM-Pl"; +DEV_PATHS["HM-OU-CFM-Pl"] = new Object(); +DEV_PATHS["HM-OU-CFM-Pl"]["50"] = "/config/img/devices/50/60_hm-ou-cf-pl_thumb.png"; +DEV_PATHS["HM-OU-CFM-Pl"]["250"] = "/config/img/devices/250/60_hm-ou-cf-pl.png"; +DEV_HIGHLIGHT["HM-OU-CFM-Pl"] = new Object(); +DEV_HIGHLIGHT["HM-OU-CFM-Pl"]["Light_circle"] = [4, 0.688, 0.224, 0.118, 0.112]; +DEV_HIGHLIGHT["HM-OU-CFM-Pl"]["Light_beam_1"] = [6, 0.628, 0.28, 0.656, 0.28, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-Pl"]["Light_beam_2"] = [6, 0.656, 0.2, 0.68, 0.22, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-Pl"]["Light_beam_3"] = [6, 0.74, 0.168, 0.74, 0.196, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-Pl"]["Light_beam_4"] = [6, 0.82, 0.196, 0.8, 0.216, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-Pl"]["Light_beam_5"] = [6, 0.824, 0.28, 0.856, 0.28, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-Pl"]["Light_beam_6"] = [6, 0.68, 0.34, 0.664, 0.36, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-Pl"]["Light_beam_7"] = [6, 0.74, 0.364, 0.74, 0.392, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-Pl"]["Light_beam_8"] = [6, 0.8, 0.34, 0.82, 0.36, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-Pl"]["1"] = [5, 'Light_circle', 'Light_beam_1', 'Light_beam_2', 'Light_beam_3', 'Light_beam_4', 'Light_beam_5', 'Light_beam_6', 'Light_beam_7', 'Light_beam_8']; +DEV_HIGHLIGHT["HM-OU-CFM-Pl"]["SP_1"] = [6, 0.644, 0.676, 0.672, 0.676, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-Pl"]["SP_2"] = [6, 0.672, 0.676, 0.672, 0.816, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-Pl"]["SP_3"] = [6, 0.644, 0.816, 0.672, 0.816, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-Pl"]["SP_4"] = [6, 0.644, 0.676, 0.644, 0.816, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-Pl"]["SP_5"] = [6, 0.672, 0.676, 0.716, 0.632, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-Pl"]["SP_6"] = [6, 0.716, 0.632, 0.716, 0.86, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-Pl"]["SP_7"] = [6, 0.672, 0.816, 0.716, 0.86, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-Pl"]["SP_beam_1"] = [6, 0.75, 0.7, 0.832, 0.632, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-Pl"]["SP_beam_2"] = [6, 0.75, 0.748, 0.832, 0.748, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-Pl"]["SP_beam_3"] = [6, 0.75, 0.796, 0.832, 0.86, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-Pl"]["2"] = [5, 'SP_1', 'SP_2', 'SP_3', 'SP_4', 'SP_5', 'SP_6', 'SP_7', 'SP_beam_1', 'SP_beam_2', 'SP_beam_3']; +DEV_LIST.push('HM-LC-Sw1-FM'); +DEV_DESCRIPTION["HM-LC-Sw1-FM"] = "HM-LC-Sw1-FM"; +DEV_PATHS["HM-LC-Sw1-FM"] = new Object(); +DEV_PATHS["HM-LC-Sw1-FM"]["50"] = "/config/img/devices/50/4_hm-lc-sw1-fm_thumb.png"; +DEV_PATHS["HM-LC-Sw1-FM"]["250"] = "/config/img/devices/250/4_hm-lc-sw1-fm.png"; +DEV_HIGHLIGHT["HM-LC-Sw1-FM"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Sw1-FM"]["1_AUS"] = [2, 0.288, 0.66, 0.068, 0.152]; +DEV_HIGHLIGHT["HM-LC-Sw1-FM"]["1_EIN"] = [2, 0.548, 0.66, 0.068, 0.152]; +DEV_HIGHLIGHT["HM-LC-Sw1-FM"]["1"] = [5, '1_AUS', '1_EIN']; +DEV_LIST.push('HmIP-HAP JS1'); +DEV_DESCRIPTION["HmIP-HAP JS1"] = "HmIP-HAP"; +DEV_PATHS["HmIP-HAP JS1"] = new Object(); +DEV_PATHS["HmIP-HAP JS1"]["50"] = "/config/img/devices/50/CCU3_thumb.png"; +DEV_PATHS["HmIP-HAP JS1"]["250"] = "/config/img/devices/250/CCU3.png"; +DEV_HIGHLIGHT["HmIP-HAP JS1"] = new Object(); +DEV_LIST.push('HM-WS550STH-I'); +DEV_DESCRIPTION["HM-WS550STH-I"] = "HM-WS550STH-I"; +DEV_PATHS["HM-WS550STH-I"] = new Object(); +DEV_PATHS["HM-WS550STH-I"]["50"] = "/config/img/devices/50/13_hm-ws550sth-i_thumb.png"; +DEV_PATHS["HM-WS550STH-I"]["250"] = "/config/img/devices/250/13_hm-ws550sth-i.png"; +DEV_HIGHLIGHT["HM-WS550STH-I"] = new Object(); +DEV_LIST.push('HmIP-eTRV-E-S'); +DEV_DESCRIPTION["HmIP-eTRV-E-S"] = "TRV-E"; +DEV_PATHS["HmIP-eTRV-E-S"] = new Object(); +DEV_PATHS["HmIP-eTRV-E-S"]["50"] = "/config/img/devices/50/216_hmip-etrv-e_thumb.png"; +DEV_PATHS["HmIP-eTRV-E-S"]["250"] = "/config/img/devices/250/216_hmip-etrv-e.png"; +DEV_HIGHLIGHT["HmIP-eTRV-E-S"] = new Object(); +DEV_LIST.push('HMIP-SWDO'); +DEV_DESCRIPTION["HMIP-SWDO"] = "HmIP-SWDO"; +DEV_PATHS["HMIP-SWDO"] = new Object(); +DEV_PATHS["HMIP-SWDO"]["50"] = "/config/img/devices/50/118_hmip-swdo_thumb.png"; +DEV_PATHS["HMIP-SWDO"]["250"] = "/config/img/devices/250/118_hmip-swdo.png"; +DEV_HIGHLIGHT["HMIP-SWDO"] = new Object(); +DEV_LIST.push('HmIPW-FAL24-C6'); +DEV_DESCRIPTION["HmIPW-FAL24-C6"] = "HmIPW-FAL24-C6"; +DEV_PATHS["HmIPW-FAL24-C6"] = new Object(); +DEV_PATHS["HmIPW-FAL24-C6"]["50"] = "/config/img/devices/50/137_hmip-fal-c6_thumb.png"; +DEV_PATHS["HmIPW-FAL24-C6"]["250"] = "/config/img/devices/250/137_hmip-fal-c6.png"; +DEV_HIGHLIGHT["HmIPW-FAL24-C6"] = new Object(); +DEV_LIST.push('HMW-WSTH-SM'); +DEV_DESCRIPTION["HMW-WSTH-SM"] = "HMW-WSTH-SM"; +DEV_PATHS["HMW-WSTH-SM"] = new Object(); +DEV_PATHS["HMW-WSTH-SM"]["50"] = "/config/img/devices/50/32_hmw-wsth-sm_thumb.png"; +DEV_PATHS["HMW-WSTH-SM"]["250"] = "/config/img/devices/250/32_hmw-wsth-sm.png"; +DEV_HIGHLIGHT["HMW-WSTH-SM"] = new Object(); +DEV_LIST.push('HM-RC-Sec3-B'); +DEV_DESCRIPTION["HM-RC-Sec3-B"] = "HM-RC-Sec3-B"; +DEV_PATHS["HM-RC-Sec3-B"] = new Object(); +DEV_PATHS["HM-RC-Sec3-B"]["50"] = "/config/img/devices/50/22_hm-rc-sec3-b_thumb.png"; +DEV_PATHS["HM-RC-Sec3-B"]["250"] = "/config/img/devices/250/22_hm-rc-sec3-b.png"; +DEV_HIGHLIGHT["HM-RC-Sec3-B"] = new Object(); +DEV_HIGHLIGHT["HM-RC-Sec3-B"]["1"] = [4, 0.252, 0.2, 0.16, 0.176]; +DEV_HIGHLIGHT["HM-RC-Sec3-B"]["2"] = [4, 0.492, 0.2, 0.16, 0.176]; +DEV_HIGHLIGHT["HM-RC-Sec3-B"]["3"] = [4, 0.34, 0.48, 0.224, 0.248]; +DEV_HIGHLIGHT["HM-RC-Sec3-B"]["1+2"] = [5, '1', '2']; +DEV_LIST.push('HmIP-BRC2'); +DEV_DESCRIPTION["HmIP-BRC2"] = "HmIP-BRC2"; +DEV_PATHS["HmIP-BRC2"] = new Object(); +DEV_PATHS["HmIP-BRC2"]["50"] = "/config/img/devices/50/PushButton-2ch-wm_thumb.png"; +DEV_PATHS["HmIP-BRC2"]["250"] = "/config/img/devices/250/PushButton-2ch-wm.png"; +DEV_HIGHLIGHT["HmIP-BRC2"] = new Object(); +DEV_HIGHLIGHT["HmIP-BRC2"]["2"] = [2, 0.244, 0.312, 0.428, 0.168]; +DEV_HIGHLIGHT["HmIP-BRC2"]["1"] = [2, 0.244, 0.56, 0.428, 0.168]; +DEV_HIGHLIGHT["HmIP-BRC2"]["1+2"] = [2, 0.244, 0.308, 0.428, 0.416]; +DEV_LIST.push('HmIP-MP3P'); +DEV_DESCRIPTION["HmIP-MP3P"] = "HmIP-MP3P"; +DEV_PATHS["HmIP-MP3P"] = new Object(); +DEV_PATHS["HmIP-MP3P"]["50"] = "/config/img/devices/50/186_hmip-mp3p_thumb.png"; +DEV_PATHS["HmIP-MP3P"]["250"] = "/config/img/devices/250/186_hmip-mp3p.png"; +DEV_HIGHLIGHT["HmIP-MP3P"] = new Object(); +DEV_LIST.push('HM-Sec-MDIR-2'); +DEV_DESCRIPTION["HM-Sec-MDIR-2"] = "HM-Sec-MDIR"; +DEV_PATHS["HM-Sec-MDIR-2"] = new Object(); +DEV_PATHS["HM-Sec-MDIR-2"]["50"] = "/config/img/devices/50/124_hm-sec-mdir_thumb.png"; +DEV_PATHS["HM-Sec-MDIR-2"]["250"] = "/config/img/devices/250/124_hm-sec-mdir.png"; +DEV_HIGHLIGHT["HM-Sec-MDIR-2"] = new Object(); +DEV_LIST.push('HmIP-eTRV'); +DEV_DESCRIPTION["HmIP-eTRV"] = "TRV"; +DEV_PATHS["HmIP-eTRV"] = new Object(); +DEV_PATHS["HmIP-eTRV"]["50"] = "/config/img/devices/50/120_hmip-etrv_thumb.png"; +DEV_PATHS["HmIP-eTRV"]["250"] = "/config/img/devices/250/120_hmip-etrv.png"; +DEV_HIGHLIGHT["HmIP-eTRV"] = new Object(); +DEV_LIST.push('HmIPW-DRI16'); +DEV_DESCRIPTION["HmIPW-DRI16"] = "HmIPW-DRI16"; +DEV_PATHS["HmIPW-DRI16"] = new Object(); +DEV_PATHS["HmIPW-DRI16"]["50"] = "/config/img/devices/50/164_hmipw-dri16_thumb.png"; +DEV_PATHS["HmIPW-DRI16"]["250"] = "/config/img/devices/250/164_hmipw-dri16.png"; +DEV_HIGHLIGHT["HmIPW-DRI16"] = new Object(); +DEV_LIST.push('HM-LC-Dim1TPBU-FM-2'); +DEV_DESCRIPTION["HM-LC-Dim1TPBU-FM-2"] = "HM-LC-Dim1TPBU-FM-2"; +DEV_PATHS["HM-LC-Dim1TPBU-FM-2"] = new Object(); +DEV_PATHS["HM-LC-Dim1TPBU-FM-2"]["50"] = "/config/img/devices/50/PushButton-2ch-wm_thumb.png"; +DEV_PATHS["HM-LC-Dim1TPBU-FM-2"]["250"] = "/config/img/devices/250/PushButton-2ch-wm.png"; +DEV_HIGHLIGHT["HM-LC-Dim1TPBU-FM-2"] = new Object(); +DEV_LIST.push('HM-LC-AO-SM'); +DEV_DESCRIPTION["HM-LC-AO-SM"] = "HM-LC-AO-SM"; +DEV_PATHS["HM-LC-AO-SM"] = new Object(); +DEV_PATHS["HM-LC-AO-SM"]["50"] = "/config/img/devices/50/129_hm-lc-ao-sm_thumb.png"; +DEV_PATHS["HM-LC-AO-SM"]["250"] = "/config/img/devices/250/129_hm-lc-ao-sm.png"; +DEV_HIGHLIGHT["HM-LC-AO-SM"] = new Object(); +DEV_LIST.push('HmIP-FAL24-C10'); +DEV_DESCRIPTION["HmIP-FAL24-C10"] = "HmIP-FAL24-C10"; +DEV_PATHS["HmIP-FAL24-C10"] = new Object(); +DEV_PATHS["HmIP-FAL24-C10"]["50"] = "/config/img/devices/50/138_hmip-fal-c10_thumb.png"; +DEV_PATHS["HmIP-FAL24-C10"]["250"] = "/config/img/devices/250/138_hmip-fal-c10.png"; +DEV_HIGHLIGHT["HmIP-FAL24-C10"] = new Object(); +DEV_LIST.push('HM-RC-4-B'); +DEV_DESCRIPTION["HM-RC-4-B"] = "HM-RC-4-B"; +DEV_PATHS["HM-RC-4-B"] = new Object(); +DEV_PATHS["HM-RC-4-B"]["50"] = "/config/img/devices/50/18_hm-rc-4_thumb.png"; +DEV_PATHS["HM-RC-4-B"]["250"] = "/config/img/devices/250/18_hm-rc-4.png"; +DEV_HIGHLIGHT["HM-RC-4-B"] = new Object(); +DEV_HIGHLIGHT["HM-RC-4-B"]["1"] = [4, 0.268, 0.236, 0.16, 0.164]; +DEV_HIGHLIGHT["HM-RC-4-B"]["2"] = [4, 0.476, 0.236, 0.16, 0.164]; +DEV_HIGHLIGHT["HM-RC-4-B"]["3"] = [4, 0.268, 0.48, 0.16, 0.164]; +DEV_HIGHLIGHT["HM-RC-4-B"]["4"] = [4, 0.476, 0.48, 0.16, 0.164]; +DEV_HIGHLIGHT["HM-RC-4-B"]["1+2"] = [5, '1', '2']; +DEV_HIGHLIGHT["HM-RC-4-B"]["3+4"] = [5, '3', '4']; +DEV_LIST.push('HM-RC-Sec3'); +DEV_DESCRIPTION["HM-RC-Sec3"] = "HM-RC-Sec3"; +DEV_PATHS["HM-RC-Sec3"] = new Object(); +DEV_PATHS["HM-RC-Sec3"]["50"] = "/config/img/devices/50/22_hm-rc-sec3-b_thumb.png"; +DEV_PATHS["HM-RC-Sec3"]["250"] = "/config/img/devices/250/22_hm-rc-sec3-b.png"; +DEV_HIGHLIGHT["HM-RC-Sec3"] = new Object(); +DEV_HIGHLIGHT["HM-RC-Sec3"]["1"] = [4, 0.252, 0.2, 0.16, 0.176]; +DEV_HIGHLIGHT["HM-RC-Sec3"]["2"] = [4, 0.492, 0.2, 0.16, 0.176]; +DEV_HIGHLIGHT["HM-RC-Sec3"]["3"] = [4, 0.34, 0.48, 0.224, 0.248]; +DEV_HIGHLIGHT["HM-RC-Sec3"]["1+2"] = [5, '1', '2']; +DEV_LIST.push('HmIP-SWO-PR'); +DEV_DESCRIPTION["HmIP-SWO-PR"] = "HmIP-SWO-PR"; +DEV_PATHS["HmIP-SWO-PR"] = new Object(); +DEV_PATHS["HmIP-SWO-PR"]["50"] = "/config/img/devices/50/169_hmip-swo-pr_thumb.png"; +DEV_PATHS["HmIP-SWO-PR"]["250"] = "/config/img/devices/250/169_hmip-swo-pr.png"; +DEV_HIGHLIGHT["HmIP-SWO-PR"] = new Object(); +DEV_LIST.push('HM-LC-Sw1-PB-FM'); +DEV_DESCRIPTION["HM-LC-Sw1-PB-FM"] = "HM-LC-Sw1-PB-FM"; +DEV_PATHS["HM-LC-Sw1-PB-FM"] = new Object(); +DEV_PATHS["HM-LC-Sw1-PB-FM"]["50"] = "/config/img/devices/50/PushButton-2ch-wm_thumb.png"; +DEV_PATHS["HM-LC-Sw1-PB-FM"]["250"] = "/config/img/devices/250/PushButton-2ch-wm.png"; +DEV_HIGHLIGHT["HM-LC-Sw1-PB-FM"] = new Object(); +DEV_LIST.push('HM-RC-2-PBU-FM-2'); +DEV_DESCRIPTION["HM-RC-2-PBU-FM-2"] = "HM-RC-2-PBU-FM"; +DEV_PATHS["HM-RC-2-PBU-FM-2"] = new Object(); +DEV_PATHS["HM-RC-2-PBU-FM-2"]["50"] = "/config/img/devices/50/PushButton-2ch-wm_thumb.png"; +DEV_PATHS["HM-RC-2-PBU-FM-2"]["250"] = "/config/img/devices/250/PushButton-2ch-wm.png"; +DEV_HIGHLIGHT["HM-RC-2-PBU-FM-2"] = new Object(); +DEV_HIGHLIGHT["HM-RC-2-PBU-FM-2"]["2"] = [2, 0.244, 0.312, 0.428, 0.168]; +DEV_HIGHLIGHT["HM-RC-2-PBU-FM-2"]["1"] = [2, 0.244, 0.56, 0.428, 0.168]; +DEV_HIGHLIGHT["HM-RC-2-PBU-FM-2"]["1+2"] = [2, 0.244, 0.308, 0.428, 0.416]; +DEV_LIST.push('HM-Sec-SD'); +DEV_DESCRIPTION["HM-Sec-SD"] = "HM-Sec-SD"; +DEV_PATHS["HM-Sec-SD"] = new Object(); +DEV_PATHS["HM-Sec-SD"]["50"] = "/config/img/devices/50/51_hm-sec-sd_thumb.png"; +DEV_PATHS["HM-Sec-SD"]["250"] = "/config/img/devices/250/51_hm-sec-sd.png"; +DEV_HIGHLIGHT["HM-Sec-SD"] = new Object(); +DEV_LIST.push('HmIP-SWDO-PL-2'); +DEV_DESCRIPTION["HmIP-SWDO-PL-2"] = "HmIP-SWDO-PL"; +DEV_PATHS["HmIP-SWDO-PL-2"] = new Object(); +DEV_PATHS["HmIP-SWDO-PL-2"]["50"] = "/config/img/devices/50/197_hmip-swdo-pl_thumb.png"; +DEV_PATHS["HmIP-SWDO-PL-2"]["250"] = "/config/img/devices/250/197_hmip-swdo-pl.png"; +DEV_HIGHLIGHT["HmIP-SWDO-PL-2"] = new Object(); +DEV_LIST.push('HmIPW-DRI32'); +DEV_DESCRIPTION["HmIPW-DRI32"] = "HmIPW-DRI32"; +DEV_PATHS["HmIPW-DRI32"] = new Object(); +DEV_PATHS["HmIPW-DRI32"]["50"] = "/config/img/devices/50/167_hmipw-dri32_thumb.png"; +DEV_PATHS["HmIPW-DRI32"]["250"] = "/config/img/devices/250/167_hmipw-dri32.png"; +DEV_HIGHLIGHT["HmIPW-DRI32"] = new Object(); +DEV_LIST.push('HM-CC-VD'); +DEV_DESCRIPTION["HM-CC-VD"] = "HM-CC-VD"; +DEV_PATHS["HM-CC-VD"] = new Object(); +DEV_PATHS["HM-CC-VD"]["50"] = "/config/img/devices/50/43_hm-cc-vd_thumb.png"; +DEV_PATHS["HM-CC-VD"]["250"] = "/config/img/devices/250/43_hm-cc-vd.png"; +DEV_HIGHLIGHT["HM-CC-VD"] = new Object(); +DEV_LIST.push('HM-PB-2-WM55'); +DEV_DESCRIPTION["HM-PB-2-WM55"] = "HM-PB-2-WM55"; +DEV_PATHS["HM-PB-2-WM55"] = new Object(); +DEV_PATHS["HM-PB-2-WM55"]["50"] = "/config/img/devices/50/75_hm-pb-2-wm55_thumb.png"; +DEV_PATHS["HM-PB-2-WM55"]["250"] = "/config/img/devices/250/75_hm-pb-2-wm55.png"; +DEV_HIGHLIGHT["HM-PB-2-WM55"] = new Object(); +DEV_HIGHLIGHT["HM-PB-2-WM55"]["2"] = [2, 0.204, 0.23, 0.546, 0.128]; +DEV_HIGHLIGHT["HM-PB-2-WM55"]["1"] = [2, 0.204, 0.65, 0.546, 0.128]; +DEV_LIST.push('HmIP-eTRV-B-UK'); +DEV_DESCRIPTION["HmIP-eTRV-B-UK"] = "TRV-B-UK"; +DEV_PATHS["HmIP-eTRV-B-UK"] = new Object(); +DEV_PATHS["HmIP-eTRV-B-UK"]["50"] = "/config/img/devices/50/209_hmip-etrv-b-uk_thumb.png"; +DEV_PATHS["HmIP-eTRV-B-UK"]["250"] = "/config/img/devices/250/209_hmip-etrv-b-uk.png"; +DEV_HIGHLIGHT["HmIP-eTRV-B-UK"] = new Object(); +DEV_LIST.push('HM-ES-PMSw1-Pl-DN-R1'); +DEV_DESCRIPTION["HM-ES-PMSw1-Pl-DN-R1"] = "HM-ES-PMSw1-Pl-DN-R1"; +DEV_PATHS["HM-ES-PMSw1-Pl-DN-R1"] = new Object(); +DEV_PATHS["HM-ES-PMSw1-Pl-DN-R1"]["50"] = "/config/img/devices/50/93_hm-es-pmsw1-pl_thumb.png"; +DEV_PATHS["HM-ES-PMSw1-Pl-DN-R1"]["250"] = "/config/img/devices/250/93_hm-es-pmsw1-pl.png"; +DEV_HIGHLIGHT["HM-ES-PMSw1-Pl-DN-R1"] = new Object(); +DEV_LIST.push('HM-WS550ST-IO'); +DEV_DESCRIPTION["HM-WS550ST-IO"] = "HM-WS550ST-IO"; +DEV_PATHS["HM-WS550ST-IO"] = new Object(); +DEV_PATHS["HM-WS550ST-IO"]["50"] = "/config/img/devices/50/IP65_G201_thumb.png"; +DEV_PATHS["HM-WS550ST-IO"]["250"] = "/config/img/devices/250/IP65_G201.png"; +DEV_HIGHLIGHT["HM-WS550ST-IO"] = new Object(); +DEV_LIST.push('HmIP-FDC'); +DEV_DESCRIPTION["HmIP-FDC"] = "HmIP-FLC"; +DEV_PATHS["HmIP-FDC"] = new Object(); +DEV_PATHS["HmIP-FDC"]["50"] = "/config/img/devices/50/233_hmip-flc_thumb.png"; +DEV_PATHS["HmIP-FDC"]["250"] = "/config/img/devices/250/233_hmip-flc.png"; +DEV_HIGHLIGHT["HmIP-FDC"] = new Object(); +DEV_LIST.push('HmIP-eTRV-C-2'); +DEV_DESCRIPTION["HmIP-eTRV-C-2"] = "TRV-C"; +DEV_PATHS["HmIP-eTRV-C-2"] = new Object(); +DEV_PATHS["HmIP-eTRV-C-2"]["50"] = "/config/img/devices/50/188_hmip-etrv-c_thumb.png"; +DEV_PATHS["HmIP-eTRV-C-2"]["250"] = "/config/img/devices/250/188_hmip-etrv-c.png"; +DEV_HIGHLIGHT["HmIP-eTRV-C-2"] = new Object(); +DEV_LIST.push('263 162'); +DEV_DESCRIPTION["263 162"] = "263_162"; +DEV_PATHS["263 162"] = new Object(); +DEV_PATHS["263 162"]["50"] = "/config/img/devices/50/124_hm-sec-mdir_thumb.png"; +DEV_PATHS["263 162"]["250"] = "/config/img/devices/250/124_hm-sec-mdir.png"; +DEV_HIGHLIGHT["263 162"] = new Object(); +DEV_LIST.push('HM-Sys-sRP-Pl'); +DEV_DESCRIPTION["HM-Sys-sRP-Pl"] = "HM-Sys-sRP-Pl"; +DEV_PATHS["HM-Sys-sRP-Pl"] = new Object(); +DEV_PATHS["HM-Sys-sRP-Pl"]["50"] = "/config/img/devices/50/OM55_DimmerSwitch_thumb.png"; +DEV_PATHS["HM-Sys-sRP-Pl"]["250"] = "/config/img/devices/250/OM55_DimmerSwitch.png"; +DEV_HIGHLIGHT["HM-Sys-sRP-Pl"] = new Object(); +DEV_LIST.push('HmIP-FAL230-C6'); +DEV_DESCRIPTION["HmIP-FAL230-C6"] = "HmIP-FAL230-C6"; +DEV_PATHS["HmIP-FAL230-C6"] = new Object(); +DEV_PATHS["HmIP-FAL230-C6"]["50"] = "/config/img/devices/50/137_hmip-fal-c6_thumb.png"; +DEV_PATHS["HmIP-FAL230-C6"]["250"] = "/config/img/devices/250/137_hmip-fal-c6.png"; +DEV_HIGHLIGHT["HmIP-FAL230-C6"] = new Object(); +DEV_LIST.push('HM-Sec-SFA-SM'); +DEV_DESCRIPTION["HM-Sec-SFA-SM"] = "HM-Sec-SFA-SM"; +DEV_PATHS["HM-Sec-SFA-SM"] = new Object(); +DEV_PATHS["HM-Sec-SFA-SM"]["50"] = "/config/img/devices/50/55_hm-sec-sfa-sm_thumb.png"; +DEV_PATHS["HM-Sec-SFA-SM"]["250"] = "/config/img/devices/250/55_hm-sec-sfa-sm.png"; +DEV_HIGHLIGHT["HM-Sec-SFA-SM"] = new Object(); +DEV_HIGHLIGHT["HM-Sec-SFA-SM"]["1_Taster"] = [4, 0.348, 0.388, 0.08, 0.08]; +DEV_HIGHLIGHT["HM-Sec-SFA-SM"]["1_Led"] = [4, 0.372, 0.304, 0.036, 0.036]; +DEV_HIGHLIGHT["HM-Sec-SFA-SM"]["1"] = [5, '1_Taster', '1_Led']; +DEV_HIGHLIGHT["HM-Sec-SFA-SM"]["2_Taster"] = [4, 0.552, 0.388, 0.08, 0.08]; +DEV_HIGHLIGHT["HM-Sec-SFA-SM"]["2_Led"] = [4, 0.576, 0.304, 0.036, 0.036]; +DEV_HIGHLIGHT["HM-Sec-SFA-SM"]["2"] = [5, '2_Taster', '2_Led']; +DEV_LIST.push('HmIP-SMO'); +DEV_DESCRIPTION["HmIP-SMO"] = "SMO"; +DEV_PATHS["HmIP-SMO"] = new Object(); +DEV_PATHS["HmIP-SMO"]["50"] = "/config/img/devices/50/132_hmip-smo_thumb.png"; +DEV_PATHS["HmIP-SMO"]["250"] = "/config/img/devices/250/132_hmip-smo.png"; +DEV_HIGHLIGHT["HmIP-SMO"] = new Object(); +DEV_LIST.push('HmIP-FSM'); +DEV_DESCRIPTION["HmIP-FSM"] = "FSM"; +DEV_PATHS["HmIP-FSM"] = new Object(); +DEV_PATHS["HmIP-FSM"]["50"] = "/config/img/devices/50/134_hmip-fsm_thumb.png"; +DEV_PATHS["HmIP-FSM"]["250"] = "/config/img/devices/250/134_hmip-fsm.png"; +DEV_HIGHLIGHT["HmIP-FSM"] = new Object(); +DEV_LIST.push('ZEL STG RM FZS-2'); +DEV_DESCRIPTION["ZEL STG RM FZS-2"] = "ZEL_STG_RM_FZS-2"; +DEV_PATHS["ZEL STG RM FZS-2"] = new Object(); +DEV_PATHS["ZEL STG RM FZS-2"]["50"] = "/config/img/devices/50/OM55_DimmerSwitch_thumb.png"; +DEV_PATHS["ZEL STG RM FZS-2"]["250"] = "/config/img/devices/250/OM55_DimmerSwitch.png"; +DEV_HIGHLIGHT["ZEL STG RM FZS-2"] = new Object(); +DEV_HIGHLIGHT["ZEL STG RM FZS-2"]["1_part1"] = [2, 0.548, 0.468, 0.072, 0.052]; +DEV_HIGHLIGHT["ZEL STG RM FZS-2"]["1_part2"] = [2, 0.612, 0.452, 0.028, 0.056]; +DEV_HIGHLIGHT["ZEL STG RM FZS-2"]["1"] = [5, '1_part1', '1_part2']; +DEV_LIST.push('HmIP-HEATING'); +DEV_DESCRIPTION["HmIP-HEATING"] = "HM-CC-VG-1"; +DEV_PATHS["HmIP-HEATING"] = new Object(); +DEV_PATHS["HmIP-HEATING"]["50"] = "/config/img/devices/50/175_hmip-group-heating_thumb.png"; +DEV_PATHS["HmIP-HEATING"]["250"] = "/config/img/devices/250/175_hmip-group-heating.png"; +DEV_HIGHLIGHT["HmIP-HEATING"] = new Object(); +DEV_LIST.push('HM-RCV-50'); +DEV_DESCRIPTION["HM-RCV-50"] = "HM-RCV-50"; +DEV_PATHS["HM-RCV-50"] = new Object(); +DEV_PATHS["HM-RCV-50"]["50"] = "/config/img/devices/50/CCU2_thumb.png"; +DEV_PATHS["HM-RCV-50"]["250"] = "/config/img/devices/250/CCU2.png"; +DEV_HIGHLIGHT["HM-RCV-50"] = new Object(); +DEV_HIGHLIGHT["HM-RCV-50"]["RF_1"] = [4, 0.364, 0.048, 0.028, 0.028]; +DEV_HIGHLIGHT["HM-RCV-50"]["RF_2"] = [6, 0.4, 0.052, 0.544, 0.004, 0.016]; +DEV_HIGHLIGHT["HM-RCV-50"]["RF_3"] = [6, 0.4, 0.052, 0.6, 0.052, 0.016]; +DEV_HIGHLIGHT["HM-RCV-50"]["RF_4"] = [6, 0.4, 0.052, 0.544, 0.104, 0.016]; +DEV_HIGHLIGHT["HM-RCV-50"]["RF_5"] = [6, 0.168, 0.052, 0.344, 0.052, 0.016]; +DEV_HIGHLIGHT["HM-RCV-50"]["RF_6"] = [6, 0.168, 0, 0.344, 0.052, 0.016]; +DEV_HIGHLIGHT["HM-RCV-50"]["RF_7"] = [6, 0.168, 0.104, 0.344, 0.052, 0.016]; +DEV_HIGHLIGHT["HM-RCV-50"]["RF"] = [5, 'RF_1', 'RF_2', 'RF_3', 'RF_4', 'RF_5', 'RF_6', 'RF_7']; +DEV_HIGHLIGHT["HM-RCV-50"]["S1"] = [3, 0.25, 0.15, '1', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S2"] = [3, 0.25, 0.15, '2', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S3"] = [3, 0.25, 0.15, '3', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S4"] = [3, 0.25, 0.15, '4', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S5"] = [3, 0.25, 0.15, '5', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S6"] = [3, 0.25, 0.15, '6', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S7"] = [3, 0.25, 0.15, '7', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S8"] = [3, 0.25, 0.15, '8', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S9"] = [3, 0.25, 0.15, '9', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S10"] = [3, 0.175, 0.15, '10', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S11"] = [3, 0.175, 0.15, '11', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S12"] = [3, 0.175, 0.15, '12', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S13"] = [3, 0.175, 0.15, '13', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S14"] = [3, 0.175, 0.15, '14', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S15"] = [3, 0.175, 0.15, '15', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S16"] = [3, 0.175, 0.15, '16', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S17"] = [3, 0.175, 0.15, '17', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S18"] = [3, 0.175, 0.15, '18', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S19"] = [3, 0.175, 0.15, '19', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S20"] = [3, 0.175, 0.15, '20', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S21"] = [3, 0.175, 0.15, '21', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S22"] = [3, 0.175, 0.15, '22', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S23"] = [3, 0.175, 0.15, '23', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S24"] = [3, 0.175, 0.15, '24', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S25"] = [3, 0.175, 0.15, '25', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S26"] = [3, 0.175, 0.15, '26', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S27"] = [3, 0.175, 0.15, '27', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S28"] = [3, 0.175, 0.15, '28', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S29"] = [3, 0.175, 0.15, '29', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S30"] = [3, 0.175, 0.15, '30', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S31"] = [3, 0.175, 0.15, '31', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S32"] = [3, 0.175, 0.15, '32', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S33"] = [3, 0.175, 0.15, '33', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S34"] = [3, 0.175, 0.15, '34', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S35"] = [3, 0.175, 0.15, '35', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S36"] = [3, 0.175, 0.15, '36', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S37"] = [3, 0.175, 0.15, '37', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S38"] = [3, 0.175, 0.15, '38', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S39"] = [3, 0.175, 0.15, '39', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S40"] = [3, 0.175, 0.15, '40', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S41"] = [3, 0.175, 0.15, '41', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S42"] = [3, 0.175, 0.15, '42', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S43"] = [3, 0.175, 0.15, '43', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S44"] = [3, 0.175, 0.15, '44', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S45"] = [3, 0.175, 0.15, '45', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S46"] = [3, 0.175, 0.15, '46', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S47"] = [3, 0.175, 0.15, '47', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S48"] = [3, 0.175, 0.15, '48', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S49"] = [3, 0.175, 0.15, '49', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S50"] = [3, 0.175, 0.15, '50', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["1"] = [5, 'S1']; +DEV_HIGHLIGHT["HM-RCV-50"]["2"] = [5, 'S2']; +DEV_HIGHLIGHT["HM-RCV-50"]["3"] = [5, 'S3']; +DEV_HIGHLIGHT["HM-RCV-50"]["4"] = [5, 'S4']; +DEV_HIGHLIGHT["HM-RCV-50"]["5"] = [5, 'S5']; +DEV_HIGHLIGHT["HM-RCV-50"]["6"] = [5, 'S6']; +DEV_HIGHLIGHT["HM-RCV-50"]["7"] = [5, 'S7']; +DEV_HIGHLIGHT["HM-RCV-50"]["8"] = [5, 'S8']; +DEV_HIGHLIGHT["HM-RCV-50"]["9"] = [5, 'S9']; +DEV_HIGHLIGHT["HM-RCV-50"]["10"] = [5, 'S10']; +DEV_HIGHLIGHT["HM-RCV-50"]["11"] = [5, 'S11']; +DEV_HIGHLIGHT["HM-RCV-50"]["12"] = [5, 'S12']; +DEV_HIGHLIGHT["HM-RCV-50"]["13"] = [5, 'S13']; +DEV_HIGHLIGHT["HM-RCV-50"]["14"] = [5, 'S14']; +DEV_HIGHLIGHT["HM-RCV-50"]["15"] = [5, 'S15']; +DEV_HIGHLIGHT["HM-RCV-50"]["16"] = [5, 'S16']; +DEV_HIGHLIGHT["HM-RCV-50"]["17"] = [5, 'S17']; +DEV_HIGHLIGHT["HM-RCV-50"]["18"] = [5, 'S18']; +DEV_HIGHLIGHT["HM-RCV-50"]["19"] = [5, 'S19']; +DEV_HIGHLIGHT["HM-RCV-50"]["20"] = [5, 'S20']; +DEV_HIGHLIGHT["HM-RCV-50"]["21"] = [5, 'S21']; +DEV_HIGHLIGHT["HM-RCV-50"]["22"] = [5, 'S22']; +DEV_HIGHLIGHT["HM-RCV-50"]["23"] = [5, 'S23']; +DEV_HIGHLIGHT["HM-RCV-50"]["24"] = [5, 'S24']; +DEV_HIGHLIGHT["HM-RCV-50"]["25"] = [5, 'S25']; +DEV_HIGHLIGHT["HM-RCV-50"]["26"] = [5, 'S26']; +DEV_HIGHLIGHT["HM-RCV-50"]["27"] = [5, 'S27']; +DEV_HIGHLIGHT["HM-RCV-50"]["28"] = [5, 'S28']; +DEV_HIGHLIGHT["HM-RCV-50"]["29"] = [5, 'S29']; +DEV_HIGHLIGHT["HM-RCV-50"]["30"] = [5, 'S30']; +DEV_HIGHLIGHT["HM-RCV-50"]["31"] = [5, 'S31']; +DEV_HIGHLIGHT["HM-RCV-50"]["32"] = [5, 'S32']; +DEV_HIGHLIGHT["HM-RCV-50"]["33"] = [5, 'S33']; +DEV_HIGHLIGHT["HM-RCV-50"]["34"] = [5, 'S34']; +DEV_HIGHLIGHT["HM-RCV-50"]["35"] = [5, 'S35']; +DEV_HIGHLIGHT["HM-RCV-50"]["36"] = [5, 'S36']; +DEV_HIGHLIGHT["HM-RCV-50"]["37"] = [5, 'S37']; +DEV_HIGHLIGHT["HM-RCV-50"]["38"] = [5, 'S38']; +DEV_HIGHLIGHT["HM-RCV-50"]["39"] = [5, 'S39']; +DEV_HIGHLIGHT["HM-RCV-50"]["40"] = [5, 'S40']; +DEV_HIGHLIGHT["HM-RCV-50"]["41"] = [5, 'S41']; +DEV_HIGHLIGHT["HM-RCV-50"]["42"] = [5, 'S42']; +DEV_HIGHLIGHT["HM-RCV-50"]["43"] = [5, 'S43']; +DEV_HIGHLIGHT["HM-RCV-50"]["44"] = [5, 'S44']; +DEV_HIGHLIGHT["HM-RCV-50"]["45"] = [5, 'S45']; +DEV_HIGHLIGHT["HM-RCV-50"]["46"] = [5, 'S46']; +DEV_HIGHLIGHT["HM-RCV-50"]["47"] = [5, 'S47']; +DEV_HIGHLIGHT["HM-RCV-50"]["48"] = [5, 'S48']; +DEV_HIGHLIGHT["HM-RCV-50"]["49"] = [5, 'S49']; +DEV_HIGHLIGHT["HM-RCV-50"]["50"] = [5, 'S50']; +DEV_LIST.push('HM-CC-TC'); +DEV_DESCRIPTION["HM-CC-TC"] = "HM-CC-TC"; +DEV_PATHS["HM-CC-TC"] = new Object(); +DEV_PATHS["HM-CC-TC"]["50"] = "/config/img/devices/50/42_hm-cc-tc_thumb.png"; +DEV_PATHS["HM-CC-TC"]["250"] = "/config/img/devices/250/42_hm-cc-tc.png"; +DEV_HIGHLIGHT["HM-CC-TC"] = new Object(); +DEV_LIST.push('HmIP-BDT-I'); +DEV_DESCRIPTION["HmIP-BDT-I"] = "BDT"; +DEV_PATHS["HmIP-BDT-I"] = new Object(); +DEV_PATHS["HmIP-BDT-I"]["50"] = "/config/img/devices/50/PushButton-2ch-wm_thumb.png"; +DEV_PATHS["HmIP-BDT-I"]["250"] = "/config/img/devices/250/PushButton-2ch-wm.png"; +DEV_HIGHLIGHT["HmIP-BDT-I"] = new Object(); +DEV_HIGHLIGHT["HmIP-BDT-I"]["2"] = [2, 0.244, 0.312, 0.428, 0.168]; +DEV_HIGHLIGHT["HmIP-BDT-I"]["1"] = [2, 0.244, 0.56, 0.428, 0.168]; +DEV_HIGHLIGHT["HmIP-BDT-I"]["1+2"] = [2, 0.244, 0.308, 0.428, 0.416]; +DEV_LIST.push('263 160'); +DEV_DESCRIPTION["263 160"] = "263_160"; +DEV_PATHS["263 160"] = new Object(); +DEV_PATHS["263 160"]["50"] = "/config/img/devices/50/57_hm-cc-scd_thumb.png"; +DEV_PATHS["263 160"]["250"] = "/config/img/devices/250/57_hm-cc-scd.png"; +DEV_HIGHLIGHT["263 160"] = new Object(); +DEV_LIST.push('HM-RC-P1'); +DEV_DESCRIPTION["HM-RC-P1"] = "HM-RC-P1"; +DEV_PATHS["HM-RC-P1"] = new Object(); +DEV_PATHS["HM-RC-P1"]["50"] = "/config/img/devices/50/21_hm-rc-p1_thumb.png"; +DEV_PATHS["HM-RC-P1"]["250"] = "/config/img/devices/250/21_hm-rc-p1.png"; +DEV_HIGHLIGHT["HM-RC-P1"] = new Object(); +DEV_HIGHLIGHT["HM-RC-P1"]["1"] = [4, 0.26, 0.248, 0.38, 0.42]; +DEV_LIST.push('HM-LC-Sw1-Pl-DN-R4'); +DEV_DESCRIPTION["HM-LC-Sw1-Pl-DN-R4"] = "HM-LC-Sw1-Pl-DN-R4"; +DEV_PATHS["HM-LC-Sw1-Pl-DN-R4"] = new Object(); +DEV_PATHS["HM-LC-Sw1-Pl-DN-R4"]["50"] = "/config/img/devices/50/107_hm-es-pmsw1-pl-R4_thumb.png"; +DEV_PATHS["HM-LC-Sw1-Pl-DN-R4"]["250"] = "/config/img/devices/250/107_hm-es-pmsw1-pl-R4.png"; +DEV_HIGHLIGHT["HM-LC-Sw1-Pl-DN-R4"] = new Object(); +DEV_LIST.push('HM-Dis-WM55'); +DEV_DESCRIPTION["HM-Dis-WM55"] = "HM-Dis-WM55"; +DEV_PATHS["HM-Dis-WM55"] = new Object(); +DEV_PATHS["HM-Dis-WM55"]["50"] = "/config/img/devices/50/97_hm-dis-wm55_thumb.png"; +DEV_PATHS["HM-Dis-WM55"]["250"] = "/config/img/devices/250/97_hm-dis-wm55.png"; +DEV_HIGHLIGHT["HM-Dis-WM55"] = new Object(); +DEV_LIST.push('HM-ES-PMSw1-Pl-DN-R3'); +DEV_DESCRIPTION["HM-ES-PMSw1-Pl-DN-R3"] = "HM-ES-PMSw1-Pl-DN-R3"; +DEV_PATHS["HM-ES-PMSw1-Pl-DN-R3"] = new Object(); +DEV_PATHS["HM-ES-PMSw1-Pl-DN-R3"]["50"] = "/config/img/devices/50/107_hm-es-pmsw1-pl-R3_thumb.png"; +DEV_PATHS["HM-ES-PMSw1-Pl-DN-R3"]["250"] = "/config/img/devices/250/107_hm-es-pmsw1-pl-R3.png"; +DEV_HIGHLIGHT["HM-ES-PMSw1-Pl-DN-R3"] = new Object(); +DEV_LIST.push('HmIP-SMI55'); +DEV_DESCRIPTION["HmIP-SMI55"] = "HmIP-SMI55"; +DEV_PATHS["HmIP-SMI55"] = new Object(); +DEV_PATHS["HmIP-SMI55"]["50"] = "/config/img/devices/50/168_hmip-smi55_thumb.png"; +DEV_PATHS["HmIP-SMI55"]["250"] = "/config/img/devices/250/168_hmip-smi55.png"; +DEV_HIGHLIGHT["HmIP-SMI55"] = new Object(); +DEV_HIGHLIGHT["HmIP-SMI55"]["2"] = [4, 0.540, 0.188, 0.04, 0.044]; +DEV_HIGHLIGHT["HmIP-SMI55"]["1"] = [4, 0.540, 0.820, 0.04, 0.044]; +DEV_LIST.push('HmIP-MOD-WD-VK'); +DEV_DESCRIPTION["HmIP-MOD-WD-VK"] = "HmIP-MOD-WD-VK"; +DEV_PATHS["HmIP-MOD-WD-VK"] = new Object(); +DEV_PATHS["HmIP-MOD-WD-VK"]["50"] = "/config/img/devices/50/223_hmip-mod-wd-vk_thumb.png"; +DEV_PATHS["HmIP-MOD-WD-VK"]["250"] = "/config/img/devices/250/223_hmip-mod-wd-vk.png"; +DEV_HIGHLIGHT["HmIP-MOD-WD-VK"] = new Object(); +DEV_LIST.push('HM-LC-Sw4-DR'); +DEV_DESCRIPTION["HM-LC-Sw4-DR"] = "HM-LC-Sw4-DR"; +DEV_PATHS["HM-LC-Sw4-DR"] = new Object(); +DEV_PATHS["HM-LC-Sw4-DR"]["50"] = "/config/img/devices/50/68_hm-lc-sw4-dr_thumb.png"; +DEV_PATHS["HM-LC-Sw4-DR"]["250"] = "/config/img/devices/250/68_hm-lc-sw4-dr.png"; +DEV_HIGHLIGHT["HM-LC-Sw4-DR"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Sw4-DR"]["1"] = [4, 0.088, 0.556, 0.048, 0.04]; +DEV_HIGHLIGHT["HM-LC-Sw4-DR"]["2"] = [4, 0.280, 0.556, 0.048, 0.04]; +DEV_HIGHLIGHT["HM-LC-Sw4-DR"]["3"] = [4, 0.472, 0.556, 0.048, 0.04]; +DEV_HIGHLIGHT["HM-LC-Sw4-DR"]["4"] = [4, 0.656, 0.556, 0.048, 0.04]; +DEV_LIST.push('HmIP-SWDO-A'); +DEV_DESCRIPTION["HmIP-SWDO-A"] = "HmIP-SWDO"; +DEV_PATHS["HmIP-SWDO-A"] = new Object(); +DEV_PATHS["HmIP-SWDO-A"]["50"] = "/config/img/devices/50/118_hmip-swdo_thumb.png"; +DEV_PATHS["HmIP-SWDO-A"]["250"] = "/config/img/devices/250/118_hmip-swdo.png"; +DEV_HIGHLIGHT["HmIP-SWDO-A"] = new Object(); +DEV_LIST.push('HM-LC-Sw1-Pl-OM54'); +DEV_DESCRIPTION["HM-LC-Sw1-Pl-OM54"] = "HM-LC-Sw1-Pl-OM54"; +DEV_PATHS["HM-LC-Sw1-Pl-OM54"] = new Object(); +DEV_PATHS["HM-LC-Sw1-Pl-OM54"]["50"] = "/config/img/devices/50/OM55_DimmerSwitch_thumb.png"; +DEV_PATHS["HM-LC-Sw1-Pl-OM54"]["250"] = "/config/img/devices/250/OM55_DimmerSwitch.png"; +DEV_HIGHLIGHT["HM-LC-Sw1-Pl-OM54"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Sw1-Pl-OM54"]["1_part1"] = [2, 0.548, 0.468, 0.072, 0.052]; +DEV_HIGHLIGHT["HM-LC-Sw1-Pl-OM54"]["1_part2"] = [2, 0.612, 0.452, 0.028, 0.056]; +DEV_HIGHLIGHT["HM-LC-Sw1-Pl-OM54"]["1"] = [5, '1_part1', '1_part2']; +DEV_LIST.push('HmIP-MOD-HO'); +DEV_DESCRIPTION["HmIP-MOD-HO"] = "HmIP-MOD-HO"; +DEV_PATHS["HmIP-MOD-HO"] = new Object(); +DEV_PATHS["HmIP-MOD-HO"]["50"] = "/config/img/devices/50/191_hmip-mod-ho_thumb.png"; +DEV_PATHS["HmIP-MOD-HO"]["250"] = "/config/img/devices/250/191_hmip-mod-ho.png"; +DEV_HIGHLIGHT["HmIP-MOD-HO"] = new Object(); +DEV_LIST.push('HmIP-WHS2'); +DEV_DESCRIPTION["HmIP-WHS2"] = "HmIP-WHS2"; +DEV_PATHS["HmIP-WHS2"] = new Object(); +DEV_PATHS["HmIP-WHS2"]["50"] = "/config/img/devices/50/155_hmip-whs2_thumb.png"; +DEV_PATHS["HmIP-WHS2"]["250"] = "/config/img/devices/250/155_hmip-whs2.png"; +DEV_HIGHLIGHT["HmIP-WHS2"] = new Object(); +DEV_LIST.push('HmIPW-BRC2'); +DEV_DESCRIPTION["HmIPW-BRC2"] = "HmIPW-BRC2"; +DEV_PATHS["HmIPW-BRC2"] = new Object(); +DEV_PATHS["HmIPW-BRC2"]["50"] = "/config/img/devices/50/PushButton-2ch-wm_thumb.png"; +DEV_PATHS["HmIPW-BRC2"]["250"] = "/config/img/devices/250/PushButton-2ch-wm.png"; +DEV_HIGHLIGHT["HmIPW-BRC2"] = new Object(); +DEV_HIGHLIGHT["HmIPW-BRC2"]["2"] = [2, 0.244, 0.312, 0.428, 0.168]; +DEV_HIGHLIGHT["HmIPW-BRC2"]["1"] = [2, 0.244, 0.56, 0.428, 0.168]; +DEV_HIGHLIGHT["HmIPW-BRC2"]["1+2"] = [2, 0.244, 0.308, 0.428, 0.416]; +DEV_LIST.push('HM-LC-Sw1-DR'); +DEV_DESCRIPTION["HM-LC-Sw1-DR"] = "HM-LC-Sw1-DR"; +DEV_PATHS["HM-LC-Sw1-DR"] = new Object(); +DEV_PATHS["HM-LC-Sw1-DR"]["50"] = "/config/img/devices/50/35_hmw-sys-tm-dr_thumb.png"; +DEV_PATHS["HM-LC-Sw1-DR"]["250"] = "/config/img/devices/250/106_hm-lc-sw1-dr.png"; +DEV_HIGHLIGHT["HM-LC-Sw1-DR"] = new Object(); +DEV_LIST.push('HM-PB-4Dis-WM'); +DEV_DESCRIPTION["HM-PB-4Dis-WM"] = "HM-PB-4Dis-WM"; +DEV_PATHS["HM-PB-4Dis-WM"] = new Object(); +DEV_PATHS["HM-PB-4Dis-WM"]["50"] = "/config/img/devices/50/70_hm-pb-4dis-wm_thumb.png"; +DEV_PATHS["HM-PB-4Dis-WM"]["250"] = "/config/img/devices/250/70_hm-pb-4dis-wm.png"; +DEV_HIGHLIGHT["HM-PB-4Dis-WM"] = new Object(); +DEV_HIGHLIGHT["HM-PB-4Dis-WM"]["2"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM"]["1"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM"]["4"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM"]["3"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM"]["6"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM"]["5"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM"]["8"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM"]["7"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM"]["10"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM"]["9"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM"]["12"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM"]["11"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM"]["14"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM"]["13"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM"]["16"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM"]["15"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM"]["18"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM"]["17"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM"]["20"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM"]["19"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_LIST.push('HmIP-FAL230-C10'); +DEV_DESCRIPTION["HmIP-FAL230-C10"] = "HmIP-FAL230-C10"; +DEV_PATHS["HmIP-FAL230-C10"] = new Object(); +DEV_PATHS["HmIP-FAL230-C10"]["50"] = "/config/img/devices/50/138_hmip-fal-c10_thumb.png"; +DEV_PATHS["HmIP-FAL230-C10"]["250"] = "/config/img/devices/250/138_hmip-fal-c10.png"; +DEV_HIGHLIGHT["HmIP-FAL230-C10"] = new Object(); +DEV_LIST.push('HM-LC-Dim1T-Pl-644'); +DEV_DESCRIPTION["HM-LC-Dim1T-Pl-644"] = "HM-LC-Dim1T-Pl"; +DEV_PATHS["HM-LC-Dim1T-Pl-644"] = new Object(); +DEV_PATHS["HM-LC-Dim1T-Pl-644"]["50"] = "/config/img/devices/50/OM55_DimmerSwitch_thumb.png"; +DEV_PATHS["HM-LC-Dim1T-Pl-644"]["250"] = "/config/img/devices/250/OM55_DimmerSwitch.png"; +DEV_HIGHLIGHT["HM-LC-Dim1T-Pl-644"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Dim1T-Pl-644"]["1_part1"] = [2, 0.548, 0.468, 0.072, 0.052]; +DEV_HIGHLIGHT["HM-LC-Dim1T-Pl-644"]["1_part2"] = [2, 0.612, 0.452, 0.028, 0.056]; +DEV_HIGHLIGHT["HM-LC-Dim1T-Pl-644"]["1"] = [5, '1_part1', '1_part2']; +DEV_LIST.push('HmIP-WKP'); +DEV_DESCRIPTION["HmIP-WKP"] = "HmIP-WKP"; +DEV_PATHS["HmIP-WKP"] = new Object(); +DEV_PATHS["HmIP-WKP"]["50"] = "/config/img/devices/50/221_hmip-wkp_thumb.png"; +DEV_PATHS["HmIP-WKP"]["250"] = "/config/img/devices/250/221_hmip-wkp.png"; +DEV_HIGHLIGHT["HmIP-WKP"] = new Object(); +DEV_LIST.push('ELV-SH-CTV'); +DEV_DESCRIPTION["ELV-SH-CTV"] = "ELV-SH-CTV"; +DEV_PATHS["ELV-SH-CTV"] = new Object(); +DEV_PATHS["ELV-SH-CTV"]["50"] = "/config/img/devices/50/237_elv-sh-ctv_thumb.png"; +DEV_PATHS["ELV-SH-CTV"]["250"] = "/config/img/devices/250/237_elv-sh-ctv.png"; +DEV_HIGHLIGHT["ELV-SH-CTV"] = new Object(); +DEV_LIST.push('HmIP-DLD-A'); +DEV_DESCRIPTION["HmIP-DLD-A"] = "HmIP-DLD"; +DEV_PATHS["HmIP-DLD-A"] = new Object(); +DEV_PATHS["HmIP-DLD-A"]["50"] = "/config/img/devices/50/214_hmip-dld_thumb.png"; +DEV_PATHS["HmIP-DLD-A"]["250"] = "/config/img/devices/250/214_hmip-dld.png"; +DEV_HIGHLIGHT["HmIP-DLD-A"] = new Object(); +DEV_LIST.push('HmIP-WRC6'); +DEV_DESCRIPTION["HmIP-WRC6"] = "WRC6"; +DEV_PATHS["HmIP-WRC6"] = new Object(); +DEV_PATHS["HmIP-WRC6"]["50"] = "/config/img/devices/50/131_hmip-wrc6_thumb.png"; +DEV_PATHS["HmIP-WRC6"]["250"] = "/config/img/devices/250/131_hmip-wrc6.png"; +DEV_HIGHLIGHT["HmIP-WRC6"] = new Object(); +DEV_HIGHLIGHT["HmIP-WRC6"]["1"] = [1, 0.270, 0.310, 0.050]; +DEV_HIGHLIGHT["HmIP-WRC6"]["2"] = [1, 0.675, 0.285, 0.050]; +DEV_HIGHLIGHT["HmIP-WRC6"]["3"] = [1, 0.270, 0.510, 0.050]; +DEV_HIGHLIGHT["HmIP-WRC6"]["4"] = [1, 0.675, 0.480, 0.050]; +DEV_HIGHLIGHT["HmIP-WRC6"]["5"] = [1, 0.270, 0.706, 0.050]; +DEV_HIGHLIGHT["HmIP-WRC6"]["6"] = [1, 0.675, 0.671, 0.050]; +DEV_HIGHLIGHT["HmIP-WRC6"]["1+2"] = [5, '1', '2']; +DEV_HIGHLIGHT["HmIP-WRC6"]["3+4"] = [5, '3', '4']; +DEV_HIGHLIGHT["HmIP-WRC6"]["5+6"] = [5, '5', '6']; +DEV_LIST.push('HmIP-PS-2 9YM'); +DEV_DESCRIPTION["HmIP-PS-2 9YM"] = "PS"; +DEV_PATHS["HmIP-PS-2 9YM"] = new Object(); +DEV_PATHS["HmIP-PS-2 9YM"]["50"] = "/config/img/devices/50/113_hmip-psm_thumb.png"; +DEV_PATHS["HmIP-PS-2 9YM"]["250"] = "/config/img/devices/250/113_hmip-psm.png"; +DEV_HIGHLIGHT["HmIP-PS-2 9YM"] = new Object(); +DEV_LIST.push('HM-LC-Sw4-SM'); +DEV_DESCRIPTION["HM-LC-Sw4-SM"] = "HM-LC-Sw4-SM"; +DEV_PATHS["HM-LC-Sw4-SM"] = new Object(); +DEV_PATHS["HM-LC-Sw4-SM"]["50"] = "/config/img/devices/50/3_hm-lc-sw4-sm_thumb.png"; +DEV_PATHS["HM-LC-Sw4-SM"]["250"] = "/config/img/devices/250/3_hm-lc-sw4-sm.png"; +DEV_HIGHLIGHT["HM-LC-Sw4-SM"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Sw4-SM"]["1_Part1"] = [6, 0.136, 0.896, 0.136, 0.98, 0.012]; +DEV_HIGHLIGHT["HM-LC-Sw4-SM"]["1_Part2"] = [6, 0.136, 0.98, 0.096, 0.916, 0.012]; +DEV_HIGHLIGHT["HM-LC-Sw4-SM"]["1_Part3"] = [6, 0.136, 0.98, 0.176, 0.916, 0.012]; +DEV_HIGHLIGHT["HM-LC-Sw4-SM"]["1_Arrow"] = [5, '1_Part1', '1_Part2', '1_Part3']; +DEV_HIGHLIGHT["HM-LC-Sw4-SM"]["2_Arrow"] = [7, '1_Arrow', 0.164, 0]; +DEV_HIGHLIGHT["HM-LC-Sw4-SM"]["3_Arrow"] = [7, '1_Arrow', 0.328, 0]; +DEV_HIGHLIGHT["HM-LC-Sw4-SM"]["4_Arrow"] = [7, '1_Arrow', 0.492, 0]; +DEV_HIGHLIGHT["HM-LC-Sw4-SM"]["1_Key"] = [4, 0.244, 0.372, 0.04, 0.044]; +DEV_HIGHLIGHT["HM-LC-Sw4-SM"]["2_Key"] = [4, 0.328, 0.372, 0.04, 0.044]; +DEV_HIGHLIGHT["HM-LC-Sw4-SM"]["3_Key"] = [4, 0.404, 0.372, 0.04, 0.044]; +DEV_HIGHLIGHT["HM-LC-Sw4-SM"]["4_Key"] = [4, 0.484, 0.372, 0.04, 0.044]; +DEV_HIGHLIGHT["HM-LC-Sw4-SM"]["1"] = [5, '1_Arrow', '1_Key']; +DEV_HIGHLIGHT["HM-LC-Sw4-SM"]["2"] = [5, '2_Arrow', '2_Key']; +DEV_HIGHLIGHT["HM-LC-Sw4-SM"]["3"] = [5, '3_Arrow', '3_Key']; +DEV_HIGHLIGHT["HM-LC-Sw4-SM"]["4"] = [5, '4_Arrow', '4_Key']; +DEV_LIST.push('HmIP-MIOB'); +DEV_DESCRIPTION["HmIP-MIOB"] = "MIOB"; +DEV_PATHS["HmIP-MIOB"] = new Object(); +DEV_PATHS["HmIP-MIOB"]["50"] = "/config/img/devices/50/136_hmip-miob_thumb.png"; +DEV_PATHS["HmIP-MIOB"]["250"] = "/config/img/devices/250/136_hmip-miob.png"; +DEV_HIGHLIGHT["HmIP-MIOB"] = new Object(); +DEV_LIST.push('ALPHA-IP-RBGa'); +DEV_DESCRIPTION["ALPHA-IP-RBGa"] = "ALPHA-IP-RBGa"; +DEV_PATHS["ALPHA-IP-RBGa"] = new Object(); +DEV_PATHS["ALPHA-IP-RBGa"]["50"] = "/config/img/devices/50/141_alpha-ip-rgba_thumb.png"; +DEV_PATHS["ALPHA-IP-RBGa"]["250"] = "/config/img/devices/250/141_alpha-ip-rgba.png"; +DEV_HIGHLIGHT["ALPHA-IP-RBGa"] = new Object(); +DEV_LIST.push('HmIP-KRCK-2'); +DEV_DESCRIPTION["HmIP-KRCK-2"] = "HmIP-KRCK"; +DEV_PATHS["HmIP-KRCK-2"] = new Object(); +DEV_PATHS["HmIP-KRCK-2"]["50"] = "/config/img/devices/50/84_hm-rc-4-x_thumb.png"; +DEV_PATHS["HmIP-KRCK-2"]["250"] = "/config/img/devices/250/86_hm-rc-key4-3.png"; +DEV_HIGHLIGHT["HmIP-KRCK-2"] = new Object(); +DEV_HIGHLIGHT["HmIP-KRCK-2"]["arrow_part1"] = [6, 0.312, 0.288, 0.416, 0.288, 0.012]; +DEV_HIGHLIGHT["HmIP-KRCK-2"]["arrow_part2"] = [6, 0.312, 0.288, 0.352, 0.248, 0.012]; +DEV_HIGHLIGHT["HmIP-KRCK-2"]["arrow_part3"] = [6, 0.312, 0.288, 0.352, 0.328, 0.012]; +DEV_HIGHLIGHT["HmIP-KRCK-2"]["Arrow"] = [5, 'arrow_part1', 'arrow_part2', 'arrow_part3']; +DEV_HIGHLIGHT["HmIP-KRCK-2"]["1_Arrow"] = [7, 'Arrow', 0.25, 0.0]; +DEV_HIGHLIGHT["HmIP-KRCK-2"]["2_Arrow"] = [7, 'Arrow', 0.238, 0.156]; +DEV_HIGHLIGHT["HmIP-KRCK-2"]["3_Arrow"] = [7, 'Arrow', 0.228, 0.312]; +DEV_HIGHLIGHT["HmIP-KRCK-2"]["4_Arrow"] = [7, 'Arrow', 0.212, 0.468]; +DEV_HIGHLIGHT["HmIP-KRCK-2"]["1"] = [5, '2_Arrow']; +DEV_HIGHLIGHT["HmIP-KRCK-2"]["2"] = [5, '1_Arrow']; +DEV_HIGHLIGHT["HmIP-KRCK-2"]["3"] = [5, '4_Arrow']; +DEV_HIGHLIGHT["HmIP-KRCK-2"]["4"] = [5, '3_Arrow']; +DEV_HIGHLIGHT["HmIP-KRCK-2"]["1+2"] = [5, '1_Arrow', '2_Arrow']; +DEV_HIGHLIGHT["HmIP-KRCK-2"]["3+4"] = [5, '3_Arrow', '4_Arrow']; +DEV_LIST.push('ALPHA-IP-RBG'); +DEV_DESCRIPTION["ALPHA-IP-RBG"] = "ALPHA-IP-RBG"; +DEV_PATHS["ALPHA-IP-RBG"] = new Object(); +DEV_PATHS["ALPHA-IP-RBG"]["50"] = "/config/img/devices/50/140_alpha-ip-rgb_thumb.png"; +DEV_PATHS["ALPHA-IP-RBG"]["250"] = "/config/img/devices/250/140_alpha-ip-rgb.png"; +DEV_HIGHLIGHT["ALPHA-IP-RBG"] = new Object(); +DEV_LIST.push('HmIP-DRSI4'); +DEV_DESCRIPTION["HmIP-DRSI4"] = "HmIP-DRSI4"; +DEV_PATHS["HmIP-DRSI4"] = new Object(); +DEV_PATHS["HmIP-DRSI4"]["50"] = "/config/img/devices/50/205_hmip-drsi4_thumb.png"; +DEV_PATHS["HmIP-DRSI4"]["250"] = "/config/img/devices/250/205_hmip-drsi4.png"; +DEV_HIGHLIGHT["HmIP-DRSI4"] = new Object(); +DEV_LIST.push('VIR-HUE-GTW'); +DEV_DESCRIPTION["VIR-HUE-GTW"] = "VIR-HUE-GTW"; +DEV_PATHS["VIR-HUE-GTW"] = new Object(); +DEV_PATHS["VIR-HUE-GTW"]["50"] = "/config/img/devices/50/coupling/hm-hue_gateway.png"; +DEV_PATHS["VIR-HUE-GTW"]["250"] = "/config/img/devices/250/coupling/hm-hue_gateway.png"; +DEV_HIGHLIGHT["VIR-HUE-GTW"] = new Object(); +DEV_LIST.push('HM-LC-Sw1-PCB'); +DEV_DESCRIPTION["HM-LC-Sw1-PCB"] = "HM-LC-Sw1-PCB"; +DEV_PATHS["HM-LC-Sw1-PCB"] = new Object(); +DEV_PATHS["HM-LC-Sw1-PCB"]["50"] = "/config/img/devices/50/139_hm-lc-sw1-pcb_thumb.png"; +DEV_PATHS["HM-LC-Sw1-PCB"]["250"] = "/config/img/devices/250/139_hm-lc-sw1-pcb.png"; +DEV_HIGHLIGHT["HM-LC-Sw1-PCB"] = new Object(); +DEV_LIST.push('HM-LC-Dim2L-SM'); +DEV_DESCRIPTION["HM-LC-Dim2L-SM"] = "HM-LC-Dim2L-SM"; +DEV_PATHS["HM-LC-Dim2L-SM"] = new Object(); +DEV_PATHS["HM-LC-Dim2L-SM"]["50"] = "/config/img/devices/50/45_hm-lc-dim2l-sm_thumb.png"; +DEV_PATHS["HM-LC-Dim2L-SM"]["250"] = "/config/img/devices/250/45_hm-lc-dim2l-sm.png"; +DEV_HIGHLIGHT["HM-LC-Dim2L-SM"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Dim2L-SM"]["1_Part1"] = [6, 0.530, 0.896, 0.530, 0.98, 0.012]; +DEV_HIGHLIGHT["HM-LC-Dim2L-SM"]["1_Part2"] = [6, 0.530, 0.98, 0.49, 0.916, 0.012]; +DEV_HIGHLIGHT["HM-LC-Dim2L-SM"]["1_Part3"] = [6, 0.530, 0.98, 0.574, 0.916, 0.012]; +DEV_HIGHLIGHT["HM-LC-Dim2L-SM"]["1_Arrow"] = [5, '1_Part1', '1_Part2', '1_Part3']; +DEV_HIGHLIGHT["HM-LC-Dim2L-SM"]["2_Arrow"] = [7, '1_Arrow', 0.168, 0]; +DEV_HIGHLIGHT["HM-LC-Dim2L-SM"]["1_Key"] = [4, 0.25, 0.33, 0.04, 0.044]; +DEV_HIGHLIGHT["HM-LC-Dim2L-SM"]["2_Key"] = [4, 0.328, 0.33, 0.04, 0.044]; +DEV_HIGHLIGHT["HM-LC-Dim2L-SM"]["1"] = [5, '1_Arrow', '1_Key']; +DEV_HIGHLIGHT["HM-LC-Dim2L-SM"]["2"] = [5, '2_Arrow', '2_Key']; +DEV_LIST.push('HmIP-WRC6-A'); +DEV_DESCRIPTION["HmIP-WRC6-A"] = "WRC6"; +DEV_PATHS["HmIP-WRC6-A"] = new Object(); +DEV_PATHS["HmIP-WRC6-A"]["50"] = "/config/img/devices/50/131_hmip-wrc6_thumb.png"; +DEV_PATHS["HmIP-WRC6-A"]["250"] = "/config/img/devices/250/131_hmip-wrc6.png"; +DEV_HIGHLIGHT["HmIP-WRC6-A"] = new Object(); +DEV_HIGHLIGHT["HmIP-WRC6-A"]["1"] = [1, 0.3, 0.358, 0.025]; +DEV_HIGHLIGHT["HmIP-WRC6-A"]["2"] = [1, 0.705, 0.315, 0.025]; +DEV_HIGHLIGHT["HmIP-WRC6-A"]["3"] = [1, 0.3, 0.53, 0.025]; +DEV_HIGHLIGHT["HmIP-WRC6-A"]["4"] = [1, 0.705, 0.495, 0.025]; +DEV_HIGHLIGHT["HmIP-WRC6-A"]["5"] = [1, 0.3, 0.706, 0.025]; +DEV_HIGHLIGHT["HmIP-WRC6-A"]["6"] = [1, 0.705, 0.671, 0.025]; +DEV_HIGHLIGHT["HmIP-WRC6-A"]["1+2"] = [5, '1', '2']; +DEV_HIGHLIGHT["HmIP-WRC6-A"]["3+4"] = [5, '3', '4']; +DEV_HIGHLIGHT["HmIP-WRC6-A"]["5+6"] = [5, '5', '6']; +DEV_LIST.push('HmIP-eTRV-2'); +DEV_DESCRIPTION["HmIP-eTRV-2"] = "TRV"; +DEV_PATHS["HmIP-eTRV-2"] = new Object(); +DEV_PATHS["HmIP-eTRV-2"]["50"] = "/config/img/devices/50/120_hmip-etrv_thumb.png"; +DEV_PATHS["HmIP-eTRV-2"]["250"] = "/config/img/devices/250/120_hmip-etrv.png"; +DEV_HIGHLIGHT["HmIP-eTRV-2"] = new Object(); +DEV_LIST.push('HmIP-STI'); +DEV_DESCRIPTION["HmIP-STI"] = "HmIP-STI"; +DEV_PATHS["HmIP-STI"] = new Object(); +DEV_PATHS["HmIP-STI"]["50"] = "/config/img/devices/50/221_hmip-sti_thumb.png"; +DEV_PATHS["HmIP-STI"]["250"] = "/config/img/devices/250/221_hmip-sti.png"; +DEV_HIGHLIGHT["HmIP-STI"] = new Object(); +DEV_LIST.push('HmIP-SMO230-A'); +DEV_DESCRIPTION["HmIP-SMO230-A"] = "SMO"; +DEV_PATHS["HmIP-SMO230-A"] = new Object(); +DEV_PATHS["HmIP-SMO230-A"]["50"] = "/config/img/devices/50/213_hmip-smo230_thumb.png"; +DEV_PATHS["HmIP-SMO230-A"]["250"] = "/config/img/devices/250/213_hmip-smo230.png"; +DEV_HIGHLIGHT["HmIP-SMO230-A"] = new Object(); +DEV_LIST.push('ELV-SH-CTH'); +DEV_DESCRIPTION["ELV-SH-CTH"] = "HmIP-STHO"; +DEV_PATHS["ELV-SH-CTH"] = new Object(); +DEV_PATHS["ELV-SH-CTH"]["50"] = "/config/img/devices/50/231_elv-sh-cth_thumb.png"; +DEV_PATHS["ELV-SH-CTH"]["250"] = "/config/img/devices/250/231_elv-sh-cth.png"; +DEV_HIGHLIGHT["ELV-SH-CTH"] = new Object(); +DEV_LIST.push('HMW-IO-12-FM'); +DEV_DESCRIPTION["HMW-IO-12-FM"] = "HMW-IO-12-FM"; +DEV_PATHS["HMW-IO-12-FM"] = new Object(); +DEV_PATHS["HMW-IO-12-FM"]["50"] = "/config/img/devices/50/59_hmw-io-12-fm_thumb.png"; +DEV_PATHS["HMW-IO-12-FM"]["250"] = "/config/img/devices/250/59_hmw-io-12-fm.png"; +DEV_HIGHLIGHT["HMW-IO-12-FM"] = new Object(); +DEV_HIGHLIGHT["HMW-IO-12-FM"]["1_num"] = [3, 0.744, 0.636, '1', 0.164, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-IO-12-FM"]["1_line"] = [6, 0.77, 0.08, 0.860, 0.08, 0.016]; +DEV_HIGHLIGHT["HMW-IO-12-FM"]["1"] = [5, '1_num', '1_line']; +DEV_HIGHLIGHT["HMW-IO-12-FM"]["2_num"] = [3, 0.744, 0.636, '2', 0.164, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-IO-12-FM"]["2_line"] = [6, 0.77, 0.136, 0.86, 0.136, 0.016]; +DEV_HIGHLIGHT["HMW-IO-12-FM"]["2"] = [5, '2_num', '2_line']; +DEV_HIGHLIGHT["HMW-IO-12-FM"]["3_num"] = [3, 0.744, 0.636, '3', 0.164, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-IO-12-FM"]["3_line"] = [6, 0.77, 0.194, 0.86, 0.194, 0.016]; +DEV_HIGHLIGHT["HMW-IO-12-FM"]["3"] = [5, '3_num', '3_line']; +DEV_HIGHLIGHT["HMW-IO-12-FM"]["4_num"] = [3, 0.744, 0.636, '4', 0.164, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-IO-12-FM"]["4_line"] = [6, 0.77, 0.25, 0.86, 0.25, 0.016]; +DEV_HIGHLIGHT["HMW-IO-12-FM"]["4"] = [5, '4_num', '4_line']; +DEV_HIGHLIGHT["HMW-IO-12-FM"]["5_num"] = [3, 0.744, 0.636, '5', 0.164, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-IO-12-FM"]["5_line"] = [6, 0.77, 0.308, 0.86, 0.308, 0.016]; +DEV_HIGHLIGHT["HMW-IO-12-FM"]["5"] = [5, '5_num', '5_line']; +DEV_HIGHLIGHT["HMW-IO-12-FM"]["6_num"] = [3, 0.744, 0.636, '6', 0.164, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-IO-12-FM"]["6_line"] = [6, 0.77, 0.366, 0.86, 0.366, 0.016]; +DEV_HIGHLIGHT["HMW-IO-12-FM"]["6"] = [5, '6_num', '6_line']; +DEV_HIGHLIGHT["HMW-IO-12-FM"]["7_num"] = [3, 0.744, 0.636, '7', 0.164, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-IO-12-FM"]["7_line"] = [6, 0.77, 0.424, 0.86, 0.424, 0.016]; +DEV_HIGHLIGHT["HMW-IO-12-FM"]["7"] = [5, '7_num', '7_line']; +DEV_HIGHLIGHT["HMW-IO-12-FM"]["8_num"] = [3, 0.744, 0.636, '8', 0.164, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-IO-12-FM"]["8_arc"] = [4, 0.370, 0.748, 0.036, 0.036, 0.036]; +DEV_HIGHLIGHT["HMW-IO-12-FM"]["8"] = [5, '8_num', '8_arc']; +DEV_HIGHLIGHT["HMW-IO-12-FM"]["9_num"] = [3, 0.744, 0.636, '9', 0.164, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-IO-12-FM"]["9_arc"] = [4, 0.3895, 0.704, 0.036, 0.036, 0.036]; +DEV_HIGHLIGHT["HMW-IO-12-FM"]["9"] = [5, '9_num', '9_arc']; +DEV_HIGHLIGHT["HMW-IO-12-FM"]["10_num"] = [3, 0.744, 0.636, '10', 0.164, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-IO-12-FM"]["10_arc"] = [4, 0.41, 0.65, 0.035, 0.036, 0.036]; +DEV_HIGHLIGHT["HMW-IO-12-FM"]["10"] = [5, '10_num', '10_arc']; +DEV_HIGHLIGHT["HMW-IO-12-FM"]["11_num"] = [3, 0.744, 0.636, '11', 0.164, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-IO-12-FM"]["11_arc"] = [4, 0.4293, 0.612, 0.036, 0.036, 0.036]; +DEV_HIGHLIGHT["HMW-IO-12-FM"]["11"] = [5, '11_num', '11_arc']; +DEV_HIGHLIGHT["HMW-IO-12-FM"]["12_num"] = [3, 0.744, 0.636, '12', 0.164, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-IO-12-FM"]["12_arc"] = [4, 0.448, 0.564, 0.036, 0.036, 0.036]; +DEV_HIGHLIGHT["HMW-IO-12-FM"]["12"] = [5, '12_num', '12_arc']; +DEV_LIST.push('HM-Sec-MDIR'); +DEV_DESCRIPTION["HM-Sec-MDIR"] = "HM-Sec-MDIR"; +DEV_PATHS["HM-Sec-MDIR"] = new Object(); +DEV_PATHS["HM-Sec-MDIR"]["50"] = "/config/img/devices/50/124_hm-sec-mdir_thumb.png"; +DEV_PATHS["HM-Sec-MDIR"]["250"] = "/config/img/devices/250/124_hm-sec-mdir.png"; +DEV_HIGHLIGHT["HM-Sec-MDIR"] = new Object(); +DEV_LIST.push('HmIP-FALMOT-C12'); +DEV_DESCRIPTION["HmIP-FALMOT-C12"] = "HmIP-FALMOT-C12"; +DEV_PATHS["HmIP-FALMOT-C12"] = new Object(); +DEV_PATHS["HmIP-FALMOT-C12"]["50"] = "/config/img/devices/50/198_hmip-falmot-c12_thumb.png"; +DEV_PATHS["HmIP-FALMOT-C12"]["250"] = "/config/img/devices/250/198_hmip-falmot-c12.png"; +DEV_HIGHLIGHT["HmIP-FALMOT-C12"] = new Object(); +DEV_LIST.push('HMIP-PSM'); +DEV_DESCRIPTION["HMIP-PSM"] = "PSM"; +DEV_PATHS["HMIP-PSM"] = new Object(); +DEV_PATHS["HMIP-PSM"]["50"] = "/config/img/devices/50/113_hmip-psm_thumb.png"; +DEV_PATHS["HMIP-PSM"]["250"] = "/config/img/devices/250/113_hmip-psm.png"; +DEV_HIGHLIGHT["HMIP-PSM"] = new Object(); +DEV_LIST.push('263 134'); +DEV_DESCRIPTION["263 134"] = "263_134"; +DEV_PATHS["263 134"] = new Object(); +DEV_PATHS["263 134"]["50"] = "/config/img/devices/50/66_hm-lc-dim1t-cv_thumb.png"; +DEV_PATHS["263 134"]["250"] = "/config/img/devices/250/66_hm-lc-dim1t-cv.png"; +DEV_HIGHLIGHT["263 134"] = new Object(); +DEV_LIST.push('HmIP-eTRV-B1'); +DEV_DESCRIPTION["HmIP-eTRV-B1"] = "TRV-B"; +DEV_PATHS["HmIP-eTRV-B1"] = new Object(); +DEV_PATHS["HmIP-eTRV-B1"]["50"] = "/config/img/devices/50/178_hmip-etrv-b1_thumb.png"; +DEV_PATHS["HmIP-eTRV-B1"]["250"] = "/config/img/devices/250/178_hmip-etrv-b1.png"; +DEV_HIGHLIGHT["HmIP-eTRV-B1"] = new Object(); +DEV_LIST.push('HmIP-SFD'); +DEV_DESCRIPTION["HmIP-SFD"] = "HmIP-SFD"; +DEV_PATHS["HmIP-SFD"] = new Object(); +DEV_PATHS["HmIP-SFD"]["50"] = "/config/img/devices/50/212_hmip-sfd_thumb.png"; +DEV_PATHS["HmIP-SFD"]["250"] = "/config/img/devices/250/212_hmip-sfd.png"; +DEV_HIGHLIGHT["HmIP-SFD"] = new Object(); +DEV_LIST.push('HM-LC-Sw1-Pl-CT-R1'); +DEV_DESCRIPTION["HM-LC-Sw1-Pl-CT-R1"] = "HM-LC-Sw1-Pl-CT-R1"; +DEV_PATHS["HM-LC-Sw1-Pl-CT-R1"] = new Object(); +DEV_PATHS["HM-LC-Sw1-Pl-CT-R1"]["50"] = "/config/img/devices/50/109_hm-lc-sw1-pl-ct_thump.png"; +DEV_PATHS["HM-LC-Sw1-Pl-CT-R1"]["250"] = "/config/img/devices/250/109_hm-lc-sw1-pl-ct.png"; +DEV_HIGHLIGHT["HM-LC-Sw1-Pl-CT-R1"] = new Object(); +DEV_LIST.push('HM-PB-2-WM'); +DEV_DESCRIPTION["HM-PB-2-WM"] = "HM-PB-2-WM"; +DEV_PATHS["HM-PB-2-WM"] = new Object(); +DEV_PATHS["HM-PB-2-WM"]["50"] = "/config/img/devices/50/PushButton-2ch-wm_thumb.png"; +DEV_PATHS["HM-PB-2-WM"]["250"] = "/config/img/devices/250/PushButton-2ch-wm.png"; +DEV_HIGHLIGHT["HM-PB-2-WM"] = new Object(); +DEV_HIGHLIGHT["HM-PB-2-WM"]["2"] = [2, 0.244, 0.312, 0.428, 0.168]; +DEV_HIGHLIGHT["HM-PB-2-WM"]["1"] = [2, 0.244, 0.56, 0.428, 0.168]; +DEV_HIGHLIGHT["HM-PB-2-WM"]["1+2"] = [2, 0.244, 0.308, 0.428, 0.416]; +DEV_LIST.push('HmIP-BBL-I'); +DEV_DESCRIPTION["HmIP-BBL-I"] = "HmIP-BBL"; +DEV_PATHS["HmIP-BBL-I"] = new Object(); +DEV_PATHS["HmIP-BBL-I"]["50"] = "/config/img/devices/50/PushButton-2ch-wm_thumb.png"; +DEV_PATHS["HmIP-BBL-I"]["250"] = "/config/img/devices/250/PushButton-2ch-wm.png"; +DEV_HIGHLIGHT["HmIP-BBL-I"] = new Object(); +DEV_HIGHLIGHT["HmIP-BBL-I"]["2"] = [2, 0.244, 0.312, 0.428, 0.168]; +DEV_HIGHLIGHT["HmIP-BBL-I"]["1"] = [2, 0.244, 0.56, 0.428, 0.168]; +DEV_HIGHLIGHT["HmIP-BBL-I"]["1+2"] = [2, 0.244, 0.308, 0.428, 0.416]; +DEV_LIST.push('HmIPW-WRC6-A'); +DEV_DESCRIPTION["HmIPW-WRC6-A"] = "HmIPW-WRC6"; +DEV_PATHS["HmIPW-WRC6-A"] = new Object(); +DEV_PATHS["HmIPW-WRC6-A"]["50"] = "/config/img/devices/50/131_hmip-wrc6_thumb.png"; +DEV_PATHS["HmIPW-WRC6-A"]["250"] = "/config/img/devices/250/131_hmip-wrc6.png"; +DEV_HIGHLIGHT["HmIPW-WRC6-A"] = new Object(); +DEV_HIGHLIGHT["HmIPW-WRC6-A"]["1"] = [1, 0.3, 0.358, 0.025]; +DEV_HIGHLIGHT["HmIPW-WRC6-A"]["2"] = [1, 0.705, 0.315, 0.025]; +DEV_HIGHLIGHT["HmIPW-WRC6-A"]["3"] = [1, 0.3, 0.53, 0.025]; +DEV_HIGHLIGHT["HmIPW-WRC6-A"]["4"] = [1, 0.705, 0.495, 0.025]; +DEV_HIGHLIGHT["HmIPW-WRC6-A"]["5"] = [1, 0.3, 0.706, 0.025]; +DEV_HIGHLIGHT["HmIPW-WRC6-A"]["6"] = [1, 0.705, 0.671, 0.025]; +DEV_HIGHLIGHT["HmIPW-WRC6-A"]["7"] = [1, 0.3, 0.358, 0.025]; +DEV_HIGHLIGHT["HmIPW-WRC6-A"]["8"] = [1, 0.705, 0.315, 0.025]; +DEV_HIGHLIGHT["HmIPW-WRC6-A"]["9"] = [1, 0.3, 0.53, 0.025]; +DEV_HIGHLIGHT["HmIPW-WRC6-A"]["10"] = [1, 0.705, 0.495, 0.025]; +DEV_HIGHLIGHT["HmIPW-WRC6-A"]["11"] = [1, 0.3, 0.706, 0.025]; +DEV_HIGHLIGHT["HmIPW-WRC6-A"]["12"] = [1, 0.705, 0.671, 0.025]; +DEV_HIGHLIGHT["HmIPW-WRC6-A"]["13"] = [5, '1', '2', '3', '4', '5', '6']; +DEV_HIGHLIGHT["HmIPW-WRC6-A"]["1+2"] = [5, '1', '2']; +DEV_HIGHLIGHT["HmIPW-WRC6-A"]["3+4"] = [5, '3', '4']; +DEV_HIGHLIGHT["HmIPW-WRC6-A"]["5+6"] = [5, '5', '6']; +DEV_HIGHLIGHT["HmIPW-WRC6-A"]["7+8"] = [5, '1', '2']; +DEV_HIGHLIGHT["HmIPW-WRC6-A"]["9+10"] = [5, '3', '4']; +DEV_HIGHLIGHT["HmIPW-WRC6-A"]["11+12"] = [5, '5', '6']; +DEV_LIST.push('VIR-LG-WHITE-DIM'); +DEV_DESCRIPTION["VIR-LG-WHITE-DIM"] = "VIR-LG-WHITE-DIM"; +DEV_PATHS["VIR-LG-WHITE-DIM"] = new Object(); +DEV_PATHS["VIR-LG-WHITE-DIM"]["50"] = "/config/img/devices/50/coupling/hm-coupling-white-dim.png"; +DEV_PATHS["VIR-LG-WHITE-DIM"]["250"] = "/config/img/devices/250/coupling/hm-coupling-white-dim.png"; +DEV_HIGHLIGHT["VIR-LG-WHITE-DIM"] = new Object(); +DEV_LIST.push('HmIPW-FAL230-C10'); +DEV_DESCRIPTION["HmIPW-FAL230-C10"] = "HmIPW-FAL230-C10"; +DEV_PATHS["HmIPW-FAL230-C10"] = new Object(); +DEV_PATHS["HmIPW-FAL230-C10"]["50"] = "/config/img/devices/50/138_hmip-fal-c10_thumb.png"; +DEV_PATHS["HmIPW-FAL230-C10"]["250"] = "/config/img/devices/250/138_hmip-fal-c10.png"; +DEV_HIGHLIGHT["HmIPW-FAL230-C10"] = new Object(); +DEV_LIST.push('HM-Sec-TiS'); +DEV_DESCRIPTION["HM-Sec-TiS"] = "HM-Sec-TiS"; +DEV_PATHS["HM-Sec-TiS"] = new Object(); +DEV_PATHS["HM-Sec-TiS"]["50"] = "/config/img/devices/50/47_hm-sec-tis_thumb.png"; +DEV_PATHS["HM-Sec-TiS"]["250"] = "/config/img/devices/250/47_hm-sec-tis.png"; +DEV_HIGHLIGHT["HM-Sec-TiS"] = new Object(); +DEV_LIST.push('HmIP-BSM-I'); +DEV_DESCRIPTION["HmIP-BSM-I"] = "BSM"; +DEV_PATHS["HmIP-BSM-I"] = new Object(); +DEV_PATHS["HmIP-BSM-I"]["50"] = "/config/img/devices/50/PushButton-2ch-wm_thumb.png"; +DEV_PATHS["HmIP-BSM-I"]["250"] = "/config/img/devices/250/PushButton-2ch-wm.png"; +DEV_HIGHLIGHT["HmIP-BSM-I"] = new Object(); +DEV_HIGHLIGHT["HmIP-BSM-I"]["2"] = [2, 0.244, 0.312, 0.428, 0.168]; +DEV_HIGHLIGHT["HmIP-BSM-I"]["1"] = [2, 0.244, 0.56, 0.428, 0.168]; +DEV_HIGHLIGHT["HmIP-BSM-I"]["1+2"] = [2, 0.244, 0.308, 0.428, 0.416]; +DEV_LIST.push('HM-LC-Sw1-Pl-DN-R1'); +DEV_DESCRIPTION["HM-LC-Sw1-Pl-DN-R1"] = "HM-LC-Sw1-Pl-DN-R1"; +DEV_PATHS["HM-LC-Sw1-Pl-DN-R1"] = new Object(); +DEV_PATHS["HM-LC-Sw1-Pl-DN-R1"]["50"] = "/config/img/devices/50/93_hm-es-pmsw1-pl_thumb.png"; +DEV_PATHS["HM-LC-Sw1-Pl-DN-R1"]["250"] = "/config/img/devices/250/93_hm-es-pmsw1-pl.png"; +DEV_HIGHLIGHT["HM-LC-Sw1-Pl-DN-R1"] = new Object(); +DEV_LIST.push('HmIP-WRC2-A'); +DEV_DESCRIPTION["HmIP-WRC2-A"] = "HmIP-WRC2"; +DEV_PATHS["HmIP-WRC2-A"] = new Object(); +DEV_PATHS["HmIP-WRC2-A"]["50"] = "/config/img/devices/50/112_hmip-wrc2_thumb.png"; +DEV_PATHS["HmIP-WRC2-A"]["250"] = "/config/img/devices/250/112_hmip-wrc2.png"; +DEV_HIGHLIGHT["HmIP-WRC2-A"] = new Object(); +DEV_HIGHLIGHT["HmIP-WRC2-A"]["2"] = [4, 0.540, 0.366, 0.04, 0.044]; +DEV_HIGHLIGHT["HmIP-WRC2-A"]["1"] = [4, 0.540, 0.622, 0.04, 0.044]; +DEV_LIST.push('HmIP-KRCA'); +DEV_DESCRIPTION["HmIP-KRCA"] = "KRCA"; +DEV_PATHS["HmIP-KRCA"] = new Object(); +DEV_PATHS["HmIP-KRCA"]["50"] = "/config/img/devices/50/84_hm-rc-4-x_thumb.png"; +DEV_PATHS["HmIP-KRCA"]["250"] = "/config/img/devices/250/85_hm-rc-sec4-3.png"; +DEV_HIGHLIGHT["HmIP-KRCA"] = new Object(); +DEV_HIGHLIGHT["HmIP-KRCA"]["arrow_part1"] = [6, 0.312, 0.288, 0.416, 0.288, 0.012]; +DEV_HIGHLIGHT["HmIP-KRCA"]["arrow_part2"] = [6, 0.312, 0.288, 0.352, 0.248, 0.012]; +DEV_HIGHLIGHT["HmIP-KRCA"]["arrow_part3"] = [6, 0.312, 0.288, 0.352, 0.328, 0.012]; +DEV_HIGHLIGHT["HmIP-KRCA"]["Arrow"] = [5, 'arrow_part1', 'arrow_part2', 'arrow_part3']; +DEV_HIGHLIGHT["HmIP-KRCA"]["1_Arrow"] = [7, 'Arrow', 0.25, 0.0]; +DEV_HIGHLIGHT["HmIP-KRCA"]["2_Arrow"] = [7, 'Arrow', 0.238, 0.156]; +DEV_HIGHLIGHT["HmIP-KRCA"]["3_Arrow"] = [7, 'Arrow', 0.228, 0.312]; +DEV_HIGHLIGHT["HmIP-KRCA"]["4_Arrow"] = [7, 'Arrow', 0.212, 0.468]; +DEV_HIGHLIGHT["HmIP-KRCA"]["1"] = [5, '2_Arrow']; +DEV_HIGHLIGHT["HmIP-KRCA"]["2"] = [5, '1_Arrow']; +DEV_HIGHLIGHT["HmIP-KRCA"]["3"] = [5, '4_Arrow']; +DEV_HIGHLIGHT["HmIP-KRCA"]["4"] = [5, '3_Arrow']; +DEV_HIGHLIGHT["HmIP-KRCA"]["1+2"] = [5, '1_Arrow', '2_Arrow']; +DEV_HIGHLIGHT["HmIP-KRCA"]["3+4"] = [5, '3_Arrow', '4_Arrow']; +DEV_LIST.push('HmIP-WRCC2'); +DEV_DESCRIPTION["HmIP-WRCC2"] = "HmIP-WRCC2"; +DEV_PATHS["HmIP-WRCC2"] = new Object(); +DEV_PATHS["HmIP-WRCC2"]["50"] = "/config/img/devices/50/112_hmip-wrc2_thumb.png"; +DEV_PATHS["HmIP-WRCC2"]["250"] = "/config/img/devices/250/112_hmip-wrc2.png"; +DEV_HIGHLIGHT["HmIP-WRCC2"] = new Object(); +DEV_HIGHLIGHT["HmIP-WRCC2"]["2"] = [4, 0.540, 0.366, 0.04, 0.044]; +DEV_HIGHLIGHT["HmIP-WRCC2"]["1"] = [4, 0.540, 0.622, 0.04, 0.044]; +DEV_LIST.push('HmIPW-SMO230-A'); +DEV_DESCRIPTION["HmIPW-SMO230-A"] = "SMO"; +DEV_PATHS["HmIPW-SMO230-A"] = new Object(); +DEV_PATHS["HmIPW-SMO230-A"]["50"] = "/config/img/devices/50/213_hmip-smo230_thumb.png"; +DEV_PATHS["HmIPW-SMO230-A"]["250"] = "/config/img/devices/250/213_hmip-smo230.png"; +DEV_HIGHLIGHT["HmIPW-SMO230-A"] = new Object(); +DEV_LIST.push('HmIP-SMO-A-2'); +DEV_DESCRIPTION["HmIP-SMO-A-2"] = "SMO"; +DEV_PATHS["HmIP-SMO-A-2"] = new Object(); +DEV_PATHS["HmIP-SMO-A-2"]["50"] = "/config/img/devices/50/132_hmip-smo_thumb.png"; +DEV_PATHS["HmIP-SMO-A-2"]["250"] = "/config/img/devices/250/132_hmip-smo.png"; +DEV_HIGHLIGHT["HmIP-SMO-A-2"] = new Object(); +DEV_LIST.push('HmIP-DSD-PCB'); +DEV_DESCRIPTION["HmIP-DSD-PCB"] = "HmIP-DSD-PCB"; +DEV_PATHS["HmIP-DSD-PCB"] = new Object(); +DEV_PATHS["HmIP-DSD-PCB"]["50"] = "/config/img/devices/50/208_hmip-dsd-pcb_thumb.png"; +DEV_PATHS["HmIP-DSD-PCB"]["250"] = "/config/img/devices/250/208_hmip-dsd-pcb.png"; +DEV_HIGHLIGHT["HmIP-DSD-PCB"] = new Object(); +DEV_LIST.push('HM-LC-Dim1T-FM'); +DEV_DESCRIPTION["HM-LC-Dim1T-FM"] = "HM-LC-Dim1T-FM"; +DEV_PATHS["HM-LC-Dim1T-FM"] = new Object(); +DEV_PATHS["HM-LC-Dim1T-FM"]["50"] = "/config/img/devices/50/65_hm-lc-dim1t-fm_thumb.png"; +DEV_PATHS["HM-LC-Dim1T-FM"]["250"] = "/config/img/devices/250/65_hm-lc-dim1t-fm.png"; +DEV_HIGHLIGHT["HM-LC-Dim1T-FM"] = new Object(); +DEV_LIST.push('HmIP-RGBW'); +DEV_DESCRIPTION["HmIP-RGBW"] = "HmIP-RGBW"; +DEV_PATHS["HmIP-RGBW"] = new Object(); +DEV_PATHS["HmIP-RGBW"]["50"] = "/config/img/devices/50/225_hmip-rgbw_thumb.png"; +DEV_PATHS["HmIP-RGBW"]["250"] = "/config/img/devices/250/225_hmip-rgbw.png"; +DEV_HIGHLIGHT["HmIP-RGBW"] = new Object(); +DEV_LIST.push('HMIP-WRC2'); +DEV_DESCRIPTION["HMIP-WRC2"] = "WRC2"; +DEV_PATHS["HMIP-WRC2"] = new Object(); +DEV_PATHS["HMIP-WRC2"]["50"] = "/config/img/devices/50/112_hmip-wrc2_thumb.png"; +DEV_PATHS["HMIP-WRC2"]["250"] = "/config/img/devices/250/112_hmip-wrc2.png"; +DEV_HIGHLIGHT["HMIP-WRC2"] = new Object(); +DEV_HIGHLIGHT["HMIP-WRC2"]["2"] = [4, 0.540, 0.366, 0.04, 0.044]; +DEV_HIGHLIGHT["HMIP-WRC2"]["1"] = [4, 0.540, 0.622, 0.04, 0.044]; +DEV_LIST.push('HM-OU-CM-PCB'); +DEV_DESCRIPTION["HM-OU-CM-PCB"] = "HM-OU-CM-PCB"; +DEV_PATHS["HM-OU-CM-PCB"] = new Object(); +DEV_PATHS["HM-OU-CM-PCB"]["50"] = "/config/img/devices/50/92_hm-ou-cm-pcb_thumb.png"; +DEV_PATHS["HM-OU-CM-PCB"]["250"] = "/config/img/devices/250/92_hm-ou-cm-pcb.png"; +DEV_HIGHLIGHT["HM-OU-CM-PCB"] = new Object(); +DEV_LIST.push('HmIP-HAP-B1'); +DEV_DESCRIPTION["HmIP-HAP-B1"] = "HmIP-HAP"; +DEV_PATHS["HmIP-HAP-B1"] = new Object(); +DEV_PATHS["HmIP-HAP-B1"]["50"] = "/config/img/devices/50/CCU3_thumb.png"; +DEV_PATHS["HmIP-HAP-B1"]["250"] = "/config/img/devices/250/CCU3.png"; +DEV_HIGHLIGHT["HmIP-HAP-B1"] = new Object(); +DEV_LIST.push('HmIPW-STHD'); +DEV_DESCRIPTION["HmIPW-STHD"] = "HmIPW-STHD"; +DEV_PATHS["HmIPW-STHD"] = new Object(); +DEV_PATHS["HmIPW-STHD"]["50"] = "/config/img/devices/50/147_hmip-sthd_thumb.png"; +DEV_PATHS["HmIPW-STHD"]["250"] = "/config/img/devices/250/147_hmip-sthd.png"; +DEV_HIGHLIGHT["HmIPW-STHD"] = new Object(); +DEV_LIST.push('HM-LC-Sw1-FM-2'); +DEV_DESCRIPTION["HM-LC-Sw1-FM-2"] = "HM-LC-Sw1-FM"; +DEV_PATHS["HM-LC-Sw1-FM-2"] = new Object(); +DEV_PATHS["HM-LC-Sw1-FM-2"]["50"] = "/config/img/devices/50/4_hm-lc-sw1-fm_thumb.png"; +DEV_PATHS["HM-LC-Sw1-FM-2"]["250"] = "/config/img/devices/250/4_hm-lc-sw1-fm.png"; +DEV_HIGHLIGHT["HM-LC-Sw1-FM-2"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Sw1-FM-2"]["1_AUS"] = [2, 0.288, 0.66, 0.068, 0.152]; +DEV_HIGHLIGHT["HM-LC-Sw1-FM-2"]["1_EIN"] = [2, 0.548, 0.66, 0.068, 0.152]; +DEV_HIGHLIGHT["HM-LC-Sw1-FM-2"]["1"] = [5, '1_AUS', '1_EIN']; +DEV_LIST.push('HMW-LC-Dim1L-DR'); +DEV_DESCRIPTION["HMW-LC-Dim1L-DR"] = "HMW-LC-Dim1L-DR"; +DEV_PATHS["HMW-LC-Dim1L-DR"] = new Object(); +DEV_PATHS["HMW-LC-Dim1L-DR"]["50"] = "/config/img/devices/50/28_hmw-lc-dim1l-dr_thumb.png"; +DEV_PATHS["HMW-LC-Dim1L-DR"]["250"] = "/config/img/devices/250/28_hmw-lc-dim1l-dr.png"; +DEV_HIGHLIGHT["HMW-LC-Dim1L-DR"] = new Object(); +DEV_HIGHLIGHT["HMW-LC-Dim1L-DR"]["1"] = [2, 0.312, 0.756, 0.056, 0.06]; +DEV_HIGHLIGHT["HMW-LC-Dim1L-DR"]["2"] = [2, 0.368, 0.752, 0.048, 0.068]; +DEV_HIGHLIGHT["HMW-LC-Dim1L-DR"]["3"] = [2, 0.368, 0.388, 0.048, 0.064]; +DEV_LIST.push('HM-Sen-MDIR-O-2'); +DEV_DESCRIPTION["HM-Sen-MDIR-O-2"] = "HM-Sen-MDIR-O"; +DEV_PATHS["HM-Sen-MDIR-O-2"] = new Object(); +DEV_PATHS["HM-Sen-MDIR-O-2"]["50"] = "/config/img/devices/50/80_hm-sen-mdir-o_thumb.png"; +DEV_PATHS["HM-Sen-MDIR-O-2"]["250"] = "/config/img/devices/250/80_hm-sen-mdir-o.png"; +DEV_HIGHLIGHT["HM-Sen-MDIR-O-2"] = new Object(); +DEV_LIST.push('HmIPW-FAL230-C6'); +DEV_DESCRIPTION["HmIPW-FAL230-C6"] = "HmIPW-FAL230-C6"; +DEV_PATHS["HmIPW-FAL230-C6"] = new Object(); +DEV_PATHS["HmIPW-FAL230-C6"]["50"] = "/config/img/devices/50/137_hmip-fal-c6_thumb.png"; +DEV_PATHS["HmIPW-FAL230-C6"]["250"] = "/config/img/devices/250/137_hmip-fal-c6.png"; +DEV_HIGHLIGHT["HmIPW-FAL230-C6"] = new Object(); +DEV_LIST.push('HmIP-PS'); +DEV_DESCRIPTION["HmIP-PS"] = "PS"; +DEV_PATHS["HmIP-PS"] = new Object(); +DEV_PATHS["HmIP-PS"]["50"] = "/config/img/devices/50/113_hmip-psm_thumb.png"; +DEV_PATHS["HmIP-PS"]["250"] = "/config/img/devices/250/113_hmip-psm.png"; +DEV_HIGHLIGHT["HmIP-PS"] = new Object(); +DEV_LIST.push('HmIP-eTRV-E-A'); +DEV_DESCRIPTION["HmIP-eTRV-E-A"] = "TRV-E"; +DEV_PATHS["HmIP-eTRV-E-A"] = new Object(); +DEV_PATHS["HmIP-eTRV-E-A"]["50"] = "/config/img/devices/50/216_hmip-etrv-e_thumb.png"; +DEV_PATHS["HmIP-eTRV-E-A"]["250"] = "/config/img/devices/250/216_hmip-etrv-e.png"; +DEV_HIGHLIGHT["HmIP-eTRV-E-A"] = new Object(); +DEV_LIST.push('HmIPW-SMI55-A'); +DEV_DESCRIPTION["HmIPW-SMI55-A"] = "HmIPW-SMI55"; +DEV_PATHS["HmIPW-SMI55-A"] = new Object(); +DEV_PATHS["HmIPW-SMI55-A"]["50"] = "/config/img/devices/50/195_hmipw-smi55_thumb.png"; +DEV_PATHS["HmIPW-SMI55-A"]["250"] = "/config/img/devices/250/195_hmipw-smi55.png"; +DEV_HIGHLIGHT["HmIPW-SMI55-A"] = new Object(); +DEV_HIGHLIGHT["HmIPW-SMI55-A"]["1"] = [1, 0.530, 0.820, 0.025]; +DEV_HIGHLIGHT["HmIPW-SMI55-A"]["2"] = [1, 0.505, 0.210, 0.025]; +DEV_LIST.push('HmIP-PCBS2'); +DEV_DESCRIPTION["HmIP-PCBS2"] = "HmIP-PCBS2"; +DEV_PATHS["HmIP-PCBS2"] = new Object(); +DEV_PATHS["HmIP-PCBS2"]["50"] = "/config/img/devices/50/184_hmip-pcbs2_thumb.png"; +DEV_PATHS["HmIP-PCBS2"]["250"] = "/config/img/devices/250/184_hmip-pcbs2.png"; +DEV_HIGHLIGHT["HmIP-PCBS2"] = new Object(); +DEV_LIST.push('HM-LC-Dim1PWM-CV-2'); +DEV_DESCRIPTION["HM-LC-Dim1PWM-CV-2"] = "HM-LC-Dim1PWM-CV"; +DEV_PATHS["HM-LC-Dim1PWM-CV-2"] = new Object(); +DEV_PATHS["HM-LC-Dim1PWM-CV-2"]["50"] = "/config/img/devices/50/2_hm-lc-dim1l-cv_thumb.png"; +DEV_PATHS["HM-LC-Dim1PWM-CV-2"]["250"] = "/config/img/devices/250/79_hm-lc-dim1pwm-cv.png"; +DEV_HIGHLIGHT["HM-LC-Dim1PWM-CV-2"] = new Object(); +DEV_LIST.push('HM-RC-2-PBU-FM'); +DEV_DESCRIPTION["HM-RC-2-PBU-FM"] = "HM-RC-2-PBU-FM"; +DEV_PATHS["HM-RC-2-PBU-FM"] = new Object(); +DEV_PATHS["HM-RC-2-PBU-FM"]["50"] = "/config/img/devices/50/PushButton-2ch-wm_thumb.png"; +DEV_PATHS["HM-RC-2-PBU-FM"]["250"] = "/config/img/devices/250/PushButton-2ch-wm.png"; +DEV_HIGHLIGHT["HM-RC-2-PBU-FM"] = new Object(); +DEV_HIGHLIGHT["HM-RC-2-PBU-FM"]["2"] = [2, 0.244, 0.312, 0.428, 0.168]; +DEV_HIGHLIGHT["HM-RC-2-PBU-FM"]["1"] = [2, 0.244, 0.56, 0.428, 0.168]; +DEV_HIGHLIGHT["HM-RC-2-PBU-FM"]["1+2"] = [2, 0.244, 0.308, 0.428, 0.416]; +DEV_LIST.push('HmIP-PS-2'); +DEV_DESCRIPTION["HmIP-PS-2"] = "PS"; +DEV_PATHS["HmIP-PS-2"] = new Object(); +DEV_PATHS["HmIP-PS-2"]["50"] = "/config/img/devices/50/113_hmip-psm_thumb.png"; +DEV_PATHS["HmIP-PS-2"]["250"] = "/config/img/devices/250/113_hmip-psm.png"; +DEV_HIGHLIGHT["HmIP-PS-2"] = new Object(); +DEV_LIST.push('HmIP-SWDM'); +DEV_DESCRIPTION["HmIP-SWDM"] = "HmIP-SWDM"; +DEV_PATHS["HmIP-SWDM"] = new Object(); +DEV_PATHS["HmIP-SWDM"]["50"] = "/config/img/devices/50/181_hmip-swdm_thumb.png"; +DEV_PATHS["HmIP-SWDM"]["250"] = "/config/img/devices/250/181_hmip-swdm.png"; +DEV_HIGHLIGHT["HmIP-SWDM"] = new Object(); +DEV_LIST.push('HmIP-WTH-B-A'); +DEV_DESCRIPTION["HmIP-WTH-B-A"] = "HmIP-WTH-B"; +DEV_PATHS["HmIP-WTH-B-A"] = new Object(); +DEV_PATHS["HmIP-WTH-B-A"]["50"] = "/config/img/devices/50/200_hmip-wth-b_thumb.png"; +DEV_PATHS["HmIP-WTH-B-A"]["250"] = "/config/img/devices/250/200_hmip-wth-b.png"; +DEV_HIGHLIGHT["HmIP-WTH-B-A"] = new Object(); +DEV_LIST.push('HmIP-SPI'); +DEV_DESCRIPTION["HmIP-SPI"] = "HmIP-SPI"; +DEV_PATHS["HmIP-SPI"] = new Object(); +DEV_PATHS["HmIP-SPI"]["50"] = "/config/img/devices/50/153_hmip-spi_thumb.png"; +DEV_PATHS["HmIP-SPI"]["250"] = "/config/img/devices/250/153_hmip-spi.png"; +DEV_HIGHLIGHT["HmIP-SPI"] = new Object(); +DEV_LIST.push('VIR-LG-RGB'); +DEV_DESCRIPTION["VIR-LG-RGB"] = "VIR-LG-RGB"; +DEV_PATHS["VIR-LG-RGB"] = new Object(); +DEV_PATHS["VIR-LG-RGB"]["50"] = "/config/img/devices/50/coupling/hm-coupling-rgb.png"; +DEV_PATHS["VIR-LG-RGB"]["250"] = "/config/img/devices/250/coupling/hm-coupling-rgb.png"; +DEV_HIGHLIGHT["VIR-LG-RGB"] = new Object(); +DEV_LIST.push('HM-DW-WM'); +DEV_DESCRIPTION["HM-DW-WM"] = "HM-DW-WM"; +DEV_PATHS["HM-DW-WM"] = new Object(); +DEV_PATHS["HM-DW-WM"]["50"] = "/config/img/devices/50/150_hm-lc-dw-wm_thumb.png"; +DEV_PATHS["HM-DW-WM"]["250"] = "/config/img/devices/250/150_hm-lc-dw-wm.png"; +DEV_HIGHLIGHT["HM-DW-WM"] = new Object(); +DEV_LIST.push('HM-Sen-MDIR-O-3'); +DEV_DESCRIPTION["HM-Sen-MDIR-O-3"] = "HM-Sen-MDIR-O"; +DEV_PATHS["HM-Sen-MDIR-O-3"] = new Object(); +DEV_PATHS["HM-Sen-MDIR-O-3"]["50"] = "/config/img/devices/50/80_hm-sen-mdir-o_thumb.png"; +DEV_PATHS["HM-Sen-MDIR-O-3"]["250"] = "/config/img/devices/250/80_hm-sen-mdir-o.png"; +DEV_HIGHLIGHT["HM-Sen-MDIR-O-3"] = new Object(); +DEV_LIST.push('263 144'); +DEV_DESCRIPTION["263 144"] = "263_144"; +DEV_PATHS["263 144"] = new Object(); +DEV_PATHS["263 144"]["50"] = "/config/img/devices/50/39_hm-swi-3-fm_thumb.png"; +DEV_PATHS["263 144"]["250"] = "/config/img/devices/250/39_hm-swi-3-fm.png"; +DEV_HIGHLIGHT["263 144"] = new Object(); +DEV_HIGHLIGHT["263 144"]["1_Key"] = [3, 0.18, 0.216, '1', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["263 144"]["1_Kreis"] = [4, 0.220, 0.480, 0.028, 0.028]; +DEV_HIGHLIGHT["263 144"]["1"] = [5, '1_Key', '1_Kreis']; +DEV_HIGHLIGHT["263 144"]["2_Key"] = [3, 0.18, 0.216, '2', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["263 144"]["2_Kreis"] = [4, 0.265, 0.405, 0.028, 0.028]; +DEV_HIGHLIGHT["263 144"]["2"] = [5, '2_Key', '2_Kreis']; +DEV_HIGHLIGHT["263 144"]["3_Key"] = [3, 0.18, 0.216, '3', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["263 144"]["3_Kreis"] = [4, 0.310, 0.33, 0.028, 0.028]; +DEV_HIGHLIGHT["263 144"]["3"] = [5, '3_Key', '3_Kreis']; +DEV_LIST.push('HmIPW-DRS4'); +DEV_DESCRIPTION["HmIPW-DRS4"] = "HmIPW-DRS4"; +DEV_PATHS["HmIPW-DRS4"] = new Object(); +DEV_PATHS["HmIPW-DRS4"]["50"] = "/config/img/devices/50/160_hmipw-drs4_thumb.png"; +DEV_PATHS["HmIPW-DRS4"]["250"] = "/config/img/devices/250/160_hmipw-drs4.png"; +DEV_HIGHLIGHT["HmIPW-DRS4"] = new Object(); +DEV_HIGHLIGHT["HmIPW-DRS4"]["1"] = [1, 0.217, 0.090, 0.040]; +DEV_HIGHLIGHT["HmIPW-DRS4"]["2"] = [1, 0.217, 0.090, 0.040]; +DEV_HIGHLIGHT["HmIPW-DRS4"]["3"] = [1, 0.217, 0.090, 0.040]; +DEV_HIGHLIGHT["HmIPW-DRS4"]["4"] = [1, 0.217, 0.090, 0.040]; +DEV_HIGHLIGHT["HmIPW-DRS4"]["5"] = [1, 0.650, 0.075, 0.040]; +DEV_HIGHLIGHT["HmIPW-DRS4"]["6"] = [1, 0.650, 0.075, 0.040]; +DEV_HIGHLIGHT["HmIPW-DRS4"]["7"] = [1, 0.650, 0.075, 0.040]; +DEV_HIGHLIGHT["HmIPW-DRS4"]["8"] = [1, 0.650, 0.075, 0.040]; +DEV_HIGHLIGHT["HmIPW-DRS4"]["9"] = [1, 0.210, 0.910, 0.040]; +DEV_HIGHLIGHT["HmIPW-DRS4"]["10"] = [1, 0.210, 0.910, 0.040]; +DEV_HIGHLIGHT["HmIPW-DRS4"]["11"] = [1, 0.210, 0.910, 0.040]; +DEV_HIGHLIGHT["HmIPW-DRS4"]["12"] = [1, 0.210, 0.910, 0.040]; +DEV_HIGHLIGHT["HmIPW-DRS4"]["13"] = [1, 0.645, 0.900, 0.040]; +DEV_HIGHLIGHT["HmIPW-DRS4"]["14"] = [1, 0.645, 0.900, 0.040]; +DEV_HIGHLIGHT["HmIPW-DRS4"]["15"] = [1, 0.645, 0.900, 0.040]; +DEV_HIGHLIGHT["HmIPW-DRS4"]["16"] = [1, 0.645, 0.900, 0.040]; +DEV_LIST.push('HM-LC-Sw1-SM-2'); +DEV_DESCRIPTION["HM-LC-Sw1-SM-2"] = "HM-LC-Sw1-SM"; +DEV_PATHS["HM-LC-Sw1-SM-2"] = new Object(); +DEV_PATHS["HM-LC-Sw1-SM-2"]["50"] = "/config/img/devices/50/8_hm-lc-sw1-sm_thumb.png"; +DEV_PATHS["HM-LC-Sw1-SM-2"]["250"] = "/config/img/devices/250/8_hm-lc-sw1-sm.png"; +DEV_HIGHLIGHT["HM-LC-Sw1-SM-2"] = new Object(); +DEV_LIST.push('HmIP-SLO'); +DEV_DESCRIPTION["HmIP-SLO"] = "HmIP-SLO"; +DEV_PATHS["HmIP-SLO"] = new Object(); +DEV_PATHS["HmIP-SLO"]["50"] = "/config/img/devices/50/174_hmip-slo_thumb.png"; +DEV_PATHS["HmIP-SLO"]["250"] = "/config/img/devices/250/174_hmip-slo.png"; +DEV_HIGHLIGHT["HmIP-SLO"] = new Object(); +DEV_LIST.push('HM-LC-Dim1L-Pl-644'); +DEV_DESCRIPTION["HM-LC-Dim1L-Pl-644"] = "HM-LC-Dim1L-Pl"; +DEV_PATHS["HM-LC-Dim1L-Pl-644"] = new Object(); +DEV_PATHS["HM-LC-Dim1L-Pl-644"]["50"] = "/config/img/devices/50/OM55_DimmerSwitch_thumb.png"; +DEV_PATHS["HM-LC-Dim1L-Pl-644"]["250"] = "/config/img/devices/250/OM55_DimmerSwitch.png"; +DEV_HIGHLIGHT["HM-LC-Dim1L-Pl-644"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Dim1L-Pl-644"]["1_part1"] = [2, 0.548, 0.468, 0.072, 0.052]; +DEV_HIGHLIGHT["HM-LC-Dim1L-Pl-644"]["1_part2"] = [2, 0.612, 0.452, 0.028, 0.056]; +DEV_HIGHLIGHT["HM-LC-Dim1L-Pl-644"]["1"] = [5, '1_part1', '1_part2']; +DEV_LIST.push('HmIP-LSC'); +DEV_DESCRIPTION["HmIP-LSC"] = "HmIP-LSC"; +DEV_PATHS["HmIP-LSC"] = new Object(); +DEV_PATHS["HmIP-LSC"]["50"] = "/config/img/devices/50/227_hmip-lsc_thump.png"; +DEV_PATHS["HmIP-LSC"]["250"] = "/config/img/devices/250/227_hmip-lsc.png"; +DEV_HIGHLIGHT["HmIP-LSC"] = new Object(); +DEV_LIST.push('HmIP-MOD-TM'); +DEV_DESCRIPTION["HmIP-MOD-TM"] = "HmIP-MOD-TM"; +DEV_PATHS["HmIP-MOD-TM"] = new Object(); +DEV_PATHS["HmIP-MOD-TM"]["50"] = "/config/img/devices/50/183_hmip-mod-tm_thumb.png"; +DEV_PATHS["HmIP-MOD-TM"]["250"] = "/config/img/devices/250/183_hmip-mod-tm.png"; +DEV_HIGHLIGHT["HmIP-MOD-TM"] = new Object(); +DEV_LIST.push('HM-WDS30-OT2-SM'); +DEV_DESCRIPTION["HM-WDS30-OT2-SM"] = "HM-WDS30-OT2-SM"; +DEV_PATHS["HM-WDS30-OT2-SM"] = new Object(); +DEV_PATHS["HM-WDS30-OT2-SM"]["50"] = "/config/img/devices/50/IP65_G201_thumb.png"; +DEV_PATHS["HM-WDS30-OT2-SM"]["250"] = "/config/img/devices/250/IP65_G201.png"; +DEV_HIGHLIGHT["HM-WDS30-OT2-SM"] = new Object(); +DEV_LIST.push('HmIP-eTRV-2-UK'); +DEV_DESCRIPTION["HmIP-eTRV-2-UK"] = "TRV-UK"; +DEV_PATHS["HmIP-eTRV-2-UK"] = new Object(); +DEV_PATHS["HmIP-eTRV-2-UK"]["50"] = "/config/img/devices/50/158_hmip-etrv-uk_thumb.png"; +DEV_PATHS["HmIP-eTRV-2-UK"]["250"] = "/config/img/devices/250/158_hmip-etrv-uk.png"; +DEV_HIGHLIGHT["HmIP-eTRV-2-UK"] = new Object(); +DEV_LIST.push('HM-LC-Dim2L-SM-644'); +DEV_DESCRIPTION["HM-LC-Dim2L-SM-644"] = "HM-LC-Dim2L-SM"; +DEV_PATHS["HM-LC-Dim2L-SM-644"] = new Object(); +DEV_PATHS["HM-LC-Dim2L-SM-644"]["50"] = "/config/img/devices/50/45_hm-lc-dim2l-sm_thumb.png"; +DEV_PATHS["HM-LC-Dim2L-SM-644"]["250"] = "/config/img/devices/250/45_hm-lc-dim2l-sm.png"; +DEV_HIGHLIGHT["HM-LC-Dim2L-SM-644"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Dim2L-SM-644"]["1_Part1"] = [6, 0.530, 0.896, 0.530, 0.98, 0.012]; +DEV_HIGHLIGHT["HM-LC-Dim2L-SM-644"]["1_Part2"] = [6, 0.530, 0.98, 0.49, 0.916, 0.012]; +DEV_HIGHLIGHT["HM-LC-Dim2L-SM-644"]["1_Part3"] = [6, 0.530, 0.98, 0.574, 0.916, 0.012]; +DEV_HIGHLIGHT["HM-LC-Dim2L-SM-644"]["1_Arrow"] = [5, '1_Part1', '1_Part2', '1_Part3']; +DEV_HIGHLIGHT["HM-LC-Dim2L-SM-644"]["2_Arrow"] = [7, '1_Arrow', 0.168, 0]; +DEV_HIGHLIGHT["HM-LC-Dim2L-SM-644"]["1_Key"] = [4, 0.25, 0.33, 0.04, 0.044]; +DEV_HIGHLIGHT["HM-LC-Dim2L-SM-644"]["2_Key"] = [4, 0.328, 0.33, 0.04, 0.044]; +DEV_HIGHLIGHT["HM-LC-Dim2L-SM-644"]["1"] = [5, '1_Arrow', '1_Key']; +DEV_HIGHLIGHT["HM-LC-Dim2L-SM-644"]["2"] = [5, '2_Arrow', '2_Key']; +DEV_LIST.push('VIR-LG-RGB-DIM'); +DEV_DESCRIPTION["VIR-LG-RGB-DIM"] = "VIR-LG-RGB-DIM"; +DEV_PATHS["VIR-LG-RGB-DIM"] = new Object(); +DEV_PATHS["VIR-LG-RGB-DIM"]["50"] = "/config/img/devices/50/coupling/hm-coupling-rgb-dim.png"; +DEV_PATHS["VIR-LG-RGB-DIM"]["250"] = "/config/img/devices/250/coupling/hm-coupling-rgb-dim.png"; +DEV_HIGHLIGHT["VIR-LG-RGB-DIM"] = new Object(); +DEV_LIST.push('HmIPW-WRC2'); +DEV_DESCRIPTION["HmIPW-WRC2"] = "HmIPW-WRC2"; +DEV_PATHS["HmIPW-WRC2"] = new Object(); +DEV_PATHS["HmIPW-WRC2"]["50"] = "/config/img/devices/50/112_hmip-wrc2_thumb.png"; +DEV_PATHS["HmIPW-WRC2"]["250"] = "/config/img/devices/250/112_hmip-wrc2.png"; +DEV_HIGHLIGHT["HmIPW-WRC2"] = new Object(); +DEV_HIGHLIGHT["HmIPW-WRC2"]["2"] = [4, 0.540, 0.366, 0.04, 0.044]; +DEV_HIGHLIGHT["HmIPW-WRC2"]["1"] = [4, 0.540, 0.622, 0.04, 0.044]; +DEV_LIST.push('HM-Sen-MDIR-SM'); +DEV_DESCRIPTION["HM-Sen-MDIR-SM"] = "HM-Sen-MDIR-SM"; +DEV_PATHS["HM-Sen-MDIR-SM"] = new Object(); +DEV_PATHS["HM-Sen-MDIR-SM"]["50"] = "/config/img/devices/50/53_hm-sen-mdir-sm_thumb.png"; +DEV_PATHS["HM-Sen-MDIR-SM"]["250"] = "/config/img/devices/250/53_hm-sen-mdir-sm.png"; +DEV_HIGHLIGHT["HM-Sen-MDIR-SM"] = new Object(); +DEV_LIST.push('HmIP-DBB'); +DEV_DESCRIPTION["HmIP-DBB"] = "HmIP-DBB"; +DEV_PATHS["HmIP-DBB"] = new Object(); +DEV_PATHS["HmIP-DBB"]["50"] = "/config/img/devices/50/177_hmip-dbb_thumb.png"; +DEV_PATHS["HmIP-DBB"]["250"] = "/config/img/devices/250/177_hmip-dbb.png"; +DEV_HIGHLIGHT["HmIP-DBB"] = new Object(); +DEV_LIST.push('263 155'); +DEV_DESCRIPTION["263 155"] = "263_155"; +DEV_PATHS["263 155"] = new Object(); +DEV_PATHS["263 155"]["50"] = "/config/img/devices/50/70_hm-pb-4dis-wm_thumb.png"; +DEV_PATHS["263 155"]["250"] = "/config/img/devices/250/70_hm-pb-4dis-wm.png"; +DEV_HIGHLIGHT["263 155"] = new Object(); +DEV_HIGHLIGHT["263 155"]["2"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["263 155"]["1"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["263 155"]["4"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["263 155"]["3"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["263 155"]["6"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["263 155"]["5"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["263 155"]["8"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["263 155"]["7"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["263 155"]["10"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["263 155"]["9"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["263 155"]["12"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["263 155"]["11"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["263 155"]["14"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["263 155"]["13"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["263 155"]["16"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["263 155"]["15"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["263 155"]["18"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["263 155"]["17"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["263 155"]["20"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["263 155"]["19"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_LIST.push('HM-LC-Dim2T-SM'); +DEV_DESCRIPTION["HM-LC-Dim2T-SM"] = "HM-LC-Dim2T-SM"; +DEV_PATHS["HM-LC-Dim2T-SM"] = new Object(); +DEV_PATHS["HM-LC-Dim2T-SM"]["50"] = "/config/img/devices/50/64_hm-lc-dim2T-sm_thumb.png"; +DEV_PATHS["HM-LC-Dim2T-SM"]["250"] = "/config/img/devices/250/64_hm-lc-dim2T-sm.png"; +DEV_HIGHLIGHT["HM-LC-Dim2T-SM"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Dim2T-SM"]["1_Part1"] = [6, 0.539, 0.864, 0.539, 0.948, 0.012]; +DEV_HIGHLIGHT["HM-LC-Dim2T-SM"]["1_Part2"] = [6, 0.539, 0.948, 0.49, 0.884, 0.012]; +DEV_HIGHLIGHT["HM-LC-Dim2T-SM"]["1_Part3"] = [6, 0.539, 0.948, 0.588, 0.884, 0.012]; +DEV_HIGHLIGHT["HM-LC-Dim2T-SM"]["1_Arrow"] = [5, '1_Part1', '1_Part2', '1_Part3']; +DEV_HIGHLIGHT["HM-LC-Dim2T-SM"]["2_Arrow"] = [7, '1_Arrow', 0.179, 0]; +DEV_HIGHLIGHT["HM-LC-Dim2T-SM"]["1_Key"] = [4, 0.25, 0.26, 0.04, 0.044]; +DEV_HIGHLIGHT["HM-LC-Dim2T-SM"]["2_Key"] = [4, 0.328, 0.26, 0.04, 0.044]; +DEV_HIGHLIGHT["HM-LC-Dim2T-SM"]["1"] = [5, '1_Arrow', '1_Key']; +DEV_HIGHLIGHT["HM-LC-Dim2T-SM"]["2"] = [5, '2_Arrow', '2_Key']; +DEV_LIST.push('HM-Sec-Sir-WM'); +DEV_DESCRIPTION["HM-Sec-Sir-WM"] = "HM-Sec-Sir-WM"; +DEV_PATHS["HM-Sec-Sir-WM"] = new Object(); +DEV_PATHS["HM-Sec-Sir-WM"]["50"] = "/config/img/devices/50/117_hm-sec-sir-wm_thumb.png"; +DEV_PATHS["HM-Sec-Sir-WM"]["250"] = "/config/img/devices/250/117_hm-sec-sir-wm.png"; +DEV_HIGHLIGHT["HM-Sec-Sir-WM"] = new Object(); +DEV_LIST.push('HM-MOD-Re-8'); +DEV_DESCRIPTION["HM-MOD-Re-8"] = "HM-MOD-Re-8"; +DEV_PATHS["HM-MOD-Re-8"] = new Object(); +DEV_PATHS["HM-MOD-Re-8"]["50"] = "/config/img/devices/50/94_hm-mod-re-8_thumb.png"; +DEV_PATHS["HM-MOD-Re-8"]["250"] = "/config/img/devices/250/94_hm-mod-re-8.png"; +DEV_HIGHLIGHT["HM-MOD-Re-8"] = new Object(); +DEV_LIST.push('ZEL STG RM FWT'); +DEV_DESCRIPTION["ZEL STG RM FWT"] = "ZEL_STG_RM_FWT"; +DEV_PATHS["ZEL STG RM FWT"] = new Object(); +DEV_PATHS["ZEL STG RM FWT"]["50"] = "/config/img/devices/50/42_hm-cc-tc_thumb.png"; +DEV_PATHS["ZEL STG RM FWT"]["250"] = "/config/img/devices/250/42_hm-cc-tc.png"; +DEV_HIGHLIGHT["ZEL STG RM FWT"] = new Object(); +DEV_LIST.push('ELV-SH-TACO'); +DEV_DESCRIPTION["ELV-SH-TACO"] = "ELV-SH-TACO"; +DEV_PATHS["ELV-SH-TACO"] = new Object(); +DEV_PATHS["ELV-SH-TACO"]["50"] = "/config/img/devices/50/232_elv-sh-taco_thumb.png"; +DEV_PATHS["ELV-SH-TACO"]["250"] = "/config/img/devices/250/232_elv-sh-taco.png"; +DEV_HIGHLIGHT["ELV-SH-TACO"] = new Object(); +DEV_LIST.push('VIR-OL-GTW'); +DEV_DESCRIPTION["VIR-OL-GTW"] = "VIR-OL-GTW"; +DEV_PATHS["VIR-OL-GTW"] = new Object(); +DEV_PATHS["VIR-OL-GTW"]["50"] = "/config/img/devices/50/coupling/hm-lightify_gateway.png"; +DEV_PATHS["VIR-OL-GTW"]["250"] = "/config/img/devices/250/coupling/hm-lightify_gateway.png"; +DEV_HIGHLIGHT["VIR-OL-GTW"] = new Object(); +DEV_LIST.push('HMW-RCV-50'); +DEV_DESCRIPTION["HMW-RCV-50"] = "HMW-RCV-50"; +DEV_PATHS["HMW-RCV-50"] = new Object(); +DEV_PATHS["HMW-RCV-50"]["50"] = "/config/img/devices/50/CCU2_thumb.png"; +DEV_PATHS["HMW-RCV-50"]["250"] = "/config/img/devices/250/CCU2.png"; +DEV_HIGHLIGHT["HMW-RCV-50"] = new Object(); +DEV_HIGHLIGHT["HMW-RCV-50"]["RF_1"] = [4, 0.364, 0.048, 0.028, 0.028]; +DEV_HIGHLIGHT["HMW-RCV-50"]["RF_2"] = [6, 0.4, 0.052, 0.544, 0.004, 0.016]; +DEV_HIGHLIGHT["HMW-RCV-50"]["RF_3"] = [6, 0.4, 0.052, 0.6, 0.052, 0.016]; +DEV_HIGHLIGHT["HMW-RCV-50"]["RF_4"] = [6, 0.4, 0.052, 0.544, 0.104, 0.016]; +DEV_HIGHLIGHT["HMW-RCV-50"]["RF_5"] = [6, 0.168, 0.052, 0.344, 0.052, 0.016]; +DEV_HIGHLIGHT["HMW-RCV-50"]["RF_6"] = [6, 0.168, 0, 0.344, 0.052, 0.016]; +DEV_HIGHLIGHT["HMW-RCV-50"]["RF_7"] = [6, 0.168, 0.104, 0.344, 0.052, 0.016]; +DEV_HIGHLIGHT["HMW-RCV-50"]["RF"] = [5, 'RF_1', 'RF_2', 'RF_3', 'RF_4', 'RF_5', 'RF_6', 'RF_7']; +DEV_HIGHLIGHT["HMW-RCV-50"]["S1"] = [3, 0.25, 0.57, '1', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S2"] = [3, 0.25, 0.57, '2', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S3"] = [3, 0.25, 0.57, '3', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S4"] = [3, 0.25, 0.57, '4', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S5"] = [3, 0.25, 0.57, '5', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S6"] = [3, 0.25, 0.57, '6', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S7"] = [3, 0.25, 0.57, '7', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S8"] = [3, 0.25, 0.57, '8', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S9"] = [3, 0.25, 0.57, '9', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S10"] = [3, 0.175, 0.57, '10', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S11"] = [3, 0.175, 0.57, '11', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S12"] = [3, 0.175, 0.57, '12', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S13"] = [3, 0.175, 0.57, '13', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S14"] = [3, 0.175, 0.57, '14', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S15"] = [3, 0.175, 0.57, '15', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S16"] = [3, 0.175, 0.57, '16', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S17"] = [3, 0.175, 0.57, '17', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S18"] = [3, 0.175, 0.57, '18', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S19"] = [3, 0.175, 0.57, '19', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S20"] = [3, 0.175, 0.57, '20', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S21"] = [3, 0.175, 0.57, '21', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S22"] = [3, 0.175, 0.57, '22', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S23"] = [3, 0.175, 0.57, '23', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S24"] = [3, 0.175, 0.57, '24', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S25"] = [3, 0.175, 0.57, '25', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S26"] = [3, 0.175, 0.57, '26', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S27"] = [3, 0.175, 0.57, '27', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S28"] = [3, 0.175, 0.57, '28', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S29"] = [3, 0.175, 0.57, '29', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S30"] = [3, 0.175, 0.57, '30', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S31"] = [3, 0.175, 0.57, '31', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S32"] = [3, 0.175, 0.57, '32', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S33"] = [3, 0.175, 0.57, '33', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S34"] = [3, 0.175, 0.57, '34', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S35"] = [3, 0.175, 0.57, '35', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S36"] = [3, 0.175, 0.57, '36', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S37"] = [3, 0.175, 0.57, '37', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S38"] = [3, 0.175, 0.57, '38', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S39"] = [3, 0.175, 0.57, '39', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S40"] = [3, 0.175, 0.57, '40', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S41"] = [3, 0.175, 0.57, '41', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S42"] = [3, 0.175, 0.57, '42', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S43"] = [3, 0.175, 0.57, '43', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S44"] = [3, 0.175, 0.57, '44', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S45"] = [3, 0.175, 0.57, '45', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S46"] = [3, 0.175, 0.57, '46', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S47"] = [3, 0.175, 0.57, '47', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S48"] = [3, 0.175, 0.57, '48', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S49"] = [3, 0.175, 0.57, '49', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S50"] = [3, 0.175, 0.57, '50', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["1"] = [5, 'S1']; +DEV_HIGHLIGHT["HMW-RCV-50"]["2"] = [5, 'S2']; +DEV_HIGHLIGHT["HMW-RCV-50"]["3"] = [5, 'S3']; +DEV_HIGHLIGHT["HMW-RCV-50"]["4"] = [5, 'S4']; +DEV_HIGHLIGHT["HMW-RCV-50"]["5"] = [5, 'S5']; +DEV_HIGHLIGHT["HMW-RCV-50"]["6"] = [5, 'S6']; +DEV_HIGHLIGHT["HMW-RCV-50"]["7"] = [5, 'S7']; +DEV_HIGHLIGHT["HMW-RCV-50"]["8"] = [5, 'S8']; +DEV_HIGHLIGHT["HMW-RCV-50"]["9"] = [5, 'S9']; +DEV_HIGHLIGHT["HMW-RCV-50"]["10"] = [5, 'S10']; +DEV_HIGHLIGHT["HMW-RCV-50"]["11"] = [5, 'S11']; +DEV_HIGHLIGHT["HMW-RCV-50"]["12"] = [5, 'S12']; +DEV_HIGHLIGHT["HMW-RCV-50"]["13"] = [5, 'S13']; +DEV_HIGHLIGHT["HMW-RCV-50"]["14"] = [5, 'S14']; +DEV_HIGHLIGHT["HMW-RCV-50"]["15"] = [5, 'S15']; +DEV_HIGHLIGHT["HMW-RCV-50"]["16"] = [5, 'S16']; +DEV_HIGHLIGHT["HMW-RCV-50"]["17"] = [5, 'S17']; +DEV_HIGHLIGHT["HMW-RCV-50"]["18"] = [5, 'S18']; +DEV_HIGHLIGHT["HMW-RCV-50"]["19"] = [5, 'S19']; +DEV_HIGHLIGHT["HMW-RCV-50"]["20"] = [5, 'S20']; +DEV_HIGHLIGHT["HMW-RCV-50"]["21"] = [5, 'S21']; +DEV_HIGHLIGHT["HMW-RCV-50"]["22"] = [5, 'S22']; +DEV_HIGHLIGHT["HMW-RCV-50"]["23"] = [5, 'S23']; +DEV_HIGHLIGHT["HMW-RCV-50"]["24"] = [5, 'S24']; +DEV_HIGHLIGHT["HMW-RCV-50"]["25"] = [5, 'S25']; +DEV_HIGHLIGHT["HMW-RCV-50"]["26"] = [5, 'S26']; +DEV_HIGHLIGHT["HMW-RCV-50"]["27"] = [5, 'S27']; +DEV_HIGHLIGHT["HMW-RCV-50"]["28"] = [5, 'S28']; +DEV_HIGHLIGHT["HMW-RCV-50"]["29"] = [5, 'S29']; +DEV_HIGHLIGHT["HMW-RCV-50"]["30"] = [5, 'S30']; +DEV_HIGHLIGHT["HMW-RCV-50"]["31"] = [5, 'S31']; +DEV_HIGHLIGHT["HMW-RCV-50"]["32"] = [5, 'S32']; +DEV_HIGHLIGHT["HMW-RCV-50"]["33"] = [5, 'S33']; +DEV_HIGHLIGHT["HMW-RCV-50"]["34"] = [5, 'S34']; +DEV_HIGHLIGHT["HMW-RCV-50"]["35"] = [5, 'S35']; +DEV_HIGHLIGHT["HMW-RCV-50"]["36"] = [5, 'S36']; +DEV_HIGHLIGHT["HMW-RCV-50"]["37"] = [5, 'S37']; +DEV_HIGHLIGHT["HMW-RCV-50"]["38"] = [5, 'S38']; +DEV_HIGHLIGHT["HMW-RCV-50"]["39"] = [5, 'S39']; +DEV_HIGHLIGHT["HMW-RCV-50"]["40"] = [5, 'S40']; +DEV_HIGHLIGHT["HMW-RCV-50"]["41"] = [5, 'S41']; +DEV_HIGHLIGHT["HMW-RCV-50"]["42"] = [5, 'S42']; +DEV_HIGHLIGHT["HMW-RCV-50"]["43"] = [5, 'S43']; +DEV_HIGHLIGHT["HMW-RCV-50"]["44"] = [5, 'S44']; +DEV_HIGHLIGHT["HMW-RCV-50"]["45"] = [5, 'S45']; +DEV_HIGHLIGHT["HMW-RCV-50"]["46"] = [5, 'S46']; +DEV_HIGHLIGHT["HMW-RCV-50"]["47"] = [5, 'S47']; +DEV_HIGHLIGHT["HMW-RCV-50"]["48"] = [5, 'S48']; +DEV_HIGHLIGHT["HMW-RCV-50"]["49"] = [5, 'S49']; +DEV_HIGHLIGHT["HMW-RCV-50"]["50"] = [5, 'S50']; +DEV_LIST.push('HM-RC-4-2'); +DEV_DESCRIPTION["HM-RC-4-2"] = "HM-RC-4-2"; +DEV_PATHS["HM-RC-4-2"] = new Object(); +DEV_PATHS["HM-RC-4-2"]["50"] = "/config/img/devices/50/84_hm-rc-4-2_thumb.png"; +DEV_PATHS["HM-RC-4-2"]["250"] = "/config/img/devices/250/84_hm-rc-4-2.png"; +DEV_HIGHLIGHT["HM-RC-4-2"] = new Object(); +DEV_HIGHLIGHT["HM-RC-4-2"]["arrow_part1"] = [6, 0.312, 0.288, 0.416, 0.288, 0.012]; +DEV_HIGHLIGHT["HM-RC-4-2"]["arrow_part2"] = [6, 0.312, 0.288, 0.352, 0.248, 0.012]; +DEV_HIGHLIGHT["HM-RC-4-2"]["arrow_part3"] = [6, 0.312, 0.288, 0.352, 0.328, 0.012]; +DEV_HIGHLIGHT["HM-RC-4-2"]["1_Arrow"] = [5, 'arrow_part1', 'arrow_part2', 'arrow_part3']; +DEV_HIGHLIGHT["HM-RC-4-2"]["2_Arrow"] = [7, '1_Arrow', 0.028, 0.156]; +DEV_HIGHLIGHT["HM-RC-4-2"]["3_Arrow"] = [7, '1_Arrow', 0.028, 0.312]; +DEV_HIGHLIGHT["HM-RC-4-2"]["4_Arrow"] = [7, '1_Arrow', 0.012, 0.468]; +DEV_HIGHLIGHT["HM-RC-4-2"]["1"] = [5, '2_Arrow']; +DEV_HIGHLIGHT["HM-RC-4-2"]["2"] = [5, '1_Arrow']; +DEV_HIGHLIGHT["HM-RC-4-2"]["3"] = [5, '4_Arrow']; +DEV_HIGHLIGHT["HM-RC-4-2"]["4"] = [5, '3_Arrow']; +DEV_HIGHLIGHT["HM-RC-4-2"]["1+2"] = [5, '1_Arrow', '2_Arrow']; +DEV_HIGHLIGHT["HM-RC-4-2"]["3+4"] = [5, '3_Arrow', '4_Arrow']; +DEV_LIST.push('HM-LC-Sw1-Pl-DN-R5'); +DEV_DESCRIPTION["HM-LC-Sw1-Pl-DN-R5"] = "HM-LC-Sw1-Pl-DN-R5"; +DEV_PATHS["HM-LC-Sw1-Pl-DN-R5"] = new Object(); +DEV_PATHS["HM-LC-Sw1-Pl-DN-R5"]["50"] = "/config/img/devices/50/107_hm-es-pmsw1-pl-R5_thumb.png"; +DEV_PATHS["HM-LC-Sw1-Pl-DN-R5"]["250"] = "/config/img/devices/250/107_hm-es-pmsw1-pl-R5.png"; +DEV_HIGHLIGHT["HM-LC-Sw1-Pl-DN-R5"] = new Object(); +DEV_LIST.push('HM-WDS40-TH-I'); +DEV_DESCRIPTION["HM-WDS40-TH-I"] = "HM-WDS40-TH-I"; +DEV_PATHS["HM-WDS40-TH-I"] = new Object(); +DEV_PATHS["HM-WDS40-TH-I"]["50"] = "/config/img/devices/50/13_hm-ws550sth-i_thumb.png"; +DEV_PATHS["HM-WDS40-TH-I"]["250"] = "/config/img/devices/250/13_hm-ws550sth-i.png"; +DEV_HIGHLIGHT["HM-WDS40-TH-I"] = new Object(); +DEV_LIST.push('HMIP-WTH-2'); +DEV_DESCRIPTION["HMIP-WTH-2"] = "HmIP-WTH"; +DEV_PATHS["HMIP-WTH-2"] = new Object(); +DEV_PATHS["HMIP-WTH-2"]["50"] = "/config/img/devices/50/121_hmip-wth_thumb.png"; +DEV_PATHS["HMIP-WTH-2"]["250"] = "/config/img/devices/250/121_hmip-wth.png"; +DEV_HIGHLIGHT["HMIP-WTH-2"] = new Object(); +DEV_LIST.push('HM-Sec-SCo'); +DEV_DESCRIPTION["HM-Sec-SCo"] = "HM-Sec-SCo"; +DEV_PATHS["HM-Sec-SCo"] = new Object(); +DEV_PATHS["HM-Sec-SCo"]["50"] = "/config/img/devices/50/98_hm-sec-sco_thumb.png"; +DEV_PATHS["HM-Sec-SCo"]["250"] = "/config/img/devices/250/98_hm-sec-sco.png"; +DEV_HIGHLIGHT["HM-Sec-SCo"] = new Object(); +DEV_LIST.push('HmIP-MIO16-PCB'); +DEV_DESCRIPTION["HmIP-MIO16-PCB"] = "HmIP-MIO16-PCB"; +DEV_PATHS["HmIP-MIO16-PCB"] = new Object(); +DEV_PATHS["HmIP-MIO16-PCB"]["50"] = "/config/img/devices/50/199_hmip-mio16-pcb_thumb.png"; +DEV_PATHS["HmIP-MIO16-PCB"]["250"] = "/config/img/devices/250/199_hmip-mio16-pcb.png"; +DEV_HIGHLIGHT["HmIP-MIO16-PCB"] = new Object(); +DEV_LIST.push('HmIP-WRC2'); +DEV_DESCRIPTION["HmIP-WRC2"] = "HmIP-WRC2"; +DEV_PATHS["HmIP-WRC2"] = new Object(); +DEV_PATHS["HmIP-WRC2"]["50"] = "/config/img/devices/50/112_hmip-wrc2_thumb.png"; +DEV_PATHS["HmIP-WRC2"]["250"] = "/config/img/devices/250/112_hmip-wrc2.png"; +DEV_HIGHLIGHT["HmIP-WRC2"] = new Object(); +DEV_HIGHLIGHT["HmIP-WRC2"]["2"] = [4, 0.540, 0.366, 0.04, 0.044]; +DEV_HIGHLIGHT["HmIP-WRC2"]["1"] = [4, 0.540, 0.622, 0.04, 0.044]; +DEV_LIST.push('HmIP-ASIR'); +DEV_DESCRIPTION["HmIP-ASIR"] = "HmIP-ASIR"; +DEV_PATHS["HmIP-ASIR"] = new Object(); +DEV_PATHS["HmIP-ASIR"]["50"] = "/config/img/devices/50/133_hmip-asir_thumb.png"; +DEV_PATHS["HmIP-ASIR"]["250"] = "/config/img/devices/250/133_hmip-asir.png"; +DEV_HIGHLIGHT["HmIP-ASIR"] = new Object(); +DEV_LIST.push('VIR-LG-RGBW'); +DEV_DESCRIPTION["VIR-LG-RGBW"] = "VIR-LG-RGBW"; +DEV_PATHS["VIR-LG-RGBW"] = new Object(); +DEV_PATHS["VIR-LG-RGBW"]["50"] = "/config/img/devices/50/coupling/hm-coupling-rgbw.png"; +DEV_PATHS["VIR-LG-RGBW"]["250"] = "/config/img/devices/250/coupling/hm-coupling-rgbw.png"; +DEV_HIGHLIGHT["VIR-LG-RGBW"] = new Object(); +DEV_LIST.push('HM-RC-4'); +DEV_DESCRIPTION["HM-RC-4"] = "HM-RC-4"; +DEV_PATHS["HM-RC-4"] = new Object(); +DEV_PATHS["HM-RC-4"]["50"] = "/config/img/devices/50/18_hm-rc-4_thumb.png"; +DEV_PATHS["HM-RC-4"]["250"] = "/config/img/devices/250/18_hm-rc-4.png"; +DEV_HIGHLIGHT["HM-RC-4"] = new Object(); +DEV_HIGHLIGHT["HM-RC-4"]["1"] = [4, 0.268, 0.236, 0.16, 0.164]; +DEV_HIGHLIGHT["HM-RC-4"]["2"] = [4, 0.476, 0.236, 0.16, 0.164]; +DEV_HIGHLIGHT["HM-RC-4"]["3"] = [4, 0.268, 0.48, 0.16, 0.164]; +DEV_HIGHLIGHT["HM-RC-4"]["4"] = [4, 0.476, 0.48, 0.16, 0.164]; +DEV_HIGHLIGHT["HM-RC-4"]["1+2"] = [5, '1', '2']; +DEV_HIGHLIGHT["HM-RC-4"]["3+4"] = [5, '3', '4']; +DEV_LIST.push('HmIP-BDT'); +DEV_DESCRIPTION["HmIP-BDT"] = "BDT"; +DEV_PATHS["HmIP-BDT"] = new Object(); +DEV_PATHS["HmIP-BDT"]["50"] = "/config/img/devices/50/PushButton-2ch-wm_thumb.png"; +DEV_PATHS["HmIP-BDT"]["250"] = "/config/img/devices/250/PushButton-2ch-wm.png"; +DEV_HIGHLIGHT["HmIP-BDT"] = new Object(); +DEV_HIGHLIGHT["HmIP-BDT"]["2"] = [2, 0.244, 0.312, 0.428, 0.168]; +DEV_HIGHLIGHT["HmIP-BDT"]["1"] = [2, 0.244, 0.56, 0.428, 0.168]; +DEV_HIGHLIGHT["HmIP-BDT"]["1+2"] = [2, 0.244, 0.308, 0.428, 0.416]; +DEV_LIST.push('HM-LC-Sw1-Ba-PCB'); +DEV_DESCRIPTION["HM-LC-Sw1-Ba-PCB"] = "HM-LC-Sw1-Ba-PCB"; +DEV_PATHS["HM-LC-Sw1-Ba-PCB"] = new Object(); +DEV_PATHS["HM-LC-Sw1-Ba-PCB"]["50"] = "/config/img/devices/50/77_hm-lc-sw1-ba-pcb_thumb.png"; +DEV_PATHS["HM-LC-Sw1-Ba-PCB"]["250"] = "/config/img/devices/250/77_hm-lc-sw1-ba-pcb.png"; +DEV_HIGHLIGHT["HM-LC-Sw1-Ba-PCB"] = new Object(); +DEV_LIST.push('HmIP-SPDR'); +DEV_DESCRIPTION["HmIP-SPDR"] = "HmIP-SPDR"; +DEV_PATHS["HmIP-SPDR"] = new Object(); +DEV_PATHS["HmIP-SPDR"]["50"] = "/config/img/devices/50/154_hmip-spdr_thumb.png"; +DEV_PATHS["HmIP-SPDR"]["250"] = "/config/img/devices/250/154_hmip-spdr.png"; +DEV_HIGHLIGHT["HmIP-SPDR"] = new Object(); +DEV_LIST.push('HM-PB-4-WM'); +DEV_DESCRIPTION["HM-PB-4-WM"] = "HM-PB-4-WM"; +DEV_PATHS["HM-PB-4-WM"] = new Object(); +DEV_PATHS["HM-PB-4-WM"]["50"] = "/config/img/devices/50/PushButton-4ch-wm_thumb.png"; +DEV_PATHS["HM-PB-4-WM"]["250"] = "/config/img/devices/250/PushButton-4ch-wm.png"; +DEV_HIGHLIGHT["HM-PB-4-WM"] = new Object(); +DEV_HIGHLIGHT["HM-PB-4-WM"]["2"] = [2, 0.24, 0.312, 0.204, 0.168]; +DEV_HIGHLIGHT["HM-PB-4-WM"]["1"] = [2, 0.24, 0.556, 0.204, 0.168]; +DEV_HIGHLIGHT["HM-PB-4-WM"]["3"] = [2, 0.46, 0.556, 0.204, 0.168]; +DEV_HIGHLIGHT["HM-PB-4-WM"]["4"] = [2, 0.46, 0.312, 0.204, 0.168]; +DEV_HIGHLIGHT["HM-PB-4-WM"]["1+2"] = [2, 0.24, 0.312, 0.204, 0.412]; +DEV_HIGHLIGHT["HM-PB-4-WM"]["3+4"] = [2, 0.46, 0.312, 0.204, 0.412]; +DEV_LIST.push('HmIP-BWTH24'); +DEV_DESCRIPTION["HmIP-BWTH24"] = "HmIP-WTH"; +DEV_PATHS["HmIP-BWTH24"] = new Object(); +DEV_PATHS["HmIP-BWTH24"]["50"] = "/config/img/devices/50/121_hmip-wth_thumb.png"; +DEV_PATHS["HmIP-BWTH24"]["250"] = "/config/img/devices/250/121_hmip-wth.png"; +DEV_HIGHLIGHT["HmIP-BWTH24"] = new Object(); +DEV_LIST.push('HmIP-WRCR'); +DEV_DESCRIPTION["HmIP-WRCR"] = "HmIP-WRCR"; +DEV_PATHS["HmIP-WRCR"] = new Object(); +DEV_PATHS["HmIP-WRCR"]["50"] = "/config/img/devices/50/202_hmip-wrcr_thumb.png"; +DEV_PATHS["HmIP-WRCR"]["250"] = "/config/img/devices/250/202_hmip-wrcr.png"; +DEV_HIGHLIGHT["HmIP-WRCR"] = new Object(); +DEV_LIST.push('HmIP-FROLL'); +DEV_DESCRIPTION["HmIP-FROLL"] = "HmIP-FROLL"; +DEV_PATHS["HmIP-FROLL"] = new Object(); +DEV_PATHS["HmIP-FROLL"]["50"] = "/config/img/devices/50/145_hmip-froll_hmip-fbl_thumb.png"; +DEV_PATHS["HmIP-FROLL"]["250"] = "/config/img/devices/250/145_hmip-froll_hmip-fbl.png"; +DEV_HIGHLIGHT["HmIP-FROLL"] = new Object(); +DEV_LIST.push('HmIP-PSMCO'); +DEV_DESCRIPTION["HmIP-PSMCO"] = "PSMCO"; +DEV_PATHS["HmIP-PSMCO"] = new Object(); +DEV_PATHS["HmIP-PSMCO"]["50"] = "/config/img/devices/50/235_hmip-psmco_thumb.png"; +DEV_PATHS["HmIP-PSMCO"]["250"] = "/config/img/devices/250/235_hmip-psmco.png"; +DEV_HIGHLIGHT["HmIP-PSMCO"] = new Object(); +DEV_LIST.push('HM-ES-PMSw1-Pl'); +DEV_DESCRIPTION["HM-ES-PMSw1-Pl"] = "HM-ES-PMSw1-Pl"; +DEV_PATHS["HM-ES-PMSw1-Pl"] = new Object(); +DEV_PATHS["HM-ES-PMSw1-Pl"]["50"] = "/config/img/devices/50/93_hm-es-pmsw1-pl_thumb.png"; +DEV_PATHS["HM-ES-PMSw1-Pl"]["250"] = "/config/img/devices/250/93_hm-es-pmsw1-pl.png"; +DEV_HIGHLIGHT["HM-ES-PMSw1-Pl"] = new Object(); +DEV_LIST.push('HM-WDS40-TH-I-2'); +DEV_DESCRIPTION["HM-WDS40-TH-I-2"] = "HM-WDS40-TH-I"; +DEV_PATHS["HM-WDS40-TH-I-2"] = new Object(); +DEV_PATHS["HM-WDS40-TH-I-2"]["50"] = "/config/img/devices/50/13_hm-ws550sth-i_thumb.png"; +DEV_PATHS["HM-WDS40-TH-I-2"]["250"] = "/config/img/devices/250/13_hm-ws550sth-i.png"; +DEV_HIGHLIGHT["HM-WDS40-TH-I-2"] = new Object(); +DEV_LIST.push('HMW-WSE-SM'); +DEV_DESCRIPTION["HMW-WSE-SM"] = "HMW-WSE-SM"; +DEV_PATHS["HMW-WSE-SM"] = new Object(); +DEV_PATHS["HMW-WSE-SM"]["50"] = "/config/img/devices/50/31_hmw-wse-sm_thumb.png"; +DEV_PATHS["HMW-WSE-SM"]["250"] = "/config/img/devices/250/31_hmw-wse-sm.png"; +DEV_HIGHLIGHT["HMW-WSE-SM"] = new Object(); +DEV_LIST.push('HM-PBI-4-FM'); +DEV_DESCRIPTION["HM-PBI-4-FM"] = "HM-PBI-4-FM"; +DEV_PATHS["HM-PBI-4-FM"] = new Object(); +DEV_PATHS["HM-PBI-4-FM"]["50"] = "/config/img/devices/50/38_hm-pbi-4-fm_thumb.png"; +DEV_PATHS["HM-PBI-4-FM"]["250"] = "/config/img/devices/250/38_hm-pbi-4-fm.png"; +DEV_HIGHLIGHT["HM-PBI-4-FM"] = new Object(); +DEV_HIGHLIGHT["HM-PBI-4-FM"]["1_Key"] = [3, 0.18, 0.216, '1', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-PBI-4-FM"]["1_Kreis"] = [4, 0.265, 0.500, 0.028, 0.028]; +DEV_HIGHLIGHT["HM-PBI-4-FM"]["1"] = [5, '1_Key', '1_Kreis']; +DEV_HIGHLIGHT["HM-PBI-4-FM"]["2_Key"] = [3, 0.18, 0.216, '2', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-PBI-4-FM"]["2_Kreis"] = [4, 0.287, 0.465, 0.028, 0.028]; +DEV_HIGHLIGHT["HM-PBI-4-FM"]["2"] = [5, '2_Key', '2_Kreis']; +DEV_HIGHLIGHT["HM-PBI-4-FM"]["3_Key"] = [3, 0.18, 0.216, '3', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-PBI-4-FM"]["3_Kreis"] = [4, 0.309, 0.430, 0.028, 0.028]; +DEV_HIGHLIGHT["HM-PBI-4-FM"]["3"] = [5, '3_Key', '3_Kreis']; +DEV_HIGHLIGHT["HM-PBI-4-FM"]["4_Key"] = [3, 0.18, 0.216, '4', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-PBI-4-FM"]["4_Kreis"] = [4, 0.331, 0.395, 0.028, 0.028]; +DEV_HIGHLIGHT["HM-PBI-4-FM"]["4"] = [5, '4_Key', '4_Kreis']; +DEV_LIST.push('HM-LC-Sw2-PB-FM'); +DEV_DESCRIPTION["HM-LC-Sw2-PB-FM"] = "HM-LC-Sw2-PB-FM"; +DEV_PATHS["HM-LC-Sw2-PB-FM"] = new Object(); +DEV_PATHS["HM-LC-Sw2-PB-FM"]["50"] = "/config/img/devices/50/PushButton-4ch-wm_thumb.png"; +DEV_PATHS["HM-LC-Sw2-PB-FM"]["250"] = "/config/img/devices/250/PushButton-4ch-wm.png"; +DEV_HIGHLIGHT["HM-LC-Sw2-PB-FM"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Sw2-PB-FM"]["1"] = [2, 0.24, 0.312, 0.204, 0.412]; +DEV_HIGHLIGHT["HM-LC-Sw2-PB-FM"]["2"] = [2, 0.46, 0.312, 0.204, 0.412]; +DEV_LIST.push('263 131'); +DEV_DESCRIPTION["263 131"] = "263_131"; +DEV_PATHS["263 131"] = new Object(); +DEV_PATHS["263 131"]["50"] = "/config/img/devices/50/PushButton-2ch-wm_thumb.png"; +DEV_PATHS["263 131"]["250"] = "/config/img/devices/250/PushButton-2ch-wm.png"; +DEV_HIGHLIGHT["263 131"] = new Object(); +DEV_HIGHLIGHT["263 131"]["1a"] = [2, 0.244, 0.312, 0.428, 0.168]; +DEV_HIGHLIGHT["263 131"]["1b"] = [2, 0.244, 0.56, 0.428, 0.168]; +DEV_HIGHLIGHT["263 131"]["1"] = [5, '1a', '1b']; +DEV_LIST.push('HMW-LC-Bl1-DR-2'); +DEV_DESCRIPTION["HMW-LC-Bl1-DR-2"] = "HMW-LC-Bl1-DR"; +DEV_PATHS["HMW-LC-Bl1-DR-2"] = new Object(); +DEV_PATHS["HMW-LC-Bl1-DR-2"]["50"] = "/config/img/devices/50/27_hmw-lc-bl1-dr_thumb.png"; +DEV_PATHS["HMW-LC-Bl1-DR-2"]["250"] = "/config/img/devices/250/27_hmw-lc-bl1-dr.png"; +DEV_HIGHLIGHT["HMW-LC-Bl1-DR-2"] = new Object(); +DEV_HIGHLIGHT["HMW-LC-Bl1-DR-2"]["1"] = [2, 0.452, 0.772, 0.044, 0.06]; +DEV_HIGHLIGHT["HMW-LC-Bl1-DR-2"]["2"] = [2, 0.5, 0.772, 0.048, 0.06]; +DEV_HIGHLIGHT["HMW-LC-Bl1-DR-2"]["3"] = [2, 0.452, 0.388, 0.096, 0.06]; +DEV_LIST.push('HmIP-SCI'); +DEV_DESCRIPTION["HmIP-SCI"] = "HmIP-SCI"; +DEV_PATHS["HmIP-SCI"] = new Object(); +DEV_PATHS["HmIP-SCI"]["50"] = "/config/img/devices/50/190_hmip-sci_thumb.png"; +DEV_PATHS["HmIP-SCI"]["250"] = "/config/img/devices/250/190_hmip-sci.png"; +DEV_HIGHLIGHT["HmIP-SCI"] = new Object(); +DEV_LIST.push('HmIP-DLS'); +DEV_DESCRIPTION["HmIP-DLS"] = "HmIP-DLS"; +DEV_PATHS["HmIP-DLS"] = new Object(); +DEV_PATHS["HmIP-DLS"]["50"] = "/config/img/devices/50/218_hmip-dls_thumb.png"; +DEV_PATHS["HmIP-DLS"]["250"] = "/config/img/devices/250/218_hmip-dls.png"; +DEV_HIGHLIGHT["HmIP-DLS"] = new Object(); +DEV_LIST.push('ELV-SH-WUA'); +DEV_DESCRIPTION["ELV-SH-WUA"] = "HmIP-WUA"; +DEV_PATHS["ELV-SH-WUA"] = new Object(); +DEV_PATHS["ELV-SH-WUA"]["50"] = "/config/img/devices/50/213_hmip-wua_thumb.png"; +DEV_PATHS["ELV-SH-WUA"]["250"] = "/config/img/devices/250/213_hmip-wua.png"; +DEV_HIGHLIGHT["ELV-SH-WUA"] = new Object(); +DEV_LIST.push('HM-WDS100-C6-O-2'); +DEV_DESCRIPTION["HM-WDS100-C6-O-2"] = "HM-WDS100-C6-O"; +DEV_PATHS["HM-WDS100-C6-O-2"] = new Object(); +DEV_PATHS["HM-WDS100-C6-O-2"]["50"] = "/config/img/devices/50/WeatherCombiSensor_thumb.png"; +DEV_PATHS["HM-WDS100-C6-O-2"]["250"] = "/config/img/devices/250/WeatherCombiSensor.png"; +DEV_HIGHLIGHT["HM-WDS100-C6-O-2"] = new Object(); +DEV_LIST.push('HmIP-BROLL'); +DEV_DESCRIPTION["HmIP-BROLL"] = "HmIP-BROLL"; +DEV_PATHS["HmIP-BROLL"] = new Object(); +DEV_PATHS["HmIP-BROLL"]["50"] = "/config/img/devices/50/PushButton-2ch-wm_thumb.png"; +DEV_PATHS["HmIP-BROLL"]["250"] = "/config/img/devices/250/PushButton-2ch-wm.png"; +DEV_HIGHLIGHT["HmIP-BROLL"] = new Object(); +DEV_HIGHLIGHT["HmIP-BROLL"]["2"] = [2, 0.244, 0.312, 0.428, 0.168]; +DEV_HIGHLIGHT["HmIP-BROLL"]["1"] = [2, 0.244, 0.56, 0.428, 0.168]; +DEV_HIGHLIGHT["HmIP-BROLL"]["1+2"] = [2, 0.244, 0.308, 0.428, 0.416]; +DEV_LIST.push('HmIP-DLD'); +DEV_DESCRIPTION["HmIP-DLD"] = "HmIP-DLD"; +DEV_PATHS["HmIP-DLD"] = new Object(); +DEV_PATHS["HmIP-DLD"]["50"] = "/config/img/devices/50/214_hmip-dld_thumb.png"; +DEV_PATHS["HmIP-DLD"]["250"] = "/config/img/devices/250/214_hmip-dld.png"; +DEV_HIGHLIGHT["HmIP-DLD"] = new Object(); +DEV_LIST.push('HM-LC-Bl1-PB-FM'); +DEV_DESCRIPTION["HM-LC-Bl1-PB-FM"] = "HM-LC-Bl1-PB-FM"; +DEV_PATHS["HM-LC-Bl1-PB-FM"] = new Object(); +DEV_PATHS["HM-LC-Bl1-PB-FM"]["50"] = "/config/img/devices/50/61_hm-lc-bl1-pb-fm_thumb.png"; +DEV_PATHS["HM-LC-Bl1-PB-FM"]["250"] = "/config/img/devices/250/61_hm-lc-bl1-pb-fm.png"; +DEV_HIGHLIGHT["HM-LC-Bl1-PB-FM"] = new Object(); +DEV_LIST.push('HM-LC-Dim1L-CV-2'); +DEV_DESCRIPTION["HM-LC-Dim1L-CV-2"] = "HM-LC-Dim1L-CV"; +DEV_PATHS["HM-LC-Dim1L-CV-2"] = new Object(); +DEV_PATHS["HM-LC-Dim1L-CV-2"]["50"] = "/config/img/devices/50/2_hm-lc-dim1l-cv_thumb.png"; +DEV_PATHS["HM-LC-Dim1L-CV-2"]["250"] = "/config/img/devices/250/2_hm-lc-dim1l-cv.png"; +DEV_HIGHLIGHT["HM-LC-Dim1L-CV-2"] = new Object(); +DEV_LIST.push('ZEL STG RM FZS'); +DEV_DESCRIPTION["ZEL STG RM FZS"] = "ZEL_STG_RM_FZS"; +DEV_PATHS["ZEL STG RM FZS"] = new Object(); +DEV_PATHS["ZEL STG RM FZS"]["50"] = "/config/img/devices/50/OM55_DimmerSwitch_thumb.png"; +DEV_PATHS["ZEL STG RM FZS"]["250"] = "/config/img/devices/250/OM55_DimmerSwitch.png"; +DEV_HIGHLIGHT["ZEL STG RM FZS"] = new Object(); +DEV_HIGHLIGHT["ZEL STG RM FZS"]["1_part1"] = [2, 0.548, 0.468, 0.072, 0.052]; +DEV_HIGHLIGHT["ZEL STG RM FZS"]["1_part2"] = [2, 0.612, 0.452, 0.028, 0.056]; +DEV_HIGHLIGHT["ZEL STG RM FZS"]["1"] = [5, '1_part1', '1_part2']; +DEV_LIST.push('HmIP-eTRV-B-2 R4M'); +DEV_DESCRIPTION["HmIP-eTRV-B-2 R4M"] = "TRV-B"; +DEV_PATHS["HmIP-eTRV-B-2 R4M"] = new Object(); +DEV_PATHS["HmIP-eTRV-B-2 R4M"]["50"] = "/config/img/devices/50/180_hmip-etrv-b_thumb.png"; +DEV_PATHS["HmIP-eTRV-B-2 R4M"]["250"] = "/config/img/devices/250/180_hmip-etrv-b.png"; +DEV_HIGHLIGHT["HmIP-eTRV-B-2 R4M"] = new Object(); +DEV_LIST.push('HmIPW-WRC6'); +DEV_DESCRIPTION["HmIPW-WRC6"] = "HmIPW-WRC6"; +DEV_PATHS["HmIPW-WRC6"] = new Object(); +DEV_PATHS["HmIPW-WRC6"]["50"] = "/config/img/devices/50/131_hmip-wrc6_thumb.png"; +DEV_PATHS["HmIPW-WRC6"]["250"] = "/config/img/devices/250/131_hmip-wrc6.png"; +DEV_HIGHLIGHT["HmIPW-WRC6"] = new Object(); +DEV_HIGHLIGHT["HmIPW-WRC6"]["1"] = [1, 0.270, 0.310, 0.050]; +DEV_HIGHLIGHT["HmIPW-WRC6"]["2"] = [1, 0.675, 0.285, 0.050]; +DEV_HIGHLIGHT["HmIPW-WRC6"]["3"] = [1, 0.270, 0.510, 0.050]; +DEV_HIGHLIGHT["HmIPW-WRC6"]["4"] = [1, 0.675, 0.480, 0.050]; +DEV_HIGHLIGHT["HmIPW-WRC6"]["5"] = [1, 0.270, 0.706, 0.050]; +DEV_HIGHLIGHT["HmIPW-WRC6"]["6"] = [1, 0.675, 0.671, 0.050]; +DEV_HIGHLIGHT["HmIPW-WRC6"]["7"] = [1, 0.270, 0.310, 0.050]; +DEV_HIGHLIGHT["HmIPW-WRC6"]["8"] = [1, 0.675, 0.285, 0.050]; +DEV_HIGHLIGHT["HmIPW-WRC6"]["9"] = [1, 0.270, 0.510, 0.050]; +DEV_HIGHLIGHT["HmIPW-WRC6"]["10"] = [1, 0.675, 0.480, 0.050]; +DEV_HIGHLIGHT["HmIPW-WRC6"]["11"] = [1, 0.270, 0.706, 0.050]; +DEV_HIGHLIGHT["HmIPW-WRC6"]["12"] = [1, 0.675, 0.671, 0.050]; +DEV_HIGHLIGHT["HmIPW-WRC6"]["13"] = [5, '1', '2', '3', '4', '5', '6']; +DEV_HIGHLIGHT["HmIPW-WRC6"]["1+2"] = [5, '1', '2']; +DEV_HIGHLIGHT["HmIPW-WRC6"]["3+4"] = [5, '3', '4']; +DEV_HIGHLIGHT["HmIPW-WRC6"]["5+6"] = [5, '5', '6']; +DEV_HIGHLIGHT["HmIPW-WRC6"]["7+8"] = [5, '1', '2']; +DEV_HIGHLIGHT["HmIPW-WRC6"]["9+10"] = [5, '3', '4']; +DEV_HIGHLIGHT["HmIPW-WRC6"]["11+12"] = [5, '5', '6']; +DEV_LIST.push('HM-LC-Sw1-SM'); +DEV_DESCRIPTION["HM-LC-Sw1-SM"] = "HM-LC-Sw1-SM"; +DEV_PATHS["HM-LC-Sw1-SM"] = new Object(); +DEV_PATHS["HM-LC-Sw1-SM"]["50"] = "/config/img/devices/50/8_hm-lc-sw1-sm_thumb.png"; +DEV_PATHS["HM-LC-Sw1-SM"]["250"] = "/config/img/devices/250/8_hm-lc-sw1-sm.png"; +DEV_HIGHLIGHT["HM-LC-Sw1-SM"] = new Object(); +DEV_LIST.push('HM-EM-CMM'); +DEV_DESCRIPTION["HM-EM-CMM"] = "HM-EM-CMM"; +DEV_PATHS["HM-EM-CMM"] = new Object(); +DEV_PATHS["HM-EM-CMM"]["50"] = "/config/img/devices/50/25_hm-em-cmm_thumb.png"; +DEV_PATHS["HM-EM-CMM"]["250"] = "/config/img/devices/250/25_hm-em-cmm.png"; +DEV_HIGHLIGHT["HM-EM-CMM"] = new Object(); +DEV_LIST.push('263 147'); +DEV_DESCRIPTION["263 147"] = "263_147"; +DEV_PATHS["263 147"] = new Object(); +DEV_PATHS["263 147"]["50"] = "/config/img/devices/50/PushButton-2ch-wm_thumb.png"; +DEV_PATHS["263 147"]["250"] = "/config/img/devices/250/PushButton-2ch-wm.png"; +DEV_HIGHLIGHT["263 147"] = new Object(); +DEV_HIGHLIGHT["263 147"]["1a"] = [2, 0.244, 0.312, 0.428, 0.168]; +DEV_HIGHLIGHT["263 147"]["1b"] = [2, 0.244, 0.56, 0.428, 0.168]; +DEV_HIGHLIGHT["263 147"]["1"] = [5, '1a', '1b']; +DEV_LIST.push('HmIP-PSM-PE-2'); +DEV_DESCRIPTION["HmIP-PSM-PE-2"] = "PSM-PE"; +DEV_PATHS["HmIP-PSM-PE-2"] = new Object(); +DEV_PATHS["HmIP-PSM-PE-2"]["50"] = "/config/img/devices/50/215_hmip-psm-pe-2_thumb.png"; +DEV_PATHS["HmIP-PSM-PE-2"]["250"] = "/config/img/devices/250/215_hmip-psm-pe-2.png"; +DEV_HIGHLIGHT["HmIP-PSM-PE-2"] = new Object(); +DEV_LIST.push('HM-WS550STH-O'); +DEV_DESCRIPTION["HM-WS550STH-O"] = "HM-WS550STH-O"; +DEV_PATHS["HM-WS550STH-O"] = new Object(); +DEV_PATHS["HM-WS550STH-O"]["50"] = "/config/img/devices/50/TH_CS_thumb.png"; +DEV_PATHS["HM-WS550STH-O"]["250"] = "/config/img/devices/250/TH_CS.png"; +DEV_HIGHLIGHT["HM-WS550STH-O"] = new Object(); +DEV_LIST.push('HMW-Sen-SC-12-DR'); +DEV_DESCRIPTION["HMW-Sen-SC-12-DR"] = "HMW-Sen-SC-12-DR"; +DEV_PATHS["HMW-Sen-SC-12-DR"] = new Object(); +DEV_PATHS["HMW-Sen-SC-12-DR"]["50"] = "/config/img/devices/50/56_hmw-sen-sc-12-dr_thumb.png"; +DEV_PATHS["HMW-Sen-SC-12-DR"]["250"] = "/config/img/devices/250/56_hmw-sen-sc-12-dr.png"; +DEV_HIGHLIGHT["HMW-Sen-SC-12-DR"] = new Object(); +DEV_HIGHLIGHT["HMW-Sen-SC-12-DR"]["1"] = [2, 0.244, 0.688, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-Sen-SC-12-DR"]["2"] = [2, 0.304, 0.688, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-Sen-SC-12-DR"]["3"] = [2, 0.436, 0.688, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-Sen-SC-12-DR"]["4"] = [2, 0.496, 0.688, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-Sen-SC-12-DR"]["5"] = [2, 0.62, 0.688, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-Sen-SC-12-DR"]["6"] = [2, 0.68, 0.688, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-Sen-SC-12-DR"]["7"] = [2, 0.244, 0.752, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-Sen-SC-12-DR"]["8"] = [2, 0.304, 0.752, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-Sen-SC-12-DR"]["9"] = [2, 0.436, 0.752, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-Sen-SC-12-DR"]["10"] = [2, 0.496, 0.752, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-Sen-SC-12-DR"]["11"] = [2, 0.62, 0.752, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-Sen-SC-12-DR"]["12"] = [2, 0.68, 0.752, 0.06, 0.06]; +DEV_LIST.push('ZEL STG RM HS 4'); +DEV_DESCRIPTION["ZEL STG RM HS 4"] = "ZEL_STG_RM_HS_4"; +DEV_PATHS["ZEL STG RM HS 4"] = new Object(); +DEV_PATHS["ZEL STG RM HS 4"]["50"] = "/config/img/devices/50/18_hm-rc-4_thumb.png"; +DEV_PATHS["ZEL STG RM HS 4"]["250"] = "/config/img/devices/250/18_hm-rc-4.png"; +DEV_HIGHLIGHT["ZEL STG RM HS 4"] = new Object(); +DEV_HIGHLIGHT["ZEL STG RM HS 4"]["1"] = [4, 0.268, 0.236, 0.16, 0.164]; +DEV_HIGHLIGHT["ZEL STG RM HS 4"]["2"] = [4, 0.476, 0.236, 0.16, 0.164]; +DEV_HIGHLIGHT["ZEL STG RM HS 4"]["3"] = [4, 0.268, 0.48, 0.16, 0.164]; +DEV_HIGHLIGHT["ZEL STG RM HS 4"]["4"] = [4, 0.476, 0.48, 0.16, 0.164]; +DEV_HIGHLIGHT["ZEL STG RM HS 4"]["1+2"] = [5, '1', '2']; +DEV_HIGHLIGHT["ZEL STG RM HS 4"]["3+4"] = [5, '3', '4']; +DEV_LIST.push('HmIP-SWDO-PL'); +DEV_DESCRIPTION["HmIP-SWDO-PL"] = "HmIP-SWDO-PL"; +DEV_PATHS["HmIP-SWDO-PL"] = new Object(); +DEV_PATHS["HmIP-SWDO-PL"]["50"] = "/config/img/devices/50/197_hmip-swdo-pl_thumb.png"; +DEV_PATHS["HmIP-SWDO-PL"]["250"] = "/config/img/devices/250/197_hmip-swdo-pl.png"; +DEV_HIGHLIGHT["HmIP-SWDO-PL"] = new Object(); +DEV_LIST.push('HmIP-WRCD'); +DEV_DESCRIPTION["HmIP-WRCD"] = "HmIP-WRCD"; +DEV_PATHS["HmIP-WRCD"] = new Object(); +DEV_PATHS["HmIP-WRCD"]["50"] = "/config/img/devices/50/194_hmip-wrcd_thumb.png"; +DEV_PATHS["HmIP-WRCD"]["250"] = "/config/img/devices/250/194_hmip-wrcd.png"; +DEV_HIGHLIGHT["HmIP-WRCD"] = new Object(); +DEV_HIGHLIGHT["HmIP-WRCD"]["1"] = [1, 0.525, 0.690, 0.025]; +DEV_HIGHLIGHT["HmIP-WRCD"]["2"] = [1, 0.510, 0.360, 0.025]; +DEV_LIST.push('HM-OU-LED16'); +DEV_DESCRIPTION["HM-OU-LED16"] = "HM-OU-LED16"; +DEV_PATHS["HM-OU-LED16"] = new Object(); +DEV_PATHS["HM-OU-LED16"]["50"] = "/config/img/devices/50/78_hm-ou-led16_thumb.png"; +DEV_PATHS["HM-OU-LED16"]["250"] = "/config/img/devices/250/78_hm-ou-led16.png"; +DEV_HIGHLIGHT["HM-OU-LED16"] = new Object(); +DEV_HIGHLIGHT["HM-OU-LED16"]["1"] = [2, 0.152, 0.218, 0.064, 0.056]; +DEV_HIGHLIGHT["HM-OU-LED16"]["2"] = [2, 0.152, 0.277, 0.064, 0.056]; +DEV_HIGHLIGHT["HM-OU-LED16"]["3"] = [2, 0.152, 0.336, 0.064, 0.056]; +DEV_HIGHLIGHT["HM-OU-LED16"]["4"] = [2, 0.152, 0.395, 0.064, 0.056]; +DEV_HIGHLIGHT["HM-OU-LED16"]["5"] = [2, 0.152, 0.454, 0.064, 0.056]; +DEV_HIGHLIGHT["HM-OU-LED16"]["6"] = [2, 0.152, 0.513, 0.064, 0.056]; +DEV_HIGHLIGHT["HM-OU-LED16"]["7"] = [2, 0.152, 0.572, 0.064, 0.056]; +DEV_HIGHLIGHT["HM-OU-LED16"]["8"] = [2, 0.152, 0.631, 0.064, 0.056]; +DEV_HIGHLIGHT["HM-OU-LED16"]["9"] = [2, 0.728, 0.218, 0.064, 0.056]; +DEV_HIGHLIGHT["HM-OU-LED16"]["10"] = [2, 0.728, 0.277, 0.064, 0.056]; +DEV_HIGHLIGHT["HM-OU-LED16"]["11"] = [2, 0.728, 0.336, 0.064, 0.056]; +DEV_HIGHLIGHT["HM-OU-LED16"]["12"] = [2, 0.728, 0.395, 0.064, 0.056]; +DEV_HIGHLIGHT["HM-OU-LED16"]["13"] = [2, 0.728, 0.454, 0.064, 0.056]; +DEV_HIGHLIGHT["HM-OU-LED16"]["14"] = [2, 0.728, 0.513, 0.064, 0.056]; +DEV_HIGHLIGHT["HM-OU-LED16"]["15"] = [2, 0.728, 0.572, 0.064, 0.056]; +DEV_HIGHLIGHT["HM-OU-LED16"]["16"] = [2, 0.728, 0.631, 0.064, 0.056]; +DEV_LIST.push('HM-WDS30-T-O'); +DEV_DESCRIPTION["HM-WDS30-T-O"] = "HM-WDS30-T-O"; +DEV_PATHS["HM-WDS30-T-O"] = new Object(); +DEV_PATHS["HM-WDS30-T-O"]["50"] = "/config/img/devices/50/IP65_G201_thumb.png"; +DEV_PATHS["HM-WDS30-T-O"]["250"] = "/config/img/devices/250/IP65_G201.png"; +DEV_HIGHLIGHT["HM-WDS30-T-O"] = new Object(); +DEV_LIST.push('HM-RC-12-B'); +DEV_DESCRIPTION["HM-RC-12-B"] = "HM-RC-12-B"; +DEV_PATHS["HM-RC-12-B"] = new Object(); +DEV_PATHS["HM-RC-12-B"]["50"] = "/config/img/devices/50/19_hm-rc-12_thumb.png"; +DEV_PATHS["HM-RC-12-B"]["250"] = "/config/img/devices/250/19_hm-rc-12.png"; +DEV_HIGHLIGHT["HM-RC-12-B"] = new Object(); +DEV_HIGHLIGHT["HM-RC-12-B"]["1"] = [2, 0.252, 0.412, 0.044, 0.072]; +DEV_HIGHLIGHT["HM-RC-12-B"]["3"] = [2, 0.252, 0.508, 0.044, 0.072]; +DEV_HIGHLIGHT["HM-RC-12-B"]["5"] = [2, 0.252, 0.604, 0.044, 0.072]; +DEV_HIGHLIGHT["HM-RC-12-B"]["7"] = [2, 0.252, 0.7, 0.044, 0.072]; +DEV_HIGHLIGHT["HM-RC-12-B"]["9"] = [2, 0.252, 0.8, 0.044, 0.072]; +DEV_HIGHLIGHT["HM-RC-12-B"]["10"] = [2, 0.476, 0.8, 0.044, 0.072]; +DEV_HIGHLIGHT["HM-RC-12-B"]["8"] = [2, 0.476, 0.7, 0.044, 0.072]; +DEV_HIGHLIGHT["HM-RC-12-B"]["6"] = [2, 0.476, 0.604, 0.044, 0.072]; +DEV_HIGHLIGHT["HM-RC-12-B"]["4"] = [2, 0.476, 0.508, 0.044, 0.072]; +DEV_HIGHLIGHT["HM-RC-12-B"]["2"] = [2, 0.476, 0.412, 0.044, 0.072]; +DEV_HIGHLIGHT["HM-RC-12-B"]["11"] = [2, 0.62, 0.8, 0.068, 0.064]; +DEV_HIGHLIGHT["HM-RC-12-B"]["12"] = [2, 0.62, 0.704, 0.068, 0.064]; +DEV_HIGHLIGHT["HM-RC-12-B"]["1+2"] = [5, '1', '2']; +DEV_HIGHLIGHT["HM-RC-12-B"]["3+4"] = [5, '3', '4']; +DEV_HIGHLIGHT["HM-RC-12-B"]["5+6"] = [5, '5', '6']; +DEV_HIGHLIGHT["HM-RC-12-B"]["7+8"] = [5, '7', '8']; +DEV_HIGHLIGHT["HM-RC-12-B"]["9+10"] = [5, '9', '10']; +DEV_HIGHLIGHT["HM-RC-12-B"]["11+12"] = [5, '11', '12']; +DEV_LIST.push('HM-ES-PMSw1-Pl-DN-R5'); +DEV_DESCRIPTION["HM-ES-PMSw1-Pl-DN-R5"] = "HM-ES-PMSw1-Pl-DN-R5"; +DEV_PATHS["HM-ES-PMSw1-Pl-DN-R5"] = new Object(); +DEV_PATHS["HM-ES-PMSw1-Pl-DN-R5"]["50"] = "/config/img/devices/50/107_hm-es-pmsw1-pl-R5_thumb.png"; +DEV_PATHS["HM-ES-PMSw1-Pl-DN-R5"]["250"] = "/config/img/devices/250/107_hm-es-pmsw1-pl-R5.png"; +DEV_HIGHLIGHT["HM-ES-PMSw1-Pl-DN-R5"] = new Object(); +DEV_LIST.push('HM-LC-Sw4-SM-ATmega168'); +DEV_DESCRIPTION["HM-LC-Sw4-SM-ATmega168"] = "HM-LC-Sw4-SM-ATmega168"; +DEV_PATHS["HM-LC-Sw4-SM-ATmega168"] = new Object(); +DEV_PATHS["HM-LC-Sw4-SM-ATmega168"]["50"] = "/config/img/devices/50/3_hm-lc-sw4-sm_thumb.png"; +DEV_PATHS["HM-LC-Sw4-SM-ATmega168"]["250"] = "/config/img/devices/250/3_hm-lc-sw4-sm.png"; +DEV_HIGHLIGHT["HM-LC-Sw4-SM-ATmega168"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Sw4-SM-ATmega168"]["1_Part1"] = [6, 0.136, 0.896, 0.136, 0.98, 0.012]; +DEV_HIGHLIGHT["HM-LC-Sw4-SM-ATmega168"]["1_Part2"] = [6, 0.136, 0.98, 0.096, 0.916, 0.012]; +DEV_HIGHLIGHT["HM-LC-Sw4-SM-ATmega168"]["1_Part3"] = [6, 0.136, 0.98, 0.176, 0.916, 0.012]; +DEV_HIGHLIGHT["HM-LC-Sw4-SM-ATmega168"]["1_Arrow"] = [5, '1_Part1', '1_Part2', '1_Part3']; +DEV_HIGHLIGHT["HM-LC-Sw4-SM-ATmega168"]["2_Arrow"] = [7, '1_Arrow', 0.164, 0]; +DEV_HIGHLIGHT["HM-LC-Sw4-SM-ATmega168"]["3_Arrow"] = [7, '1_Arrow', 0.328, 0]; +DEV_HIGHLIGHT["HM-LC-Sw4-SM-ATmega168"]["4_Arrow"] = [7, '1_Arrow', 0.492, 0]; +DEV_HIGHLIGHT["HM-LC-Sw4-SM-ATmega168"]["1_Key"] = [4, 0.244, 0.372, 0.04, 0.044]; +DEV_HIGHLIGHT["HM-LC-Sw4-SM-ATmega168"]["2_Key"] = [4, 0.328, 0.372, 0.04, 0.044]; +DEV_HIGHLIGHT["HM-LC-Sw4-SM-ATmega168"]["3_Key"] = [4, 0.404, 0.372, 0.04, 0.044]; +DEV_HIGHLIGHT["HM-LC-Sw4-SM-ATmega168"]["4_Key"] = [4, 0.484, 0.372, 0.04, 0.044]; +DEV_HIGHLIGHT["HM-LC-Sw4-SM-ATmega168"]["1"] = [5, '1_Arrow', '1_Key']; +DEV_HIGHLIGHT["HM-LC-Sw4-SM-ATmega168"]["2"] = [5, '2_Arrow', '2_Key']; +DEV_HIGHLIGHT["HM-LC-Sw4-SM-ATmega168"]["3"] = [5, '3_Arrow', '3_Key']; +DEV_HIGHLIGHT["HM-LC-Sw4-SM-ATmega168"]["4"] = [5, '4_Arrow', '4_Key']; +DEV_LIST.push('HM-SCI-3-FM'); +DEV_DESCRIPTION["HM-SCI-3-FM"] = "HM-SCI-3-FM"; +DEV_PATHS["HM-SCI-3-FM"] = new Object(); +DEV_PATHS["HM-SCI-3-FM"]["50"] = "/config/img/devices/50/67_hm-sci-3-fm_thumb.png"; +DEV_PATHS["HM-SCI-3-FM"]["250"] = "/config/img/devices/250/67_hm-sci-3-fm.png"; +DEV_HIGHLIGHT["HM-SCI-3-FM"] = new Object(); +DEV_HIGHLIGHT["HM-SCI-3-FM"]["1_Key"] = [3, 0.18, 0.216, '1', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-SCI-3-FM"]["1_Kreis"] = [4, 0.220, 0.480, 0.028, 0.028]; +DEV_HIGHLIGHT["HM-SCI-3-FM"]["1"] = [5, '1_Key', '1_Kreis']; +DEV_HIGHLIGHT["HM-SCI-3-FM"]["2_Key"] = [3, 0.18, 0.216, '2', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-SCI-3-FM"]["2_Kreis"] = [4, 0.265, 0.405, 0.028, 0.028]; +DEV_HIGHLIGHT["HM-SCI-3-FM"]["2"] = [5, '2_Key', '2_Kreis']; +DEV_HIGHLIGHT["HM-SCI-3-FM"]["3_Key"] = [3, 0.18, 0.216, '3', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-SCI-3-FM"]["3_Kreis"] = [4, 0.310, 0.33, 0.028, 0.028]; +DEV_HIGHLIGHT["HM-SCI-3-FM"]["3"] = [5, '3_Key', '3_Kreis']; +DEV_LIST.push('HM-LC-Sw2PBU-FM'); +DEV_DESCRIPTION["HM-LC-Sw2PBU-FM"] = "HM-LC-Sw2PBU-FM"; +DEV_PATHS["HM-LC-Sw2PBU-FM"] = new Object(); +DEV_PATHS["HM-LC-Sw2PBU-FM"]["50"] = "/config/img/devices/50/PushButton-2ch-wm_thumb.png"; +DEV_PATHS["HM-LC-Sw2PBU-FM"]["250"] = "/config/img/devices/250/PushButton-2ch-wm.png"; +DEV_HIGHLIGHT["HM-LC-Sw2PBU-FM"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Sw2PBU-FM"]["2"] = [2, 0.244, 0.312, 0.428, 0.168]; +DEV_HIGHLIGHT["HM-LC-Sw2PBU-FM"]["1"] = [2, 0.244, 0.56, 0.428, 0.168]; +DEV_HIGHLIGHT["HM-LC-Sw2PBU-FM"]["1+2"] = [2, 0.244, 0.308, 0.428, 0.416]; +DEV_LIST.push('HmIP-SMI55-2'); +DEV_DESCRIPTION["HmIP-SMI55-2"] = "HmIP-SMI55"; +DEV_PATHS["HmIP-SMI55-2"] = new Object(); +DEV_PATHS["HmIP-SMI55-2"]["50"] = "/config/img/devices/50/168_hmip-smi55_thumb.png"; +DEV_PATHS["HmIP-SMI55-2"]["250"] = "/config/img/devices/250/168_hmip-smi55.png"; +DEV_HIGHLIGHT["HmIP-SMI55-2"] = new Object(); +DEV_HIGHLIGHT["HmIP-SMI55-2"]["2"] = [4, 0.540, 0.188, 0.04, 0.044]; +DEV_HIGHLIGHT["HmIP-SMI55-2"]["1"] = [4, 0.540, 0.820, 0.04, 0.044]; +DEV_LIST.push('HmIP-HAP'); +DEV_DESCRIPTION["HmIP-HAP"] = "HmIP-HAP"; +DEV_PATHS["HmIP-HAP"] = new Object(); +DEV_PATHS["HmIP-HAP"]["50"] = "/config/img/devices/50/CCU3_thumb.png"; +DEV_PATHS["HmIP-HAP"]["250"] = "/config/img/devices/250/CCU3.png"; +DEV_HIGHLIGHT["HmIP-HAP"] = new Object(); +DEV_LIST.push('263 146'); +DEV_DESCRIPTION["263 146"] = "263_146"; +DEV_PATHS["263 146"] = new Object(); +DEV_PATHS["263 146"]["50"] = "/config/img/devices/50/7_hm-lc-bl1-fm_thumb.png"; +DEV_PATHS["263 146"]["250"] = "/config/img/devices/250/7_hm-lc-bl1-fm.png"; +DEV_HIGHLIGHT["263 146"] = new Object(); +DEV_LIST.push('HM-CC-VG-1'); +DEV_DESCRIPTION["HM-CC-VG-1"] = "HM-CC-VG-1"; +DEV_PATHS["HM-CC-VG-1"] = new Object(); +DEV_PATHS["HM-CC-VG-1"]["50"] = "/config/img/devices/50/95_group_hm-cc-vg-1_thumb.png"; +DEV_PATHS["HM-CC-VG-1"]["250"] = "/config/img/devices/250/95_group_hm-cc-vg-1.png"; +DEV_HIGHLIGHT["HM-CC-VG-1"] = new Object(); +DEV_LIST.push('HmIP-BSL'); +DEV_DESCRIPTION["HmIP-BSL"] = "HmIP-BSL"; +DEV_PATHS["HmIP-BSL"] = new Object(); +DEV_PATHS["HmIP-BSL"]["50"] = "/config/img/devices/50/173_hmip-bsl_thumb.png"; +DEV_PATHS["HmIP-BSL"]["250"] = "/config/img/devices/250/173_hmip-bsl.png"; +DEV_HIGHLIGHT["HmIP-BSL"] = new Object(); +DEV_HIGHLIGHT["HmIP-BSL"]["1"] = [1, 0.505, 0.635, 0.050]; +DEV_HIGHLIGHT["HmIP-BSL"]["2"] = [1, 0.505, 0.360, 0.050]; +DEV_HIGHLIGHT["HmIP-BSL"]["8"] = [1, 0.505, 0.360, 0.050]; +DEV_HIGHLIGHT["HmIP-BSL"]["9"] = [1, 0.505, 0.360, 0.050]; +DEV_HIGHLIGHT["HmIP-BSL"]["10"] = [1, 0.505, 0.360, 0.050]; +DEV_HIGHLIGHT["HmIP-BSL"]["12"] = [1, 0.505, 0.635, 0.050]; +DEV_HIGHLIGHT["HmIP-BSL"]["13"] = [1, 0.505, 0.635, 0.050]; +DEV_HIGHLIGHT["HmIP-BSL"]["14"] = [1, 0.505, 0.635, 0.050]; +DEV_LIST.push('HmIP-PDT-CH'); +DEV_DESCRIPTION["HmIP-PDT-CH"] = "PDT-CH"; +DEV_PATHS["HmIP-PDT-CH"] = new Object(); +DEV_PATHS["HmIP-PDT-CH"]["50"] = "/config/img/devices/50/113_hmip-psm-ch_thumb.png"; +DEV_PATHS["HmIP-PDT-CH"]["250"] = "/config/img/devices/250/113_hmip-psm-ch.png"; +DEV_HIGHLIGHT["HmIP-PDT-CH"] = new Object(); +DEV_LIST.push('HmIP-WTH-B'); +DEV_DESCRIPTION["HmIP-WTH-B"] = "HmIP-WTH-B"; +DEV_PATHS["HmIP-WTH-B"] = new Object(); +DEV_PATHS["HmIP-WTH-B"]["50"] = "/config/img/devices/50/200_hmip-wth-b_thumb.png"; +DEV_PATHS["HmIP-WTH-B"]["250"] = "/config/img/devices/250/200_hmip-wth-b.png"; +DEV_HIGHLIGHT["HmIP-WTH-B"] = new Object(); +DEV_LIST.push('HM-LC-DDC1-PCB'); +DEV_DESCRIPTION["HM-LC-DDC1-PCB"] = "HM-LC-DDC1-PCB"; +DEV_PATHS["HM-LC-DDC1-PCB"] = new Object(); +DEV_PATHS["HM-LC-DDC1-PCB"]["50"] = "/config/img/devices/50/54a_lc-ddc1_thumb.png"; +DEV_PATHS["HM-LC-DDC1-PCB"]["250"] = "/config/img/devices/250/54a_lc-ddc1-pcb.png"; +DEV_HIGHLIGHT["HM-LC-DDC1-PCB"] = new Object(); +DEV_LIST.push('HmIP-PSM-CH-2'); +DEV_DESCRIPTION["HmIP-PSM-CH-2"] = "PSM-CH"; +DEV_PATHS["HmIP-PSM-CH-2"] = new Object(); +DEV_PATHS["HmIP-PSM-CH-2"]["50"] = "/config/img/devices/50/216_hmip-psm-ch-2_thumb.png"; +DEV_PATHS["HmIP-PSM-CH-2"]["250"] = "/config/img/devices/250/216_hmip-psm-ch-2.png"; +DEV_HIGHLIGHT["HmIP-PSM-CH-2"] = new Object(); +DEV_LIST.push('HmIP-BWTH-A'); +DEV_DESCRIPTION["HmIP-BWTH-A"] = "HmIP-WTH"; +DEV_PATHS["HmIP-BWTH-A"] = new Object(); +DEV_PATHS["HmIP-BWTH-A"]["50"] = "/config/img/devices/50/121_hmip-wth_thumb.png"; +DEV_PATHS["HmIP-BWTH-A"]["250"] = "/config/img/devices/250/121_hmip-wth.png"; +DEV_HIGHLIGHT["HmIP-BWTH-A"] = new Object(); +DEV_LIST.push('HmIP-ESI'); +DEV_DESCRIPTION["HmIP-ESI"] = "HmIP-ESI"; +DEV_PATHS["HmIP-ESI"] = new Object(); +DEV_PATHS["HmIP-ESI"]["50"] = "/config/img/devices/50/226_hmip-esi_thumb.png"; +DEV_PATHS["HmIP-ESI"]["250"] = "/config/img/devices/250/226_hmip-esi.png"; +DEV_HIGHLIGHT["HmIP-ESI"] = new Object(); +DEV_LIST.push('HmIP-STV'); +DEV_DESCRIPTION["HmIP-STV"] = "HmIP-STV"; +DEV_PATHS["HmIP-STV"] = new Object(); +DEV_PATHS["HmIP-STV"]["50"] = "/config/img/devices/50/201_hmip-stv_thumb.png"; +DEV_PATHS["HmIP-STV"]["250"] = "/config/img/devices/250/201_hmip-stv.png"; +DEV_HIGHLIGHT["HmIP-STV"] = new Object(); +DEV_LIST.push('VIR-LG-ONOFF'); +DEV_DESCRIPTION["VIR-LG-ONOFF"] = "VIR-LG-ONOFFVIR-LG-ONOFF"; +DEV_PATHS["VIR-LG-ONOFF"] = new Object(); +DEV_PATHS["VIR-LG-ONOFF"]["50"] = "/config/img/devices/50/coupling/hm-coupling-onoff.png"; +DEV_PATHS["VIR-LG-ONOFF"]["250"] = "/config/img/devices/250/coupling/hm-coupling-onoff.png"; +DEV_HIGHLIGHT["VIR-LG-ONOFF"] = new Object(); +DEV_LIST.push('HmIPW-WGD'); +DEV_DESCRIPTION["HmIPW-WGD"] = "HmIPW-WGD"; +DEV_PATHS["HmIPW-WGD"] = new Object(); +DEV_PATHS["HmIPW-WGD"]["50"] = "/config/img/devices/50/222_hmipw-wgd_thumb.png"; +DEV_PATHS["HmIPW-WGD"]["250"] = "/config/img/devices/250/222_hmipw-wgd.png"; +DEV_HIGHLIGHT["HmIPW-WGD"] = new Object(); +DEV_LIST.push('HM-Sec-RHS-2'); +DEV_DESCRIPTION["HM-Sec-RHS-2"] = "HM-Sec-RHS"; +DEV_PATHS["HM-Sec-RHS-2"] = new Object(); +DEV_PATHS["HM-Sec-RHS-2"]["50"] = "/config/img/devices/50/17_hm-sec-rhs_thumb.png"; +DEV_PATHS["HM-Sec-RHS-2"]["250"] = "/config/img/devices/250/17_hm-sec-rhs.png"; +DEV_HIGHLIGHT["HM-Sec-RHS-2"] = new Object(); +DEV_LIST.push('HmIPW-DRS8'); +DEV_DESCRIPTION["HmIPW-DRS8"] = "HmIPW-DRS8"; +DEV_PATHS["HmIPW-DRS8"] = new Object(); +DEV_PATHS["HmIPW-DRS8"]["50"] = "/config/img/devices/50/161_hmipw-drs8_thumb.png"; +DEV_PATHS["HmIPW-DRS8"]["250"] = "/config/img/devices/250/161_hmipw-drs8.png"; +DEV_HIGHLIGHT["HmIPW-DRS8"] = new Object(); +DEV_HIGHLIGHT["HmIPW-DRS8"]["1"] = [1, 0.208, 0.080, 0.050]; +DEV_HIGHLIGHT["HmIPW-DRS8"]["2"] = [1, 0.208, 0.080, 0.050]; +DEV_HIGHLIGHT["HmIPW-DRS8"]["3"] = [1, 0.208, 0.080, 0.050]; +DEV_HIGHLIGHT["HmIPW-DRS8"]["4"] = [1, 0.208, 0.080, 0.050]; +DEV_HIGHLIGHT["HmIPW-DRS8"]["5"] = [1, 0.422, 0.075, 0.050]; +DEV_HIGHLIGHT["HmIPW-DRS8"]["6"] = [1, 0.422, 0.075, 0.050]; +DEV_HIGHLIGHT["HmIPW-DRS8"]["7"] = [1, 0.422, 0.075, 0.050]; +DEV_HIGHLIGHT["HmIPW-DRS8"]["8"] = [1, 0.422, 0.075, 0.050]; +DEV_HIGHLIGHT["HmIPW-DRS8"]["9"] = [1, 0.636, 0.070, 0.050]; +DEV_HIGHLIGHT["HmIPW-DRS8"]["10"] = [1, 0.636, 0.070, 0.050]; +DEV_HIGHLIGHT["HmIPW-DRS8"]["11"] = [1, 0.636, 0.070, 0.050]; +DEV_HIGHLIGHT["HmIPW-DRS8"]["12"] = [1, 0.636, 0.070, 0.050]; +DEV_HIGHLIGHT["HmIPW-DRS8"]["13"] = [1, 0.205, 0.910, 0.040]; +DEV_HIGHLIGHT["HmIPW-DRS8"]["14"] = [1, 0.205, 0.910, 0.040]; +DEV_HIGHLIGHT["HmIPW-DRS8"]["15"] = [1, 0.205, 0.910, 0.040]; +DEV_HIGHLIGHT["HmIPW-DRS8"]["16"] = [1, 0.205, 0.910, 0.040]; +DEV_HIGHLIGHT["HmIPW-DRS8"]["17"] = [1, 0.425, 0.910, 0.040]; +DEV_HIGHLIGHT["HmIPW-DRS8"]["18"] = [1, 0.425, 0.910, 0.040]; +DEV_HIGHLIGHT["HmIPW-DRS8"]["19"] = [1, 0.425, 0.910, 0.040]; +DEV_HIGHLIGHT["HmIPW-DRS8"]["20"] = [1, 0.425, 0.910, 0.040]; +DEV_HIGHLIGHT["HmIPW-DRS8"]["21"] = [1, 0.645, 0.900, 0.040]; +DEV_HIGHLIGHT["HmIPW-DRS8"]["22"] = [1, 0.645, 0.900, 0.040]; +DEV_HIGHLIGHT["HmIPW-DRS8"]["23"] = [1, 0.645, 0.900, 0.040]; +DEV_HIGHLIGHT["HmIPW-DRS8"]["24"] = [1, 0.645, 0.900, 0.040]; +DEV_HIGHLIGHT["HmIPW-DRS8"]["25"] = [1, 0.275, 0.242, 0.050]; +DEV_HIGHLIGHT["HmIPW-DRS8"]["26"] = [1, 0.275, 0.242, 0.050]; +DEV_HIGHLIGHT["HmIPW-DRS8"]["27"] = [1, 0.275, 0.242, 0.050]; +DEV_HIGHLIGHT["HmIPW-DRS8"]["28"] = [1, 0.275, 0.242, 0.050]; +DEV_HIGHLIGHT["HmIPW-DRS8"]["29"] = [1, 0.485, 0.230, 0.050]; +DEV_HIGHLIGHT["HmIPW-DRS8"]["30"] = [1, 0.485, 0.230, 0.050]; +DEV_HIGHLIGHT["HmIPW-DRS8"]["31"] = [1, 0.485, 0.230, 0.050]; +DEV_HIGHLIGHT["HmIPW-DRS8"]["32"] = [1, 0.485, 0.230, 0.050]; +DEV_LIST.push('263 158'); +DEV_DESCRIPTION["263 158"] = "263_158"; +DEV_PATHS["263 158"] = new Object(); +DEV_PATHS["263 158"]["50"] = "/config/img/devices/50/TH_CS_thumb.png"; +DEV_PATHS["263 158"]["250"] = "/config/img/devices/250/TH_CS.png"; +DEV_HIGHLIGHT["263 158"] = new Object(); +DEV_LIST.push('WS888'); +DEV_DESCRIPTION["WS888"] = "WS888"; +DEV_PATHS["WS888"] = new Object(); +DEV_PATHS["WS888"]["50"] = "/config/img/devices/50/9_hm-ws550-us_thumb.png"; +DEV_PATHS["WS888"]["250"] = "/config/img/devices/250/9_hm-ws550-us.png"; +DEV_HIGHLIGHT["WS888"] = new Object(); +DEV_HIGHLIGHT["WS888"]["1"] = [3, 0.440, 0.200, '1', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["WS888"]["2"] = [3, 0.440, 0.200, '2', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["WS888"]["3"] = [3, 0.440, 0.200, '3', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["WS888"]["4"] = [3, 0.440, 0.200, '4', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["WS888"]["5"] = [3, 0.440, 0.200, '5', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["WS888"]["6"] = [3, 0.440, 0.200, '6', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["WS888"]["7"] = [3, 0.440, 0.200, '7', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["WS888"]["8"] = [3, 0.440, 0.200, '8', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["WS888"]["9"] = [3, 0.440, 0.200, '9', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["WS888"]["10"] = [3, 0.405, 0.200, '10', 0.124, 'verdana', Font.BOLD]; +DEV_LIST.push('HM-LC-Bl1-FM-2'); +DEV_DESCRIPTION["HM-LC-Bl1-FM-2"] = "HM-LC-Bl1-FM"; +DEV_PATHS["HM-LC-Bl1-FM-2"] = new Object(); +DEV_PATHS["HM-LC-Bl1-FM-2"]["50"] = "/config/img/devices/50/7_hm-lc-bl1-fm_thumb.png"; +DEV_PATHS["HM-LC-Bl1-FM-2"]["250"] = "/config/img/devices/250/7_hm-lc-bl1-fm.png"; +DEV_HIGHLIGHT["HM-LC-Bl1-FM-2"] = new Object(); +DEV_LIST.push('HmIP-ASIR-B1'); +DEV_DESCRIPTION["HmIP-ASIR-B1"] = "HmIP-ASIR"; +DEV_PATHS["HmIP-ASIR-B1"] = new Object(); +DEV_PATHS["HmIP-ASIR-B1"]["50"] = "/config/img/devices/50/133_hmip-asir_thumb.png"; +DEV_PATHS["HmIP-ASIR-B1"]["250"] = "/config/img/devices/250/133_hmip-asir.png"; +DEV_HIGHLIGHT["HmIP-ASIR-B1"] = new Object(); +DEV_LIST.push('HM-LC-Dim1L-Pl-3'); +DEV_DESCRIPTION["HM-LC-Dim1L-Pl-3"] = "HM-LC-Dim1L-Pl-3"; +DEV_PATHS["HM-LC-Dim1L-Pl-3"] = new Object(); +DEV_PATHS["HM-LC-Dim1L-Pl-3"]["50"] = "/config/img/devices/50/OM55_DimmerSwitch_thumb.png"; +DEV_PATHS["HM-LC-Dim1L-Pl-3"]["250"] = "/config/img/devices/250/OM55_DimmerSwitch.png"; +DEV_HIGHLIGHT["HM-LC-Dim1L-Pl-3"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Dim1L-Pl-3"]["1_part1"] = [2, 0.548, 0.468, 0.072, 0.052]; +DEV_HIGHLIGHT["HM-LC-Dim1L-Pl-3"]["1_part2"] = [2, 0.612, 0.452, 0.028, 0.056]; +DEV_HIGHLIGHT["HM-LC-Dim1L-Pl-3"]["1"] = [5, '1_part1', '1_part2']; +DEV_LIST.push('HmIP-FCI6'); +DEV_DESCRIPTION["HmIP-FCI6"] = "HmIP-FCI6"; +DEV_PATHS["HmIP-FCI6"] = new Object(); +DEV_PATHS["HmIP-FCI6"]["50"] = "/config/img/devices/50/185_hmip-FCI6_thumb.png"; +DEV_PATHS["HmIP-FCI6"]["250"] = "/config/img/devices/250/185_hmip-FCI6.png"; +DEV_HIGHLIGHT["HmIP-FCI6"] = new Object(); +DEV_LIST.push('HMW-IO-12-Sw14-DR'); +DEV_DESCRIPTION["HMW-IO-12-Sw14-DR"] = "HMW-IO-12-Sw14-DR"; +DEV_PATHS["HMW-IO-12-Sw14-DR"] = new Object(); +DEV_PATHS["HMW-IO-12-Sw14-DR"]["50"] = "/config/img/devices/50/71_hmw-io-12-sw14-dr_thumb.png"; +DEV_PATHS["HMW-IO-12-Sw14-DR"]["250"] = "/config/img/devices/250/71_hmw-io-12-sw14-dr.png"; +DEV_HIGHLIGHT["HMW-IO-12-Sw14-DR"] = new Object(); +DEV_HIGHLIGHT["HMW-IO-12-Sw14-DR"]["1"] = [2, 0.106, 0.398, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw14-DR"]["2"] = [2, 0.230, 0.398, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw14-DR"]["3"] = [2, 0.294, 0.398, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw14-DR"]["4"] = [2, 0.422, 0.398, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw14-DR"]["5"] = [2, 0.482, 0.398, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw14-DR"]["6"] = [2, 0.602, 0.398, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw14-DR"]["7"] = [2, 0.046, 0.458, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw14-DR"]["8"] = [2, 0.106, 0.458, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw14-DR"]["9"] = [2, 0.230, 0.458, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw14-DR"]["10"] = [2, 0.294, 0.458, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw14-DR"]["11"] = [2, 0.422, 0.458, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw14-DR"]["12"] = [2, 0.482, 0.458, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw14-DR"]["13"] = [2, 0.602, 0.458, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw14-DR"]["14"] = [2, 0.666, 0.458, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw14-DR"]["15"] = [2, 0.230, 0.69, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw14-DR"]["16"] = [2, 0.294, 0.69, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw14-DR"]["17"] = [2, 0.422, 0.69, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw14-DR"]["18"] = [2, 0.482, 0.69, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw14-DR"]["19"] = [2, 0.602, 0.69, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw14-DR"]["20"] = [2, 0.666, 0.69, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw14-DR"]["21"] = [2, 0.230, 0.755, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw14-DR"]["22"] = [2, 0.294, 0.755, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw14-DR"]["23"] = [2, 0.422, 0.755, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw14-DR"]["24"] = [2, 0.482, 0.755, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw14-DR"]["25"] = [2, 0.602, 0.755, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw14-DR"]["26"] = [2, 0.666, 0.755, 0.06, 0.06]; +DEV_LIST.push('HmIP-WT'); +DEV_DESCRIPTION["HmIP-WT"] = "WT"; +DEV_PATHS["HmIP-WT"] = new Object(); +DEV_PATHS["HmIP-WT"]["50"] = "/config/img/devices/50/193_hmip-wt_thumb.png"; +DEV_PATHS["HmIP-WT"]["250"] = "/config/img/devices/250/193_hmip-wt.png"; +DEV_HIGHLIGHT["HmIP-WT"] = new Object(); +DEV_LIST.push('HmIP-RCV-50'); +DEV_DESCRIPTION["HmIP-RCV-50"] = "HmIP-RCV-50"; +DEV_PATHS["HmIP-RCV-50"] = new Object(); +DEV_PATHS["HmIP-RCV-50"]["50"] = "/config/img/devices/50/CCU3-1-50_thumb.png"; +DEV_PATHS["HmIP-RCV-50"]["250"] = "/config/img/devices/250/CCU3-1-50.png"; +DEV_HIGHLIGHT["HmIP-RCV-50"] = new Object(); +DEV_HIGHLIGHT["HmIP-RCV-50"]["RF_1"] = [4, 0.364, 0.048, 0.028, 0.028]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["RF_2"] = [6, 0.4, 0.052, 0.544, 0.004, 0.016]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["RF_3"] = [6, 0.4, 0.052, 0.6, 0.052, 0.016]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["RF_4"] = [6, 0.4, 0.052, 0.544, 0.104, 0.016]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["RF_5"] = [6, 0.168, 0.052, 0.344, 0.052, 0.016]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["RF_6"] = [6, 0.168, 0, 0.344, 0.052, 0.016]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["RF_7"] = [6, 0.168, 0.104, 0.344, 0.052, 0.016]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["RF"] = [5, 'RF_1', 'RF_2', 'RF_3', 'RF_4', 'RF_5', 'RF_6', 'RF_7']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S1"] = [3, 0.25, 0.57, '1', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S2"] = [3, 0.25, 0.57, '2', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S3"] = [3, 0.25, 0.57, '3', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S4"] = [3, 0.25, 0.57, '4', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S5"] = [3, 0.25, 0.57, '5', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S6"] = [3, 0.25, 0.57, '6', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S7"] = [3, 0.25, 0.57, '7', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S8"] = [3, 0.25, 0.57, '8', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S9"] = [3, 0.25, 0.57, '9', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S10"] = [3, 0.175, 0.57, '10', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S11"] = [3, 0.175, 0.57, '11', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S12"] = [3, 0.175, 0.57, '12', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S13"] = [3, 0.175, 0.57, '13', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S14"] = [3, 0.175, 0.57, '14', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S15"] = [3, 0.175, 0.57, '15', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S16"] = [3, 0.175, 0.57, '16', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S17"] = [3, 0.175, 0.57, '17', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S18"] = [3, 0.175, 0.57, '18', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S19"] = [3, 0.175, 0.57, '19', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S20"] = [3, 0.175, 0.57, '20', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S21"] = [3, 0.175, 0.57, '21', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S22"] = [3, 0.175, 0.57, '22', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S23"] = [3, 0.175, 0.57, '23', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S24"] = [3, 0.175, 0.57, '24', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S25"] = [3, 0.175, 0.57, '25', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S26"] = [3, 0.175, 0.57, '26', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S27"] = [3, 0.175, 0.57, '27', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S28"] = [3, 0.175, 0.57, '28', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S29"] = [3, 0.175, 0.57, '29', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S30"] = [3, 0.175, 0.57, '30', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S31"] = [3, 0.175, 0.57, '31', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S32"] = [3, 0.175, 0.57, '32', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S33"] = [3, 0.175, 0.57, '33', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S34"] = [3, 0.175, 0.57, '34', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S35"] = [3, 0.175, 0.57, '35', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S36"] = [3, 0.175, 0.57, '36', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S37"] = [3, 0.175, 0.57, '37', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S38"] = [3, 0.175, 0.57, '38', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S39"] = [3, 0.175, 0.57, '39', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S40"] = [3, 0.175, 0.57, '40', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S41"] = [3, 0.175, 0.57, '41', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S42"] = [3, 0.175, 0.57, '42', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S43"] = [3, 0.175, 0.57, '43', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S44"] = [3, 0.175, 0.57, '44', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S45"] = [3, 0.175, 0.57, '45', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S46"] = [3, 0.175, 0.57, '46', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S47"] = [3, 0.175, 0.57, '47', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S48"] = [3, 0.175, 0.57, '48', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S49"] = [3, 0.175, 0.57, '49', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S50"] = [3, 0.175, 0.57, '50', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["1"] = [5, 'S1']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["2"] = [5, 'S2']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["3"] = [5, 'S3']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["4"] = [5, 'S4']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["5"] = [5, 'S5']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["6"] = [5, 'S6']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["7"] = [5, 'S7']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["8"] = [5, 'S8']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["9"] = [5, 'S9']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["10"] = [5, 'S10']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["11"] = [5, 'S11']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["12"] = [5, 'S12']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["13"] = [5, 'S13']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["14"] = [5, 'S14']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["15"] = [5, 'S15']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["16"] = [5, 'S16']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["17"] = [5, 'S17']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["18"] = [5, 'S18']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["19"] = [5, 'S19']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["20"] = [5, 'S20']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["21"] = [5, 'S21']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["22"] = [5, 'S22']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["23"] = [5, 'S23']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["24"] = [5, 'S24']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["25"] = [5, 'S25']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["26"] = [5, 'S26']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["27"] = [5, 'S27']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["28"] = [5, 'S28']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["29"] = [5, 'S29']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["30"] = [5, 'S30']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["31"] = [5, 'S31']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["32"] = [5, 'S32']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["33"] = [5, 'S33']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["34"] = [5, 'S34']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["35"] = [5, 'S35']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["36"] = [5, 'S36']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["37"] = [5, 'S37']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["38"] = [5, 'S38']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["39"] = [5, 'S39']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["40"] = [5, 'S40']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["41"] = [5, 'S41']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["42"] = [5, 'S42']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["43"] = [5, 'S43']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["44"] = [5, 'S44']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["45"] = [5, 'S45']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["46"] = [5, 'S46']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["47"] = [5, 'S47']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["48"] = [5, 'S48']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["49"] = [5, 'S49']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["50"] = [5, 'S50']; +DEV_LIST.push('HmIP-SMI55-A'); +DEV_DESCRIPTION["HmIP-SMI55-A"] = "HmIP-SMI55"; +DEV_PATHS["HmIP-SMI55-A"] = new Object(); +DEV_PATHS["HmIP-SMI55-A"]["50"] = "/config/img/devices/50/168_hmip-smi55_thumb.png"; +DEV_PATHS["HmIP-SMI55-A"]["250"] = "/config/img/devices/250/168_hmip-smi55.png"; +DEV_HIGHLIGHT["HmIP-SMI55-A"] = new Object(); +DEV_HIGHLIGHT["HmIP-SMI55-A"]["2"] = [4, 0.540, 0.188, 0.04, 0.044]; +DEV_HIGHLIGHT["HmIP-SMI55-A"]["1"] = [4, 0.540, 0.820, 0.04, 0.044]; +DEV_LIST.push('ELV-SH-SW1-BAT'); +DEV_DESCRIPTION["ELV-SH-SW1-BAT"] = "HmIP-PCBS-BAT"; +DEV_PATHS["ELV-SH-SW1-BAT"] = new Object(); +DEV_PATHS["ELV-SH-SW1-BAT"]["50"] = "/config/img/devices/50/228_elv-sh-sw1-bat_thumb.png"; +DEV_PATHS["ELV-SH-SW1-BAT"]["250"] = "/config/img/devices/250/228_elv-sh-sw1-bat.png"; +DEV_HIGHLIGHT["ELV-SH-SW1-BAT"] = new Object(); +DEV_LIST.push('Wired-LAN-Sniffer'); +DEV_DESCRIPTION["Wired-LAN-Sniffer"] = "Wired-LAN-Sniffer"; +DEV_PATHS["Wired-LAN-Sniffer"] = new Object(); +DEV_PATHS["Wired-LAN-Sniffer"]["50"] = "/config/img/devices/50/162_hmipw-drap_thumb.png"; +DEV_PATHS["Wired-LAN-Sniffer"]["250"] = "/config/img/devices/250/162_hmipw-drap.png"; +DEV_HIGHLIGHT["Wired-LAN-Sniffer"] = new Object(); +DEV_LIST.push('HM-Sec-SD-2'); +DEV_DESCRIPTION["HM-Sec-SD-2"] = "HM-Sec-SD"; +DEV_PATHS["HM-Sec-SD-2"] = new Object(); +DEV_PATHS["HM-Sec-SD-2"]["50"] = "/config/img/devices/50/104_hm-sec-sd-2_thumb.png"; +DEV_PATHS["HM-Sec-SD-2"]["250"] = "/config/img/devices/250/104_hm-sec-sd-2.png"; +DEV_HIGHLIGHT["HM-Sec-SD-2"] = new Object(); +DEV_LIST.push('HM-Sec-SC'); +DEV_DESCRIPTION["HM-Sec-SC"] = "HM-Sec-SC"; +DEV_PATHS["HM-Sec-SC"] = new Object(); +DEV_PATHS["HM-Sec-SC"]["50"] = "/config/img/devices/50/16_hm-sec-sc_thumb.png"; +DEV_PATHS["HM-Sec-SC"]["250"] = "/config/img/devices/250/16_hm-sec-sc.png"; +DEV_HIGHLIGHT["HM-Sec-SC"] = new Object(); +DEV_LIST.push('HMW-LC-Sw2-DR'); +DEV_DESCRIPTION["HMW-LC-Sw2-DR"] = "HMW-LC-Sw2-DR"; +DEV_PATHS["HMW-LC-Sw2-DR"] = new Object(); +DEV_PATHS["HMW-LC-Sw2-DR"]["50"] = "/config/img/devices/50/26_hmw-lc-sw2-dr_thumb.png"; +DEV_PATHS["HMW-LC-Sw2-DR"]["250"] = "/config/img/devices/250/26_hmw-lc-sw2-dr.png"; +DEV_HIGHLIGHT["HMW-LC-Sw2-DR"] = new Object(); +DEV_HIGHLIGHT["HMW-LC-Sw2-DR"]["1"] = [2, 0.448, 0.764, 0.048, 0.064]; +DEV_HIGHLIGHT["HMW-LC-Sw2-DR"]["2"] = [2, 0.496, 0.764, 0.052, 0.068]; +DEV_HIGHLIGHT["HMW-LC-Sw2-DR"]["3"] = [2, 0.232, 0.384, 0.104, 0.068]; +DEV_HIGHLIGHT["HMW-LC-Sw2-DR"]["4"] = [2, 0.448, 0.384, 0.104, 0.068]; +DEV_LIST.push('HM-LC-Bl1-SM'); +DEV_DESCRIPTION["HM-LC-Bl1-SM"] = "HM-LC-Bl1-SM"; +DEV_PATHS["HM-LC-Bl1-SM"] = new Object(); +DEV_PATHS["HM-LC-Bl1-SM"]["50"] = "/config/img/devices/50/6_hm-lc-bl1-sm_thumb.png"; +DEV_PATHS["HM-LC-Bl1-SM"]["250"] = "/config/img/devices/250/6_hm-lc-bl1-sm.png"; +DEV_HIGHLIGHT["HM-LC-Bl1-SM"] = new Object(); +DEV_LIST.push('HmIP-HAP-A'); +DEV_DESCRIPTION["HmIP-HAP-A"] = "HmIP-HAP"; +DEV_PATHS["HmIP-HAP-A"] = new Object(); +DEV_PATHS["HmIP-HAP-A"]["50"] = "/config/img/devices/50/CCU3_thumb.png"; +DEV_PATHS["HmIP-HAP-A"]["250"] = "/config/img/devices/250/CCU3.png"; +DEV_HIGHLIGHT["HmIP-HAP-A"] = new Object(); +DEV_LIST.push('HmIP-PSM-2'); +DEV_DESCRIPTION["HmIP-PSM-2"] = "PSM"; +DEV_PATHS["HmIP-PSM-2"] = new Object(); +DEV_PATHS["HmIP-PSM-2"]["50"] = "/config/img/devices/50/113_hmip-psm_thumb.png"; +DEV_PATHS["HmIP-PSM-2"]["250"] = "/config/img/devices/250/113_hmip-psm.png"; +DEV_HIGHLIGHT["HmIP-PSM-2"] = new Object(); +DEV_LIST.push('HM-LC-Dim1T-FM-2'); +DEV_DESCRIPTION["HM-LC-Dim1T-FM-2"] = "HM-LC-Dim1T-FM"; +DEV_PATHS["HM-LC-Dim1T-FM-2"] = new Object(); +DEV_PATHS["HM-LC-Dim1T-FM-2"]["50"] = "/config/img/devices/50/65_hm-lc-dim1t-fm_thumb.png"; +DEV_PATHS["HM-LC-Dim1T-FM-2"]["250"] = "/config/img/devices/250/65_hm-lc-dim1t-fm.png"; +DEV_HIGHLIGHT["HM-LC-Dim1T-FM-2"] = new Object(); +DEV_LIST.push('HmIP-SMO-A'); +DEV_DESCRIPTION["HmIP-SMO-A"] = "SMO"; +DEV_PATHS["HmIP-SMO-A"] = new Object(); +DEV_PATHS["HmIP-SMO-A"]["50"] = "/config/img/devices/50/132_hmip-smo_thumb.png"; +DEV_PATHS["HmIP-SMO-A"]["250"] = "/config/img/devices/250/132_hmip-smo.png"; +DEV_HIGHLIGHT["HmIP-SMO-A"] = new Object(); +DEV_LIST.push('HmIP-SWDO-2'); +DEV_DESCRIPTION["HmIP-SWDO-2"] = "HmIP-SWDO"; +DEV_PATHS["HmIP-SWDO-2"] = new Object(); +DEV_PATHS["HmIP-SWDO-2"]["50"] = "/config/img/devices/50/118_hmip-swdo_thumb.png"; +DEV_PATHS["HmIP-SWDO-2"]["250"] = "/config/img/devices/250/118_hmip-swdo.png"; +DEV_HIGHLIGHT["HmIP-SWDO-2"] = new Object(); +DEV_LIST.push('HmIP-SWO-PL'); +DEV_DESCRIPTION["HmIP-SWO-PL"] = "HmIP-SWO-PL"; +DEV_PATHS["HmIP-SWO-PL"] = new Object(); +DEV_PATHS["HmIP-SWO-PL"]["50"] = "/config/img/devices/50/170_hmip-swo-pl_thumb.png"; +DEV_PATHS["HmIP-SWO-PL"]["250"] = "/config/img/devices/250/170_hmip-swo-pl.png"; +DEV_HIGHLIGHT["HmIP-SWO-PL"] = new Object(); +DEV_LIST.push('HM-PB-4Dis-WM-2'); +DEV_DESCRIPTION["HM-PB-4Dis-WM-2"] = "HM-PB-4Dis-WM-2"; +DEV_PATHS["HM-PB-4Dis-WM-2"] = new Object(); +DEV_PATHS["HM-PB-4Dis-WM-2"]["50"] = "/config/img/devices/50/70_hm-pb-4dis-wm_thumb.png"; +DEV_PATHS["HM-PB-4Dis-WM-2"]["250"] = "/config/img/devices/250/70_hm-pb-4dis-wm.png"; +DEV_HIGHLIGHT["HM-PB-4Dis-WM-2"] = new Object(); +DEV_HIGHLIGHT["HM-PB-4Dis-WM-2"]["2"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM-2"]["1"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM-2"]["4"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM-2"]["3"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM-2"]["6"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM-2"]["5"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM-2"]["8"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM-2"]["7"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM-2"]["10"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM-2"]["9"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM-2"]["12"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM-2"]["11"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM-2"]["14"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM-2"]["13"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM-2"]["16"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM-2"]["15"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM-2"]["18"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM-2"]["17"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM-2"]["20"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM-2"]["19"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_LIST.push('HM-LC-Dim1L-Pl'); +DEV_DESCRIPTION["HM-LC-Dim1L-Pl"] = "HM-LC-Dim1L-Pl"; +DEV_PATHS["HM-LC-Dim1L-Pl"] = new Object(); +DEV_PATHS["HM-LC-Dim1L-Pl"]["50"] = "/config/img/devices/50/OM55_DimmerSwitch_thumb.png"; +DEV_PATHS["HM-LC-Dim1L-Pl"]["250"] = "/config/img/devices/250/OM55_DimmerSwitch.png"; +DEV_HIGHLIGHT["HM-LC-Dim1L-Pl"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Dim1L-Pl"]["1_part1"] = [2, 0.548, 0.468, 0.072, 0.052]; +DEV_HIGHLIGHT["HM-LC-Dim1L-Pl"]["1_part2"] = [2, 0.612, 0.452, 0.028, 0.056]; +DEV_HIGHLIGHT["HM-LC-Dim1L-Pl"]["1"] = [5, '1_part1', '1_part2']; +DEV_LIST.push('HmIP-DRDI3'); +DEV_DESCRIPTION["HmIP-DRDI3"] = "HmIP-DRDI3"; +DEV_PATHS["HmIP-DRDI3"] = new Object(); +DEV_PATHS["HmIP-DRDI3"]["50"] = "/config/img/devices/50/204_hmip-drdi3_thumb.png"; +DEV_PATHS["HmIP-DRDI3"]["250"] = "/config/img/devices/250/204_hmip-drdi3.png"; +DEV_HIGHLIGHT["HmIP-DRDI3"] = new Object(); +DEV_LIST.push('HmIP-PDT'); +DEV_DESCRIPTION["HmIP-PDT"] = "PDT"; +DEV_PATHS["HmIP-PDT"] = new Object(); +DEV_PATHS["HmIP-PDT"]["50"] = "/config/img/devices/50/113_hmip-psm_thumb.png"; +DEV_PATHS["HmIP-PDT"]["250"] = "/config/img/devices/250/113_hmip-psm.png"; +DEV_HIGHLIGHT["HmIP-PDT"] = new Object(); +DEV_LIST.push('HmIP-BROLL-2'); +DEV_DESCRIPTION["HmIP-BROLL-2"] = "HmIP-BROLL-2"; +DEV_PATHS["HmIP-BROLL-2"] = new Object(); +DEV_PATHS["HmIP-BROLL-2"]["50"] = "/config/img/devices/50/PushButton-2ch-wm_thumb.png"; +DEV_PATHS["HmIP-BROLL-2"]["250"] = "/config/img/devices/250/PushButton-2ch-wm.png"; +DEV_HIGHLIGHT["HmIP-BROLL-2"] = new Object(); +DEV_HIGHLIGHT["HmIP-BROLL-2"]["2"] = [2, 0.244, 0.312, 0.428, 0.168]; +DEV_HIGHLIGHT["HmIP-BROLL-2"]["1"] = [2, 0.244, 0.56, 0.428, 0.168]; +DEV_HIGHLIGHT["HmIP-BROLL-2"]["1+2"] = [2, 0.244, 0.308, 0.428, 0.416]; +DEV_LIST.push('HM-Sec-WDS'); +DEV_DESCRIPTION["HM-Sec-WDS"] = "HM-Sec-WDS"; +DEV_PATHS["HM-Sec-WDS"] = new Object(); +DEV_PATHS["HM-Sec-WDS"]["50"] = "/config/img/devices/50/49_hm-sec-wds_thumb.png"; +DEV_PATHS["HM-Sec-WDS"]["250"] = "/config/img/devices/250/49_hm-sec-wds.png"; +DEV_HIGHLIGHT["HM-Sec-WDS"] = new Object(); +DEV_LIST.push('HmIP-eTRV-3'); +DEV_DESCRIPTION["HmIP-eTRV-3"] = "TRV"; +DEV_PATHS["HmIP-eTRV-3"] = new Object(); +DEV_PATHS["HmIP-eTRV-3"]["50"] = "/config/img/devices/50/234_hmip-etrv-3_thumb.png"; +DEV_PATHS["HmIP-eTRV-3"]["250"] = "/config/img/devices/250/234_hmip-etrv-3.png"; +DEV_HIGHLIGHT["HmIP-eTRV-3"] = new Object(); +DEV_LIST.push('HM-CC-SCD'); +DEV_DESCRIPTION["HM-CC-SCD"] = "HM-CC-SCD"; +DEV_PATHS["HM-CC-SCD"] = new Object(); +DEV_PATHS["HM-CC-SCD"]["50"] = "/config/img/devices/50/57_hm-cc-scd_thumb.png"; +DEV_PATHS["HM-CC-SCD"]["250"] = "/config/img/devices/250/57_hm-cc-scd.png"; +DEV_HIGHLIGHT["HM-CC-SCD"] = new Object(); +DEV_LIST.push('HM-LC-Dim1T-CV'); +DEV_DESCRIPTION["HM-LC-Dim1T-CV"] = "HM-LC-Dim1T-CV"; +DEV_PATHS["HM-LC-Dim1T-CV"] = new Object(); +DEV_PATHS["HM-LC-Dim1T-CV"]["50"] = "/config/img/devices/50/66_hm-lc-dim1t-cv_thumb.png"; +DEV_PATHS["HM-LC-Dim1T-CV"]["250"] = "/config/img/devices/250/66_hm-lc-dim1t-cv.png"; +DEV_HIGHLIGHT["HM-LC-Dim1T-CV"] = new Object(); +DEV_LIST.push('HM-LC-Dim1T-Pl'); +DEV_DESCRIPTION["HM-LC-Dim1T-Pl"] = "HM-LC-Dim1T-Pl"; +DEV_PATHS["HM-LC-Dim1T-Pl"] = new Object(); +DEV_PATHS["HM-LC-Dim1T-Pl"]["50"] = "/config/img/devices/50/OM55_DimmerSwitch_thumb.png"; +DEV_PATHS["HM-LC-Dim1T-Pl"]["250"] = "/config/img/devices/250/OM55_DimmerSwitch.png"; +DEV_HIGHLIGHT["HM-LC-Dim1T-Pl"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Dim1T-Pl"]["1_part1"] = [2, 0.548, 0.468, 0.072, 0.052]; +DEV_HIGHLIGHT["HM-LC-Dim1T-Pl"]["1_part2"] = [2, 0.612, 0.452, 0.028, 0.056]; +DEV_HIGHLIGHT["HM-LC-Dim1T-Pl"]["1"] = [5, '1_part1', '1_part2']; +DEV_LIST.push('HmIP-DRG-DALI'); +DEV_DESCRIPTION["HmIP-DRG-DALI"] = "HmIP-DRG-DALI"; +DEV_PATHS["HmIP-DRG-DALI"] = new Object(); +DEV_PATHS["HmIP-DRG-DALI"]["50"] = "/config/img/devices/50/211_hmip-drg-dali_thumb.png"; +DEV_PATHS["HmIP-DRG-DALI"]["250"] = "/config/img/devices/250/211_hmip-drg-dali.png"; +DEV_HIGHLIGHT["HmIP-DRG-DALI"] = new Object(); +DEV_LIST.push('HM-LC-Dim2T-SM-644'); +DEV_DESCRIPTION["HM-LC-Dim2T-SM-644"] = "HM-LC-Dim2T-SM"; +DEV_PATHS["HM-LC-Dim2T-SM-644"] = new Object(); +DEV_PATHS["HM-LC-Dim2T-SM-644"]["50"] = "/config/img/devices/50/64_hm-lc-dim2T-sm_thumb.png"; +DEV_PATHS["HM-LC-Dim2T-SM-644"]["250"] = "/config/img/devices/250/64_hm-lc-dim2T-sm.png"; +DEV_HIGHLIGHT["HM-LC-Dim2T-SM-644"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Dim2T-SM-644"]["1_Part1"] = [6, 0.539, 0.864, 0.539, 0.948, 0.012]; +DEV_HIGHLIGHT["HM-LC-Dim2T-SM-644"]["1_Part2"] = [6, 0.539, 0.948, 0.49, 0.884, 0.012]; +DEV_HIGHLIGHT["HM-LC-Dim2T-SM-644"]["1_Part3"] = [6, 0.539, 0.948, 0.588, 0.884, 0.012]; +DEV_HIGHLIGHT["HM-LC-Dim2T-SM-644"]["1_Arrow"] = [5, '1_Part1', '1_Part2', '1_Part3']; +DEV_HIGHLIGHT["HM-LC-Dim2T-SM-644"]["2_Arrow"] = [7, '1_Arrow', 0.179, 0]; +DEV_HIGHLIGHT["HM-LC-Dim2T-SM-644"]["1_Key"] = [4, 0.25, 0.26, 0.04, 0.044]; +DEV_HIGHLIGHT["HM-LC-Dim2T-SM-644"]["2_Key"] = [4, 0.328, 0.26, 0.04, 0.044]; +DEV_HIGHLIGHT["HM-LC-Dim2T-SM-644"]["1"] = [5, '1_Arrow', '1_Key']; +DEV_HIGHLIGHT["HM-LC-Dim2T-SM-644"]["2"] = [5, '2_Arrow', '2_Key']; +DEV_LIST.push('HmIP-KRCK'); +DEV_DESCRIPTION["HmIP-KRCK"] = "HmIP-KRCK"; +DEV_PATHS["HmIP-KRCK"] = new Object(); +DEV_PATHS["HmIP-KRCK"]["50"] = "/config/img/devices/50/84_hm-rc-4-x_thumb.png"; +DEV_PATHS["HmIP-KRCK"]["250"] = "/config/img/devices/250/86_hm-rc-key4-3.png"; +DEV_HIGHLIGHT["HmIP-KRCK"] = new Object(); +DEV_HIGHLIGHT["HmIP-KRCK"]["arrow_part1"] = [6, 0.312, 0.288, 0.416, 0.288, 0.012]; +DEV_HIGHLIGHT["HmIP-KRCK"]["arrow_part2"] = [6, 0.312, 0.288, 0.352, 0.248, 0.012]; +DEV_HIGHLIGHT["HmIP-KRCK"]["arrow_part3"] = [6, 0.312, 0.288, 0.352, 0.328, 0.012]; +DEV_HIGHLIGHT["HmIP-KRCK"]["Arrow"] = [5, 'arrow_part1', 'arrow_part2', 'arrow_part3']; +DEV_HIGHLIGHT["HmIP-KRCK"]["1_Arrow"] = [7, 'Arrow', 0.25, 0.0]; +DEV_HIGHLIGHT["HmIP-KRCK"]["2_Arrow"] = [7, 'Arrow', 0.238, 0.156]; +DEV_HIGHLIGHT["HmIP-KRCK"]["3_Arrow"] = [7, 'Arrow', 0.228, 0.312]; +DEV_HIGHLIGHT["HmIP-KRCK"]["4_Arrow"] = [7, 'Arrow', 0.212, 0.468]; +DEV_HIGHLIGHT["HmIP-KRCK"]["1"] = [5, '2_Arrow']; +DEV_HIGHLIGHT["HmIP-KRCK"]["2"] = [5, '1_Arrow']; +DEV_HIGHLIGHT["HmIP-KRCK"]["3"] = [5, '4_Arrow']; +DEV_HIGHLIGHT["HmIP-KRCK"]["4"] = [5, '3_Arrow']; +DEV_HIGHLIGHT["HmIP-KRCK"]["1+2"] = [5, '1_Arrow', '2_Arrow']; +DEV_HIGHLIGHT["HmIP-KRCK"]["3+4"] = [5, '3_Arrow', '4_Arrow']; +DEV_LIST.push('HMW-Sen-SC-12-FM'); +DEV_DESCRIPTION["HMW-Sen-SC-12-FM"] = "HMW-Sen-SC-12-FM"; +DEV_PATHS["HMW-Sen-SC-12-FM"] = new Object(); +DEV_PATHS["HMW-Sen-SC-12-FM"]["50"] = "/config/img/devices/50/58_hmw-sen-sc-12-fm_thumb.png"; +DEV_PATHS["HMW-Sen-SC-12-FM"]["250"] = "/config/img/devices/250/58_hmw-sen-sc-12-fm.png"; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"] = new Object(); +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["1_num"] = [3, 0.744, 0.636, '1', 0.164, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["1_line"] = [6, 0.77, 0.055, 0.860, 0.055, 0.016]; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["1"] = [5, '1_num', '1_line']; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["2_num"] = [3, 0.744, 0.636, '2', 0.164, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["2_line"] = [6, 0.77, 0.115, 0.86, 0.115, 0.016]; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["2"] = [5, '2_num', '2_line']; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["3_num"] = [3, 0.744, 0.636, '3', 0.164, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["3_line"] = [6, 0.77, 0.173, 0.86, 0.173, 0.016]; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["3"] = [5, '3_num', '3_line']; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["4_num"] = [3, 0.744, 0.636, '4', 0.164, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["4_line"] = [6, 0.77, 0.226, 0.86, 0.226, 0.016]; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["4"] = [5, '4_num', '4_line']; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["5_num"] = [3, 0.744, 0.636, '5', 0.164, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["5_line"] = [6, 0.77, 0.288, 0.86, 0.288, 0.016]; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["5"] = [5, '5_num', '5_line']; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["6_num"] = [3, 0.744, 0.636, '6', 0.164, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["6_line"] = [6, 0.77, 0.348, 0.86, 0.348, 0.016]; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["6"] = [5, '6_num', '6_line']; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["7_num"] = [3, 0.744, 0.636, '7', 0.164, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["7_line"] = [6, 0.77, 0.403, 0.86, 0.403, 0.016]; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["7"] = [5, '7_num', '7_line']; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["8_num"] = [3, 0.744, 0.636, '8', 0.164, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["8_arc"] = [4, 0.370, 0.730, 0.036, 0.036, 0.036]; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["8"] = [5, '8_num', '8_arc']; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["9_num"] = [3, 0.744, 0.636, '9', 0.164, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["9_arc"] = [4, 0.3895, 0.685, 0.036, 0.036, 0.0368]; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["9"] = [5, '9_num', '9_arc']; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["10_num"] = [3, 0.744, 0.636, '10', 0.164, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["10_arc"] = [4, 0.41, 0.64, 0.036, 0.036, 0.036]; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["10"] = [5, '10_num', '10_arc']; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["11_num"] = [3, 0.744, 0.636, '11', 0.164, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["11_arc"] = [4, 0.43, 0.589, 0.036, 0.036, 0.036]; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["11"] = [5, '11_num', '11_arc']; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["12_num"] = [3, 0.744, 0.636, '12', 0.164, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["12_arc"] = [4, 0.45, 0.542, 0.036, 0.036, 0.036]; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["12"] = [5, '12_num', '12_arc']; +DEV_LIST.push('HM-RC-Key3-B'); +DEV_DESCRIPTION["HM-RC-Key3-B"] = "HM-RC-Key3-B"; +DEV_PATHS["HM-RC-Key3-B"] = new Object(); +DEV_PATHS["HM-RC-Key3-B"]["50"] = "/config/img/devices/50/23_hm-rc-key3-b_thumb.png"; +DEV_PATHS["HM-RC-Key3-B"]["250"] = "/config/img/devices/250/23_hm-rc-key3-b.png"; +DEV_HIGHLIGHT["HM-RC-Key3-B"] = new Object(); +DEV_HIGHLIGHT["HM-RC-Key3-B"]["1"] = [4, 0.252, 0.2, 0.16, 0.18]; +DEV_HIGHLIGHT["HM-RC-Key3-B"]["2"] = [4, 0.492, 0.2, 0.16, 0.18]; +DEV_HIGHLIGHT["HM-RC-Key3-B"]["3"] = [4, 0.34, 0.484, 0.228, 0.252]; +DEV_HIGHLIGHT["HM-RC-Key3-B"]["1+2"] = [5, '1', '2']; +DEV_LIST.push('HM-LC-DW-WM'); +DEV_DESCRIPTION["HM-LC-DW-WM"] = "HM-LC-DW-WM"; +DEV_PATHS["HM-LC-DW-WM"] = new Object(); +DEV_PATHS["HM-LC-DW-WM"]["50"] = "/config/img/devices/50/150_hm-lc-dw-wm_thumb.png"; +DEV_PATHS["HM-LC-DW-WM"]["250"] = "/config/img/devices/250/150_hm-lc-dw-wm.png"; +DEV_HIGHLIGHT["HM-LC-DW-WM"] = new Object(); +DEV_LIST.push('HmIP-eTRV-B-UK-2'); +DEV_DESCRIPTION["HmIP-eTRV-B-UK-2"] = "TRV-B-UK"; +DEV_PATHS["HmIP-eTRV-B-UK-2"] = new Object(); +DEV_PATHS["HmIP-eTRV-B-UK-2"]["50"] = "/config/img/devices/50/209_hmip-etrv-b-uk_thumb.png"; +DEV_PATHS["HmIP-eTRV-B-UK-2"]["250"] = "/config/img/devices/250/209_hmip-etrv-b-uk.png"; +DEV_HIGHLIGHT["HmIP-eTRV-B-UK-2"] = new Object(); +DEV_LIST.push('HM-RC-Key4-2'); +DEV_DESCRIPTION["HM-RC-Key4-2"] = "HM-RC-Key4-2"; +DEV_PATHS["HM-RC-Key4-2"] = new Object(); +DEV_PATHS["HM-RC-Key4-2"]["50"] = "/config/img/devices/50/85_hm-rc-key4-2_thumb.png"; +DEV_PATHS["HM-RC-Key4-2"]["250"] = "/config/img/devices/250/85_hm-rc-key4-2.png"; +DEV_HIGHLIGHT["HM-RC-Key4-2"] = new Object(); +DEV_HIGHLIGHT["HM-RC-Key4-2"]["arrow_part1"] = [6, 0.312, 0.288, 0.416, 0.288, 0.012]; +DEV_HIGHLIGHT["HM-RC-Key4-2"]["arrow_part2"] = [6, 0.312, 0.288, 0.352, 0.248, 0.012]; +DEV_HIGHLIGHT["HM-RC-Key4-2"]["arrow_part3"] = [6, 0.312, 0.288, 0.352, 0.328, 0.012]; +DEV_HIGHLIGHT["HM-RC-Key4-2"]["1_Arrow"] = [5, 'arrow_part1', 'arrow_part2', 'arrow_part3']; +DEV_HIGHLIGHT["HM-RC-Key4-2"]["2_Arrow"] = [7, '1_Arrow', 0.028, 0.156]; +DEV_HIGHLIGHT["HM-RC-Key4-2"]["3_Arrow"] = [7, '1_Arrow', 0.028, 0.312]; +DEV_HIGHLIGHT["HM-RC-Key4-2"]["4_Arrow"] = [7, '1_Arrow', 0.012, 0.468]; +DEV_HIGHLIGHT["HM-RC-Key4-2"]["1"] = [5, '2_Arrow']; +DEV_HIGHLIGHT["HM-RC-Key4-2"]["2"] = [5, '1_Arrow']; +DEV_HIGHLIGHT["HM-RC-Key4-2"]["3"] = [5, '4_Arrow']; +DEV_HIGHLIGHT["HM-RC-Key4-2"]["4"] = [5, '3_Arrow']; +DEV_HIGHLIGHT["HM-RC-Key4-2"]["1+2"] = [5, '1_Arrow', '2_Arrow']; +DEV_HIGHLIGHT["HM-RC-Key4-2"]["3+4"] = [5, '3_Arrow', '4_Arrow']; +DEV_LIST.push('HmIP-PSM-CH'); +DEV_DESCRIPTION["HmIP-PSM-CH"] = "PSM-CH"; +DEV_PATHS["HmIP-PSM-CH"] = new Object(); +DEV_PATHS["HmIP-PSM-CH"]["50"] = "/config/img/devices/50/113_hmip-psm-ch_thumb.png"; +DEV_PATHS["HmIP-PSM-CH"]["250"] = "/config/img/devices/250/113_hmip-psm-ch.png"; +DEV_HIGHLIGHT["HmIP-PSM-CH"] = new Object(); +DEV_LIST.push('HM-LC-Dim1T-DR'); +DEV_DESCRIPTION["HM-LC-Dim1T-DR"] = "HM-LC-Dim1T-DR"; +DEV_PATHS["HM-LC-Dim1T-DR"] = new Object(); +DEV_PATHS["HM-LC-Dim1T-DR"]["50"] = "/config/img/devices/50/143_hm-lc-dim1t-dr_thumb.png"; +DEV_PATHS["HM-LC-Dim1T-DR"]["250"] = "/config/img/devices/250/143_hm-lc-dim1t-dr.png"; +DEV_HIGHLIGHT["HM-LC-Dim1T-DR"] = new Object(); +DEV_LIST.push('HM-LC-Sw1-SM-ATmega168'); +DEV_DESCRIPTION["HM-LC-Sw1-SM-ATmega168"] = "HM-LC-Sw1-SM-ATmega168"; +DEV_PATHS["HM-LC-Sw1-SM-ATmega168"] = new Object(); +DEV_PATHS["HM-LC-Sw1-SM-ATmega168"]["50"] = "/config/img/devices/50/8_hm-lc-sw1-sm_thumb.png"; +DEV_PATHS["HM-LC-Sw1-SM-ATmega168"]["250"] = "/config/img/devices/250/8_hm-lc-sw1-sm.png"; +DEV_HIGHLIGHT["HM-LC-Sw1-SM-ATmega168"] = new Object(); +DEV_LIST.push('HM-LC-Sw4-PCB-2'); +DEV_DESCRIPTION["HM-LC-Sw4-PCB-2"] = "HM-LC-Sw4-PCB"; +DEV_PATHS["HM-LC-Sw4-PCB-2"] = new Object(); +DEV_PATHS["HM-LC-Sw4-PCB-2"]["50"] = "/config/img/devices/50/46_hm-lc-sw4-pcb_thumb.png"; +DEV_PATHS["HM-LC-Sw4-PCB-2"]["250"] = "/config/img/devices/250/46_hm-lc-sw4-pcb.png"; +DEV_HIGHLIGHT["HM-LC-Sw4-PCB-2"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Sw4-PCB-2"]["Channel1"] = [2, 0.176, 0.78, 0.068, 0.064]; +DEV_HIGHLIGHT["HM-LC-Sw4-PCB-2"]["Channel2"] = [2, 0.244, 0.78, 0.068, 0.064]; +DEV_HIGHLIGHT["HM-LC-Sw4-PCB-2"]["Channel3"] = [2, 0.312, 0.78, 0.068, 0.064]; +DEV_HIGHLIGHT["HM-LC-Sw4-PCB-2"]["Channel4"] = [2, 0.38, 0.78, 0.068, 0.064]; +DEV_HIGHLIGHT["HM-LC-Sw4-PCB-2"]["1_val"] = [3, 0.372, 0.288, '1', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-LC-Sw4-PCB-2"]["2_val"] = [3, 0.372, 0.288, '2', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-LC-Sw4-PCB-2"]["3_val"] = [3, 0.372, 0.288, '3', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-LC-Sw4-PCB-2"]["4_val"] = [3, 0.372, 0.288, '4', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-LC-Sw4-PCB-2"]["Circle1"] = [4, 0.512, 0.784, 0.044, 0.044]; +DEV_HIGHLIGHT["HM-LC-Sw4-PCB-2"]["Circle2"] = [4, 0.570, 0.784, 0.044, 0.044]; +DEV_HIGHLIGHT["HM-LC-Sw4-PCB-2"]["Circle3"] = [4, 0.628, 0.784, 0.044, 0.044]; +DEV_HIGHLIGHT["HM-LC-Sw4-PCB-2"]["Circle4"] = [4, 0.686, 0.784, 0.044, 0.044]; +DEV_HIGHLIGHT["HM-LC-Sw4-PCB-2"]["1"] = [5, 'Channel1', '1_val', 'Circle1']; +DEV_HIGHLIGHT["HM-LC-Sw4-PCB-2"]["2"] = [5, 'Channel2', '2_val', 'Circle2']; +DEV_HIGHLIGHT["HM-LC-Sw4-PCB-2"]["3"] = [5, 'Channel3', '3_val', 'Circle3']; +DEV_HIGHLIGHT["HM-LC-Sw4-PCB-2"]["4"] = [5, 'Channel4', '4_val', 'Circle4']; +DEV_LIST.push('HmIP-SWO-B'); +DEV_DESCRIPTION["HmIP-SWO-B"] = "HmIP-SWO-B"; +DEV_PATHS["HmIP-SWO-B"] = new Object(); +DEV_PATHS["HmIP-SWO-B"]["50"] = "/config/img/devices/50/171_hmip-swo-b_thumb.png"; +DEV_PATHS["HmIP-SWO-B"]["250"] = "/config/img/devices/250/171_hmip-swo-b.png"; +DEV_HIGHLIGHT["HmIP-SWO-B"] = new Object(); +DEV_LIST.push('HMW-Sys-PS7-DR'); +DEV_DESCRIPTION["HMW-Sys-PS7-DR"] = "HMW-Sys-PS7-DR"; +DEV_PATHS["HMW-Sys-PS7-DR"] = new Object(); +DEV_PATHS["HMW-Sys-PS7-DR"]["50"] = "/config/img/devices/50/36_hmw-sys-ps7-dr_thumb.png"; +DEV_PATHS["HMW-Sys-PS7-DR"]["250"] = "/config/img/devices/250/36_hmw-sys-ps7-dr.png"; +DEV_HIGHLIGHT["HMW-Sys-PS7-DR"] = new Object(); +DEV_LIST.push('HmIP-SMO-2'); +DEV_DESCRIPTION["HmIP-SMO-2"] = "SMO"; +DEV_PATHS["HmIP-SMO-2"] = new Object(); +DEV_PATHS["HmIP-SMO-2"]["50"] = "/config/img/devices/50/132_hmip-smo_thumb.png"; +DEV_PATHS["HmIP-SMO-2"]["250"] = "/config/img/devices/250/132_hmip-smo.png"; +DEV_HIGHLIGHT["HmIP-SMO-2"] = new Object(); +DEV_LIST.push('HmIPW-DRD3'); +DEV_DESCRIPTION["HmIPW-DRD3"] = "HmIPW-DRD3"; +DEV_PATHS["HmIPW-DRD3"] = new Object(); +DEV_PATHS["HmIPW-DRD3"]["50"] = "/config/img/devices/50/166_hmipw-drd3_thumb.png"; +DEV_PATHS["HmIPW-DRD3"]["250"] = "/config/img/devices/250/166_hmipw-drd3.png"; +DEV_HIGHLIGHT["HmIPW-DRD3"] = new Object(); +DEV_LIST.push('WS550'); +DEV_DESCRIPTION["WS550"] = "Funk- Wetterstation"; +DEV_PATHS["WS550"] = new Object(); +DEV_PATHS["WS550"]["50"] = "/config/img/devices/50/9_hm-ws550-us_thumb.png"; +DEV_PATHS["WS550"]["250"] = "/config/img/devices/250/9_hm-ws550-us.png"; +DEV_HIGHLIGHT["WS550"] = new Object(); +DEV_HIGHLIGHT["WS550"]["1"] = [3, 0.440, 0.200, '1', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["WS550"]["2"] = [3, 0.440, 0.200, '2', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["WS550"]["3"] = [3, 0.440, 0.200, '3', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["WS550"]["4"] = [3, 0.440, 0.200, '4', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["WS550"]["5"] = [3, 0.440, 0.200, '5', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["WS550"]["6"] = [3, 0.440, 0.200, '6', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["WS550"]["7"] = [3, 0.440, 0.200, '7', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["WS550"]["8"] = [3, 0.440, 0.200, '8', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["WS550"]["9"] = [3, 0.440, 0.200, '9', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["WS550"]["10"] = [3, 0.405, 0.200, '10', 0.124, 'verdana', Font.BOLD]; +DEV_LIST.push('HM-LC-Dim1T-Pl-2'); +DEV_DESCRIPTION["HM-LC-Dim1T-Pl-2"] = "HM-LC-Dim1T-Pl-2"; +DEV_PATHS["HM-LC-Dim1T-Pl-2"] = new Object(); +DEV_PATHS["HM-LC-Dim1T-Pl-2"]["50"] = "/config/img/devices/50/OM55_DimmerSwitch_thumb.png"; +DEV_PATHS["HM-LC-Dim1T-Pl-2"]["250"] = "/config/img/devices/250/OM55_DimmerSwitch.png"; +DEV_HIGHLIGHT["HM-LC-Dim1T-Pl-2"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Dim1T-Pl-2"]["1_part1"] = [2, 0.548, 0.468, 0.072, 0.052]; +DEV_HIGHLIGHT["HM-LC-Dim1T-Pl-2"]["1_part2"] = [2, 0.612, 0.452, 0.028, 0.056]; +DEV_HIGHLIGHT["HM-LC-Dim1T-Pl-2"]["1"] = [5, '1_part1', '1_part2']; +DEV_LIST.push('HmIP-STE2-PCB'); +DEV_DESCRIPTION["HmIP-STE2-PCB"] = "HmIP-STE2-PCB"; +DEV_PATHS["HmIP-STE2-PCB"] = new Object(); +DEV_PATHS["HmIP-STE2-PCB"]["50"] = "/config/img/devices/50/210_hmip-ste2-pcb_thumb.png"; +DEV_PATHS["HmIP-STE2-PCB"]["250"] = "/config/img/devices/250/210_hmip-ste2-pcb.png"; +DEV_HIGHLIGHT["HmIP-STE2-PCB"] = new Object(); +DEV_LIST.push('HmIP-STH-A'); +DEV_DESCRIPTION["HmIP-STH-A"] = "STH"; +DEV_PATHS["HmIP-STH-A"] = new Object(); +DEV_PATHS["HmIP-STH-A"]["50"] = "/config/img/devices/50/146_hmip-sth_thumb.png"; +DEV_PATHS["HmIP-STH-A"]["250"] = "/config/img/devices/250/146_hmip-sth.png"; +DEV_HIGHLIGHT["HmIP-STH-A"] = new Object(); +DEV_LIST.push('HmIPW-STHD-A'); +DEV_DESCRIPTION["HmIPW-STHD-A"] = "HmIPW-STHD"; +DEV_PATHS["HmIPW-STHD-A"] = new Object(); +DEV_PATHS["HmIPW-STHD-A"]["50"] = "/config/img/devices/50/147_hmip-sthd_thumb.png"; +DEV_PATHS["HmIPW-STHD-A"]["250"] = "/config/img/devices/250/147_hmip-sthd.png"; +DEV_HIGHLIGHT["HmIPW-STHD-A"] = new Object(); +DEV_LIST.push('HM-Sec-Key-O'); +DEV_DESCRIPTION["HM-Sec-Key-O"] = "HM-Sec-Key-O"; +DEV_PATHS["HM-Sec-Key-O"] = new Object(); +DEV_PATHS["HM-Sec-Key-O"]["50"] = "/config/img/devices/50/14_hm-sec-key_thumb.png"; +DEV_PATHS["HM-Sec-Key-O"]["250"] = "/config/img/devices/250/14_hm-sec-key.png"; +DEV_HIGHLIGHT["HM-Sec-Key-O"] = new Object(); +DEV_LIST.push('ZEL STG RM DWT 10'); +DEV_DESCRIPTION["ZEL STG RM DWT 10"] = "ZEL_STG_RM_DWT_10"; +DEV_PATHS["ZEL STG RM DWT 10"] = new Object(); +DEV_PATHS["ZEL STG RM DWT 10"]["50"] = "/config/img/devices/50/70_hm-pb-4dis-wm_thumb.png"; +DEV_PATHS["ZEL STG RM DWT 10"]["250"] = "/config/img/devices/250/70_hm-pb-4dis-wm.png"; +DEV_HIGHLIGHT["ZEL STG RM DWT 10"] = new Object(); +DEV_HIGHLIGHT["ZEL STG RM DWT 10"]["2"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["ZEL STG RM DWT 10"]["1"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["ZEL STG RM DWT 10"]["4"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["ZEL STG RM DWT 10"]["3"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["ZEL STG RM DWT 10"]["6"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["ZEL STG RM DWT 10"]["5"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["ZEL STG RM DWT 10"]["8"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["ZEL STG RM DWT 10"]["7"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["ZEL STG RM DWT 10"]["10"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["ZEL STG RM DWT 10"]["9"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["ZEL STG RM DWT 10"]["12"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["ZEL STG RM DWT 10"]["11"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["ZEL STG RM DWT 10"]["14"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["ZEL STG RM DWT 10"]["13"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["ZEL STG RM DWT 10"]["16"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["ZEL STG RM DWT 10"]["15"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["ZEL STG RM DWT 10"]["18"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["ZEL STG RM DWT 10"]["17"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["ZEL STG RM DWT 10"]["20"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["ZEL STG RM DWT 10"]["19"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_LIST.push('HmIPW-SCTHD'); +DEV_DESCRIPTION["HmIPW-SCTHD"] = "HmIPW-SCTHD"; +DEV_PATHS["HmIPW-SCTHD"] = new Object(); +DEV_PATHS["HmIPW-SCTHD"]["50"] = "/config/img/devices/50/212_hmipw-scthd_thumb.png"; +DEV_PATHS["HmIPW-SCTHD"]["250"] = "/config/img/devices/250/212_hmipw-scthd.png"; +DEV_HIGHLIGHT["HmIPW-SCTHD"] = new Object(); +DEV_LIST.push('HM-TC-IT-WM-W-EU'); +DEV_DESCRIPTION["HM-TC-IT-WM-W-EU"] = "HM-TC-IT-WM-W-EU"; +DEV_PATHS["HM-TC-IT-WM-W-EU"] = new Object(); +DEV_PATHS["HM-TC-IT-WM-W-EU"]["50"] = "/config/img/devices/50/96_hm-tc-it-wm-w-eu_thumb.png"; +DEV_PATHS["HM-TC-IT-WM-W-EU"]["250"] = "/config/img/devices/250/96_hm-tc-it-wm-w-eu.png"; +DEV_HIGHLIGHT["HM-TC-IT-WM-W-EU"] = new Object(); +DEV_LIST.push('HmIPW-STH-A'); +DEV_DESCRIPTION["HmIPW-STH-A"] = "HmIPW-STH"; +DEV_PATHS["HmIPW-STH-A"] = new Object(); +DEV_PATHS["HmIPW-STH-A"]["50"] = "/config/img/devices/50/146_hmip-sth_thumb.png"; +DEV_PATHS["HmIPW-STH-A"]["250"] = "/config/img/devices/250/146_hmip-sth.png"; +DEV_HIGHLIGHT["HmIPW-STH-A"] = new Object(); +DEV_LIST.push('HM-Sec-Key-S'); +DEV_DESCRIPTION["HM-Sec-Key-S"] = "HM-Sec-Key-S"; +DEV_PATHS["HM-Sec-Key-S"] = new Object(); +DEV_PATHS["HM-Sec-Key-S"]["50"] = "/config/img/devices/50/14_hm-sec-key_thumb.png"; +DEV_PATHS["HM-Sec-Key-S"]["250"] = "/config/img/devices/250/14_hm-sec-key.png"; +DEV_HIGHLIGHT["HM-Sec-Key-S"] = new Object(); +DEV_LIST.push('263 167'); +DEV_DESCRIPTION["263 167"] = "263_167"; +DEV_PATHS["263 167"] = new Object(); +DEV_PATHS["263 167"]["50"] = "/config/img/devices/50/51_hm-sec-sd_thumb.png"; +DEV_PATHS["263 167"]["250"] = "/config/img/devices/250/51_hm-sec-sd.png"; +DEV_HIGHLIGHT["263 167"] = new Object(); +DEV_LIST.push('HmIPW-WGD-PL'); +DEV_DESCRIPTION["HmIPW-WGD-PL"] = "HmIPW-WGD-PL"; +DEV_PATHS["HmIPW-WGD-PL"] = new Object(); +DEV_PATHS["HmIPW-WGD-PL"]["50"] = "/config/img/devices/50/222_hmipw-wgd_thumb.png"; +DEV_PATHS["HmIPW-WGD-PL"]["250"] = "/config/img/devices/250/222_hmipw-wgd.png"; +DEV_HIGHLIGHT["HmIPW-WGD-PL"] = new Object(); +DEV_LIST.push('HM-SwI-3-FM'); +DEV_DESCRIPTION["HM-SwI-3-FM"] = "HM-SwI-3-FM"; +DEV_PATHS["HM-SwI-3-FM"] = new Object(); +DEV_PATHS["HM-SwI-3-FM"]["50"] = "/config/img/devices/50/39_hm-swi-3-fm_thumb.png"; +DEV_PATHS["HM-SwI-3-FM"]["250"] = "/config/img/devices/250/39_hm-swi-3-fm.png"; +DEV_HIGHLIGHT["HM-SwI-3-FM"] = new Object(); +DEV_HIGHLIGHT["HM-SwI-3-FM"]["1_Key"] = [3, 0.18, 0.216, '1', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-SwI-3-FM"]["1_Kreis"] = [4, 0.220, 0.480, 0.028, 0.028]; +DEV_HIGHLIGHT["HM-SwI-3-FM"]["1"] = [5, '1_Key', '1_Kreis']; +DEV_HIGHLIGHT["HM-SwI-3-FM"]["2_Key"] = [3, 0.18, 0.216, '2', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-SwI-3-FM"]["2_Kreis"] = [4, 0.265, 0.405, 0.028, 0.028]; +DEV_HIGHLIGHT["HM-SwI-3-FM"]["2"] = [5, '2_Key', '2_Kreis']; +DEV_HIGHLIGHT["HM-SwI-3-FM"]["3_Key"] = [3, 0.18, 0.216, '3', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-SwI-3-FM"]["3_Kreis"] = [4, 0.310, 0.33, 0.028, 0.028]; +DEV_HIGHLIGHT["HM-SwI-3-FM"]["3"] = [5, '3_Key', '3_Kreis']; +DEV_LIST.push('HmIP-RCB1'); +DEV_DESCRIPTION["HmIP-RCB1"] = "HmIP-RCB1"; +DEV_PATHS["HmIP-RCB1"] = new Object(); +DEV_PATHS["HmIP-RCB1"]["50"] = "/config/img/devices/50/187_hmip-rcb1_thumb.png"; +DEV_PATHS["HmIP-RCB1"]["250"] = "/config/img/devices/250/187_hmip-rcb1.png"; +DEV_HIGHLIGHT["HmIP-RCB1"] = new Object(); +DEV_LIST.push('HM-RC-19-SW'); +DEV_DESCRIPTION["HM-RC-19-SW"] = "HM-RC-19-SW"; +DEV_PATHS["HM-RC-19-SW"] = new Object(); +DEV_PATHS["HM-RC-19-SW"]["50"] = "/config/img/devices/50/20_hm-rc-19_thumb.png"; +DEV_PATHS["HM-RC-19-SW"]["250"] = "/config/img/devices/250/20_hm-rc-19.png"; +DEV_HIGHLIGHT["HM-RC-19-SW"] = new Object(); +DEV_HIGHLIGHT["HM-RC-19-SW"]["1"] = [2, 0.296, 0.344, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19-SW"]["3"] = [2, 0.296, 0.416, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19-SW"]["5"] = [2, 0.296, 0.488, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19-SW"]["7"] = [2, 0.296, 0.56, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19-SW"]["9"] = [2, 0.296, 0.628, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19-SW"]["11"] = [2, 0.296, 0.704, 0.036, 0.048]; +DEV_HIGHLIGHT["HM-RC-19-SW"]["13"] = [2, 0.296, 0.772, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19-SW"]["15"] = [2, 0.296, 0.844, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19-SW"]["2"] = [2, 0.468, 0.344, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19-SW"]["4"] = [2, 0.468, 0.416, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19-SW"]["6"] = [2, 0.468, 0.488, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19-SW"]["8"] = [2, 0.468, 0.56, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19-SW"]["10"] = [2, 0.468, 0.628, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19-SW"]["12"] = [2, 0.468, 0.704, 0.036, 0.048]; +DEV_HIGHLIGHT["HM-RC-19-SW"]["14"] = [2, 0.468, 0.772, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19-SW"]["16"] = [2, 0.468, 0.844, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19-SW"]["17"] = [2, 0.58, 0.84, 0.044, 0.056]; +DEV_HIGHLIGHT["HM-RC-19-SW"]["18"] = [2, 0.312, 0.188, 0.168, 0.088]; +DEV_HIGHLIGHT["HM-RC-19-SW"]["1+2"] = [5, '1', '2']; +DEV_HIGHLIGHT["HM-RC-19-SW"]["3+4"] = [5, '3', '4']; +DEV_HIGHLIGHT["HM-RC-19-SW"]["5+6"] = [5, '5', '6']; +DEV_HIGHLIGHT["HM-RC-19-SW"]["7+8"] = [5, '7', '8']; +DEV_HIGHLIGHT["HM-RC-19-SW"]["9+10"] = [5, '9', '10']; +DEV_HIGHLIGHT["HM-RC-19-SW"]["11+12"] = [5, '11', '12']; +DEV_HIGHLIGHT["HM-RC-19-SW"]["13+14"] = [5, '13', '14']; +DEV_HIGHLIGHT["HM-RC-19-SW"]["15+16"] = [5, '15', '16']; +DEV_LIST.push('HM-Sec-Key'); +DEV_DESCRIPTION["HM-Sec-Key"] = "HM-Sec-Key"; +DEV_PATHS["HM-Sec-Key"] = new Object(); +DEV_PATHS["HM-Sec-Key"]["50"] = "/config/img/devices/50/14_hm-sec-key_thumb.png"; +DEV_PATHS["HM-Sec-Key"]["250"] = "/config/img/devices/250/14_hm-sec-key.png"; +DEV_HIGHLIGHT["HM-Sec-Key"] = new Object(); +DEV_LIST.push('HM-LC-RGBW-WM'); +DEV_DESCRIPTION["HM-LC-RGBW-WM"] = "HM-LC-RGBW-WM"; +DEV_PATHS["HM-LC-RGBW-WM"] = new Object(); +DEV_PATHS["HM-LC-RGBW-WM"]["50"] = "/config/img/devices/50/111_hm-lc-rgbw-wm_thumb.png"; +DEV_PATHS["HM-LC-RGBW-WM"]["250"] = "/config/img/devices/250/111_hm-lc-rgbw-wm.png"; +DEV_HIGHLIGHT["HM-LC-RGBW-WM"] = new Object(); +DEV_HIGHLIGHT["HM-LC-RGBW-WM"]["1"] = [1, 0.280, 0.569, 0.014]; +DEV_HIGHLIGHT["HM-LC-RGBW-WM"]["2"] = [1, 0.280, 0.645, 0.014]; +DEV_HIGHLIGHT["HM-LC-RGBW-WM"]["3"] = [1, 0.280, 0.721, 0.014]; +DEV_LIST.push('HM-RC-19'); +DEV_DESCRIPTION["HM-RC-19"] = "HM-RC-19"; +DEV_PATHS["HM-RC-19"] = new Object(); +DEV_PATHS["HM-RC-19"]["50"] = "/config/img/devices/50/20_hm-rc-19_thumb.png"; +DEV_PATHS["HM-RC-19"]["250"] = "/config/img/devices/250/20_hm-rc-19.png"; +DEV_HIGHLIGHT["HM-RC-19"] = new Object(); +DEV_HIGHLIGHT["HM-RC-19"]["1"] = [2, 0.296, 0.344, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19"]["3"] = [2, 0.296, 0.416, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19"]["5"] = [2, 0.296, 0.488, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19"]["7"] = [2, 0.296, 0.56, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19"]["9"] = [2, 0.296, 0.628, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19"]["11"] = [2, 0.296, 0.704, 0.036, 0.048]; +DEV_HIGHLIGHT["HM-RC-19"]["13"] = [2, 0.296, 0.772, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19"]["15"] = [2, 0.296, 0.844, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19"]["2"] = [2, 0.468, 0.344, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19"]["4"] = [2, 0.468, 0.416, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19"]["6"] = [2, 0.468, 0.488, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19"]["8"] = [2, 0.468, 0.56, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19"]["10"] = [2, 0.468, 0.628, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19"]["12"] = [2, 0.468, 0.704, 0.036, 0.048]; +DEV_HIGHLIGHT["HM-RC-19"]["14"] = [2, 0.468, 0.772, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19"]["16"] = [2, 0.468, 0.844, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19"]["17"] = [2, 0.58, 0.84, 0.044, 0.056]; +DEV_HIGHLIGHT["HM-RC-19"]["18"] = [2, 0.312, 0.188, 0.168, 0.088]; +DEV_HIGHLIGHT["HM-RC-19"]["1+2"] = [5, '1', '2']; +DEV_HIGHLIGHT["HM-RC-19"]["3+4"] = [5, '3', '4']; +DEV_HIGHLIGHT["HM-RC-19"]["5+6"] = [5, '5', '6']; +DEV_HIGHLIGHT["HM-RC-19"]["7+8"] = [5, '7', '8']; +DEV_HIGHLIGHT["HM-RC-19"]["9+10"] = [5, '9', '10']; +DEV_HIGHLIGHT["HM-RC-19"]["11+12"] = [5, '11', '12']; +DEV_HIGHLIGHT["HM-RC-19"]["13+14"] = [5, '13', '14']; +DEV_HIGHLIGHT["HM-RC-19"]["15+16"] = [5, '15', '16']; +DEV_LIST.push('263 167 Gruppe'); +DEV_DESCRIPTION["263 167 Gruppe"] = "263_167_Gruppe"; +DEV_PATHS["263 167 Gruppe"] = new Object(); +DEV_PATHS["263 167 Gruppe"]["50"] = "/config/img/devices/50/52_hm-sec-sd-team_thumb.png"; +DEV_PATHS["263 167 Gruppe"]["250"] = "/config/img/devices/250/52_hm-sec-sd-team.png"; +DEV_HIGHLIGHT["263 167 Gruppe"] = new Object(); +DEV_LIST.push('HMW-IO-4-FM'); +DEV_DESCRIPTION["HMW-IO-4-FM"] = "HMW-IO-4-FM"; +DEV_PATHS["HMW-IO-4-FM"] = new Object(); +DEV_PATHS["HMW-IO-4-FM"]["50"] = "/config/img/devices/50/29_hmw-io-4-fm_thumb.png"; +DEV_PATHS["HMW-IO-4-FM"]["250"] = "/config/img/devices/250/29_hmw-io-4-fm.png"; +DEV_HIGHLIGHT["HMW-IO-4-FM"] = new Object(); +DEV_HIGHLIGHT["HMW-IO-4-FM"]["1"] = [6, 0.616, 0.736, 0.612, 0.836, 0.02]; +DEV_HIGHLIGHT["HMW-IO-4-FM"]["2"] = [6, 0.672, 0.736, 0.668, 0.836, 0.02]; +DEV_HIGHLIGHT["HMW-IO-4-FM"]["3"] = [6, 0.724, 0.736, 0.724, 0.836, 0.02]; +DEV_HIGHLIGHT["HMW-IO-4-FM"]["4"] = [6, 0.78, 0.736, 0.78, 0.836, 0.02]; +DEV_LIST.push('HM-Sen-MDIR-O'); +DEV_DESCRIPTION["HM-Sen-MDIR-O"] = "HM-Sen-MDIR-O"; +DEV_PATHS["HM-Sen-MDIR-O"] = new Object(); +DEV_PATHS["HM-Sen-MDIR-O"]["50"] = "/config/img/devices/50/80_hm-sen-mdir-o_thumb.png"; +DEV_PATHS["HM-Sen-MDIR-O"]["250"] = "/config/img/devices/250/80_hm-sen-mdir-o.png"; +DEV_HIGHLIGHT["HM-Sen-MDIR-O"] = new Object(); +DEV_LIST.push('HM-RC-8'); +DEV_DESCRIPTION["HM-RC-8"] = "HM-RC-8"; +DEV_PATHS["HM-RC-8"] = new Object(); +DEV_PATHS["HM-RC-8"]["50"] = "/config/img/devices/50/100_hm-rc-8_thumb.png"; +DEV_PATHS["HM-RC-8"]["250"] = "/config/img/devices/250/100_hm-rc-8.png"; +DEV_HIGHLIGHT["HM-RC-8"] = new Object(); +DEV_HIGHLIGHT["HM-RC-8"]["1"] = [1, 0.374, 0.192, 0.02]; +DEV_HIGHLIGHT["HM-RC-8"]["2"] = [1, 0.537, 0.248, 0.02]; +DEV_HIGHLIGHT["HM-RC-8"]["3"] = [1, 0.374, 0.284, 0.02]; +DEV_HIGHLIGHT["HM-RC-8"]["4"] = [1, 0.537, 0.340, 0.02]; +DEV_HIGHLIGHT["HM-RC-8"]["5"] = [1, 0.374, 0.378, 0.02]; +DEV_HIGHLIGHT["HM-RC-8"]["6"] = [1, 0.537, 0.434, 0.02]; +DEV_HIGHLIGHT["HM-RC-8"]["7"] = [1, 0.374, 0.470, 0.02]; +DEV_HIGHLIGHT["HM-RC-8"]["8"] = [1, 0.537, 0.526, 0.02]; +DEV_HIGHLIGHT["HM-RC-8"]["1+2"] = [5, '1', '2']; +DEV_HIGHLIGHT["HM-RC-8"]["3+4"] = [5, '3', '4']; +DEV_HIGHLIGHT["HM-RC-8"]["5+6"] = [5, '5', '6']; +DEV_HIGHLIGHT["HM-RC-8"]["7+8"] = [5, '7', '8']; +DEV_LIST.push('HmIP-BSM'); +DEV_DESCRIPTION["HmIP-BSM"] = "BSM"; +DEV_PATHS["HmIP-BSM"] = new Object(); +DEV_PATHS["HmIP-BSM"]["50"] = "/config/img/devices/50/PushButton-2ch-wm_thumb.png"; +DEV_PATHS["HmIP-BSM"]["250"] = "/config/img/devices/250/PushButton-2ch-wm.png"; +DEV_HIGHLIGHT["HmIP-BSM"] = new Object(); +DEV_HIGHLIGHT["HmIP-BSM"]["2"] = [2, 0.244, 0.312, 0.428, 0.168]; +DEV_HIGHLIGHT["HmIP-BSM"]["1"] = [2, 0.244, 0.56, 0.428, 0.168]; +DEV_HIGHLIGHT["HmIP-BSM"]["1+2"] = [2, 0.244, 0.308, 0.428, 0.416]; +DEV_LIST.push('263 135'); +DEV_DESCRIPTION["263 135"] = "263_135"; +DEV_PATHS["263 135"] = new Object(); +DEV_PATHS["263 135"]["50"] = "/config/img/devices/50/75_hm-pb-2-wm55_thumb.png"; +DEV_PATHS["263 135"]["250"] = "/config/img/devices/250/75_hm-pb-2-wm55.png"; +DEV_HIGHLIGHT["263 135"] = new Object(); +DEV_HIGHLIGHT["263 135"]["2"] = [2, 0.204, 0.23, 0.546, 0.128]; +DEV_HIGHLIGHT["263 135"]["1"] = [2, 0.204, 0.65, 0.546, 0.128]; +DEV_LIST.push('HmIP-SMO230'); +DEV_DESCRIPTION["HmIP-SMO230"] = "SMO"; +DEV_PATHS["HmIP-SMO230"] = new Object(); +DEV_PATHS["HmIP-SMO230"]["50"] = "/config/img/devices/50/213_hmip-smo230_thumb.png"; +DEV_PATHS["HmIP-SMO230"]["250"] = "/config/img/devices/250/213_hmip-smo230.png"; +DEV_HIGHLIGHT["HmIP-SMO230"] = new Object(); +DEV_LIST.push('HmIPW-SMO230'); +DEV_DESCRIPTION["HmIPW-SMO230"] = "SMO"; +DEV_PATHS["HmIPW-SMO230"] = new Object(); +DEV_PATHS["HmIPW-SMO230"]["50"] = "/config/img/devices/50/213_hmip-smo230_thumb.png"; +DEV_PATHS["HmIPW-SMO230"]["250"] = "/config/img/devices/250/213_hmip-smo230.png"; +DEV_HIGHLIGHT["HmIPW-SMO230"] = new Object(); +DEV_LIST.push('HM-CCU-1'); +DEV_DESCRIPTION["HM-CCU-1"] = "HM-CCU-1"; +DEV_PATHS["HM-CCU-1"] = new Object(); +DEV_PATHS["HM-CCU-1"]["50"] = "/config/img/devices/50/24_hm-cen-3-1_thumb.png"; +DEV_PATHS["HM-CCU-1"]["250"] = "/config/img/devices/250/24_hm-cen-3-1.png"; +DEV_HIGHLIGHT["HM-CCU-1"] = new Object(); +DEV_LIST.push('HmIP-DRBLI4'); +DEV_DESCRIPTION["HmIP-DRBLI4"] = "HmIP-DRBLI4"; +DEV_PATHS["HmIP-DRBLI4"] = new Object(); +DEV_PATHS["HmIP-DRBLI4"]["50"] = "/config/img/devices/50/206_hmip-drbli4_thumb.png"; +DEV_PATHS["HmIP-DRBLI4"]["250"] = "/config/img/devices/250/206_hmip-drbli4.png"; +DEV_HIGHLIGHT["HmIP-DRBLI4"] = new Object(); +DEV_LIST.push('HmIP-DRSI1'); +DEV_DESCRIPTION["HmIP-DRSI1"] = "HmIP-DRSI1"; +DEV_PATHS["HmIP-DRSI1"] = new Object(); +DEV_PATHS["HmIP-DRSI1"]["50"] = "/config/img/devices/50/211_hmip-drsi1_thumb.png"; +DEV_PATHS["HmIP-DRSI1"]["250"] = "/config/img/devices/250/211_hmip-drsi1.png"; +DEV_HIGHLIGHT["HmIP-DRSI1"] = new Object(); +DEV_LIST.push('HmIP-KRCA-2'); +DEV_DESCRIPTION["HmIP-KRCA-2"] = "KRCA"; +DEV_PATHS["HmIP-KRCA-2"] = new Object(); +DEV_PATHS["HmIP-KRCA-2"]["50"] = "/config/img/devices/50/84_hm-rc-4-x_thumb.png"; +DEV_PATHS["HmIP-KRCA-2"]["250"] = "/config/img/devices/250/85_hm-rc-sec4-3.png"; +DEV_HIGHLIGHT["HmIP-KRCA-2"] = new Object(); +DEV_HIGHLIGHT["HmIP-KRCA-2"]["arrow_part1"] = [6, 0.312, 0.288, 0.416, 0.288, 0.012]; +DEV_HIGHLIGHT["HmIP-KRCA-2"]["arrow_part2"] = [6, 0.312, 0.288, 0.352, 0.248, 0.012]; +DEV_HIGHLIGHT["HmIP-KRCA-2"]["arrow_part3"] = [6, 0.312, 0.288, 0.352, 0.328, 0.012]; +DEV_HIGHLIGHT["HmIP-KRCA-2"]["Arrow"] = [5, 'arrow_part1', 'arrow_part2', 'arrow_part3']; +DEV_HIGHLIGHT["HmIP-KRCA-2"]["1_Arrow"] = [7, 'Arrow', 0.25, 0.0]; +DEV_HIGHLIGHT["HmIP-KRCA-2"]["2_Arrow"] = [7, 'Arrow', 0.238, 0.156]; +DEV_HIGHLIGHT["HmIP-KRCA-2"]["3_Arrow"] = [7, 'Arrow', 0.228, 0.312]; +DEV_HIGHLIGHT["HmIP-KRCA-2"]["4_Arrow"] = [7, 'Arrow', 0.212, 0.468]; +DEV_HIGHLIGHT["HmIP-KRCA-2"]["1"] = [5, '2_Arrow']; +DEV_HIGHLIGHT["HmIP-KRCA-2"]["2"] = [5, '1_Arrow']; +DEV_HIGHLIGHT["HmIP-KRCA-2"]["3"] = [5, '4_Arrow']; +DEV_HIGHLIGHT["HmIP-KRCA-2"]["4"] = [5, '3_Arrow']; +DEV_HIGHLIGHT["HmIP-KRCA-2"]["1+2"] = [5, '1_Arrow', '2_Arrow']; +DEV_HIGHLIGHT["HmIP-KRCA-2"]["3+4"] = [5, '3_Arrow', '4_Arrow']; +DEV_LIST.push('HM-Sen-RD-O'); +DEV_DESCRIPTION["HM-Sen-RD-O"] = "HM-Sen-RD-O"; +DEV_PATHS["HM-Sen-RD-O"] = new Object(); +DEV_PATHS["HM-Sen-RD-O"]["50"] = "/config/img/devices/50/87_hm-sen-rd-o_thumb.png"; +DEV_PATHS["HM-Sen-RD-O"]["250"] = "/config/img/devices/250/87_hm-sen-rd-o.png"; +DEV_HIGHLIGHT["HM-Sen-RD-O"] = new Object(); +DEV_LIST.push('HmIP-SWD'); +DEV_DESCRIPTION["HmIP-SWD"] = "HmIP-SWD"; +DEV_PATHS["HmIP-SWD"] = new Object(); +DEV_PATHS["HmIP-SWD"]["50"] = "/config/img/devices/50/172_hmip-swd_thumb.png"; +DEV_PATHS["HmIP-SWD"]["250"] = "/config/img/devices/250/172_hmip-swd.png"; +DEV_HIGHLIGHT["HmIP-SWD"] = new Object(); +DEV_LIST.push('VIR-LG-DIM'); +DEV_DESCRIPTION["VIR-LG-DIM"] = "VIR-LG-DIM"; +DEV_PATHS["VIR-LG-DIM"] = new Object(); +DEV_PATHS["VIR-LG-DIM"]["50"] = "/config/img/devices/50/coupling/hm-coupling-dim.png"; +DEV_PATHS["VIR-LG-DIM"]["250"] = "/config/img/devices/250/coupling/hm-coupling-dim.png"; +DEV_HIGHLIGHT["VIR-LG-DIM"] = new Object(); +DEV_LIST.push('HmIP-BBL'); +DEV_DESCRIPTION["HmIP-BBL"] = "HmIP-BBL"; +DEV_PATHS["HmIP-BBL"] = new Object(); +DEV_PATHS["HmIP-BBL"]["50"] = "/config/img/devices/50/PushButton-2ch-wm_thumb.png"; +DEV_PATHS["HmIP-BBL"]["250"] = "/config/img/devices/250/PushButton-2ch-wm.png"; +DEV_HIGHLIGHT["HmIP-BBL"] = new Object(); +DEV_HIGHLIGHT["HmIP-BBL"]["2"] = [2, 0.244, 0.312, 0.428, 0.168]; +DEV_HIGHLIGHT["HmIP-BBL"]["1"] = [2, 0.244, 0.56, 0.428, 0.168]; +DEV_HIGHLIGHT["HmIP-BBL"]["1+2"] = [2, 0.244, 0.308, 0.428, 0.416]; +DEV_LIST.push('HM-LC-Dim1PWM-CV'); +DEV_DESCRIPTION["HM-LC-Dim1PWM-CV"] = "HM-LC-Dim1PWM-CV"; +DEV_PATHS["HM-LC-Dim1PWM-CV"] = new Object(); +DEV_PATHS["HM-LC-Dim1PWM-CV"]["50"] = "/config/img/devices/50/2_hm-lc-dim1l-cv_thumb.png"; +DEV_PATHS["HM-LC-Dim1PWM-CV"]["250"] = "/config/img/devices/250/79_hm-lc-dim1pwm-cv.png"; +DEV_HIGHLIGHT["HM-LC-Dim1PWM-CV"] = new Object(); +DEV_LIST.push('HmIP-ASIR-2'); +DEV_DESCRIPTION["HmIP-ASIR-2"] = "HmIP-ASIR"; +DEV_PATHS["HmIP-ASIR-2"] = new Object(); +DEV_PATHS["HmIP-ASIR-2"]["50"] = "/config/img/devices/50/196_hmip-ASIR-2_thumb.png"; +DEV_PATHS["HmIP-ASIR-2"]["250"] = "/config/img/devices/250/196_hmip-ASIR-2.png"; +DEV_HIGHLIGHT["HmIP-ASIR-2"] = new Object(); +DEV_LIST.push('HmIP-STH-A 8DU'); +DEV_DESCRIPTION["HmIP-STH-A 8DU"] = "STH"; +DEV_PATHS["HmIP-STH-A 8DU"] = new Object(); +DEV_PATHS["HmIP-STH-A 8DU"]["50"] = "/config/img/devices/50/146_hmip-sth_thumb.png"; +DEV_PATHS["HmIP-STH-A 8DU"]["250"] = "/config/img/devices/250/146_hmip-sth.png"; +DEV_HIGHLIGHT["HmIP-STH-A 8DU"] = new Object(); +DEV_LIST.push('HM-CC-RT-DN'); +DEV_DESCRIPTION["HM-CC-RT-DN"] = "HM-CC-RT-DN"; +DEV_PATHS["HM-CC-RT-DN"] = new Object(); +DEV_PATHS["HM-CC-RT-DN"]["50"] = "/config/img/devices/50/83_hm-cc-rt-dn_thumb.png"; +DEV_PATHS["HM-CC-RT-DN"]["250"] = "/config/img/devices/250/83_hm-cc-rt-dn.png"; +DEV_HIGHLIGHT["HM-CC-RT-DN"] = new Object(); +DEV_LIST.push('HmIP-STHD-A L9D'); +DEV_DESCRIPTION["HmIP-STHD-A L9D"] = "HmIP-STHD"; +DEV_PATHS["HmIP-STHD-A L9D"] = new Object(); +DEV_PATHS["HmIP-STHD-A L9D"]["50"] = "/config/img/devices/50/147_hmip-sthd_thumb.png"; +DEV_PATHS["HmIP-STHD-A L9D"]["250"] = "/config/img/devices/250/147_hmip-sthd.png"; +DEV_HIGHLIGHT["HmIP-STHD-A L9D"] = new Object(); +DEV_LIST.push('HM-LC-Dim1TPBU-FM'); +DEV_DESCRIPTION["HM-LC-Dim1TPBU-FM"] = "HM-LC-Dim1TPBU-FM"; +DEV_PATHS["HM-LC-Dim1TPBU-FM"] = new Object(); +DEV_PATHS["HM-LC-Dim1TPBU-FM"]["50"] = "/config/img/devices/50/PushButton-2ch-wm_thumb.png"; +DEV_PATHS["HM-LC-Dim1TPBU-FM"]["250"] = "/config/img/devices/250/PushButton-2ch-wm.png"; +DEV_HIGHLIGHT["HM-LC-Dim1TPBU-FM"] = new Object(); +DEV_LIST.push('HmIP-SCTH230'); +DEV_DESCRIPTION["HmIP-SCTH230"] = "HmIP-SCTH230"; +DEV_PATHS["HmIP-SCTH230"] = new Object(); +DEV_PATHS["HmIP-SCTH230"]["50"] = "/config/img/devices/50/215_hmip-scth230_thumb.png"; +DEV_PATHS["HmIP-SCTH230"]["250"] = "/config/img/devices/250/215_hmip-scth230.png"; +DEV_HIGHLIGHT["HmIP-SCTH230"] = new Object(); +DEV_LIST.push('OLIGO.smart.iq.HM'); +DEV_DESCRIPTION["OLIGO.smart.iq.HM"] = "OLIGO.smart.iq.HM"; +DEV_PATHS["OLIGO.smart.iq.HM"] = new Object(); +DEV_PATHS["OLIGO.smart.iq.HM"]["50"] = "/config/img/devices/50/123_oligo.smart.ip.hm_thumb.png"; +DEV_PATHS["OLIGO.smart.iq.HM"]["250"] = "/config/img/devices/250/123_oligo.smart.ip.hm.png"; +DEV_HIGHLIGHT["OLIGO.smart.iq.HM"] = new Object(); +DEV_LIST.push('HMIP-PS'); +DEV_DESCRIPTION["HMIP-PS"] = "PS"; +DEV_PATHS["HMIP-PS"] = new Object(); +DEV_PATHS["HMIP-PS"]["50"] = "/config/img/devices/50/113_hmip-psm_thumb.png"; +DEV_PATHS["HMIP-PS"]["250"] = "/config/img/devices/250/113_hmip-psm.png"; +DEV_HIGHLIGHT["HMIP-PS"] = new Object(); +DEV_LIST.push('HM-LC-Sw4-WM'); +DEV_DESCRIPTION["HM-LC-Sw4-WM"] = "HM-LC-Sw4-WM"; +DEV_PATHS["HM-LC-Sw4-WM"] = new Object(); +DEV_PATHS["HM-LC-Sw4-WM"]["50"] = "/config/img/devices/50/76_hm-lc-sw4-wm_thumb.png"; +DEV_PATHS["HM-LC-Sw4-WM"]["250"] = "/config/img/devices/250/76_hm-lc-sw4-wm.png"; +DEV_HIGHLIGHT["HM-LC-Sw4-WM"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Sw4-WM"]["Channel1"] = [2, 0.208, 0.766, 0.065, 0.060]; +DEV_HIGHLIGHT["HM-LC-Sw4-WM"]["Channel2"] = [2, 0.276, 0.766, 0.065, 0.060]; +DEV_HIGHLIGHT["HM-LC-Sw4-WM"]["Channel3"] = [2, 0.344, 0.766, 0.065, 0.060]; +DEV_HIGHLIGHT["HM-LC-Sw4-WM"]["Channel4"] = [2, 0.412, 0.766, 0.065, 0.060]; +DEV_HIGHLIGHT["HM-LC-Sw4-WM"]["1_val"] = [3, 0.372, 0.288, '1', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-LC-Sw4-WM"]["2_val"] = [3, 0.372, 0.288, '2', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-LC-Sw4-WM"]["3_val"] = [3, 0.372, 0.288, '3', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-LC-Sw4-WM"]["4_val"] = [3, 0.372, 0.288, '4', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-LC-Sw4-WM"]["Circle1"] = [4, 0.534, 0.762, 0.044, 0.044]; +DEV_HIGHLIGHT["HM-LC-Sw4-WM"]["Circle2"] = [4, 0.583, 0.762, 0.044, 0.044]; +DEV_HIGHLIGHT["HM-LC-Sw4-WM"]["Circle3"] = [4, 0.637, 0.762, 0.044, 0.044]; +DEV_HIGHLIGHT["HM-LC-Sw4-WM"]["Circle4"] = [4, 0.693, 0.762, 0.044, 0.044]; +DEV_HIGHLIGHT["HM-LC-Sw4-WM"]["1"] = [5, 'Channel1', '1_val', 'Circle1']; +DEV_HIGHLIGHT["HM-LC-Sw4-WM"]["2"] = [5, 'Channel2', '2_val', 'Circle2']; +DEV_HIGHLIGHT["HM-LC-Sw4-WM"]["3"] = [5, 'Channel3', '3_val', 'Circle3']; +DEV_HIGHLIGHT["HM-LC-Sw4-WM"]["4"] = [5, 'Channel4', '4_val', 'Circle4']; +DEV_LIST.push('HmIP-eTRV-E'); +DEV_DESCRIPTION["HmIP-eTRV-E"] = "TRV-E"; +DEV_PATHS["HmIP-eTRV-E"] = new Object(); +DEV_PATHS["HmIP-eTRV-E"]["50"] = "/config/img/devices/50/216_hmip-etrv-e_thumb.png"; +DEV_PATHS["HmIP-eTRV-E"]["250"] = "/config/img/devices/250/216_hmip-etrv-e.png"; +DEV_HIGHLIGHT["HmIP-eTRV-E"] = new Object(); +DEV_LIST.push('ELV-SH-SB8'); +DEV_DESCRIPTION["ELV-SH-SB8"] = "ELV-SH-SB8"; +DEV_PATHS["ELV-SH-SB8"] = new Object(); +DEV_PATHS["ELV-SH-SB8"]["50"] = "/config/img/devices/50/236_elv-sh-sb8_thumb.png"; +DEV_PATHS["ELV-SH-SB8"]["250"] = "/config/img/devices/250/236_elv-sh-sb8.png"; +DEV_HIGHLIGHT["ELV-SH-SB8"] = new Object(); +DEV_HIGHLIGHT["ELV-SH-SB8"]["1"] = [1, 0.770, 0.165, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["2"] = [1, 0.775, 0.226, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["3"] = [1, 0.780, 0.290, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["4"] = [1, 0.787, 0.355, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["5"] = [1, 0.792, 0.418, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["6"] = [1, 0.795, 0.485, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["7"] = [1, 0.798, 0.549, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["8"] = [1, 0.803, 0.610, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["10"] = [1, 0.710, 0.169, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["11"] = [1, 0.710, 0.169, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["12"] = [1, 0.710, 0.169, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["14"] = [1, 0.715, 0.230, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["15"] = [1, 0.715, 0.230, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["16"] = [1, 0.715, 0.230, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["18"] = [1, 0.720, 0.291, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["19"] = [1, 0.720, 0.291, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["20"] = [1, 0.720, 0.291, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["22"] = [1, 0.727, 0.355, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["23"] = [1, 0.727, 0.355, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["24"] = [1, 0.727, 0.355, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["26"] = [1, 0.732, 0.418, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["27"] = [1, 0.732, 0.418, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["28"] = [1, 0.732, 0.418, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["30"] = [1, 0.737, 0.485, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["31"] = [1, 0.737, 0.485, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["32"] = [1, 0.737, 0.485, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["34"] = [1, 0.742, 0.550, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["35"] = [1, 0.742, 0.550, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["36"] = [1, 0.742, 0.550, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["38"] = [1, 0.747, 0.615, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["39"] = [1, 0.747, 0.615, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["40"] = [1, 0.747, 0.615, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["1"] = [1, 0.770, 0.165, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["2"] = [1, 0.775, 0.226, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["3"] = [1, 0.780, 0.290, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["4"] = [1, 0.787, 0.355, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["5"] = [1, 0.792, 0.418, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["6"] = [1, 0.795, 0.485, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["7"] = [1, 0.798, 0.549, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["8"] = [1, 0.803, 0.610, 0.02]; +DEV_LIST.push('HmIP-STHD'); +DEV_DESCRIPTION["HmIP-STHD"] = "HmIP-STHD"; +DEV_PATHS["HmIP-STHD"] = new Object(); +DEV_PATHS["HmIP-STHD"]["50"] = "/config/img/devices/50/147_hmip-sthd_thumb.png"; +DEV_PATHS["HmIP-STHD"]["250"] = "/config/img/devices/250/147_hmip-sthd.png"; +DEV_HIGHLIGHT["HmIP-STHD"] = new Object(); +DEV_LIST.push('HM-ES-PMSw1-SM'); +DEV_DESCRIPTION["HM-ES-PMSw1-SM"] = "HM-ES-PMSw1-SM"; +DEV_PATHS["HM-ES-PMSw1-SM"] = new Object(); +DEV_PATHS["HM-ES-PMSw1-SM"]["50"] = "/config/img/devices/50/115_hm-es-pmsw1-sm_thumb.png"; +DEV_PATHS["HM-ES-PMSw1-SM"]["250"] = "/config/img/devices/250/115_hm-es-pmsw1-sm.png"; +DEV_HIGHLIGHT["HM-ES-PMSw1-SM"] = new Object(); +DEV_LIST.push('HmIP-STH 8DU'); +DEV_DESCRIPTION["HmIP-STH 8DU"] = "STH"; +DEV_PATHS["HmIP-STH 8DU"] = new Object(); +DEV_PATHS["HmIP-STH 8DU"]["50"] = "/config/img/devices/50/146_hmip-sth_thumb.png"; +DEV_PATHS["HmIP-STH 8DU"]["250"] = "/config/img/devices/250/146_hmip-sth.png"; +DEV_HIGHLIGHT["HmIP-STH 8DU"] = new Object(); +DEV_LIST.push('HmIP-FAL24-C6'); +DEV_DESCRIPTION["HmIP-FAL24-C6"] = "HmIP-FAL24-C6"; +DEV_PATHS["HmIP-FAL24-C6"] = new Object(); +DEV_PATHS["HmIP-FAL24-C6"]["50"] = "/config/img/devices/50/137_hmip-fal-c6_thumb.png"; +DEV_PATHS["HmIP-FAL24-C6"]["250"] = "/config/img/devices/250/137_hmip-fal-c6.png"; +DEV_HIGHLIGHT["HmIP-FAL24-C6"] = new Object(); +DEV_LIST.push('RF-LAN-Sniffer'); +DEV_DESCRIPTION["RF-LAN-Sniffer"] = "RF-LAN-Sniffer"; +DEV_PATHS["RF-LAN-Sniffer"] = new Object(); +DEV_PATHS["RF-LAN-Sniffer"]["50"] = "/config/img/devices/50/CCU2_thumb.png"; +DEV_PATHS["RF-LAN-Sniffer"]["250"] = "/config/img/devices/250/CCU2.png"; +DEV_HIGHLIGHT["RF-LAN-Sniffer"] = new Object(); +DEV_LIST.push('HmIP-SAM'); +DEV_DESCRIPTION["HmIP-SAM"] = "HmIP-SAM"; +DEV_PATHS["HmIP-SAM"] = new Object(); +DEV_PATHS["HmIP-SAM"]["50"] = "/config/img/devices/50/149_hmip-sam_thumb.png"; +DEV_PATHS["HmIP-SAM"]["250"] = "/config/img/devices/250/149_hmip-sam.png"; +DEV_HIGHLIGHT["HmIP-SAM"] = new Object(); +DEV_LIST.push('HmIP-MOD-RC8'); +DEV_DESCRIPTION["HmIP-MOD-RC8"] = "HmIP-MOD-RC8"; +DEV_PATHS["HmIP-MOD-RC8"] = new Object(); +DEV_PATHS["HmIP-MOD-RC8"]["50"] = "/config/img/devices/50/159_hmip-mod-rc8_thumb.png"; +DEV_PATHS["HmIP-MOD-RC8"]["250"] = "/config/img/devices/250/159_hmip-mod-rc8.png"; +DEV_HIGHLIGHT["HmIP-MOD-RC8"] = new Object(); +DEV_LIST.push('HmIP-PSM'); +DEV_DESCRIPTION["HmIP-PSM"] = "PSM"; +DEV_PATHS["HmIP-PSM"] = new Object(); +DEV_PATHS["HmIP-PSM"]["50"] = "/config/img/devices/50/113_hmip-psm_thumb.png"; +DEV_PATHS["HmIP-PSM"]["250"] = "/config/img/devices/250/113_hmip-psm.png"; +DEV_HIGHLIGHT["HmIP-PSM"] = new Object(); +DEV_LIST.push('HmIP-PCBS'); +DEV_DESCRIPTION["HmIP-PCBS"] = "HmIP-PCBS"; +DEV_PATHS["HmIP-PCBS"] = new Object(); +DEV_PATHS["HmIP-PCBS"]["50"] = "/config/img/devices/50/139_hm-lc-sw1-pcb_thumb.png"; +DEV_PATHS["HmIP-PCBS"]["250"] = "/config/img/devices/250/139_hm-lc-sw1-pcb.png"; +DEV_HIGHLIGHT["HmIP-PCBS"] = new Object(); +DEV_LIST.push('HmIPW-FIO6'); +DEV_DESCRIPTION["HmIPW-FIO6"] = "HmIPW-FIO6"; +DEV_PATHS["HmIPW-FIO6"] = new Object(); +DEV_PATHS["HmIPW-FIO6"]["50"] = "/config/img/devices/50/165_hmipw-fio6_thumb.png"; +DEV_PATHS["HmIPW-FIO6"]["250"] = "/config/img/devices/250/165_hmipw-fio6.png"; +DEV_HIGHLIGHT["HmIPW-FIO6"] = new Object(); +DEV_LIST.push('HM-LC-Sw4-DR-2'); +DEV_DESCRIPTION["HM-LC-Sw4-DR-2"] = "HM-LC-Sw4-DR"; +DEV_PATHS["HM-LC-Sw4-DR-2"] = new Object(); +DEV_PATHS["HM-LC-Sw4-DR-2"]["50"] = "/config/img/devices/50/68_hm-lc-sw4-dr_thumb.png"; +DEV_PATHS["HM-LC-Sw4-DR-2"]["250"] = "/config/img/devices/250/68_hm-lc-sw4-dr.png"; +DEV_HIGHLIGHT["HM-LC-Sw4-DR-2"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Sw4-DR-2"]["1"] = [4, 0.088, 0.556, 0.048, 0.04]; +DEV_HIGHLIGHT["HM-LC-Sw4-DR-2"]["2"] = [4, 0.280, 0.556, 0.048, 0.04]; +DEV_HIGHLIGHT["HM-LC-Sw4-DR-2"]["3"] = [4, 0.472, 0.556, 0.048, 0.04]; +DEV_HIGHLIGHT["HM-LC-Sw4-DR-2"]["4"] = [4, 0.656, 0.556, 0.048, 0.04]; +DEV_LIST.push('ZEL STG RM FDK'); +DEV_DESCRIPTION["ZEL STG RM FDK"] = "ZEL_STG_RM_FDK"; +DEV_PATHS["ZEL STG RM FDK"] = new Object(); +DEV_PATHS["ZEL STG RM FDK"]["50"] = "/config/img/devices/50/17_hm-sec-rhs_thumb.png"; +DEV_PATHS["ZEL STG RM FDK"]["250"] = "/config/img/devices/250/17_hm-sec-rhs.png"; +DEV_HIGHLIGHT["ZEL STG RM FDK"] = new Object(); +DEV_LIST.push('HmIP-PCBS-BAT'); +DEV_DESCRIPTION["HmIP-PCBS-BAT"] = "HmIP-PCBS-BAT"; +DEV_PATHS["HmIP-PCBS-BAT"] = new Object(); +DEV_PATHS["HmIP-PCBS-BAT"]["50"] = "/config/img/devices/50/151_hmip-pcbs-bat_thumb.png"; +DEV_PATHS["HmIP-PCBS-BAT"]["250"] = "/config/img/devices/250/151_hmip-pcbs-bat.png"; +DEV_HIGHLIGHT["HmIP-PCBS-BAT"] = new Object(); +DEV_LIST.push('HmIP-eTRV-2 I9F'); +DEV_DESCRIPTION["HmIP-eTRV-2 I9F"] = "TRV"; +DEV_PATHS["HmIP-eTRV-2 I9F"] = new Object(); +DEV_PATHS["HmIP-eTRV-2 I9F"]["50"] = "/config/img/devices/50/120_hmip-etrv_thumb.png"; +DEV_PATHS["HmIP-eTRV-2 I9F"]["250"] = "/config/img/devices/250/120_hmip-etrv.png"; +DEV_HIGHLIGHT["HmIP-eTRV-2 I9F"] = new Object(); +DEV_LIST.push('HM-LC-Bl1-SM-2'); +DEV_DESCRIPTION["HM-LC-Bl1-SM-2"] = "HM-LC-Bl1-SM"; +DEV_PATHS["HM-LC-Bl1-SM-2"] = new Object(); +DEV_PATHS["HM-LC-Bl1-SM-2"]["50"] = "/config/img/devices/50/6_hm-lc-bl1-sm_thumb.png"; +DEV_PATHS["HM-LC-Bl1-SM-2"]["250"] = "/config/img/devices/250/6_hm-lc-bl1-sm.png"; +DEV_HIGHLIGHT["HM-LC-Bl1-SM-2"] = new Object(); +DEV_LIST.push('ZEL STG RM FEP 230V'); +DEV_DESCRIPTION["ZEL STG RM FEP 230V"] = "ZEL_STG_RM_FEP_230V"; +DEV_PATHS["ZEL STG RM FEP 230V"] = new Object(); +DEV_PATHS["ZEL STG RM FEP 230V"]["50"] = "/config/img/devices/50/7_hm-lc-bl1-fm_thumb.png"; +DEV_PATHS["ZEL STG RM FEP 230V"]["250"] = "/config/img/devices/250/7_hm-lc-bl1-fm.png"; +DEV_HIGHLIGHT["ZEL STG RM FEP 230V"] = new Object(); +DEV_LIST.push('HM-Sen-MDIR-WM55'); +DEV_DESCRIPTION["HM-Sen-MDIR-WM55"] = "HM-Sen-MDIR-WM55"; +DEV_PATHS["HM-Sen-MDIR-WM55"] = new Object(); +DEV_PATHS["HM-Sen-MDIR-WM55"]["50"] = "/config/img/devices/50/103_hm-sen-mdir-wm55_thumb.png"; +DEV_PATHS["HM-Sen-MDIR-WM55"]["250"] = "/config/img/devices/250/103_hm-sen-mdir-wm55.png"; +DEV_HIGHLIGHT["HM-Sen-MDIR-WM55"] = new Object(); +DEV_HIGHLIGHT["HM-Sen-MDIR-WM55"]["1"] = [2, 0.192, 0.660, 0.524, 0.12]; +DEV_HIGHLIGHT["HM-Sen-MDIR-WM55"]["2"] = [2, 0.192, 0.252, 0.524, 0.12]; +DEV_HIGHLIGHT["HM-Sen-MDIR-WM55"]["1+2"] = [5, '1', '2']; +DEV_LIST.push('HmIP-SWDM-2'); +DEV_DESCRIPTION["HmIP-SWDM-2"] = "HmIP-SWDM"; +DEV_PATHS["HmIP-SWDM-2"] = new Object(); +DEV_PATHS["HmIP-SWDM-2"]["50"] = "/config/img/devices/50/181_hmip-swdm_thumb.png"; +DEV_PATHS["HmIP-SWDM-2"]["250"] = "/config/img/devices/250/181_hmip-swdm.png"; +DEV_HIGHLIGHT["HmIP-SWDM-2"] = new Object(); +DEV_LIST.push('HmIPW-WTH-A'); +DEV_DESCRIPTION["HmIPW-WTH-A"] = "HmIPW-WTH"; +DEV_PATHS["HmIPW-WTH-A"] = new Object(); +DEV_PATHS["HmIPW-WTH-A"]["50"] = "/config/img/devices/50/121_hmip-wth_thumb.png"; +DEV_PATHS["HmIPW-WTH-A"]["250"] = "/config/img/devices/250/121_hmip-wth.png"; +DEV_HIGHLIGHT["HmIPW-WTH-A"] = new Object(); +DEV_LIST.push('HM-Sen-DB-PCB'); +DEV_DESCRIPTION["HM-Sen-DB-PCB"] = "HM-Sen-DB-PCB"; +DEV_PATHS["HM-Sen-DB-PCB"] = new Object(); +DEV_PATHS["HM-Sen-DB-PCB"]["50"] = "/config/img/devices/50/101_hm-sen-db-pcb_thumb.png"; +DEV_PATHS["HM-Sen-DB-PCB"]["250"] = "/config/img/devices/250/101_hm-sen-db-pcb.png"; +DEV_HIGHLIGHT["HM-Sen-DB-PCB"] = new Object(); +DEV_LIST.push('HM-LC-Sw2-DR'); +DEV_DESCRIPTION["HM-LC-Sw2-DR"] = "HM-LC-Sw2-DR"; +DEV_PATHS["HM-LC-Sw2-DR"] = new Object(); +DEV_PATHS["HM-LC-Sw2-DR"]["50"] = "/config/img/devices/50/69_hm-lc-sw2-dr_thumb.png"; +DEV_PATHS["HM-LC-Sw2-DR"]["250"] = "/config/img/devices/250/69_hm-lc-sw2-dr.png"; +DEV_HIGHLIGHT["HM-LC-Sw2-DR"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Sw2-DR"]["1"] = [4, 0.095, 0.556, 0.045, 0.04]; +DEV_HIGHLIGHT["HM-LC-Sw2-DR"]["2"] = [4, 0.285, 0.556, 0.045, 0.04]; +DEV_LIST.push('HM-LC-Sw2-DR-2'); +DEV_DESCRIPTION["HM-LC-Sw2-DR-2"] = "HM-LC-Sw2-DR"; +DEV_PATHS["HM-LC-Sw2-DR-2"] = new Object(); +DEV_PATHS["HM-LC-Sw2-DR-2"]["50"] = "/config/img/devices/50/69_hm-lc-sw2-dr_thumb.png"; +DEV_PATHS["HM-LC-Sw2-DR-2"]["250"] = "/config/img/devices/250/69_hm-lc-sw2-dr.png"; +DEV_HIGHLIGHT["HM-LC-Sw2-DR-2"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Sw2-DR-2"]["1"] = [4, 0.095, 0.556, 0.045, 0.04]; +DEV_HIGHLIGHT["HM-LC-Sw2-DR-2"]["2"] = [4, 0.285, 0.556, 0.045, 0.04]; +DEV_LIST.push('263 133'); +DEV_DESCRIPTION["263 133"] = "263_133"; +DEV_PATHS["263 133"] = new Object(); +DEV_PATHS["263 133"]["50"] = "/config/img/devices/50/PushButton-2ch-wm_thumb.png"; +DEV_PATHS["263 133"]["250"] = "/config/img/devices/250/PushButton-2ch-wm.png"; +DEV_HIGHLIGHT["263 133"] = new Object(); +DEV_LIST.push('HM-LC-Dim1L-CV-644'); +DEV_DESCRIPTION["HM-LC-Dim1L-CV-644"] = "HM-LC-Dim1L-CV"; +DEV_PATHS["HM-LC-Dim1L-CV-644"] = new Object(); +DEV_PATHS["HM-LC-Dim1L-CV-644"]["50"] = "/config/img/devices/50/2_hm-lc-dim1l-cv_thumb.png"; +DEV_PATHS["HM-LC-Dim1L-CV-644"]["250"] = "/config/img/devices/250/2_hm-lc-dim1l-cv.png"; +DEV_HIGHLIGHT["HM-LC-Dim1L-CV-644"] = new Object(); +DEV_LIST.push('HmIP-DLD-S'); +DEV_DESCRIPTION["HmIP-DLD-S"] = "HmIP-DLD"; +DEV_PATHS["HmIP-DLD-S"] = new Object(); +DEV_PATHS["HmIP-DLD-S"]["50"] = "/config/img/devices/50/214_hmip-dld_thumb.png"; +DEV_PATHS["HmIP-DLD-S"]["250"] = "/config/img/devices/250/214_hmip-dld.png"; +DEV_HIGHLIGHT["HmIP-DLD-S"] = new Object(); +DEV_LIST.push('HmIP-WTH-A'); +DEV_DESCRIPTION["HmIP-WTH-A"] = "HmIP-WTH-2"; +DEV_PATHS["HmIP-WTH-A"] = new Object(); +DEV_PATHS["HmIP-WTH-A"]["50"] = "/config/img/devices/50/121_hmip-wth_thumb.png"; +DEV_PATHS["HmIP-WTH-A"]["250"] = "/config/img/devices/250/121_hmip-wth.png"; +DEV_HIGHLIGHT["HmIP-WTH-A"] = new Object(); +DEV_LIST.push('263 132'); +DEV_DESCRIPTION["263 132"] = "263_132"; +DEV_PATHS["263 132"] = new Object(); +DEV_PATHS["263 132"]["50"] = "/config/img/devices/50/2_hm-lc-dim1l-cv_thumb.png"; +DEV_PATHS["263 132"]["250"] = "/config/img/devices/250/2_hm-lc-dim1l-cv.png"; +DEV_HIGHLIGHT["263 132"] = new Object(); +DEV_LIST.push('HmIP-STHD-A'); +DEV_DESCRIPTION["HmIP-STHD-A"] = "HmIP-STHD"; +DEV_PATHS["HmIP-STHD-A"] = new Object(); +DEV_PATHS["HmIP-STHD-A"]["50"] = "/config/img/devices/50/147_hmip-sthd_thumb.png"; +DEV_PATHS["HmIP-STHD-A"]["250"] = "/config/img/devices/250/147_hmip-sthd.png"; +DEV_HIGHLIGHT["HmIP-STHD-A"] = new Object(); +DEV_LIST.push('HM-Sec-RHS'); +DEV_DESCRIPTION["HM-Sec-RHS"] = "HM-Sec-RHS"; +DEV_PATHS["HM-Sec-RHS"] = new Object(); +DEV_PATHS["HM-Sec-RHS"]["50"] = "/config/img/devices/50/17_hm-sec-rhs_thumb.png"; +DEV_PATHS["HM-Sec-RHS"]["250"] = "/config/img/devices/250/17_hm-sec-rhs.png"; +DEV_HIGHLIGHT["HM-Sec-RHS"] = new Object(); +DEV_LIST.push('atent'); +DEV_DESCRIPTION["atent"] = "atent"; +DEV_PATHS["atent"] = new Object(); +DEV_PATHS["atent"]["50"] = "/config/img/devices/50/73_hm-atent_thumb.png"; +DEV_PATHS["atent"]["250"] = "/config/img/devices/250/73_hm-atent.png"; +DEV_HIGHLIGHT["atent"] = new Object(); +DEV_HIGHLIGHT["atent"]["1"] = [4, 0.177, 0.216, 0.166, 0.166]; +DEV_HIGHLIGHT["atent"]["2"] = [4, 0.438, 0.216, 0.166, 0.166]; +DEV_HIGHLIGHT["atent"]["3"] = [4, 0.273, 0.49, 0.24, 0.235]; +DEV_HIGHLIGHT["atent"]["1+2"] = [5, '1', '2']; +DEV_LIST.push('HM-LC-Dim2L-SM-2'); +DEV_DESCRIPTION["HM-LC-Dim2L-SM-2"] = "HM-LC-Dim2L-SM"; +DEV_PATHS["HM-LC-Dim2L-SM-2"] = new Object(); +DEV_PATHS["HM-LC-Dim2L-SM-2"]["50"] = "/config/img/devices/50/45_hm-lc-dim2l-sm_thumb.png"; +DEV_PATHS["HM-LC-Dim2L-SM-2"]["250"] = "/config/img/devices/250/45_hm-lc-dim2l-sm.png"; +DEV_HIGHLIGHT["HM-LC-Dim2L-SM-2"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Dim2L-SM-2"]["1_Part1"] = [6, 0.530, 0.896, 0.530, 0.98, 0.012]; +DEV_HIGHLIGHT["HM-LC-Dim2L-SM-2"]["1_Part2"] = [6, 0.530, 0.98, 0.49, 0.916, 0.012]; +DEV_HIGHLIGHT["HM-LC-Dim2L-SM-2"]["1_Part3"] = [6, 0.530, 0.98, 0.574, 0.916, 0.012]; +DEV_HIGHLIGHT["HM-LC-Dim2L-SM-2"]["1_Arrow"] = [5, '1_Part1', '1_Part2', '1_Part3']; +DEV_HIGHLIGHT["HM-LC-Dim2L-SM-2"]["2_Arrow"] = [7, '1_Arrow', 0.168, 0]; +DEV_HIGHLIGHT["HM-LC-Dim2L-SM-2"]["1_Key"] = [4, 0.25, 0.33, 0.04, 0.044]; +DEV_HIGHLIGHT["HM-LC-Dim2L-SM-2"]["2_Key"] = [4, 0.328, 0.33, 0.04, 0.044]; +DEV_HIGHLIGHT["HM-LC-Dim2L-SM-2"]["1"] = [5, '1_Arrow', '1_Key']; +DEV_HIGHLIGHT["HM-LC-Dim2L-SM-2"]["2"] = [5, '2_Arrow', '2_Key']; +DEV_LIST.push('HmIP-USBSM'); +DEV_DESCRIPTION["HmIP-USBSM"] = "HmIP-USBSM"; +DEV_PATHS["HmIP-USBSM"] = new Object(); +DEV_PATHS["HmIP-USBSM"]["50"] = "/config/img/devices/50/217_hmip-usbsm_thumb.png"; +DEV_PATHS["HmIP-USBSM"]["250"] = "/config/img/devices/250/217_hmip-usbsm.png"; +DEV_HIGHLIGHT["HmIP-USBSM"] = new Object(); +DEV_LIST.push('HM-LC-Sw2-FM'); +DEV_DESCRIPTION["HM-LC-Sw2-FM"] = "HM-LC-Sw2-FM"; +DEV_PATHS["HM-LC-Sw2-FM"] = new Object(); +DEV_PATHS["HM-LC-Sw2-FM"]["50"] = "/config/img/devices/50/5_hm-lc-sw2-fm_thumb.png"; +DEV_PATHS["HM-LC-Sw2-FM"]["250"] = "/config/img/devices/250/5_hm-lc-sw2-fm.png"; +DEV_HIGHLIGHT["HM-LC-Sw2-FM"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Sw2-FM"]["1_AUS"] = [2, 0.34, 0.66, 0.068, 0.148]; +DEV_HIGHLIGHT["HM-LC-Sw2-FM"]["1_EIN"] = [2, 0.6, 0.66, 0.068, 0.148]; +DEV_HIGHLIGHT["HM-LC-Sw2-FM"]["2_AUS"] = [2, 0.256, 0.66, 0.068, 0.148]; +DEV_HIGHLIGHT["HM-LC-Sw2-FM"]["2_EIN"] = [2, 0.508, 0.66, 0.068, 0.148]; +DEV_HIGHLIGHT["HM-LC-Sw2-FM"]["1"] = [5, '1_AUS', '1_EIN']; +DEV_HIGHLIGHT["HM-LC-Sw2-FM"]["2"] = [5, '2_AUS', '2_EIN']; +DEV_LIST.push('ELV-SH-WSC'); +DEV_DESCRIPTION["ELV-SH-WSC"] = "HmIP-WSC"; +DEV_PATHS["ELV-SH-WSC"] = new Object(); +DEV_PATHS["ELV-SH-WSC"]["50"] = "/config/img/devices/50/220_hmip-wsc_thumb.png"; +DEV_PATHS["ELV-SH-WSC"]["250"] = "/config/img/devices/250/220_hmip-wsc.png"; +DEV_HIGHLIGHT["ELV-SH-WSC"] = new Object(); +DEV_LIST.push('HmIP-WTH-1'); +DEV_DESCRIPTION["HmIP-WTH-1"] = "HmIP-WTH-2"; +DEV_PATHS["HmIP-WTH-1"] = new Object(); +DEV_PATHS["HmIP-WTH-1"]["50"] = "/config/img/devices/50/121_hmip-wth_thumb.png"; +DEV_PATHS["HmIP-WTH-1"]["250"] = "/config/img/devices/250/121_hmip-wth.png"; +DEV_HIGHLIGHT["HmIP-WTH-1"] = new Object(); +DEV_LIST.push('HM-LC-Dim1T-CV-2'); +DEV_DESCRIPTION["HM-LC-Dim1T-CV-2"] = "HM-LC-Dim1T-CV"; +DEV_PATHS["HM-LC-Dim1T-CV-2"] = new Object(); +DEV_PATHS["HM-LC-Dim1T-CV-2"]["50"] = "/config/img/devices/50/66_hm-lc-dim1t-cv_thumb.png"; +DEV_PATHS["HM-LC-Dim1T-CV-2"]["250"] = "/config/img/devices/250/66_hm-lc-dim1t-cv.png"; +DEV_HIGHLIGHT["HM-LC-Dim1T-CV-2"] = new Object(); +DEV_LIST.push('HM-Dis-EP-WM55'); +DEV_DESCRIPTION["HM-Dis-EP-WM55"] = "HM-Dis-EP-WM55"; +DEV_PATHS["HM-Dis-EP-WM55"] = new Object(); +DEV_PATHS["HM-Dis-EP-WM55"]["50"] = "/config/img/devices/50/128_hm-dis-ep-wm55_thumb.png"; +DEV_PATHS["HM-Dis-EP-WM55"]["250"] = "/config/img/devices/250/128_hm-dis-ep-wm55.png"; +DEV_HIGHLIGHT["HM-Dis-EP-WM55"] = new Object(); +DEV_LIST.push('HM-LC-Sw1-Pl-3'); +DEV_DESCRIPTION["HM-LC-Sw1-Pl-3"] = "HM-LC-Sw1-Pl"; +DEV_PATHS["HM-LC-Sw1-Pl-3"] = new Object(); +DEV_PATHS["HM-LC-Sw1-Pl-3"]["50"] = "/config/img/devices/50/OM55_DimmerSwitch_thumb.png"; +DEV_PATHS["HM-LC-Sw1-Pl-3"]["250"] = "/config/img/devices/250/OM55_DimmerSwitch.png"; +DEV_HIGHLIGHT["HM-LC-Sw1-Pl-3"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Sw1-Pl-3"]["1_part1"] = [2, 0.548, 0.468, 0.072, 0.052]; +DEV_HIGHLIGHT["HM-LC-Sw1-Pl-3"]["1_part2"] = [2, 0.612, 0.452, 0.028, 0.056]; +DEV_HIGHLIGHT["HM-LC-Sw1-Pl-3"]["1"] = [5, '1_part1', '1_part2']; +DEV_LIST.push('HmIP-PDT-UK'); +DEV_DESCRIPTION["HmIP-PDT-UK"] = "PDT"; +DEV_PATHS["HmIP-PDT-UK"] = new Object(); +DEV_PATHS["HmIP-PDT-UK"]["50"] = "/config/img/devices/50/113_hmip-psm-uk_thumb.png"; +DEV_PATHS["HmIP-PDT-UK"]["250"] = "/config/img/devices/250/113_hmip-psm-uk.png"; +DEV_HIGHLIGHT["HmIP-PDT-UK"] = new Object(); +DEV_LIST.push('HmIPW-SMI55'); +DEV_DESCRIPTION["HmIPW-SMI55"] = "HmIPW-SMI55"; +DEV_PATHS["HmIPW-SMI55"] = new Object(); +DEV_PATHS["HmIPW-SMI55"]["50"] = "/config/img/devices/50/195_hmipw-smi55_thumb.png"; +DEV_PATHS["HmIPW-SMI55"]["250"] = "/config/img/devices/250/195_hmipw-smi55.png"; +DEV_HIGHLIGHT["HmIPW-SMI55"] = new Object(); +DEV_HIGHLIGHT["HmIPW-SMI55"]["1"] = [1, 0.530, 0.820, 0.025]; +DEV_HIGHLIGHT["HmIPW-SMI55"]["2"] = [1, 0.505, 0.210, 0.025]; +DEV_LIST.push('HM-LC-Sw1-Pl-DN-R2'); +DEV_DESCRIPTION["HM-LC-Sw1-Pl-DN-R2"] = "HM-LC-Sw1-Pl-DN-R2"; +DEV_PATHS["HM-LC-Sw1-Pl-DN-R2"] = new Object(); +DEV_PATHS["HM-LC-Sw1-Pl-DN-R2"]["50"] = "/config/img/devices/50/107_hm-es-pmsw1-pl-R2_thumb.png"; +DEV_PATHS["HM-LC-Sw1-Pl-DN-R2"]["250"] = "/config/img/devices/250/107_hm-es-pmsw1-pl-R2.png"; +DEV_HIGHLIGHT["HM-LC-Sw1-Pl-DN-R2"] = new Object(); +DEV_LIST.push('HmIP-BBL-2'); +DEV_DESCRIPTION["HmIP-BBL-2"] = "HmIP-BBL-2"; +DEV_PATHS["HmIP-BBL-2"] = new Object(); +DEV_PATHS["HmIP-BBL-2"]["50"] = "/config/img/devices/50/PushButton-2ch-wm_thumb.png"; +DEV_PATHS["HmIP-BBL-2"]["250"] = "/config/img/devices/250/PushButton-2ch-wm.png"; +DEV_HIGHLIGHT["HmIP-BBL-2"] = new Object(); +DEV_HIGHLIGHT["HmIP-BBL-2"]["2"] = [2, 0.244, 0.312, 0.428, 0.168]; +DEV_HIGHLIGHT["HmIP-BBL-2"]["1"] = [2, 0.244, 0.56, 0.428, 0.168]; +DEV_HIGHLIGHT["HmIP-BBL-2"]["1+2"] = [2, 0.244, 0.308, 0.428, 0.416]; +DEV_LIST.push('HmIP-STHO-A'); +DEV_DESCRIPTION["HmIP-STHO-A"] = "HmIP-STHO"; +DEV_PATHS["HmIP-STHO-A"] = new Object(); +DEV_PATHS["HmIP-STHO-A"]["50"] = "/config/img/devices/50/148_hmip-stho_thumb.png"; +DEV_PATHS["HmIP-STHO-A"]["250"] = "/config/img/devices/250/148_hmip-stho.png"; +DEV_HIGHLIGHT["HmIP-STHO-A"] = new Object(); +DEV_LIST.push('HM-WDS10-TH-O'); +DEV_DESCRIPTION["HM-WDS10-TH-O"] = "HM-WDS10-TH-O"; +DEV_PATHS["HM-WDS10-TH-O"] = new Object(); +DEV_PATHS["HM-WDS10-TH-O"]["50"] = "/config/img/devices/50/TH_CS_thumb.png"; +DEV_PATHS["HM-WDS10-TH-O"]["250"] = "/config/img/devices/250/TH_CS.png"; +DEV_HIGHLIGHT["HM-WDS10-TH-O"] = new Object(); +DEV_LIST.push('ELV-SH-BS2'); +DEV_DESCRIPTION["ELV-SH-BS2"] = "HmIP-BS2"; +DEV_PATHS["ELV-SH-BS2"] = new Object(); +DEV_PATHS["ELV-SH-BS2"]["50"] = "/config/img/devices/50/PushButton-2ch-wm_thumb.png"; +DEV_PATHS["ELV-SH-BS2"]["250"] = "/config/img/devices/250/PushButton-2ch-wm.png"; +DEV_HIGHLIGHT["ELV-SH-BS2"] = new Object(); +DEV_HIGHLIGHT["ELV-SH-BS2"]["1"] = [2, 0.244, 0.312, 0.428, 0.168]; +DEV_HIGHLIGHT["ELV-SH-BS2"]["2"] = [2, 0.244, 0.56, 0.428, 0.168]; +DEV_HIGHLIGHT["ELV-SH-BS2"]["1+2"] = [2, 0.244, 0.308, 0.428, 0.416]; +DEV_LIST.push('ZEL STG RM FSS UP3'); +DEV_DESCRIPTION["ZEL STG RM FSS UP3"] = "ZEL_STG_RM_FSS_UP3"; +DEV_PATHS["ZEL STG RM FSS UP3"] = new Object(); +DEV_PATHS["ZEL STG RM FSS UP3"]["50"] = "/config/img/devices/50/39_hm-swi-3-fm_thumb.png"; +DEV_PATHS["ZEL STG RM FSS UP3"]["250"] = "/config/img/devices/250/39_hm-swi-3-fm.png"; +DEV_HIGHLIGHT["ZEL STG RM FSS UP3"] = new Object(); +DEV_HIGHLIGHT["ZEL STG RM FSS UP3"]["1_Key"] = [3, 0.18, 0.216, '1', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["ZEL STG RM FSS UP3"]["1_Kreis"] = [4, 0.220, 0.480, 0.028, 0.028]; +DEV_HIGHLIGHT["ZEL STG RM FSS UP3"]["1"] = [5, '1_Key', '1_Kreis']; +DEV_HIGHLIGHT["ZEL STG RM FSS UP3"]["2_Key"] = [3, 0.18, 0.216, '2', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["ZEL STG RM FSS UP3"]["2_Kreis"] = [4, 0.265, 0.405, 0.028, 0.028]; +DEV_HIGHLIGHT["ZEL STG RM FSS UP3"]["2"] = [5, '2_Key', '2_Kreis']; +DEV_HIGHLIGHT["ZEL STG RM FSS UP3"]["3_Key"] = [3, 0.18, 0.216, '3', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["ZEL STG RM FSS UP3"]["3_Kreis"] = [4, 0.310, 0.33, 0.028, 0.028]; +DEV_HIGHLIGHT["ZEL STG RM FSS UP3"]["3"] = [5, '3_Key', '3_Kreis']; +DEV_LIST.push('HmIP-CCU3'); +DEV_DESCRIPTION["HmIP-CCU3"] = "HmIP-CCU3"; +DEV_PATHS["HmIP-CCU3"] = new Object(); +DEV_PATHS["HmIP-CCU3"]["50"] = "/config/img/devices/50/CCU3_thumb.png"; +DEV_PATHS["HmIP-CCU3"]["250"] = "/config/img/devices/250/CCU3.png"; +DEV_HIGHLIGHT["HmIP-CCU3"] = new Object(); +DEV_LIST.push('263 145'); +DEV_DESCRIPTION["263 145"] = "263_145"; +DEV_PATHS["263 145"] = new Object(); +DEV_PATHS["263 145"]["50"] = "/config/img/devices/50/38_hm-pbi-4-fm_thumb.png"; +DEV_PATHS["263 145"]["250"] = "/config/img/devices/250/38_hm-pbi-4-fm.png"; +DEV_HIGHLIGHT["263 145"] = new Object(); +DEV_HIGHLIGHT["263 145"]["1_Key"] = [3, 0.18, 0.216, '1', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["263 145"]["1_Kreis"] = [4, 0.265, 0.500, 0.028, 0.028]; +DEV_HIGHLIGHT["263 145"]["1"] = [5, '1_Key', '1_Kreis']; +DEV_HIGHLIGHT["263 145"]["2_Key"] = [3, 0.18, 0.216, '2', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["263 145"]["2_Kreis"] = [4, 0.287, 0.465, 0.028, 0.028]; +DEV_HIGHLIGHT["263 145"]["2"] = [5, '2_Key', '2_Kreis']; +DEV_HIGHLIGHT["263 145"]["3_Key"] = [3, 0.18, 0.216, '3', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["263 145"]["3_Kreis"] = [4, 0.309, 0.430, 0.028, 0.028]; +DEV_HIGHLIGHT["263 145"]["3"] = [5, '3_Key', '3_Kreis']; +DEV_HIGHLIGHT["263 145"]["4_Key"] = [3, 0.18, 0.216, '4', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["263 145"]["4_Kreis"] = [4, 0.331, 0.395, 0.028, 0.028]; +DEV_HIGHLIGHT["263 145"]["4"] = [5, '4_Key', '4_Kreis']; +DEV_LIST.push('HM-LC-Sw4-SM-2'); +DEV_DESCRIPTION["HM-LC-Sw4-SM-2"] = "HM-LC-Sw4-SM"; +DEV_PATHS["HM-LC-Sw4-SM-2"] = new Object(); +DEV_PATHS["HM-LC-Sw4-SM-2"]["50"] = "/config/img/devices/50/3_hm-lc-sw4-sm_thumb.png"; +DEV_PATHS["HM-LC-Sw4-SM-2"]["250"] = "/config/img/devices/250/3_hm-lc-sw4-sm.png"; +DEV_HIGHLIGHT["HM-LC-Sw4-SM-2"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Sw4-SM-2"]["1_Part1"] = [6, 0.136, 0.896, 0.136, 0.98, 0.012]; +DEV_HIGHLIGHT["HM-LC-Sw4-SM-2"]["1_Part2"] = [6, 0.136, 0.98, 0.096, 0.916, 0.012]; +DEV_HIGHLIGHT["HM-LC-Sw4-SM-2"]["1_Part3"] = [6, 0.136, 0.98, 0.176, 0.916, 0.012]; +DEV_HIGHLIGHT["HM-LC-Sw4-SM-2"]["1_Arrow"] = [5, '1_Part1', '1_Part2', '1_Part3']; +DEV_HIGHLIGHT["HM-LC-Sw4-SM-2"]["2_Arrow"] = [7, '1_Arrow', 0.164, 0]; +DEV_HIGHLIGHT["HM-LC-Sw4-SM-2"]["3_Arrow"] = [7, '1_Arrow', 0.328, 0]; +DEV_HIGHLIGHT["HM-LC-Sw4-SM-2"]["4_Arrow"] = [7, '1_Arrow', 0.492, 0]; +DEV_HIGHLIGHT["HM-LC-Sw4-SM-2"]["1_Key"] = [4, 0.244, 0.372, 0.04, 0.044]; +DEV_HIGHLIGHT["HM-LC-Sw4-SM-2"]["2_Key"] = [4, 0.328, 0.372, 0.04, 0.044]; +DEV_HIGHLIGHT["HM-LC-Sw4-SM-2"]["3_Key"] = [4, 0.404, 0.372, 0.04, 0.044]; +DEV_HIGHLIGHT["HM-LC-Sw4-SM-2"]["4_Key"] = [4, 0.484, 0.372, 0.04, 0.044]; +DEV_HIGHLIGHT["HM-LC-Sw4-SM-2"]["1"] = [5, '1_Arrow', '1_Key']; +DEV_HIGHLIGHT["HM-LC-Sw4-SM-2"]["2"] = [5, '2_Arrow', '2_Key']; +DEV_HIGHLIGHT["HM-LC-Sw4-SM-2"]["3"] = [5, '3_Arrow', '3_Key']; +DEV_HIGHLIGHT["HM-LC-Sw4-SM-2"]["4"] = [5, '4_Arrow', '4_Key']; +DEV_LIST.push('HmIP-WSC'); +DEV_DESCRIPTION["HmIP-WSC"] = "HmIP-WSC"; +DEV_PATHS["HmIP-WSC"] = new Object(); +DEV_PATHS["HmIP-WSC"]["50"] = "/config/img/devices/50/220_hmip-wsc_thumb.png"; +DEV_PATHS["HmIP-WSC"]["250"] = "/config/img/devices/250/220_hmip-wsc.png"; +DEV_HIGHLIGHT["HmIP-WSC"] = new Object(); +DEV_LIST.push('HM-LC-Sw4-Ba-PCB'); +DEV_DESCRIPTION["HM-LC-Sw4-Ba-PCB"] = "HM-LC-Sw4-Ba-PCB"; +DEV_PATHS["HM-LC-Sw4-Ba-PCB"] = new Object(); +DEV_PATHS["HM-LC-Sw4-Ba-PCB"]["50"] = "/config/img/devices/50/88_hm-lc-sw4-ba-pcb_thumb.png"; +DEV_PATHS["HM-LC-Sw4-Ba-PCB"]["250"] = "/config/img/devices/250/88_hm-lc-sw4-ba-pcb.png"; +DEV_HIGHLIGHT["HM-LC-Sw4-Ba-PCB"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Sw4-Ba-PCB"]["1"] = [2, 0.140, 0.704, 0.092, 0.052]; +DEV_HIGHLIGHT["HM-LC-Sw4-Ba-PCB"]["2"] = [2, 0.328, 0.704, 0.092, 0.052]; +DEV_HIGHLIGHT["HM-LC-Sw4-Ba-PCB"]["3"] = [2, 0.512, 0.704, 0.092, 0.052]; +DEV_HIGHLIGHT["HM-LC-Sw4-Ba-PCB"]["4"] = [2, 0.688, 0.704, 0.092, 0.052]; +DEV_LIST.push('ZEL STG RM WT 2'); +DEV_DESCRIPTION["ZEL STG RM WT 2"] = "ZEL_STG_RM_WT_2"; +DEV_PATHS["ZEL STG RM WT 2"] = new Object(); +DEV_PATHS["ZEL STG RM WT 2"]["50"] = "/config/img/devices/50/75_hm-pb-2-wm55_thumb.png"; +DEV_PATHS["ZEL STG RM WT 2"]["250"] = "/config/img/devices/250/75_hm-pb-2-wm55.png"; +DEV_HIGHLIGHT["ZEL STG RM WT 2"] = new Object(); +DEV_HIGHLIGHT["ZEL STG RM WT 2"]["2"] = [2, 0.204, 0.23, 0.546, 0.128]; +DEV_HIGHLIGHT["ZEL STG RM WT 2"]["1"] = [2, 0.204, 0.65, 0.546, 0.128]; +DEV_LIST.push('HM-EM-CCM'); +DEV_DESCRIPTION["HM-EM-CCM"] = "HM-EM-CCM"; +DEV_PATHS["HM-EM-CCM"] = new Object(); +DEV_PATHS["HM-EM-CCM"]["50"] = "/config/img/devices/50/44_hm-em-ccm_thumb.png"; +DEV_PATHS["HM-EM-CCM"]["250"] = "/config/img/devices/250/44_hm-em-ccm.png"; +DEV_HIGHLIGHT["HM-EM-CCM"] = new Object(); +DEV_LIST.push('HM-LC-Sw1-Pl-2'); +DEV_DESCRIPTION["HM-LC-Sw1-Pl-2"] = "HM-LC-Sw1-Pl"; +DEV_PATHS["HM-LC-Sw1-Pl-2"] = new Object(); +DEV_PATHS["HM-LC-Sw1-Pl-2"]["50"] = "/config/img/devices/50/OM55_DimmerSwitch_thumb.png"; +DEV_PATHS["HM-LC-Sw1-Pl-2"]["250"] = "/config/img/devices/250/OM55_DimmerSwitch.png"; +DEV_HIGHLIGHT["HM-LC-Sw1-Pl-2"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Sw1-Pl-2"]["1_part1"] = [2, 0.548, 0.468, 0.072, 0.052]; +DEV_HIGHLIGHT["HM-LC-Sw1-Pl-2"]["1_part2"] = [2, 0.612, 0.452, 0.028, 0.056]; +DEV_HIGHLIGHT["HM-LC-Sw1-Pl-2"]["1"] = [5, '1_part1', '1_part2']; +DEV_LIST.push('HM-MOD-EM-8'); +DEV_DESCRIPTION["HM-MOD-EM-8"] = "HM-MOD-EM-8"; +DEV_PATHS["HM-MOD-EM-8"] = new Object(); +DEV_PATHS["HM-MOD-EM-8"]["50"] = "/config/img/devices/50/99_hm-mod-em-8_thumb.png"; +DEV_PATHS["HM-MOD-EM-8"]["250"] = "/config/img/devices/250/99_hm-mod-em-8.png"; +DEV_HIGHLIGHT["HM-MOD-EM-8"] = new Object(); +//====================================================================== +//Defines +//====================================================================== +GD_TYPE = new Array(); +GD_TYPE["UNDEFINED"] = 0; +GD_TYPE["CIRCLE"] = 1; +GD_TYPE["RECTANGLE"] = 2; +GD_TYPE["STRING"] = 3; +GD_TYPE["ELLIPSE"] = 4; +GD_TYPE["FORMSET"] = 5; +GD_TYPE["LINE"] = 6; +GD_TYPE["OFFSET"] = 7; + +//Bedeutung einer Position im Array DEV_HIGHLIGHT +//Typangabe +gd_type = 0; + +//circle, point +gd_xx = 1; +gd_yy = 2; +gd_rr = 3; + +//rectangle, line, ellipse +gd_dx = 3; +gd_dy = 4; + +//String +gd_string = 3; +gd_fontsize = 4; +gd_fontfamily = 5; +gd_fontstyle = 6; + +//Line +gd_x1 = 1; +gd_y1 = 2; +gd_x2 = 3; +gd_y2 = 4; +gd_stroke = 5; + +//Offset +gd_nameoff = 1; +gd_xoff = 2; +gd_yoff = 3; +//====================================================================== + +DEV_TypeExists = function(type) +{ + return DEV_LIST.indexOf(type) >= 0; +}; + +DEV_getDescription = function(type) +{ + //if (DEV_TypeExists(type)) descr = DEV_DESCRIPTION[type]; + + var descr; + + try { + descr = DEV_DESCRIPTION[type]; + } catch (e) { } + + if (!descr) descr = type; + + return descr; +}; + +DEV_getImagePath = function(type, size) +{ + + var product = WEBUI_VERSION.split(".")[0]; + + if (product < 3 && (type == "HmIP-RCV-50")) { + DEV_PATHS[type][50] = "/config/img/devices/50/CCU2_thumb.png"; + DEV_PATHS[type][250] = "/config/img/devices/250/CCU2.png"; + } + + if (product >= 3 && (type == "HM-RCV-50" || type == "HMW-RCV-50")) { + DEV_PATHS[type][50] = "/config/img/devices/50/CCU3-1-50_thumb.png"; + DEV_PATHS[type][250] = "/config/img/devices/250/CCU3-1-50.png"; + } + + var path; + + try { + path = DEV_PATHS[type][size]; + } catch (e) { } + + if (! path) path = "#"; + + return path; +}; + +DEV_getImageHighlight = function(type, form) +{ + var form; + + try { + form = DEV_HIGHLIGHT[type][form]; + } catch (e) { } + + if (! form) form = null; + + // The position of the channel number adapted to the housing of the CCU3 + var product = WEBUI_VERSION.split(".")[0]; + if (product >= 3 && (type == "HM-RCV-50" || type == "HMW-RCV-50")) { + if (form && form.length > 2) { + form[2] = 0.57; // y-position + } + } + + return form; +}; +elvST = new Array(); +elvST['ABSOLUTE_ANGLE'] = '${stringTableAbsoluteAngle}'; +elvST['ABSOLUTE_ANGLE_STATUS=NORMAL'] = '${stringTableAbsoluteAngleStatus}: ${lblNormal}'; +elvST['ABSOLUTE_ANGLE_STATUS=UNKNOWN'] = '${stringTableAbsoluteAngleStatus}: ${lblUnknown}'; +elvST['ACCELERATION_TRANSCEIVER'] = '${stringTableAccelerationTransceiverTitle}'; +elvST['ACCELERATION_TRANSCEIVER|CHANNEL_OPERATION_MODE'] = '${stringTableAccelerationTransceiverChannelOperationMode}'; +elvST['ACCELERATION_TRANSCEIVER|CHANNEL_OPERATION_MODE=OFF'] = '${stringTableAccelerationTransceiverChannelOperationModeOff}'; +elvST['ACCELERATION_TRANSCEIVER|CHANNEL_OPERATION_MODE=ANY_MOTION'] = '${stringTableAccelerationTransceiverChannelOperationModeAnyMotion}'; +elvST['ACCELERATION_TRANSCEIVER|CHANNEL_OPERATION_MODE=FLAT_DECT'] = '${stringTableAccelerationTransceiverChannelOperationModeFlat}'; +elvST['ACCELERATION_TRANSCEIVER|MOTION=FALSE'] = '${stringTableAccelerationTransceiverMotionDetectorMotionFalse}'; +elvST['ACCELERATION_TRANSCEIVER|MOTION=TRUE'] = '${stringTableAccelerationTransceiverMotionDetectorMotionTrue}'; +elvST['ACCELERATION_TRANSCEIVER|MSG_FOR_POS_A'] = '${stringTableTiltSensorMsgPosA0}'; +elvST['ACCELERATION_TRANSCEIVER|MSG_FOR_POS_A=CLOSED'] = '${stringTableTiltSensorMsgPosA1}'; +elvST['ACCELERATION_TRANSCEIVER|MSG_FOR_POS_A=NO_MSG'] = '${stringTableTiltSensorMsgPosA2}'; +elvST['ACCELERATION_TRANSCEIVER|MSG_FOR_POS_A=OPEN'] = '${stringTableTiltSensorMsgPosA3}'; +elvST['ACCELERATION_TRANSCEIVER|MSG_FOR_POS_B'] = '${stringTableTiltSensorMsgPosB0}'; +elvST['ACCELERATION_TRANSCEIVER|MSG_FOR_POS_B=CLOSED'] = '${stringTableTiltSensorMsgPosB1}'; +elvST['ACCELERATION_TRANSCEIVER|MSG_FOR_POS_B=NO_MSG'] = '${stringTableTiltSensorMsgPosB2}'; +elvST['ACCELERATION_TRANSCEIVER|MSG_FOR_POS_B=OPEN'] = '${stringTableTiltSensorMsgPosB3}'; +elvST['ACCELERATION_TRANSCEIVER|NOTIFICATION_SOUND_TYPE_HIGH_TO_LOW'] = '${stringTableAccelerationTransceiverNotificationSoundTypeHighToLow}'; +elvST['ACCELERATION_TRANSCEIVER|NOTIFICATION_SOUND_TYPE_LOW_TO_HIGH'] = '${stringTableAccelerationTransceiverNotificationSoundTypeLowToHigh}'; +elvST['ACCELERATION_TRANSCEIVER|STATE=CLOSED'] = '${stringTableRHSMsgPosClosed}'; +elvST['ACCELERATION_TRANSCEIVER|STATE=OPEN'] = '${stringTableRHSMsgPosOpen}'; +elvST['ACCELERATION_TRANSCEIVER|STATE=TILTED'] = '${stringTableRHSMsgPosTilted}'; +elvST['ACCESS_RECEIVER'] = '${stringTableAccessReceiverTitle}'; +elvST['ACCESS_RECEIVER|STATE=FALSE'] = '${stringTableAccessReceiverStateFalse}'; +elvST['ACCESS_RECEIVER|STATE=TRUE'] = '${stringTableAccessReceiverStateTrue}'; +elvST['ACCESS_RECEIVER|ACCESS_AUTHORIZATION=ENABLE'] = '${stringTableAccessReceiverAccessAuthorizationTrue}'; +elvST['ACCESS_RECEIVER|ACCESS_AUTHORIZATION=DISABLE'] = '${stringTableAccessReceiverAccessAuthorizationFalse}'; +elvST['ACCESS_TRANSCEIVER'] = '${stringTableAccessTransceiverTitle}'; +elvST['ACCESS_TRANSCEIVER|STATE=FALSE'] = '${stringTableAccessTransceiverStateFalse}'; +elvST['ACCESS_TRANSCEIVER|STATE=TRUE'] = '${stringTableAccessTransceiverStateTrue}'; +elvST['ACCESS_TRANSCEIVER|ACCESS_AUTHORIZATION=ENABLE'] = '${stringTableAccessTransceiverAccessAuthorizationTrue}'; +elvST['ACCESS_TRANSCEIVER|ACCESS_AUTHORIZATION=DISABLE'] = '${stringTableAccessTransceiverAccessAuthorizationFalse}'; +elvST['ACCESS_TRANSCEIVER|PRESS_LOCK'] = '${stringTableKeyAccessTransceiverPressLock}'; +elvST['ACCESS_TRANSCEIVER|PRESS_UNLOCK'] = '${stringTableKeyAccessTransceiverPressUnLock}'; +elvST['ACOUSTIC_ALARM_ACTIVE=FALSE'] = '${stringTableAcousticAlarmActiveFalse}'; +elvST['ACOUSTIC_ALARM_ACTIVE=TRUE'] = '${stringTableAcousticAlarmActiveTrue}'; +elvST['OPTICAL_ALARM_ACTIVE=FALSE'] = '${stringTableOpticalAlarmActiveFalse}'; +elvST['OPTICAL_ALARM_ACTIVE=TRUE'] = '${stringTableOpticalAlarmActiveTrue}'; +elvST['ACOUSTIC_ALARM_SELECTION=DELAYED_EXTERNALLY_ARMED'] = '${stringTableAlarmDelayedExternallyArmed}'; +elvST['ACOUSTIC_ALARM_SELECTION=DELAYED_INTERNALLY_ARMED'] = '${stringTableAlarmDelayedInternallyArmed}'; +elvST['ACOUSTIC_ALARM_SELECTION=DISABLE_ACOUSTIC_SIGNAL'] = '${stringTableAlarmDisableAcousticSignal}'; +elvST['ACOUSTIC_ALARM_SELECTION=DISARMED'] = '${stringTableAlarmDisarmed}'; +elvST['ACOUSTIC_ALARM_SELECTION=ERROR'] = '${stringTableAlarmError}'; +elvST['ACOUSTIC_ALARM_SELECTION=EVENT'] = '${stringTableAlarmEvent}'; +elvST['ACOUSTIC_ALARM_SELECTION=EXTERNALLY_ARMED'] = '${stringTableAlarmExternallyArmed}'; +elvST['ACOUSTIC_ALARM_SELECTION=INTERNALLY_ARMED'] = '${stringTableAlarmInternallyArmed}'; +elvST['ACOUSTIC_ALARM_SELECTION=LOW_BATTERY'] = '${stringTableAlarmLowBattery}'; +elvST['ACOUSTIC_ALARM_SELECTION=FREQUENCY_RISING'] = '${stringTableAlarmFrequencyRising}'; +elvST['ACOUSTIC_ALARM_SELECTION=FREQUENCY_FALLING'] = '${stringTableAlarmFrequencyFalling}'; +elvST['ACOUSTIC_ALARM_SELECTION=FREQUENCY_RISING_AND_FALLING'] = '${stringTableAlarmFrequencyRisingAndFalling}'; +elvST['ACOUSTIC_ALARM_SELECTION=FREQUENCY_ALTERNATING_LOW_HIGH'] = '${stringTableAlarmFrequencyAlternatingLowHigh}'; +elvST['ACOUSTIC_ALARM_SELECTION=FREQUENCY_ALTERNATING_LOW_MID_HIGH'] = '${stringTableAlarmFrequencyAlternatingLowMidHigh}'; +elvST['ACOUSTIC_ALARM_SELECTION=FREQUENCY_HIGHON_OFF'] = '${stringTableAlarmFrequencyHighOnOff}'; +elvST['ACOUSTIC_ALARM_SELECTION=FREQUENCY_HIGHON_LONGOFF'] = '${stringTableAlarmFrequencyHighOnLongOff}'; +elvST['ACOUSTIC_ALARM_SELECTION=FREQUENCY_LOWON_OFF_HIGHON_OFF'] = '${stringTableAlarmFrequencyLowOnOffHighonOff}'; +elvST['ACOUSTIC_ALARM_SELECTION=FREQUENCY_LOWON_LONGOFF_HIGHON_LONGOFF'] = '${stringTableAlarmFrequencyLowOnLongOffHighOnLongOff}'; +elvST['ACOUSTIC_SIGNAL_VIRTUAL_RECEIVER'] = '${stringTableAcousticSignalVirtualReceiverTitle}'; +elvST['ACOUSTIC_SIGNAL_VIRTUAL_RECEIVER|COMBINED_PARAMETER'] = '${lblPlaylist}'; +elvST['ACOUSTIC_SIGNAL_VIRTUAL_RECEIVER|LEVEL'] = '${lblVolume}'; +elvST['ACTOR_SECURITY'] = '${stringTableActorSecurityTitle}'; +elvST['ACTOR_SECURITY|ON_TIME'] = '${stringTableActorSecurityOnTime}'; +elvST['ACTOR_SECURITY|SECURE_STATE=FALSE'] = '${stringTableActorSecuritySecureStateFalse}'; +elvST['ACTOR_SECURITY|SECURE_STATE=TRUE'] = '${stringTableActorSecuritySecureStateTrue}'; +elvST['ACTOR_WINDOW'] = '${stringTableActorWindowTitle}'; +elvST['ACTOR_WINDOW|ERROR=NO_ERROR'] = '${stringTableActorWindowNoError}'; +elvST['ACTOR_WINDOW|ERR_DETECT_EIA485_SERVICE=TRUE'] = '${stringTableActorWindowErrorETA485}'; +elvST['ACTOR_WINDOW|ERR_TTCU_INTERNAL_TEST=TRUE'] = '${stringTableActorWindowErrorWindowControlDevice}'; +elvST['ACTOR_WINDOW|ERR_TTCU_LOCK_ROLLERS_SHORTED=TRUE'] = '${stringTableActorWindowErrorLockRoller}'; +elvST['ACTOR_WINDOW|ERR_TTCU_MAGNET_ERROR=TRUE'] = '${stringTableActorWindowErrorMagnet}'; +elvST['ACTOR_WINDOW|ERR_TTCU_POWER_ONTIME_EXCEEDED=TRUE'] = '${stringTableActorWindowErrorOntimeExceeded}'; +elvST['ACTOR_WINDOW|ERR_TTCU_SENSOR_STRIP_DISCONNECTED=TRUE'] = '${stringTableActorWindowErrorSensorStrip_1}'; +elvST['ACTOR_WINDOW|ERR_TTCU_SENSOR_STRIP_SHORTED=TRUE'] = '${stringTableActorWindowErrorSensorStrip_0}'; +elvST['ACTOR_WINDOW|ERR_TTCU_STOP_AFTER_10_CLOSING_TRIES=TRUE'] = '${stringTableActorWindowErrorCancel10}'; +elvST['ACTOR_WINDOW|ERR_TTCU_TURN_TILT_ACT_ALLOY_MOSFET=TRUE'] = '${stringTableActorWindowErrorMOSFET}'; +elvST['ACTOR_WINDOW|ERR_TTCU_TURN_TILT_ACT_ASYNCHRON=TRUE'] = '${stringTableActorWindowErrorAsynchron}'; +elvST['ACTOR_WINDOW|ERR_TTCU_TURN_TILT_ACT_BLOCKED=TRUE'] = '${stringTableActorWindowErrorTurnTiltAct_1}'; +elvST['ACTOR_WINDOW|ERR_TTCU_TURN_TILT_ACT_CONTACT_PROBLEM=TRUE'] = '${stringTableActorWindowErrorTurnTiltAct_3}'; +elvST['ACTOR_WINDOW|ERR_TTCU_TURN_TILT_ACT_NO_SPEED_SIGNAL=TRUE'] = '${stringTableActorWindowErrorNoSpeedSignal}'; +elvST['ACTOR_WINDOW|ERR_TTCU_TURN_TILT_ACT_OVERCURRENT=TRUE'] = '${stringTableActorWindowErrorTurnTiltAct_2}'; +elvST['ACTOR_WINDOW|ERR_TTCU_TURN_TILT_ACT_SHORTED=TRUE'] = '${stringTableActorWindowErrorTurnTiltAct_0}'; +elvST['ACTOR_WINDOW|ERR_TTCU_WRONG_VOLTAGE_POLARITY=TRUE'] = '${stringTableActorWindowErrorVoltageWrongPolarity}'; +elvST['ACTOR_WINDOW|ERR_TTM_INTERNAL=TRUE'] = '${stringTableActorWindowErrorTipTronicModul}'; +elvST['ACTOR_WINDOW|ERR_TTM_OVERVOLT=NO_ERROR'] = '${stringTableActorWindowErrorVoltageOverNoError}'; +elvST['ACTOR_WINDOW|ERR_TTM_OVERVOLT=OVERVOLT'] = '${stringTableActorWindowErrorVoltageOver}'; +elvST['ACTOR_WINDOW|ERR_TTM_UNDERVOLT=NO_ERROR'] = '${stringTableActorWindowErrorVoltageUnderNoError}'; +elvST['ACTOR_WINDOW|ERR_TTM_UNDERVOLT=UNDERVOLT'] = '${stringTableActorWindowErrorVoltageUnder}'; +elvST['ACTOR_WINDOW|ERR_WINDOW_NOT_FOUND=TRUE'] = '${stringTableActorWindowErrorNotFound}'; +elvST['ACTOR_WINDOW|ERR_WIN_STAY_IN_INITIAL_OPERATION=TRUE'] = '${stringTableActorWindowErrorStayInInitial}'; +elvST['ACTOR_WINDOW|FREE_TO_USE=TRUE'] = '${stringTableActorWindowErrorFreeToUse}'; +elvST['ACTOR_WINDOW|HANDLE_LED_MODE=DIMMED_ON'] = '${stringTableActorWindowLEDDimmed}'; +elvST['ACTOR_WINDOW|HANDLE_LED_MODE=FULL_ON'] = '${stringTableActorWindowLEDOn}'; +elvST['ACTOR_WINDOW|HANDLE_LED_MODE=OFF'] = '${stringTableActorWindowLEDOff}'; +elvST['ACTOR_WINDOW|HANDLE_LOCK=FALSE'] = '${stringTableActorWindowHandleLockFalse}'; +elvST['ACTOR_WINDOW|HANDLE_LOCK=TRUE'] = '${stringTableActorWindowHandleLockTrue}'; +elvST['ACTOR_WINDOW|LEVEL'] = '${stringTableActorWindowLevel}'; +elvST['ACTOR_WINDOW|LEVEL=LOCKED'] = '${stringTableActorWindowLevelLocked}'; +elvST['ACTOR_WINDOW|ON_TIME'] = '${stringTableActorWindowOnTime}'; +elvST['ACTOR_WINDOW|RELEASE_TURN=FALSE'] = '${stringTableActorWindowReleaseTurnFalse}'; +elvST['ACTOR_WINDOW|RELEASE_TURN=TRUE'] = '${stringTableActorWindowReleaseTurnTrue}'; +elvST['ACTOR_WINDOW|SHEV_POS=ZULUFT_BLOCKED'] = '${stringTableActorWindowVentBlocked}'; +elvST['ACTOR_WINDOW|SHEV_POS=ZULUFT_DEACTIVATED'] = '${stringTableActorWindowVentDeactivated}'; +elvST['ACTOR_WINDOW|SHEV_POS=ZULUFT_UNBLOCKED'] = '${stringTableActorWindowVentUnblocked}'; +elvST['ACTOR_WINDOW|STATUSINFO_MINDELAY'] = '${stringTableActorWindowStatusInfoMinDelay}'; +elvST['ACTOR_WINDOW|STATUSINFO_MINDELAY=NOT_USED'] = '${stringTableActorWindowStatusInfoNotUsed}'; +elvST['ACTOR_WINDOW|STATUSINFO_RANDOM'] = '${stringTableActorWindowStatusInfoRandom}'; +elvST['ACTOR_WINDOW|STICKY_ERR_TTM_OVERVOLT=OVERVOLT'] = '${stringTableActorWindowErrorVoltageOver}'; +elvST['ACTOR_WINDOW|STICKY_ERR_TTM_OVERVOLT=WAS_OVERVOLT'] = '${stringTableActorWindowErrorStickyWasVoltageOver}'; +elvST['ACTOR_WINDOW|STICKY_ERR_TTM_UNDERVOLT=UNDERVOLT'] = '${stringTableActorWindowErrorVoltageUnder}'; +elvST['ACTOR_WINDOW|STICKY_ERR_TTM_UNDERVOLT=WAS_UNDERVOLT'] = '${stringTableActorWindowErrorStickyWasVoltageUnder}'; +elvST['ACTOR_WINDOW|STOP'] = '${stringTableActorWindowStop}'; +elvST['ACTOR_WINDOW|WINTER_MODE'] = '${stringTableActorWindowWinterMode}'; +elvST['ACTOR_WINDOW|WINTER_MODE=NOT_USED'] = '${stringTableActorWindowWinterModeNotUsed}'; +elvST['ACTOR_WINDOW|WIN_RELEASE=FALSE'] = '${stringTableActorWindowReleaseFalse}'; +elvST['ACTOR_WINDOW|WIN_RELEASE=TRUE'] = '${stringTableActorWindowReleaseTrue}'; +elvST['ACTOR_WINDOW|WIN_RELEASE_ACT'] = '${stringTableActorWindowReleaseAction}'; +elvST['ACTUAL_HUMIDITY'] = '${stringTableWeatherHumidity}'; +elvST['ACTUAL_TEMPERATURE'] = '${stringTableClimateControlRTTransceiverActualTemp}'; +elvST['ACTUAL_TEMPERATURE_STATUS=NORMAL'] = '${lblValue} ${stringTableClimateControlRTTransceiverActualTemp}: ${lblNormal}'; +elvST['ACTUAL_TEMPERATURE_STATUS=0'] = '${lblValue} ${stringTableClimateControlRTTransceiverActualTemp}: ${lblNormal}'; +elvST['ACTUAL_TEMPERATURE_STATUS=UNKNOWN'] = '${lblValue} ${stringTableClimateControlRTTransceiverActualTemp}: ${lblUnknown}'; +elvST['ACTUAL_TEMPERATURE_STATUS=1'] = '${lblValue} ${stringTableClimateControlRTTransceiverActualTemp}: ${lblUnknown}'; +elvST['ACTUAL_TEMPERATURE_STATUS=OVERFLOW'] = '${lblValue} ${stringTableClimateControlRTTransceiverActualTemp}: ${lblOverflow}'; +elvST['ACTUAL_TEMPERATURE_STATUS=2'] = '${lblValue} ${stringTableClimateControlRTTransceiverActualTemp}: ${lblOverflow}'; +elvST['ACTUAL_TEMPERATURE_STATUS=UNDERFLOW'] = '${lblValue} ${stringTableClimateControlRTTransceiverActualTemp}: ${lblUnderflow}'; +elvST['ACTUAL_TEMPERATURE_STATUS=3'] = '${lblValue} ${stringTableClimateControlRTTransceiverActualTemp}: ${lblUnderflow}'; +elvST['AKKU|LEVEL'] = '${stringTableAccuLevel}'; +elvST['AKKU|STATUS=CHARGE'] = '${stringTableAccuCharging}'; +elvST['AKKU|STATUS=DISCHARGE'] = '${stringTableAccuDischarge}'; +elvST['AKKU|STATUS=STATE_UNKNOWN'] = '${stringTableAccuStateUnkown}'; +elvST['AKKU|STATUS=TRICKLE_CHARGE'] = '${stringTableAccuTrickleCharg}'; +elvST['ALARMACTUATOR'] = '${stringTableAlarmActuatorTitle}'; +elvST['ALARMACTUATOR|CYCLIC_INFO_MSG'] = '${stringTableAlarmActuatorCyclicInfoMsg}'; +elvST['ALARMACTUATOR|ERROR_BATTERY=BATTERY_DEFECT'] = '${stringTableBatteryDefect}'; +elvST['ALARMACTUATOR|ERROR_BATTERY=NO_ERROR'] = '${stringTableBatteryNotDefect}'; +elvST['ALARMACTUATOR|ON_TIME'] = '${stringTableAlarmActuatorOnTime}'; +elvST['ALARMACTUATOR|SABOTAGE_MSG'] = '${stringTableAlarmActuatorSabotageMsg}'; +elvST['ALARMACTUATOR|STATE=FALSE'] = '${stringTableAlarmActuatorStateFalse}'; +elvST['ALARMACTUATOR|STATE=TRUE'] = '${stringTableAlarmActuatorStateTrue}'; +elvST['ALARMTIME_MAX'] = '${stringTableAlarmTimeMax}'; +elvST['ALARM_SWITCH_VIRTUAL_RECEIVER'] = '${stringTableSwitchSensorTitle}'; +elvST['ALL_LEDS'] = '${stringTableAllLEDs}'; +elvST['ANALOG_INPUT'] = '${stringTableAnalog}'; +elvST['ANALOG_INPUT_TRANSMITTER|FILTER_SIZE'] = '${stringTableAnalogInputTransmitterFilterSize}'; +elvST['ANALOG_INPUT_TRANSMITTER|VOLTAGE'] = '${stringTableAnalogInputTransmitterVoltage}'; +elvST['ANALOG_INPUT_TRANSMITTER|VOLTAGE_STATUS=NORMAL'] = '${stringTableAnalogInputVoltageStatus}: ${lblNormal}'; +elvST['ANALOG_INPUT_TRANSMITTER|VOLTAGE_STATUS=0'] = '${stringTableAnalogInputVoltageStatus}: ${lblNormal}'; +elvST['ANALOG_INPUT_TRANSMITTER|VOLTAGE_STATUS=OVERFLOW'] = '${stringTableAnalogInputVoltageStatus}: ${lblOverflow}'; +elvST['ANALOG_INPUT_TRANSMITTER|VOLTAGE_STATUS=2'] = '${stringTableAnalogInputVoltageStatus}: ${lblOverflow}'; +elvST['ANALOG_INPUT_TRANSMITTER|VOLTAGE_STATUS=UNDERFLOW'] = '${stringTableAnalogInputVoltageStatus}: ${lblUnderflow}'; +elvST['ANALOG_INPUT_TRANSMITTER|VOLTAGE_STATUS=3'] = '${stringTableAnalogInputVoltageStatus}: ${lblUnderflow}'; +elvST['ANALOG_OUTPUT'] = '${stringTableAnalog}'; +elvST['ANALOG_OUTPUT_TRANSCEIVER'] = '${stringTableAnalogOutputTransceiverTitle}'; +elvST['ANALOG_OUTPUT_TRANSCEIVER|LEVEL'] = '${stringTableAnalogOutputTransceiverLevel}'; +elvST['ARMING'] = '${stringTableSirenArmingTitle}'; +elvST['ARMING|ACOUSTIC_ALLSENS_ARM'] = '${stringTableAcousticAllSensArm}'; +elvST['ARMING|ACOUSTIC_ALLSENS_DELAY_ARM'] = '${stringTableAcousticAllsensDelayArm}'; +elvST['ARMING|ACOUSTIC_DISARM'] = '${stringTableAcousticDisarm}'; +elvST['ARMING|ACOUSTIC_EXTSENS_ARM'] = '${stringTableAcousticExtsensArm}'; +elvST['ARMING|ACOUSTIC_EXTSENS_DELAY_ARM'] = '${stringTableAcousticExtsensDelayArm}'; +elvST['ARMING|ACOUSTIC_MULTI_DELAY_ARM'] = '${stringTableAcousticMultiDelayArm}'; +elvST['ARMING|OPTIC_ALLSENS_ARM'] = '${stringTableOpticAllSensArm}'; +elvST['ARMING|OPTIC_ALLSENS_DELAY_ARM'] = '${stringTableOpticAllSensDelayArm}'; +elvST['ARMING|OPTIC_DISARM'] = '${stringTableOpticDisarm}'; +elvST['ARMING|OPTIC_EXTSENS_ARM'] = '${stringTableOpticExtsensArm}'; +elvST['ARMING|OPTIC_EXTSENS_DELAY_ARM'] = '${stringTableOpticExtsensDelayArm}'; +elvST['ARMING|OPTIC_MULTI_DELAY_ARM'] = '${stringTableOpticMultiDelayArm}'; +elvST['ARMSTATE=ALARM_BLOCKED'] = '${stringTableAlarmBlocked}'; +elvST['ARMSTATE=ALLSENS_ARMED'] = '${stringTableAlarmExtSensArmed}'; +elvST['ARMSTATE=DISARMED'] = '${stringTableAlarmDisarmed}'; +elvST['ARMSTATE=EXTSENS_ARMED'] = '${stringTableAlarmAllSensArmed}'; +elvST['ARR_TIMEOUT'] = '${stringTableArrTimeout}'; +elvST['ATC_ADAPTION_INTERVAL'] = '${stringTableATCAdaptionInterval}'; +elvST['ATC_MODE'] = '${stringTableATCMode}'; +elvST['ATC_OFF'] = '${stringTableOFF}'; +elvST['ATC_ON'] = '${stringTableON}'; +elvST['AUTO_HYDRAULIC_ADJUSTMENT'] = '${stringTableAutoHydraulicAdjustment}'; +elvST['AUTO_MODE'] = '${stringTableClimateControlRTTransceiverAutoMode}'; +elvST['AVERAGE_ILLUMINATION'] = '${stringTableAverageIllumination}'; +elvST['AVERAGE_ILLUMINATION_STATUS=NORMAL'] = '${lblValue} ${stringTableAverageIllumination}: ${lblNormal}'; +elvST['AVERAGE_ILLUMINATION_STATUS=0'] = '${lblValue} ${stringTableAverageIllumination}: ${lblNormal}'; +elvST['AVERAGE_ILLUMINATION_STATUS=UNKNOWN'] = '${lblValue} ${stringTableAverageIllumination}: ${lblUnknown}'; +elvST['AVERAGE_ILLUMINATION_STATUS=1'] = '${lblValue} ${stringTableAverageIllumination}: ${lblUnknown}'; +elvST['AVERAGE_ILLUMINATION_STATUS=OVERFLOW'] = '${lblValue} ${stringTableAverageIllumination}: ${lblOverflow}'; +elvST['AVERAGE_ILLUMINATION_STATUS=2'] = '${lblValue} ${stringTableAverageIllumination}: ${lblOverflow}'; +elvST['BACKLIGHT_AT_CHARGE'] = '${stringTableBackLightAtCharge}'; +elvST['BACKLIGHT_AT_KEYSTROKE'] = '${stringTableBackLightAtKeystroke}'; +elvST['BACKLIGHT_AT_MOTION'] = '${stringTableBackLightAtMotion}'; +elvST['BACKLIGHT_ON_TIME'] = '${stringTableBackLightOnTime}'; +elvST['BATTERY_POWERED'] = '${stringTableBatteryPowered}'; +elvST['BATTERY_STATE'] = '${stringTableClimateControlRTTransceiverBatteryState}'; +elvST['BAT_DEFECT_LIMIT'] = '${stringTableBatDefectLimit}'; +elvST['BLIND'] = '${stringTableBlindTitle}'; +elvST['BLIND|CHANGE_OVER_DELAY'] = '${stringTableBlindChangeOverDelay}'; +elvST['BLIND|LEVEL'] = '${stringTableBlindLevel}'; +elvST['BLIND|REFERENCE_RUNNING_TIME_BOTTOM_TOP'] = '${stringTableBlindRunnintTimeBottomTop}'; +elvST['BLIND|REFERENCE_RUNNING_TIME_TOP_BOTTOM'] = '${stringTableBlindRunningTimeTopBottom}'; +elvST['BLIND|REFERENCE_RUN_COUNTER'] = '${stringTableBlindRefRunCounter}'; +elvST['BLIND|STOP'] = '${stringTableBlindStop}'; +elvST['BLIND_TRANSMITTER|ACTIVITY_STATE=DOWN'] = '${stringTableBlindActivityStateDown}'; +elvST['BLIND_TRANSMITTER|ACTIVITY_STATE=UNKNOWN'] = '${stringTableBlindActivityStateUnknown}'; +elvST['BLIND_TRANSMITTER|ACTIVITY_STATE=UP'] = '${stringTableBlindActivityStateUp}'; +elvST['BLIND_TRANSMITTER|ACTIVITY_STATE=STABLE'] = '${stringTableProcessStableBlindTransmitter}'; +elvST['BLIND_TRANSMITTER|LEVEL'] = '${stringTableBlindLevel}'; +elvST['BLIND_TRANSMITTER|LEVEL_STATUS=ERROR'] = '${lblValue} ${stringTableBlindLevel}: ${lblError}'; +elvST['BLIND_TRANSMITTER|LEVEL_STATUS=4'] = '${lblValue} ${stringTableBlindLevel}: ${lblError}'; +elvST['BLIND_TRANSMITTER|LEVEL_STATUS=NORMAL'] = '${lblValue} ${stringTableBlindLevel}: ${lblNormal}'; +elvST['BLIND_TRANSMITTER|LEVEL_STATUS=0'] = '${lblValue} ${stringTableBlindLevel}: ${lblNormal}'; +elvST['BLIND_TRANSMITTER|LEVEL_STATUS=OVERFLOW'] = '${lblValue} ${stringTableBlindLevel}: ${lblOverflow}'; +elvST['BLIND_TRANSMITTER|LEVEL_STATUS=2'] = '${lblValue} ${stringTableBlindLevel}: ${lblOverflow}'; +elvST['BLIND_TRANSMITTER|LEVEL_STATUS=UNDERFLOW'] = '${lblValue} ${stringTableBlindLevel}: ${lblUnderflow}'; +elvST['BLIND_TRANSMITTER|LEVEL_STATUS=3'] = '${lblValue} ${stringTableBlindLevel}: ${lblUnderflow}'; +elvST['BLIND_TRANSMITTER|LEVEL_STATUS=UNKNOWN'] = '${lblValue} ${stringTableBlindLevel}: ${lblUnknown}'; +elvST['BLIND_TRANSMITTER|LEVEL_STATUS=1'] = '${lblValue} ${stringTableBlindLevel}: ${lblUnknown}'; +elvST['BLIND_TRANSMITTER|LEVEL_2'] = '${stringTableJalousieSlatsLevel}'; +elvST['BLIND_TRANSMITTER|LEVEL_2_STATUS=ERROR'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblError}'; +elvST['BLIND_TRANSMITTER|LEVEL_2_STATUS=4'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblError}'; +elvST['BLIND_TRANSMITTER|LEVEL_2_STATUS=NORMAL'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblNormal}'; +elvST['BLIND_TRANSMITTER|LEVEL_2_STATUS=0'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblNormal}'; +elvST['BLIND_TRANSMITTER|LEVEL_2_STATUS=OVERFLOW'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblOverflow}'; +elvST['BLIND_TRANSMITTER|LEVEL_2_STATUS=2'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblOverflow}'; +elvST['BLIND_TRANSMITTER|LEVEL_2_STATUS=UNDERFLOW'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblUnderflow}'; +elvST['BLIND_TRANSMITTER|LEVEL_2_STATUS=3'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblUnderflow}'; +elvST['BLIND_TRANSMITTER|LEVEL_2_STATUS=UNKNOWN'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblUnknown}'; +elvST['BLIND_TRANSMITTER|LEVEL_2_STATUS=1'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblUnknown}'; +elvST['BLIND_VIRTUAL_RECEIVER'] = '${stringTableBlindVirtualReceiverTitle}'; +elvST['BLIND_VIRTUAL_RECEIVER|ACTIVITY_STATE=DOWN'] = '${stringTableBlindActivityStateDown}'; +elvST['BLIND_VIRTUAL_RECEIVER|ACTIVITY_STATE=UNKNOWN'] = '${stringTableBlindActivityStateUnknown}'; +elvST['BLIND_VIRTUAL_RECEIVER|ACTIVITY_STATE=UP'] = '${stringTableBlindActivityStateUp}'; +elvST['BLIND_VIRTUAL_RECEIVER|ACTIVITY_STATE=STABLE'] = '${stringTableProcessStableBlindTransmitter}'; +elvST['BLIND_VIRTUAL_RECEIVER|LEVEL'] = '${stringTableBlindLevel}'; +elvST['BLIND_VIRTUAL_RECEIVER|LEVEL_STATUS=ERROR'] = '${lblValue} ${stringTableBlindLevel}: ${lblError}'; +elvST['BLIND_VIRTUAL_RECEIVER|LEVEL_STATUS=4'] = '${lblValue} ${stringTableBlindLevel}: ${lblError}'; +elvST['BLIND_VIRTUAL_RECEIVER|LEVEL_STATUS=NORMAL'] = '${lblValue} ${stringTableBlindLevel}: ${lblNormal}'; +elvST['BLIND_VIRTUAL_RECEIVER|LEVEL_STATUS=0'] = '${lblValue} ${stringTableBlindLevel}: ${lblNormal}'; +elvST['BLIND_VIRTUAL_RECEIVER|LEVEL_STATUS=OVERFLOW'] = '${lblValue} ${stringTableBlindLevel}: ${lblOverflow}'; +elvST['BLIND_VIRTUAL_RECEIVER|LEVEL_STATUS=2'] = '${lblValue} ${stringTableBlindLevel}: ${lblOverflow}'; +elvST['BLIND_VIRTUAL_RECEIVER|LEVEL_STATUS=UNDERFLOW'] = '${lblValue} ${stringTableBlindLevel}: ${lblUnderflow}'; +elvST['BLIND_VIRTUAL_RECEIVER|LEVEL_STATUS=3'] = '${lblValue} ${stringTableBlindLevel}: ${lblUnderflow}'; +elvST['BLIND_VIRTUAL_RECEIVER|LEVEL_STATUS=UNKNOWN'] = '${lblValue} ${stringTableBlindLevel}: ${lblUnknown}'; +elvST['BLIND_VIRTUAL_RECEIVER|LEVEL_STATUS=1'] = '${lblValue} ${stringTableBlindLevel}: ${lblUnknown}'; +elvST['BLIND_VIRTUAL_RECEIVER|LEVEL_2'] = '${stringTableJalousieSlatsLevel}'; +elvST['BLIND_VIRTUAL_RECEIVER|LEVEL_2_STATUS=ERROR'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblError}'; +elvST['BLIND_VIRTUAL_RECEIVER|LEVEL_2_STATUS=4'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblError}'; +elvST['BLIND_VIRTUAL_RECEIVER|LEVEL_2_STATUS=NORMAL'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblNormal}'; +elvST['BLIND_VIRTUAL_RECEIVER|LEVEL_2_STATUS=0'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblNormal}'; +elvST['BLIND_VIRTUAL_RECEIVER|LEVEL_2_STATUS=OVERFLOW'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblOverflow}'; +elvST['BLIND_VIRTUAL_RECEIVER|LEVEL_2_STATUS=2'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblOverflow}'; +elvST['BLIND_VIRTUAL_RECEIVER|LEVEL_2_STATUS=UNDERFLOW'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblUnderflow}'; +elvST['BLIND_VIRTUAL_RECEIVER|LEVEL_2_STATUS=3'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblUnderflow}'; +elvST['BLIND_VIRTUAL_RECEIVER|LEVEL_2_STATUS=UNKNOWN'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblUnknown}'; +elvST['BLIND_VIRTUAL_RECEIVER|LEVEL_2_STATUS=1'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblUnknown}'; +elvST['BLIND_VIRTUAL_RECEIVER|STOP'] = '${stringTableBlindStop}'; +elvST['BLIND_TRANSMITTER|PROCESS=NOT_STABLE'] = '${stringTableProcessNotStableBlindTransmitter}'; +elvST['BLIND_TRANSMITTER|PROCESS=STABLE'] = '${stringTableProcessStableBlindTransmitter}'; +elvST['BLIND_VIRTUAL_RECEIVER|PROCESS=STABLE'] = '${stringTableProcessStableBlindTransmitter}'; +elvST['BLIND_VIRTUAL_RECEIVER|PROCESS=NOT_STABLE'] = '${stringTableProcessNotStableBlindTransmitter}'; +elvST['BLOCKING_PERIOD_UNIT'] = '${stringTableBlockingPeriodUnit}'; +elvST['BLOCKING_PERIOD_UNIT=100MS'] = '${optionUnit100MS}'; +elvST['BLOCKING_PERIOD_UNIT=H'] = '${optionUnitH}'; +elvST['BLOCKING_PERIOD_UNIT=M'] = '${optionUnitM}'; +elvST['BLOCKING_PERIOD_UNIT=S'] = '${optionUnitS}'; +elvST['BLOCKING_PERIOD_VALUE'] = '${stringTableBlockingPeriodValue}'; +elvST['BOOST_MODE'] = '${stringTableClimateControlRTTransceiverBoostMode}'; +elvST['BOOST_MODE=FALSE'] = '${stringTableBoostModeFalse}'; +elvST['BOOST_MODE=TRUE'] = '${stringTableBoostModeTrue}'; +elvST['BOOST_STATE'] = '${stringTableBoostState}'; +elvST['BOOST_TIME'] = '${stringTableBoostTime}'; +elvST['BRIGHTNESS'] = '${stringTableBrightness}'; +elvST['BRIGHTNESS_FILTER'] = '${stringTableBrightnessFilter}'; +elvST['BRIGHTNESS_TRANSMITTER|FILTER_SIZE'] = '${stringTableBrightnessFilterSize}'; +elvST['BURST_RX'] = '${stringTableBurstRX}'; +elvST['BURST_LIMIT_WARNING'] = '${stringTableBurstLimit}'; +elvST['BURST_LIMIT_WARNING=FALSE'] = '${stringTableBurstLimitFalse}'; +elvST['BURST_LIMIT_WARNING=TRUE'] = '${stringTableBurstLimitTrue}'; +elvST['BUTTON_LOCK'] = '${stringTableButtonLock}'; +elvST['BUTTON_RESPONSE_WITHOUT_BACKLIGHT'] = '${stringTableButtonResponseWithoutBacklight}'; +elvST['CAPACITIVE_FILLING_LEVEL_SENSOR'] = '${stringTableCapacitiveFillingSensorTitle}'; +elvST['CAPACITIVE_FILLING_LEVEL_SENSOR|CASE_DESIGN'] = '${stringTableCapacitiveFillingSensorCaseDesign}'; +elvST['CAPACITIVE_FILLING_LEVEL_SENSOR|CASE_DESIGN=HORIZONTAL_BARREL'] = '${stringTableCapacitiveFillingSensorCaseDesignHor}'; +elvST['CAPACITIVE_FILLING_LEVEL_SENSOR|CASE_DESIGN=RECTANGLE'] = '${stringTableCapacitiveFillingSensorCaseDesginRect}'; +elvST['CAPACITIVE_FILLING_LEVEL_SENSOR|CASE_DESIGN=VERTICAL_BARREL'] = '${stringTableCapacitiveFillingSensorCaseDesignVer}'; +elvST['CAPACITIVE_FILLING_LEVEL_SENSOR|CASE_HIGH'] = '${stringTableCapacitiveFillingSensorCaseHeight}'; +elvST['CAPACITIVE_FILLING_LEVEL_SENSOR|CASE_LENGTH'] = '${stringTableCapacitiveFillingSensorCaseLength}'; +elvST['CAPACITIVE_FILLING_LEVEL_SENSOR|CASE_WIDTH'] = '${stringTableCapacitiveFillingSensorCaseWidth}'; +elvST['CAPACITIVE_FILLING_LEVEL_SENSOR|CONTROLTEXT_CALC_FILLINGLEVEL'] = '${stringTableCapacitiveFillingSensorTextCalcFillingLevel}'; +elvST['CAPACITIVE_FILLING_LEVEL_SENSOR|CONTROLTEXT_FILLINGLEVEL'] = '${stringTableCapacitiveFillingSensorTextFillingLevel}'; +elvST['CAPACITIVE_FILLING_LEVEL_SENSOR|FILLING_LEVEL'] = '${stringTableCapacitiveFillingSensorFillingLevel}'; +elvST['CAPACITIVE_FILLING_LEVEL_SENSOR|FILL_LEVEL'] = '${stringTableCapacitiveFillingSensorFillingLevel100perc}'; +elvST['CAPACITIVE_FILLING_LEVEL_SENSOR|FILL_LEVEL_LOWER_THRESHOLD'] = '${stringTableCapacitiveFillingSensorFillingLevelLowerThres}'; +elvST['CAPACITIVE_FILLING_LEVEL_SENSOR|FILL_LEVEL_UPPER_THRESHOLD'] = '${stringTableCapacitiveFillingSensorFillingLevelUpperThres}'; +elvST['CAPACITIVE_FILLING_LEVEL_SENSOR|MEA_LENGTH'] = '${stringTableCapacitiveFillingSensorMeaLength}'; +elvST['CAPACITIVE_FILLING_LEVEL_SENSOR|USE_CUSTOM'] = '${stringTableCapacitiveFillingSensorCustomCal}'; +elvST['CAPACITIVE_FILLING_LEVEL_SENSOR|WATER_LOWER_THRESHOLD_CH'] = '${stringTableCapacitiveFillingSensorWaterLowerThres}'; +elvST['CAPACITIVE_FILLING_LEVEL_SENSOR|WATER_UPPER_THRESHOLD_CH'] = '${stringTableCapacitiveFillingSensorWaterUpperThres}'; +elvST['CAPTURE_WITHIN_INTERVAL'] = '${stringTableCaptureWithinInterval}'; +elvST['CARRIER_SENSE_LEVEL'] = '${lblCarrierSense}'; +elvST['CENTRAL_KEY|DBL_PRESS_TIME'] = '${stringTableCentralKeyDblPressTime}'; +elvST['CENTRAL_KEY|LONG_PRESS_TIME'] = '${stringTableCentralKeyLongPressTime}'; +elvST['CHANGE_OVER=FALSE'] = '${stringTableChangeOverFalse}'; +elvST['CHANGE_OVER=TRUE'] = '${stringTableChangeOverTrue}'; +elvST['CHARACTERISTIC_BASETYPE'] = '${stringTableCharacteristicBaseType}'; +elvST['CHARACTERISTIC_COLOURASSIGNMENT'] = '${stringTableCharacteristicColorAssignment}'; +elvST['CHARACTERISTIC_CROSSFADE'] = '${stringTableCharacteristicCrossfade}'; +elvST['CHARACTERISTIC_DIM2HOT'] = '${stringTableCharacteristicDim2Hot}'; +elvST['CHARACTERISTIC_DIM2WARM'] = '${stringTableCharacteristicDim2Warm}'; +elvST['CHARACTERISTIC_HALF_CONSTANT'] = '${stringTableCharacteristicHalfConstant}'; +elvST['CHARACTERISTIC_LEVELLIMIT'] = '${stringTableCharacteristicLevelLimit}'; +elvST['CHARACTERISTIC_LINEAR'] = '${stringTableCharasteristicLinear}'; +elvST['CHARACTERISTIC_LINSQUARETYPE'] = '${stringTableCharacteristicLinSquareType}'; +elvST['CHARACTERISTIC_LOW_IS_COLD'] = '${stringTableCharacteristicLowIsCold}'; +elvST['CHARACTERISTIC_LOW_IS_WARM'] = '${stringTableCharacteristicLowIsWarm}'; +elvST['CHARACTERISTIC_MAXIMUM'] = '${stringTableCharacteristicMaximum}'; +elvST['CHARACTERISTIC_SQUARE'] = '${stringTableCharasteristicSquare}'; +elvST['CLIMATECONTROL_DEHUMIDIFIER_TRANSMITER'] = '${stringTableClimateControlDehumidifierTitle}'; +elvST['CLIMATECONTROL_FLOOR_DIRECT_TRANSMITTER|COOLING_DISABLE'] = '${stringTableCoolingDisable}'; +elvST['CLIMATECONTROL_FLOOR_DIRECT_TRANSMITTER|FLOOR_HEATING_MODE'] = '${stringTableFloorHeatingMode}'; +elvST['CLIMATECONTROL_FLOOR_DIRECT_TRANSMITTER|HEATING_DISABLE'] = '${stringTableHeatingDisable}'; +elvST['CLIMATECONTROL_FLOOR_DIRECT_TRANSMITTER|HEATING_MODE_SELECTION'] = '${stringTableHeatingModeSelection}'; +elvST['CLIMATECONTROL_FLOOR_DIRECT_TRANSMITTER|HEATING_VALVE_TYPE'] = '${stringTableHeatingValveType}'; +elvST['CLIMATECONTROL_FLOOR_DIRECT_TRANSMITTER|HUMIDITY_LIMIT_DISABLE'] = '${stringTableHumidityLimitDisable}'; +elvST['CLIMATECONTROL_FLOOR_DIRECT_TRANSMITTER|HUMIDITY_LIMIT_VALUE'] = '${stringTableHumidityLimitValue}'; +elvST['CLIMATECONTROL_FLOOR_DIRECT_TRANSMITTER|MINIMAL_FLOOR_TEMPERATURE'] = '${stringTableMinimalFloorTemperature}'; +elvST['CLIMATECONTROL_FLOOR_TRANSCEIVER'] = '${stringTableClimateControlFloorTransceiverTitle}'; +elvST['CLIMATECONTROL_FLOOR_TRANSCEIVER|EMERGENCY_OPERATION=FALSE'] = '${stringTableEmergencyOperationFalse}'; +elvST['CLIMATECONTROL_FLOOR_TRANSCEIVER|EMERGENCY_OPERATION=TRUE'] = '${stringTableEmergencyOperationTrue}'; +elvST['CLIMATECONTROL_FLOOR_PUMP_TRANSCEIVER'] = '${stringTableClimateControlFloorPumpTransceiverTitle}'; +elvST['CLIMATECONTROL_FLOOR_PUMP_TRANSCEIVER|EMERGENCY_OPERATION=FALSE'] = '${stringTableEmergencyOperationFalse}'; +elvST['CLIMATECONTROL_FLOOR_PUMP_TRANSCEIVER|EMERGENCY_OPERATION=TRUE'] = '${stringTableEmergencyOperationTrue}'; +elvST['CLIMATECONTROL_FLOOR_TRANSMITTER'] = '${stringTableClimateControlFloorTransmitterTitle}'; +elvST['CLIMATECONTROL_FLOOR_TRANSMITTER|EMERGENCY_OPERATION=FALSE'] = '${stringTableEmergencyOperationFalse}'; +elvST['CLIMATECONTROL_FLOOR_TRANSMITTER|EMERGENCY_OPERATION=TRUE'] = '${stringTableEmergencyOperationTrue}'; +elvST['CLIMATECONTROL_HEAT_DEMAND_TRANSMITER'] = '${stringTableClimateControlHeatDemandTransmitterTitle}'; +elvST['CLIMATECONTROL_HEAT_DEMAND_BOILER_TRANSMITTER'] = '${stringTableClimateControlHeatDemandBoilerTransmitterTitle}'; +elvST['CLIMATECONTROL_HEAT_DEMAND_PUMP_TRANSMITTER'] = '${stringTableClimateControlHeatDemandPumpTransmitterTitle}'; +elvST['CLIMATECONTROL_INPUT_RECEIVER'] = '${stringTableClimateControlInputReceiverTitle}'; +elvST['CLIMATECONTROL_INPUT_TRANSMITTER'] = '${stringTableClimateControlInputTransmitterTitle}'; +elvST['CLIMATECONTROL_RECEIVER'] = '${stringTableClimateControlReceiver}'; +elvST['CLIMATECONTROL_REGULATOR'] = '${stringTableClimateControlRegTitle}'; +elvST['CLIMATECONTROL_REGULATOR|ADJUSTING_COMMAND'] = '${stringTableClimateControlRegAdjCommand}'; +elvST['CLIMATECONTROL_REGULATOR|ADJUSTING_DATA'] = '${stringTableClimateControlRegAdjData}'; +elvST['CLIMATECONTROL_REGULATOR|DECALCIFICATION_DAY'] = '${stringTableClimateControlRegDecalcDay}'; +elvST['CLIMATECONTROL_REGULATOR|DECALCIFICATION_HOUR'] = '${stringTableClimateControlRegDecalcHour}'; +elvST['CLIMATECONTROL_REGULATOR|DECALCIFICATION_MINUTE'] = '${stringTableClimateControlRegDecalcMin}'; +elvST['CLIMATECONTROL_REGULATOR|DISPLAY_TEMPERATUR_HUMIDITY_CHANGE'] = '${stringTableClimateControlRegDisplayTempHum}'; +elvST['CLIMATECONTROL_REGULATOR|DISPLAY_TEMPERATUR_HUMIDITY_CHANGE=TEMPERATUR_AND_HUMIDITY'] = '${stringTableClimateControlRegDisplayTempHumTH}'; +elvST['CLIMATECONTROL_REGULATOR|DISPLAY_TEMPERATUR_HUMIDITY_CHANGE=TEMPERATUR_ONLY'] = '${stringTableClimateControlRegDisplayTempHumT}'; +elvST['CLIMATECONTROL_REGULATOR|DISPLAY_TEMPERATUR_INFORMATION'] = '${stringTableClimateControlRegDisplayTempInfo}'; +elvST['CLIMATECONTROL_REGULATOR|DISPLAY_TEMPERATUR_INFORMATION=ACTUAL_VALUE'] = '${stringTableClimateControlRegDisplayTempInfoActualTemp}'; +elvST['CLIMATECONTROL_REGULATOR|DISPLAY_TEMPERATUR_INFORMATION=SET_POINT'] = '${stringTableClimateControlRegDisplayTempInfoSetPoint}'; +elvST['CLIMATECONTROL_REGULATOR|DISPLAY_TEMPERATUR_UNIT'] = '${stringTableClimateControlRegTempUnit}'; +elvST['CLIMATECONTROL_REGULATOR|DISPLAY_TEMPERATUR_UNIT=CELSIUS'] = '${stringTableClimateControlRegTempUnitC}'; +elvST['CLIMATECONTROL_REGULATOR|DISPLAY_TEMPERATUR_UNIT=FAHRENHEIT'] = '${stringTableClimateControlRegTempUnitF}'; +elvST['CLIMATECONTROL_REGULATOR|MODE_TEMPERATUR_REGULATOR'] = '${stringTableClimateControlRegRegulator}'; +elvST['CLIMATECONTROL_REGULATOR|MODE_TEMPERATUR_REGULATOR=AUTO'] = '${stringTableClimateControlRegRegulatorAuto}'; +elvST['CLIMATECONTROL_REGULATOR|MODE_TEMPERATUR_REGULATOR=CENTRAL'] = '${stringTableClimateControlRegRegulatorCentral}'; +elvST['CLIMATECONTROL_REGULATOR|MODE_TEMPERATUR_REGULATOR=MANUAL'] = '${stringTableClimateControlRegRegulatorManu}'; +elvST['CLIMATECONTROL_REGULATOR|MODE_TEMPERATUR_REGULATOR=PARTY'] = '${stringTableClimateControlRegRegulatorParty}'; +elvST['CLIMATECONTROL_REGULATOR|MODE_TEMPERATUR_VALVE'] = '${stringTableClimateControlRegValve}'; +elvST['CLIMATECONTROL_REGULATOR|MODE_TEMPERATUR_VALVE=AUTO'] = '${stringTableClimateControlRegValveAuto}'; +elvST['CLIMATECONTROL_REGULATOR|MODE_TEMPERATUR_VALVE=CLOSE_VALVE'] = '${stringTableClimateControlRegValveClose}'; +elvST['CLIMATECONTROL_REGULATOR|MODE_TEMPERATUR_VALVE=OPEN_VALVE'] = '${stringTableClimateControlRegValveOpen}'; +elvST['CLIMATECONTROL_REGULATOR|PARTY_END_TIME'] = '${stringTableClimateControlRegPartyEndTime}'; +elvST['CLIMATECONTROL_REGULATOR|SETPOINT'] = '${stringTableClimateControlRegSetpoint}'; +elvST['CLIMATECONTROL_REGULATOR|SETPOINT=VENT_CLOSED'] = '${stringTableClimateControlRegSetpointVentClosed}'; +elvST['CLIMATECONTROL_REGULATOR|SETPOINT=VENT_OPEN'] = '${stringTableClimateControlRegSetpointVentOpen}'; +elvST['CLIMATECONTROL_REGULATOR|STATE=FALSE'] = '${stringTableClimateControlRegStateFalse}'; +elvST['CLIMATECONTROL_REGULATOR|STATE=TRUE'] = '${stringTableClimateControlRegStateTrue}'; +elvST['CLIMATECONTROL_REGULATOR|TEMPERATUR_COMFORT_VALUE'] = '${stringTableClimateControlRegComfortValue}'; +elvST['CLIMATECONTROL_REGULATOR|TEMPERATUR_LOWERING_VALUE'] = '${stringTableClimateControlRegLoweringValue}'; +elvST['CLIMATECONTROL_REGULATOR|TEMPERATUR_PARTY_VALUE'] = '${stringTableClimateControlRegPartyValue}'; +elvST['CLIMATECONTROL_REGULATOR|TEMPERATUR_SET_POINT'] = '${stringTableClimateControlRegSetPoint}'; +elvST['CLIMATECONTROL_REGULATOR|TEMPERATUR_WINDOW_OPEN_VALUE'] = '${stringTableClimateControlRegWindowOpenValue}'; +elvST['CLIMATECONTROL_RT_RECEIVER'] = '${stringTableClimateControlRTReceiver}'; +elvST['CLIMATECONTROL_RT_TRANSCEIVER'] = '${stringTableClimateControlRTTransceiver}'; +elvST['CLIMATECONTROL_RT_TRANSCEIVER|FAULT_REPORTING=ADJUSTING_RANGE_TOO_LARGE'] = '${stringTableClimateControlRTTransceiverAdjustingRangeTooLarge}'; +elvST['CLIMATECONTROL_RT_TRANSCEIVER|FAULT_REPORTING=ADJUSTING_RANGE_TOO_SMALL'] = '${stringTableClimateControlRTTransceiverAdjustingRangeTooSmall}'; +elvST['CLIMATECONTROL_RT_TRANSCEIVER|FAULT_REPORTING=COMMUNICATION_ERROR'] = '${stringTableClimateControlRTTransceiverCommunicationError}'; +elvST['CLIMATECONTROL_RT_TRANSCEIVER|FAULT_REPORTING=LOWBAT'] = '${stringTableClimateControlRTTransceiverLowBat}'; +elvST['CLIMATECONTROL_RT_TRANSCEIVER|FAULT_REPORTING=NO_FAULT'] = '${stringTableClimateControlRTTransceiverNoFault}'; +elvST['CLIMATECONTROL_RT_TRANSCEIVER|FAULT_REPORTING=VALVE_ERROR_POSITION'] = '${stringTableClimateControlRTTransceiverValveErrorPosition}'; +elvST['CLIMATECONTROL_RT_TRANSCEIVER|FAULT_REPORTING=VALVE_TIGHT'] = '${stringTableClimateControlRTTransceiverValveTight}'; +elvST['CLIMATECONTROL_VENT_DRIVE'] = '${stringTableClimateControlVentDriveTitle}'; +elvST['CLIMATECONTROL_VENT_DRIVE|ERROR=ADJUSTING_RANGE_TO_SMALL'] = '${stringTableClimateControlVentDriveErrorAdjRangeToSmall}'; +elvST['CLIMATECONTROL_VENT_DRIVE|ERROR=LOWBAT'] = '${stringTableClimateControlVentDriveErrorLowBat}'; +elvST['CLIMATECONTROL_VENT_DRIVE|ERROR=VALVE_DRIVE_BLOCKED'] = '${stringTableClimateControlVentDriveErrorValveDriveBlocked}'; +elvST['CLIMATECONTROL_VENT_DRIVE|ERROR=VALVE_DRIVE_LOOSE'] = '${stringTableClimateControlVentDriveErrorValveDriveLoose}'; +elvST['CLIMATECONTROL_VENT_DRIVE|VALVE_ERROR_POSITION'] = '${stringTableClimateControlVentDriveValveErrorPos}'; +elvST['CLIMATECONTROL_VENT_DRIVE|VALVE_OFFSET_VALUE'] = '${stringTableClimateControlVentDriveValveOffsetVal}'; +elvST['CLIMATECONTROL_VENT_DRIVE|VALVE_STATE'] = '${stringTableClimateControlVentDriveValveState}'; +elvST['COLOR=BLACK'] = '${optionColorBLACK}'; +elvST['COLOR=BLUE'] = '${optionColorBLUE}'; +elvST['COLOR=GREEN'] = '${optionColorGREEN}'; +elvST['COLOR=TURQUOISE'] = '${optionColorTURQUOISE}'; +elvST['COLOR=RED'] = '${optionColorRED}'; +elvST['COLOR=PURPLE'] = '${optionColorPURPLE}'; +elvST['COLOR=YELLOW'] = '${optionColorYELLOW}'; +elvST['COLOR=WHITE'] = '${optionColorWHITE}'; +elvST['COLOR=LEVEL'] = '${stringTableBrightness}'; +elvST['COLOR=OLD_VALUE'] = '${stringTableColorOldValue}'; +elvST['COLOR=DO_NOT_CARE'] = '${stringTableColorNoChange}'; +elvST['COLOR_BEHAVIOUR=OFF'] = '${stringTableColorBehaviourOff}'; +elvST['COLOR_BEHAVIOUR=ON'] = '${stringTableColorBehaviourOn}'; +elvST['COLOR_BEHAVIOUR=BLINKING_SLOW'] = '${stringTableColorBehaviourBlinkingSlow}'; +elvST['COLOR_BEHAVIOUR=BLINKING_MIDDLE'] = '${stringTableColorBehaviourBlinkingMiddle}'; +elvST['COLOR_BEHAVIOUR=BLINKING_FAST'] = '${stringTableColorBehaviourBlinkingFast}'; +elvST['COLOR_BEHAVIOUR=FLASH_SLOW'] = '${stringTableColorBehaviourFlashSlow}'; +elvST['COLOR_BEHAVIOUR=FLASH_MIDDLE'] = '${stringTableColorBehaviourFlashMiddle}'; +elvST['COLOR_BEHAVIOUR=FLASH_FAST'] = '${stringTableColorBehaviourFlashFast}'; +elvST['COLOR_BEHAVIOUR=BILLOW_SLOW'] = '${stringTableColorBehaviourBillowSlow}'; +elvST['COLOR_BEHAVIOUR=BILLOW_MIDDLE'] = '${stringTableColorBehaviourBillowMiddle}'; +elvST['COLOR_BEHAVIOUR=BILLOW_FAST'] = '${stringTableColorBehaviourBillowFast}'; +elvST['COLOR_BEHAVIOUR=OLD_VALUE'] = '${stringTableColorBehaviourOldValue}'; +elvST['COLOR_BEHAVIOUR=DO_NOT_CARE'] = '${stringTableColorBehaviourDoNotCare}'; +elvST['COLOR_BEHAVIOUR_STATUS=NORMAL'] = '${stringTableColorBehaviourStatus}: ${lblNormal}'; +elvST['COLOR_BEHAVIOUR_STATUS=UNKNOWN'] = '${stringTableColorBehaviourStatus}: ${lblUnknown}'; +elvST['COLOR_STATUS=NORMAL'] = '${optionColorStateNormal}'; +elvST['COLOR_STATUS=UNKNOWN'] = '${optionColorStateUnknown}'; +elvST['COMBINED_PARAMETER'] = '${stringTableSubmit}'; +elvST['COMFORT_MODE'] = '${stringTableClimateControlRTTransceiverComfortMode}'; +elvST['COMMUNICATION_REPORTING'] = '${stringTableCommunicatingReporting}'; +elvST['COMMUNICATION_REPORTING=FALSE'] = '${stringTableCommunicatingReportingFalse}'; +elvST['COMMUNICATION_REPORTING=TRUE'] = '${stringTableCommunicatingReportingTrue}'; +elvST['COMPATIBILITY_MODE'] = '${stringTableCompatibilityMode}'; +elvST['CONCENTRATION'] = '${lblValue} ${stringTableConcentration}'; +elvST['CONCENTRATION_STATUS=NORMAL'] = '${stringTableConcentrationStatus}: ${lblNormal}'; +elvST['CONCENTRATION_STATUS=0'] = '${stringTableConcentrationStatus}: ${lblNormal}'; +elvST['CONCENTRATION_STATUS=UNKNOWN'] = '${stringTableConcentrationStatus}: ${lblUnknown}'; +elvST['CONCENTRATION_STATUS=1'] = '${stringTableConcentrationStatus}: ${lblUnknown}'; +elvST['CONCENTRATION_STATUS=OVERFLOW'] = '${stringTableConcentrationStatus}: ${lblOverflow}'; +elvST['CONCENTRATION_STATUS=2'] = '${stringTableConcentrationStatus}: ${lblOverflow}'; +elvST['CONDITION_CURRENT'] = '${stringTableConditionCurrentTitle}'; +elvST['CONDITION_FREQUENCY'] = '${stringTableConditionFrequencyTitle}'; +elvST['CONDITION_POWER'] = '${stringTableConditionPowerTitle}'; +elvST['CONDITION_VOLTAGE'] = '${stringTableConditionVoltageTitle}'; +elvST['COND_SWITCH_TRANSMITTER'] = '${stringTableConditionSwitchTransmitter}'; +elvST['COND_SWITCH_TRANSMITTER_WIND_SPEED'] = '${stringTableConditionSwitchTransmitterWindSpeed}'; +elvST['COND_SWITCH_TRANSMITTER_TEMPERATURE'] = '${stringTableConditionSwitchTransmitterTemperature}'; +elvST['COND_SWITCH_TRANSMITTER_HUMIDITY'] = '${stringTableConditionSwitchTransmitterHumidity}'; +elvST['COND_SWITCH_TRANSMITTER_BRIGHTNESS'] = '${stringTableConditionSwitchTransmitterBrightness}'; +elvST['COND_SWITCH_TRANSMITTER_PARTICULATE_MATTER'] = '${stringTableConditionSwitchTransmitterParticulateMatter}'; +elvST['COND_SWITCH_TRANSMITTER_RAIN_QUANTITY'] = '${stringTableConditionSwitchTransmitterRainQuantity}'; +elvST['COND_SWITCH_TRANSMITTER_RAIN_DROP'] = '${stringTableConditionSwitchTransmitterRainDrop}'; +elvST['COND_SWITCH_TRANSMITTER_WIND_DIRECTION'] = '${stringTableConditionSwitchTransmitterWindDirection}'; +elvST['COND_TX_CYCLIC_ABOVE'] = '${stringTableCondTxCyclicAbove}'; +elvST['COND_TX_CYCLIC_BELOW'] = '${stringTableCondTxCyclicBelow}'; +elvST['COND_TX_DECISION_ABOVE'] = '${stringTableCondTxDecisionAbove}'; +elvST['COND_TX_DECISION_BELOW'] = '${stringTableCondTxDecisionBelow}'; +elvST['COND_TX_FALLING'] = '${stringTableCondTxFalling}'; +elvST['COND_TX_RISING'] = '${stringTableCondTxRising}'; +elvST['COND_TX_THRESHOLD_HI'] = '${stringTableCondThresholdHi}'; +elvST['COND_TX_THRESHOLD_HI_POWER'] = '${stringTableCondThresholdHiPower}'; +elvST['COND_TX_THRESHOLD_LO'] = '${stringTableCondThresholdLo}'; +elvST['COND_TX_THRESHOLD_LO_POWER'] = '${stringTableCondThresholdLoPower}'; +elvST['CONFIG_PENDING=FALSE'] = '${stringTableConfigPendingFalse}'; +elvST['CONFIG_PENDING=TRUE'] = '${stringTableConfigPendingTrue}'; +elvST['STICKY_UNREACH=FALSE'] = '${stringTableStickyUnreachFalse}'; +elvST['STICKY_UNREACH=TRUE'] = '${stringTableStickyUnreachTrue}'; +elvST['CONF_BUTTON_TIME'] = '${stringTableConfButtonTime}'; +elvST['CONF_BUTTON_TIME=PERMANENT'] = '${stringTableConfButtonTimePermanent}'; +elvST['CONTROL_MODE=AUTO-MODE'] = '${stringTableClimateControlRTTransceiverAutoMode}'; +elvST['CONTROL_MODE=BOOST-MODE'] = '${stringTableClimateControlRTTransceiverBoostMode}'; +elvST['CONTROL_MODE=MANU-MODE'] = '${stringTableClimateControlRTTransceiverManuMode}'; +elvST['CONTROL_MODE=PARTY-MODE'] = '${stringTableClimateControlRTTransceiverPartyMode}'; +elvST['CURRENT'] = '${stringTableCurrent}'; +elvST['CURRENTDETECTION_BEHAVIOR'] = '${stringTableCurrentDetectionBehavior}'; +elvST['CURRENTDETECTION_BEHAVIOR="CURRENTDETECTION_ACTIVE"'] = '${stringTableCurrentDetectionBehaviorActive}'; +elvST['CURRENTDETECTION_BEHAVIOR="CURRENTDETECTION_INACTIVE_VALUE_OUTPUT_1"'] = '${stringTableCurrentDetectionBehaviorOutput1}'; +elvST['CURRENTDETECTION_BEHAVIOR="CURRENTDETECTION_INACTIVE_VALUE_OUTPUT_2"'] = '${stringTableCurrentDetectionBehaviorOutput2}'; +elvST['CURRENT_ILLUMINATION'] = '${stringTableCurrentIllumination}'; +elvST['CURRENT_ILLUMINATION_STATUS=NORMAL'] = '${lblValue} ${stringTableCurrentIllumination}: ${lblNormal}'; +elvST['CURRENT_ILLUMINATION_STATUS=0'] = '${lblValue} ${stringTableCurrentIllumination}: ${lblNormal}'; +elvST['CURRENT_ILLUMINATION_STATUS=UNKNOWN'] = '${lblValue} ${stringTableCurrentIllumination}: ${lblUnknown}'; +elvST['CURRENT_ILLUMINATION_STATUS=1'] = '${lblValue} ${stringTableCurrentIllumination}: ${lblUnknown}'; +elvST['CURRENT_ILLUMINATION_STATUS=OVERFLOW'] = '${lblValue} ${stringTableCurrentIllumination}: ${lblOverflow}'; +elvST['CURRENT_ILLUMINATION_STATUS=2'] = '${lblValue} ${stringTableCurrentIllumination}: ${lblOverflow}'; +elvST['CURRENT_STATUS=NORMAL'] = '${lblValue} ${stringTableCurrent}: ${lblNormal}'; +elvST['CURRENT_STATUS=0'] = '${lblValue} ${stringTableCurrent}: ${lblNormal}'; +elvST['CURRENT_STATUS=OVERFLOW'] = '${lblValue} ${stringTableCurrent}: ${lblOverflow}'; +elvST['CURRENT_STATUS=1'] = '${lblValue} ${stringTableCurrent}: ${lblOverflow}'; +elvST['CURRENT_STATUS=UNDERFLOW'] = '${lblValue} ${stringTableCurrent}: ${lblUnderflow}'; +elvST['CURRENT_STATUS=2'] = '${lblValue} ${stringTableCurrent}: ${lblUnderflow}'; +elvST['CURRENT_STATUS=UNKNOWN'] = '${lblValue} ${stringTableCurrent}: ${lblUnknown}'; +elvST['CURRENT_STATUS=3'] = '${lblValue} ${stringTableCurrent}: ${lblUnknown}'; +elvST['CYCLIC_INFO_MSG'] = '${stringTableCyclicInfoMsg}'; +elvST['CYCLIC_INFO_MSG_DIS'] = '${stringTableCyclicInfoMsgDis}'; +elvST['CYCLIC_INFO_MSG_DIS_UNCHANGED'] = '${stringTableCyclicInfoMsgDisUnChanged}'; +elvST['CYCLIC_INFO_MSG_OVERDUE_THRESHOLD'] = '${stringTableCyclicInfoMsgOverdueThreshold}'; +elvST['CYCLIC_INFO_MSG_PAUSE'] = '${stringTableCyclicInfoMsgPause}'; +elvST['DATE_TIME_UNKNOWN=FALSE'] = '${stringTableDateTimeUnknownFalse}'; +elvST['DATE_TIME_UNKNOWN=TRUE'] = '${stringTableDateTimeUnknownTrue}'; +elvST['DAYLIGHT_SAVINGS_TIME'] = '${stringTableDST}'; +elvST['DDC|STATE'] = '${stringTableDDCState}'; +elvST['DECISION_VALUE'] = '${stringTableConditionValue}'; +elvST['DEVICE_IN_BOOTLOADER'] = '${stringTableDeviceInBootloader}'; +elvST['DEVICE_LED_MODE'] = '${stringTableDeviceLEDMode}'; +elvST['DEVICE_LED_MODE=OFF'] = '${stringTableDeviceLEDModeOff}'; +elvST['DEVICE_LED_MODE=ON'] = '${stringTableDeviceLEDModeOn}'; +elvST['DEV_RPT_CNT_MAX'] = '${stringTableDevRptCntMax}'; +elvST['DEW_POINT_ALARM=FALSE'] = '${stringTableDewPointAlarmFalse}'; +elvST['DEW_POINT_ALARM=TRUE'] = '${stringTableDewPointAlarmTrue}'; +elvST['DIGITAL_ANALOG_INPUT|BEHAVIOUR'] = '${stringTableDigitalAnalogInputBehaviour}'; +elvST['DIGITAL_ANALOG_INPUT|CALIBRATION'] = '${stringTableDigitalAnalogInputCalibration}'; +elvST['DIGITAL_ANALOG_INPUT|STATE=FALSE'] = '${stringTableDigitalAnalogInputStateFalse}'; +elvST['DIGITAL_ANALOG_INPUT|STATE=TRUE'] = '${stringTableDigitalAnalogInputStateTrue}'; +elvST['DIGITAL_ANALOG_INPUT|VALUE'] = '${stringTableDigitalAnalogInputValue}'; +elvST['DIGITAL_ANALOG_OUTPUT|BEHAVIOUR'] = '${stringTableDigitalAnalogOutputBehaviour}'; +elvST['DIGITAL_ANALOG_OUTPUT|FREQUENCY'] = '${stringTableDigitalAnalogOutputFrequency}'; +elvST['DIGITAL_ANALOG_OUTPUT|PULSETIME'] = '${stringTableDigitalAnalogOutputPulseTime}'; +elvST['DIGITAL_ANALOG_OUTPUT|STATE=FALSE'] = '${stringTableDigitalAnalogOutputStateFalse}'; +elvST['DIGITAL_ANALOG_OUTPUT|STATE=TRUE'] = '${stringTableDigitalAnalogOutputStateTrue}'; +elvST['DIGITAL_INPUT'] = '${stringTableDigitalInput}'; +elvST['DIGITAL_INPUT|BEHAVIOUR'] = '${stringTableDigitalInputBehaviour}'; +elvST['DIGITAL_INPUT|FREQUENCY'] = '${stringTableDigitalInputFrequency}'; +elvST['DIGITAL_INPUT|STATE=FALSE'] = '${stringTableDigitalInputStateFalse}'; +elvST['DIGITAL_INPUT|STATE=TRUE'] = '${stringTableDigitalInputStateTrue}'; +elvST['DIGITAL_OUTPUT'] = '${stringTableDigitalOutput}'; +elvST['DIGITAL_OUTPUT|STATE=FALSE'] = '${stringTableDigitalOutputStateFalse}'; +elvST['DIGITAL_OUTPUT|STATE=TRUE'] = '${stringTableDigitalOutputStateTrue}'; +elvST['DIMMER'] = '${stringTableDimmerTitle}'; +elvST['DIMMER_VIRTUAL_RECEIVER'] = '${stringTableDimmerTitle}'; +elvST['DIMMER|CHARACTERISTIC'] = '${stringTableDimmerCharacteristic}'; +elvST['DIMMER|ERROR=LOAD_FAILURE'] = '${stringTableDimmerErrorLoad}'; +elvST['DIMMER|ERROR_OVERHEAT'] = '${stringTableDimmerErrorOverheat}'; +elvST['DIMMER|ERROR_OVERLOAD'] = '${stringTableDimmerErrorOverload}'; +elvST['DIMMER|ERROR_REDUCED'] = '${stringTableDimmerErrorReduced}'; +elvST['DIMMER|FUSE_DELAY'] = '${stringTableDimmerFuseDelay}'; +elvST['DIMMER|LEVEL'] = '${stringTableDimmerLevel}'; +elvST['DIMMER|LOAD_APPEAR_BEHAVIOUR'] = '${stringTableDimmerLoadAppearBehaviour}'; +elvST['DIMMER|LOAD_ERROR_CALIB'] = '${stringTableDimmerLoadErrorCal}'; +elvST['DIMMER|LOGIC_COMBINATION'] = '${stringTableLogicCombination}'; +elvST['DIMMER|OLD_LEVEL'] = '${stringTableDimmerOldLevel}'; +elvST['DIMMER|ON_TIME'] = '${stringTableDimmerOnTime}'; +elvST['DIMMER|OVERTEMP_LEVEL'] = '${stringTableDimmerOverTempLevel}'; +elvST['DIMMER|POWERUP_ACTION'] = '${stringTableDimmerPowerUpAction}'; +elvST['DIMMER|RAMP_STOP'] = '${stringTableDimmerRampStop}'; +elvST['DIMMER|RAMP_TIME'] = '${stringTableDimmerRampTime}'; +elvST['DIMMER|REDUCE_LEVEL'] = '${stringTableDimmerReduceLevel}'; +elvST['DIMMER|REDUCE_TEMP_LEVEL'] = '${stringTableDimmerReduceTempLevel}'; +elvST['DIMMER|RELAY_OFFDELAY_TIME'] = '${stringTableRelayOffdelayTime}'; +elvST['DIMMER_TRANSMITTER|ACTIVITY_STATE=DOWN'] = '${stringTableDimmerActivityStateDown}'; +elvST['DIMMER_TRANSMITTER|ACTIVITY_STATE=UNKNOWN'] = '${stringTableDimmerActivityStateUnknown}'; +elvST['DIMMER_TRANSMITTER|ACTIVITY_STATE=UP'] = '${stringTableDimmerActivityStateUp}'; +elvST['DIMMER_TRANSMITTER|ACTIVITY_STATE=STABLE'] = '${stringTableProcessStableBlindDimmerTransmitter}'; +elvST['DIMMER_TRANSMITTER|LEVEL_STATUS=ERROR'] = '${lblValue} ${stringTableDimmerLevel}: ${lblError}'; +elvST['DIMMER_TRANSMITTER|LEVEL_STATUS=4'] = '${lblValue} ${stringTableDimmerLevel}: ${lblError}'; +elvST['DIMMER_TRANSMITTER|LEVEL_STATUS=NORMAL'] = '${lblValue} ${stringTableDimmerLevel}: ${lblNormal}'; +elvST['DIMMER_TRANSMITTER|LEVEL_STATUS=0'] = '${lblValue} ${stringTableDimmerLevel}: ${lblNormal}'; +elvST['DIMMER_TRANSMITTER|LEVEL_STATUS=OVERFLOW'] = '${lblValue} ${stringTableDimmerLevel}: ${lblOverflow}'; +elvST['DIMMER_TRANSMITTER|LEVEL_STATUS=2'] = '${lblValue} ${stringTableDimmerLevel}: ${lblOverflow}'; +elvST['DIMMER_TRANSMITTER|LEVEL_STATUS=UNDERFLOW'] = '${lblValue} ${stringTableDimmerLevel}: ${lblUnderflow}'; +elvST['DIMMER_TRANSMITTER|LEVEL_STATUS=3'] = '${lblValue} ${stringTableDimmerLevel}: ${lblUnderflow}'; +elvST['DIMMER_TRANSMITTER|LEVEL_STATUS=UNKNOWN'] = '${lblValue} ${stringTableDimmerLevel}: ${lblUnknown}'; +elvST['DIMMER_TRANSMITTER|LEVEL_STATUS=1'] = '${lblValue} ${stringTableDimmerLevel}: ${lblUnknown}'; +elvST['DIMMER_TRANSMITTER|PROCESS=NOT_STABLE'] = '${stringTableProcessNotStableDimmerTransmitter}'; +elvST['DIMMER_TRANSMITTER|PROCESS=STABLE'] = '${stringTableProcessStableBlindDimmerTransmitter}'; +elvST['DIMMER_VIRTUAL_RECEIVER|ACTIVITY_STATE=DOWN'] = '${stringTableDimmerActivityStateDown}'; +elvST['DIMMER_VIRTUAL_RECEIVER|ACTIVITY_STATE=UNKNOWN'] = '${stringTableDimmerActivityStateUnknown}'; +elvST['DIMMER_VIRTUAL_RECEIVER|ACTIVITY_STATE=UP'] = '${stringTableDimmerActivityStateUp}'; +elvST['DIMMER_VIRTUAL_RECEIVER|ACTIVITY_STATE=STABLE'] = '${stringTableProcessStableBlindDimmerTransmitter}'; +elvST['DIMMER_VIRTUAL_RECEIVER|PROCESS=NOT_STABLE'] = '${stringTableProcessNotStableDimmerTransmitter}'; +elvST['DIMMER_VIRTUAL_RECEIVER|PROCESS=STABLE'] = '${stringTableProcessStableBlindDimmerTransmitter}'; +elvST['DIMMER_VIRTUAL_RECEIVER|LEVEL_STATUS=ERROR'] = '${lblValue} ${stringTableDimmerLevel}: ${lblError}'; +elvST['DIMMER_VIRTUAL_RECEIVER|LEVEL_STATUS=4'] = '${lblValue} ${stringTableDimmerLevel}: ${lblError}'; +elvST['DIMMER_VIRTUAL_RECEIVER|LEVEL_STATUS=NORMAL'] = '${lblValue} ${stringTableDimmerLevel}: ${lblNormal}'; +elvST['DIMMER_VIRTUAL_RECEIVER|LEVEL_STATUS=0'] = '${lblValue} ${stringTableDimmerLevel}: ${lblNormal}'; +elvST['DIMMER_VIRTUAL_RECEIVER|LEVEL_STATUS=OVERFLOW'] = '${lblValue} ${stringTableDimmerLevel}: ${lblOverflow}'; +elvST['DIMMER_VIRTUAL_RECEIVER|LEVEL_STATUS=2'] = '${lblValue} ${stringTableDimmerLevel}: ${lblOverflow}'; +elvST['DIMMER_VIRTUAL_RECEIVER|LEVEL_STATUS=UNDERFLOW'] = '${lblValue} ${stringTableDimmerLevel}: ${lblUnderflow}'; +elvST['DIMMER_VIRTUAL_RECEIVER|LEVEL_STATUS=3'] = '${lblValue} ${stringTableDimmerLevel}: ${lblUnderflow}'; +elvST['DIMMER_VIRTUAL_RECEIVER|LEVEL_STATUS=UNKNOWN'] = '${lblValue} ${stringTableDimmerLevel}: ${lblUnknown}'; +elvST['DIMMER_VIRTUAL_RECEIVER|LEVEL_STATUS=1'] = '${lblValue} ${stringTableDimmerLevel}: ${lblUnknown}'; +elvST['DIRT_LEVEL'] = '${stringTableDirtLevel}'; +elvST['DISABLE_ACOUSTIC_CHANNELSTATE'] = '${stringTableDisableAcousticChannelState}'; +elvST['DISABLE_ACOUSTIC_SENDSTATE'] = '${stringTableDisableAcousticSendState}'; +elvST['DISPLAY_BACKLIGHT_MODE'] = '${stringTableDisplayBacklightMode}'; +elvST['DISPLAY_BACKLIGHT_MODE=AUTO'] = '${stringTableDisplayBacklightModeAuto}'; +elvST['DISPLAY_BACKLIGHT_MODE=OFF'] = '${stringTableDisplayBacklightModeOff}'; +elvST['DISPLAY_BACKLIGHT_MODE=ON'] = '${stringTableDisplayBacklightModeOn}'; +elvST['DISPLAY_BACKLIGHT_TIME'] = '${stringTableDisplayBacklightTime}'; +elvST['DISPLAY_BRIGHTNESS'] = '${stringTableDisplayBrightness}'; +elvST['DISPLAY_CONTRAST'] = '${stringTableDisplayContrast}'; +elvST['DISPLAY_ENERGYOPTIONS'] = '${stringTableDisplayEnergyOptions}'; +elvST['DISPLAY_INVERTING'] = '${stringTableDisplayInverting}'; +elvST['DISPLAY|ALARM_COUNT'] = '${stringTableDisplayAlarmCount}'; +elvST['DISPLAY|ARROW_DOWN'] = '${stringTableDisplayArrowDown}'; +elvST['DISPLAY|ARROW_UP'] = '${stringTableDisplayArrowUp}'; +elvST['DISPLAY|BACKLIGHT'] = '${stringTableDisplayBacklight}'; +elvST['DISPLAY|BACKLIGHT=BLINK_FAST'] = '${stringTableDisplayBacklightBlinkFast}'; +elvST['DISPLAY|BACKLIGHT=BLINK_SLOW'] = '${stringTableDisplayBacklightBlinkSlow}'; +elvST['DISPLAY|BACKLIGHT=OFF'] = '${stringTableDisplayBacklightOff}'; +elvST['DISPLAY|BACKLIGHT=ON'] = '${stringTableDisplayBacklightOn}'; +elvST['DISPLAY|BACKLIGHT_AT_ALARM'] = '${stringTableDisplayBacklightAtAlarm}'; +elvST['DISPLAY|BACKLIGHT_AT_ALARM=BLINK_FAST'] = '${stringTableDisplayBacklightAtAlarmBlinkFast}'; +elvST['DISPLAY|BACKLIGHT_AT_ALARM=BLINK_SLOW'] = '${stringTableDisplayBacklightAtAlarmBlinkSlow}'; +elvST['DISPLAY|BACKLIGHT_AT_ALARM=OFF'] = '${stringTableDisplayBacklightAtAlarmOff}'; +elvST['DISPLAY|BACKLIGHT_AT_ALARM=ON'] = '${stringTableDisplayBacklightAtAlarmOn}'; +elvST['DISPLAY|BACKLIGHT_AT_SERVICE'] = '${stringTableDisplayBacklightAtService}'; +elvST['DISPLAY|BACKLIGHT_AT_SERVICE=BLINK_FAST'] = '${stringTableDisplayBacklightAtServiceBlinkFast}'; +elvST['DISPLAY|BACKLIGHT_AT_SERVICE=BLINK_SLOW'] = '${stringTableDisplayBacklightAtServiceBlinkSlow}'; +elvST['DISPLAY|BACKLIGHT_AT_SERVICE=OFF'] = '${stringTableDisplayBacklightAtServiceOff}'; +elvST['DISPLAY|BACKLIGHT_AT_SERVICE=ON'] = '${stringTableDisplayBacklightAtServiceOn}'; +elvST['DISPLAY|BACKLIGHT_AT_STATUS'] = '${stringTableDisplayBacklightAtState}'; +elvST['DISPLAY|BACKLIGHT_AT_STATUS=BLINK_FAST'] = '${stringTableDisplayBacklightAtStateBlinkFast}'; +elvST['DISPLAY|BACKLIGHT_AT_STATUS=BLINK_SLOW'] = '${stringTableDisplayBacklightAtStateBlinkSlow}'; +elvST['DISPLAY|BACKLIGHT_AT_STATUS=OFF'] = '${stringTableDisplayBacklightAtStateOff}'; +elvST['DISPLAY|BACKLIGHT_AT_STATUS=ON'] = '${stringTableDisplayBacklightAtStateOn}'; +elvST['DISPLAY|BEEP=NONE'] = '${stringTableDisplayBeepNone}'; +elvST['DISPLAY|BEEP=TONE1'] = '${stringTableDisplayBeepTone1}'; +elvST['DISPLAY|BEEP=TONE2'] = '${stringTableDisplayBeepTone2}'; +elvST['DISPLAY|BEEP=TONE3'] = '${stringTableDisplayBeepTone3}'; +elvST['DISPLAY|BEEP_AT_ALARM'] = '${stringTableDisplayBeepAtAlarm}'; +elvST['DISPLAY|BEEP_AT_ALARM=NONE'] = '${stringTableDisplayBeepAtAlarmNone}'; +elvST['DISPLAY|BEEP_AT_ALARM=TONE1'] = '${stringTableDisplayBeepAtAlarmTone1}'; +elvST['DISPLAY|BEEP_AT_ALARM=TONE2'] = '${stringTableDisplayBeepAtAlarmTone2}'; +elvST['DISPLAY|BEEP_AT_ALARM=TONE3'] = '${stringTableDisplayBeepAtAlarmTone3}'; +elvST['DISPLAY|BEEP_AT_SERVICE'] = '${stringTableDisplayBeepAtService}'; +elvST['DISPLAY|BEEP_AT_SERVICE=NONE'] = '${stringTableDisplayBeepAtServiceNone}'; +elvST['DISPLAY|BEEP_AT_SERVICE=TONE1'] = '${stringTableDisplayBeepAtServiceTone1}'; +elvST['DISPLAY|BEEP_AT_SERVICE=TONE2'] = '${stringTableDisplayBeepAtServiceTone2}'; +elvST['DISPLAY|BEEP_AT_SERVICE=TONE3'] = '${stringTableDisplayBeepAtServiceTone3}'; +elvST['DISPLAY|BEEP_AT_STATUSINFO'] = '${stringTableDisplayBeepAtStatusInfo}'; +elvST['DISPLAY|BEEP_AT_STATUSINFO=NONE'] = '${stringTableDisplayBeepAtStatusInfoNone}'; +elvST['DISPLAY|BEEP_AT_STATUSINFO=TONE1'] = '${stringTableDisplayBeepAtStatusInfoTone1}'; +elvST['DISPLAY|BEEP_AT_STATUSINFO=TONE2'] = '${stringTableDisplayBeepAtStatusInfoTone2}'; +elvST['DISPLAY|BEEP_AT_STATUSINFO=TONE3'] = '${stringTableDisplayBeepAtStatusInfoTone3}'; +elvST['DISPLAY|BELL'] = '${stringTableDisplayBell}'; +elvST['DISPLAY|BLIND'] = '${stringTableDisplayBlind}'; +elvST['DISPLAY|BULB'] = '${stringTableDisplayBulb}'; +elvST['DISPLAY|CLOCK'] = '${stringTableDisplayClock}'; +elvST['DISPLAY|DOOR'] = '${stringTableDisplayDoor}'; +elvST['DISPLAY|MESSAGE_SHOW_TIME'] = '${stringTableDisplayMessageShowTime}'; +elvST['DISPLAY|MESSAGE_SHOW_TIME=PERMANENT'] = '${stringTableDisplayMessageShowTimePermanent}'; +elvST['DISPLAY|PHONE'] = '${stringTableDisplayPhone}'; +elvST['DISPLAY|SCENE'] = '${stringTableDisplayScene}'; +elvST['DISPLAY|SERVICE_COUNT'] = '${stringTableDisplayServiceCount}'; +elvST['DISPLAY|SUBMIT'] = '${stringTableDisplaySubmit}'; +elvST['DISPLAY|SWITCH'] = '${stringTableDisplaySwitch}'; +elvST['DISPLAY|TEXT'] = '${stringTableDisplayText}'; +elvST['DISPLAY|UNIT=CELSIUS'] = '${stringTableDisplayUnitCelsius}'; +elvST['DISPLAY|UNIT=FAHRENHEIT'] = '${stringTableDisplayUnitFahrenheit}'; +elvST['DISPLAY|UNIT=NONE'] = '${stringTableDisplayUnitNone}'; +elvST['DISPLAY|UNIT=PERCENT'] = '${stringTableDisplayUnitPercent}'; +elvST['DISPLAY|UNIT=WATT'] = '${stringTableDisplayUnitWatt}'; +elvST['DISPLAY|WINDOW'] = '${stringTableDisplayWindow}'; +elvST['DISPLAY_INPUT_TRANSMITTER'] = '${stringTableDisplayInputTransmitterTitle}'; +elvST['DISPLAY_INPUT_TRANSMITTER|DISPLAY_DATA_STRING'] = '${stringTableWGDDisplayDataString}'; +elvST['DISPLAY_LEVEL_INPUT_TRANSMITTER'] = '${stringTableDisplayInputLevelTransmitterTitle}'; +elvST['DISPLAY_THERMOSTAT_INPUT_TRANSMITTER'] = '${stringTableDisplayInputThermostatTransmitterTitle}'; +elvST['DISPLAY_UPDATE_REQUEST_0=FALSE'] = '${stringTableDisplayUpdateRequest} 0: ${lblNo}'; +elvST['DISPLAY_UPDATE_REQUEST_0=TRUE'] = '${stringTableDisplayUpdateRequest} 0: ${lblYes}'; +elvST['DISPLAY_UPDATE_REQUEST_01=FALSE'] = '${stringTableDisplayUpdateRequest} 1: ${lblNo}'; +elvST['DISPLAY_UPDATE_REQUEST_01=TRUE'] = '${stringTableDisplayUpdateRequest} 1: ${lblYes}'; +elvST['DISPLAY_UPDATE_REQUEST_03=FALSE'] = '${stringTableDisplayUpdateRequest} 3: ${lblNo}'; +elvST['DISPLAY_UPDATE_REQUEST_03=TRUE'] = '${stringTableDisplayUpdateRequest} 3: ${lblYes}'; +elvST['DISPLAY_UPDATE_REQUEST_05=FALSE'] = '${stringTableDisplayUpdateRequest} 5: ${lblNo}'; +elvST['DISPLAY_UPDATE_REQUEST_05=TRUE'] = '${stringTableDisplayUpdateRequest} 5: ${lblYes}'; +elvST['DISPLAY_UPDATE_REQUEST_07=FALSE'] = '${stringTableDisplayUpdateRequest} 7: ${lblNo}'; +elvST['DISPLAY_UPDATE_REQUEST_07=TRUE'] = '${stringTableDisplayUpdateRequest} 7: ${lblYes}'; +elvST['DISPLAY_UPDATE_REQUEST_09=FALSE'] = '${stringTableDisplayUpdateRequest} 9: ${lblNo}'; +elvST['DISPLAY_UPDATE_REQUEST_09=TRUE'] = '${stringTableDisplayUpdateRequest} 9: ${lblYes}'; +elvST['DISPLAY_UPDATE_REQUEST_11=FALSE'] = '${stringTableDisplayUpdateRequest} 11: ${lblNo}'; +elvST['DISPLAY_UPDATE_REQUEST_11=TRUE'] = '${stringTableDisplayUpdateRequest} 11: ${lblYes}'; +elvST['DISPLAY_UPDATE_REQUEST_13=FALSE'] = '${stringTableDisplayUpdateRequest} 13: ${lblNo}'; +elvST['DISPLAY_UPDATE_REQUEST_13=TRUE'] = '${stringTableDisplayUpdateRequest} 13: ${lblYes}'; +elvST['DISPLAY_UPDATE_REQUEST_15=FALSE'] = '${stringTableDisplayUpdateRequest} 15: ${lblNo}'; +elvST['DISPLAY_UPDATE_REQUEST_15=TRUE'] = '${stringTableDisplayUpdateRequest} 15: ${lblYes}'; +elvST['DISPLAY_UPDATE_REQUEST_17=FALSE'] = '${stringTableDisplayUpdateRequest} 17: ${lblNo}'; +elvST['DISPLAY_UPDATE_REQUEST_17=TRUE'] = '${stringTableDisplayUpdateRequest} 17: ${lblYes}'; +elvST['DISPLAY_UPDATE_REQUEST_19=FALSE'] = '${stringTableDisplayUpdateRequest} 19: ${lblNo}'; +elvST['DISPLAY_UPDATE_REQUEST_19=TRUE'] = '${stringTableDisplayUpdateRequest} 19: ${lblYes}'; +elvST['DISPLAY_UPDATE_REQUEST_21=FALSE'] = '${stringTableDisplayUpdateRequest} 21: ${lblNo}'; +elvST['DISPLAY_UPDATE_REQUEST_21=TRUE'] = '${stringTableDisplayUpdateRequest} 21: ${lblYes}'; +elvST['DISPLAY_UPDATE_REQUEST_23=FALSE'] = '${stringTableDisplayUpdateRequest} 23: ${lblNo}'; +elvST['DISPLAY_UPDATE_REQUEST_23=TRUE'] = '${stringTableDisplayUpdateRequest} 23: ${lblYes}'; +elvST['DOOR_COMMAND=CLOSE'] = '${stringTableDoorCommandClose}'; +elvST['DOOR_COMMAND=NOP'] = '${stringTableDoorCommandNOP}'; +elvST['DOOR_COMMAND=OPEN'] = '${stringTableDoorCommandOpen}'; +elvST['DOOR_COMMAND=PARTIAL_OPEN'] = '${stringTableDoorCommandPartialOpen}'; +elvST['DOOR_COMMAND=STOP'] = '${stringTableDoorCommandStop}'; +elvST['DOOR_LOCK_STATE_TRANSCEIVER'] = '${stringTableDoorLockStateTransmitterTitle}'; +elvST['DOOR_LOCK_STATE_TRANSCEIVER|LOCK_STATE=LOCKED'] = '${stringTableDoorLockStateTransmitterLockStateLocked}'; +elvST['DOOR_LOCK_STATE_TRANSCEIVER|LOCK_STATE=UNLOCKED'] = '${stringTableDoorLockStateTransmitterLockStateUnlocked}'; +elvST['DOOR_LOCK_STATE_TRANSCEIVER|LOCK_STATE=UNKNOWN'] = '${stringTableDoorLockStateTransmitterLockStateUnknown}'; +elvST['DOOR_LOCK_STATE_TRANSCEIVER|MSG_FOR_POS_A=NO_MSG'] = '${stringTableTiltSensorMsgPosA2}'; +elvST['DOOR_LOCK_STATE_TRANSCEIVER|MSG_FOR_POS_A=LOCKED'] = '${stringTableDoorLockStateTransmitterLockStateLocked}'; +elvST['DOOR_LOCK_STATE_TRANSCEIVER|MSG_FOR_POS_A=UNLOCKED'] = '${stringTableDoorLockStateTransmitterLockStateUnlocked}'; +elvST['DOOR_LOCK_STATE_TRANSCEIVER|MSG_FOR_POS_B=NO_MSG'] = '${stringTableTiltSensorMsgPosB2}'; +elvST['DOOR_LOCK_STATE_TRANSCEIVER|MSG_FOR_POS_B=LOCKED'] = '${stringTableDoorLockStateTransmitterLockStateLocked}'; +elvST['DOOR_LOCK_STATE_TRANSCEIVER|MSG_FOR_POS_B=UNLOCKED'] = '${stringTableDoorLockStateTransmitterLockStateUnlocked}'; +elvST['DOOR_LOCK_STATE_TRANSMITTER|LOCK_STATE=LOCKED'] = '${stringTableDoorLockStateTransmitterLockStateLocked}'; +elvST['DOOR_LOCK_STATE_TRANSMITTER|LOCK_STATE=UNLOCKED'] = '${stringTableDoorLockStateTransmitterLockStateUnlocked}'; +elvST['DOOR_LOCK_STATE_TRANSMITTER|LOCK_STATE=UNKNOWN'] = '${stringTableDoorLockStateTransmitterLockStateUnknown}'; +elvST['DOOR_LOCK_STATE_TRANSMITTER|ACTIVITY_STATE=DOWN'] = '${stringTableDoorLockStateTransmitterActivityStateDown}'; +elvST['DOOR_LOCK_STATE_TRANSMITTER|ACTIVITY_STATE=UNKNOWN'] = '${stringTableDoorLockStateTransmitterActivityStateUnknown}'; +elvST['DOOR_LOCK_STATE_TRANSMITTER|ACTIVITY_STATE=STABLE'] = '${stringTableDoorLockStateTransmitterActivityStateStable}'; +elvST['DOOR_LOCK_STATE_TRANSMITTER|ACTIVITY_STATE=UP'] = '${stringTableDoorLockStateTransmitterActivityStateUp}'; +elvST['DOOR_LOCK_STATE_TRANSMITTER|LOCK_TARGET_LEVEL=LOCKED'] = '${stringTableDoorLockStateTransmitterLockTargetLevelLocked}'; +elvST['DOOR_LOCK_STATE_TRANSMITTER|LOCK_TARGET_LEVEL=UNLOCKED'] = '${stringTableDoorLockStateTransmitterLockTargetLevelUnlocked}'; +elvST['DOOR_LOCK_STATE_TRANSMITTER|LOCK_TARGET_LEVEL=OPEN'] = '${stringTableDoorLockStateTransmitterLockTargetLevelOpen}'; +elvST['DOOR_RECEIVER'] = '${stringTableDoorReceiverTitle}'; +elvST['DOOR_STATE=CLOSED'] = '${stringTableDoorStateClose}'; +elvST['DOOR_STATE=OPEN'] = '${stringTableDoorStateOpen}'; +elvST['DOOR_STATE=POSITION_UNKNOWN'] = '${stringTableDoorStateUnknown}'; +elvST['DOOR_STATE=VENTILATION_POSITION'] = '${stringTableDoorStateVentilationPosition}'; +elvST['DUAL_WHITE_BRIGHTNESS'] = '${stringTableDualWhiteBrightnessTitle}'; +elvST['DUAL_WHITE_COLOR'] = '${stringTableDualWhiteColorTitle}'; +elvST['DUAL_WHITE_COLOR|LEVEL'] = '${stringTableDualWhiteColorLevel}'; +elvST['DUAL_WHITE_COLOR|LEVEL_REAL'] = '${stringTableDualWhiteColorLevelReal}'; +elvST['DUAL_WHITE_COLOR|OLD_LEVEL'] = '${stringTableDualWhiteColorOldLevel}'; +elvST['DUAL_WHITE_COLOR|RAMP_STOP'] = '${stringTableDualWhiteColorRampStop}'; +elvST['DUAL_WHITE_COLOR|RAMP_TIME'] = '${stringTableDualWhiteColorRampTime}'; +elvST['DURATION_UNIT'] = '${stringTableDurationUnit}'; +elvST['DURATION_UNIT=D'] = '${stringTableDurationUnitD}'; +elvST['DURATION_UNIT=H'] = '${stringTableDurationUnitH}'; +elvST['DURATION_UNIT=M'] = '${stringTableDurationUnitM}'; +elvST['DURATION_UNIT=S'] = '${stringTableDurationUnitS}'; +elvST['DURATION_UNIT=10MS'] = '${stringTableDurationUnit10MS}'; +elvST['DURATION_VALUE'] = '${stringTableDurationValue}'; +elvST['DUTYCYCLE_LIMIT'] = '${stringTableDutyCycleLimit}'; +elvST['DUTY_CYCLE_LEVEL'] = '${lblDutyCycle}'; +elvST['DUTY_CYCLE=FALSE'] = '${stringTableDutyCycleFalse}'; +elvST['DUTY_CYCLE=TRUE'] = '${stringTableDutyCycleTrue}'; +elvST['EMERGENCY_OPERATION=FALSE'] = '${stringTableEmergencyOperationFalse}'; +elvST['EMERGENCY_OPERATION=TRUE'] = '${stringTableEmergencyOperationTrue}'; +elvST['ENABLE_ROUTING'] = '${stringTableEnableRouting}'; +elvST['ENERGIE_METER_TRANSMITTER|AVERAGING'] = '${stringTablePowerMeterAveraging}'; +elvST['ENERGIE_METER_TRANSMITTER|ENERGY_COUNTER'] = '${stringTablePowerMeterEnergyCounter}'; +elvST['ENERGIE_METER_TRANSMITTER|ENERGY_COUNTER_FEED_IN'] = '${stringTablePowerMeterEnergyCounterFeedIn}'; +elvST['ENERGIE_METER_TRANSMITTER|POWER'] = '${stringTablePowerMeterPower}'; +elvST['ENERGIE_METER_TRANSMITTER|ENERGY_COUNTER_STATUS=NORMAL'] = '${lblStatus} ${chType_POWERMETER}: ${lblNormal}'; +elvST['ENERGIE_METER_TRANSMITTER|ENERGY_COUNTER_STATUS=0'] = '${lblStatus} ${chType_POWERMETER}: ${lblNormal}'; +elvST['ENERGIE_METER_TRANSMITTER|ENERGY_COUNTER_STATUS=UNKNOWN'] = '${lblStatus} ${chType_POWERMETER}: ${lblUnknown}'; +elvST['ENERGIE_METER_TRANSMITTER|ENERGY_COUNTER_STATUS=1'] = '${lblStatus} ${chType_POWERMETER}: ${lblUnknown}'; +elvST['ENERGIE_METER_TRANSMITTER|ENERGY_COUNTER_STATUS=OVERFLOW'] = '${lblStatus} ${chType_POWERMETER}: ${lblOverflow}'; +elvST['ENERGIE_METER_TRANSMITTER|ENERGY_COUNTER_STATUS=2'] = '${lblStatus} ${chType_POWERMETER}: ${lblOverflow}'; +elvST['ENERGIE_METER_TRANSMITTER|ENERGY_COUNTER_OVERFLOW=FALSE'] = '${stringTablePowerMeterOverflowFalse}'; +elvST['ENERGIE_METER_TRANSMITTER|ENERGY_COUNTER_OVERFLOW=TRUE'] = '${stringTablePowerMeterOverflowTrue}'; +elvST['ENERGIE_METER_TRANSMITTER|FREQUENCY'] = '${stringTablePowerMeterFrequency}'; +elvST['ENERGIE_METER_TRANSMITTER|GAS_FLOW'] = '${stringTablePowerMeterGasFlow}'; +elvST['ENERGIE_METER_TRANSMITTER|GAS_FLOW_STATUS=NORMAL'] = '${lblValue} ${stringTablePowerMeterGasFlow}: ${lblNormal}'; +elvST['ENERGIE_METER_TRANSMITTER|GAS_FLOW_STATUS=UNKNOWN'] = '${lblValue} ${stringTablePowerMeterGasFlow}: ${lblUnknown}'; +elvST['ENERGIE_METER_TRANSMITTER|GAS_FLOW_STATUS=OVERFLOW'] = '${lblValue} ${stringTablePowerMeterGasFlow}: ${lblOverflow}'; +elvST['ENERGIE_METER_TRANSMITTER|GAS_VOLUME'] = '${stringTablePowerMeterGasVolume}'; +elvST['ENERGIE_METER_TRANSMITTER|GAS_VOLUME_STATUS=NORMAL'] = '${lblValue} ${stringTablePowerMeterGasVolume}: ${lblNormal}'; +elvST['ENERGIE_METER_TRANSMITTER|GAS_VOLUME_STATUS=UNKNOWN'] = '${lblValue} ${stringTablePowerMeterGasVolume}: ${lblUnknown}'; +elvST['ENERGIE_METER_TRANSMITTER|GAS_VOLUME_STATUS=OVERFLOW'] = '${lblValue} ${stringTablePowerMeterGasVolume}: ${lblOverflow}'; +elvST['ENERGIE_METER_TRANSMITTER|POWER'] = '${stringTablePowerMeterPower}'; +elvST['ENERGIE_METER_TRANSMITTER|POWER_STATUS=NORMAL'] = '${lblValue} ${stringTablePowerMeterPower}: ${lblNormal}'; +elvST['ENERGIE_METER_TRANSMITTER|POWER_STATUS=0'] = '${lblValue} ${stringTablePowerMeterPower}: ${lblNormal}'; +elvST['ENERGIE_METER_TRANSMITTER|POWER_STATUS=UNKNOWN'] = '${lblValue} ${stringTablePowerMeterPower}: ${lblUnknown}'; +elvST['ENERGIE_METER_TRANSMITTER|POWER_STATUS=1'] = '${lblValue} ${stringTablePowerMeterPower}: ${lblUnknown}'; +elvST['ENERGIE_METER_TRANSMITTER|POWER_STATUS=OVERFLOW'] = '${lblValue} ${stringTablePowerMeterPower}: ${lblOverflow}'; +elvST['ENERGIE_METER_TRANSMITTER|POWER_STATUS=2'] = '${lblValue} ${stringTablePowerMeterPower}: ${lblOverflow}'; +elvST['ENERGIE_METER_TRANSMITTER|TX_THRESHOLD_POWER'] = '${stringTablePowerMeterTxThresholdPower}'; +elvST['ERROR'] = '${stringTableError}'; +elvST['ERROR=NO_ERROR'] = '${stringTableErrorNoError}'; +elvST['ERROR_BAD_RECHARGEABLE_BATTERY_HEALTH'] = '${stringTableErrorBadRechargeableBatteryHealthTrue}'; +elvST['ERROR_BAD_RECHARGEABLE_BATTERY_HEALTH=FALSE'] = '${stringTableErrorBadRechargeableBatteryHealthFalse}'; +elvST['ERROR_BAD_RECHARGEABLE_BATTERY_HEALTH=TRUE'] = '${stringTableErrorBadRechargeableBatteryHealthTrue}'; +elvST['ERROR_BATTERY=FALSE'] = '${stringTableBatteryFailure}'; +elvST['ERROR_BATTERY=TRUE'] = '${stringTableBatteryOk}'; +elvST['ERROR_BUS_CONFIG_MISMATCH'] = '${stringTablelErrorBusConfigMismatchTrue}'; +elvST['ERROR_BUS_CONFIG_MISMATCH=FALSE'] = '${stringTablelErrorBusConfigMismatchFalse}'; +elvST['ERROR_BUS_CONFIG_MISMATCH=TRUE'] = '${stringTablelErrorBusConfigMismatchTrue}'; +elvST['ERROR_CODE'] = '${stringTableErrorCode}'; +elvST['ERROR_COMMUNICATION_PARTICULATE_MATTER_SENSOR'] = '${stringTableErrorCommunicationParticulateMatterSensor}'; +elvST['ERROR_COMMUNICATION_PARTICULATE_MATTER_SENSOR=FALSE'] = '${stringTableErrorCommunicationParticulateMatterSensorFalse}'; +elvST['ERROR_COMMUNICATION_PARTICULATE_MATTER_SENSOR=TRUE'] = '${stringTableErrorCommunicationParticulateMatterSensorTrue}'; +elvST['ERROR_COMMUNICATION_SENSOR'] = '${stringTableErrorCommunicationSensor}'; +elvST['ERROR_COMMUNICATION_SENSOR=TRUE'] = '${stringTableErrorCommunicationSensorTrue}'; +elvST['ERROR_COMMUNICATION_SENSOR=FALSE'] = '${stringTableErrorCommunicationSensorFalse}'; +elvST['ERROR_COMMUNICATION_TEMP_AND_HUMIDITY_SENSOR'] = '${stringTableErrorCommunicationTempAndHumiditySensor}'; +elvST['ERROR_COMMUNICATION_TEMP_AND_HUMIDITY_SENSOR=FALSE'] = '${stringTableErrorCommunicationTempAndHumiditySensorFalse}'; +elvST['ERROR_COMMUNICATION_TEMP_AND_HUMIDITY_SENSOR=TRUE'] = '${stringTableErrorCommunicationTempAndHumiditySensorTrue}'; +elvST['ERROR_COPROCESSOR'] = '${stringTableErrorCoProcessor}'; +elvST['ERROR_COPROCESSOR=TRUE'] = '${stringTableErrorCoprocessorTrue}'; +elvST['ERROR_COPROCESSOR=FALSE'] = '${stringTableErrorCoprocessorFalse}'; +elvST['ERROR_DALI_BUS'] = '${stringTableErrorDaliBus}'; +elvST['ERROR_DALI_BUS=FALSE'] = '${stringTableErrorDaliBusFalse}'; +elvST['ERROR_DALI_BUS=TRUE'] = '${stringTableErrorDaliBusTrue}'; +elvST['ERROR_DEGRADED_CHAMBER'] = '${stringTableErrorDegradedChamber}'; +elvST['ERROR_DEGRADED_CHAMBER=FALSE'] = '${stringTableErrorDegradedChamberFalse}'; +elvST['ERROR_DEGRADED_CHAMBER=TRUE'] = '${stringTableErrorDegradedChamberTrue}'; +elvST['ERROR_NON_FLAT_POSITIONING'] = '${stringTableErrorNonFlatPositioning}'; +elvST['ERROR_NON_FLAT_POSITIONING=FALSE'] = '${stringTableErrorNonFlatPositioningFalse}'; +elvST['ERROR_NON_FLAT_POSITIONING=TRUE'] = '${stringTableErrorNonFlatPositioningTrue}'; +elvST['ERROR_OVERHEAT'] = '${stringTableErrorOverheatTrue}'; +elvST['ERROR_OVERHEAT=FALSE'] = '${stringTableErrorOverheatFalse}'; +elvST['ERROR_OVERHEAT=TRUE'] = '${stringTableErrorOverheatTrue}'; +elvST['ERROR_OVERLOAD'] = '${stringTableErrorOverloadTrue}'; +elvST['ERROR_OVERLOAD=FALSE'] = '${stringTableErrorOverloadFalse}'; +elvST['ERROR_OVERLOAD=TRUE'] = '${stringTableErrorOverloadTrue}'; +elvST['ERROR_PARTICULATE_MATTER_MEASUREMENT=FALSE'] = '${stringTableErrorParticulateMatterMeasurementFalse}'; +elvST['ERROR_PARTICULATE_MATTER_MEASUREMENT=TRUE'] = '${stringTableErrorParticulateMatterMeasurementTrue}'; +elvST['ERROR_POWER=FALSE'] = '${stringTableErrorPowerFalse}'; +elvST['ERROR_POWER=NO_ERROR'] = '${stringTablePowerAvailable}'; +elvST['ERROR_POWER=POWER_FAILURE'] = '${stringTablePowerNotAvailable}'; +elvST['ERROR_POWER=TRUE'] = '${stringTableErrorPowerTrue}'; +elvST['ERROR_POWER_FAILURE'] = '${stringTableErrorPowerFailureTrue}'; +elvST['ERROR_POWER_FAILURE=FALSE'] = '${stringTableErrorPowerFailureFalse}'; +elvST['ERROR_POWER_FAILURE=TRUE'] = '${stringTableErrorPowerFailureTrue}'; +elvST['ERROR_POWER_SHORT_CIRCUIT_BUS_1'] = '${stringTableErrorPowerShortCircuitBus1True}'; +elvST['ERROR_POWER_SHORT_CIRCUIT_BUS_1=FALSE'] = '${stringTableErrorPowerShortCircuitBus1False}'; +elvST['ERROR_POWER_SHORT_CIRCUIT_BUS_1=TRUE'] = '${stringTableErrorPowerShortCircuitBus1True}'; +elvST['ERROR_POWER_SHORT_CIRCUIT_BUS_2'] = '${stringTableErrorPowerShortCircuitBus2True}'; +elvST['ERROR_POWER_SHORT_CIRCUIT_BUS_2=FALSE'] = '${stringTableErrorPowerShortCircuitBus2False}'; +elvST['ERROR_POWER_SHORT_CIRCUIT_BUS_2=TRUE'] = '${stringTableErrorPowerShortCircuitBus2True}'; +elvST['ERROR_REDUCED=FALSE'] = '${stringTableErrorReducedFalse}'; +elvST['ERROR_REDUCED=TRUE'] = '${stringTableErrorReducedTrue}'; +elvST['ERROR_RESTART_NEEDED'] = '${stringTableErrorRestartNeeded}'; +elvST['ERROR_RESTART_NEEDED=TRUE'] = '${stringTableErrorRestartNeededTrue}'; +elvST['ERROR_RESTART_NEEDED=FALSE'] = '${stringTableErrorRestartNeededFalse}'; +elvST['ERROR_SABOTAGE=FALSE'] = '${stringTableErrorSabotageFalse}'; +elvST['ERROR_SABOTAGE=NO_ERROR'] = '${stringTableSabotageContactOk}'; +elvST['ERROR_SABOTAGE=SABOTAGE'] = '${stringTableSabotage}'; +elvST['ERROR_SABOTAGE=TRUE'] = '${stringTableErrorSabotageTrue}'; +elvST['ERROR_SHORT_CIRCUIT_DATA_LINE_BUS_1'] = '${stringTableErrorShortCircuitDataLineBus1True}'; +elvST['ERROR_SHORT_CIRCUIT_DATA_LINE_BUS_1=FALSE'] = '${stringTableErrorShortCircuitDataLineBus1False}'; +elvST['ERROR_SHORT_CIRCUIT_DATA_LINE_BUS_1=TRUE'] = '${stringTableErrorShortCircuitDataLineBus1True}'; +elvST['ERROR_SHORT_CIRCUIT_DATA_LINE_BUS_2'] = '${stringTableErrorShortCircuitDataLineBus2True}'; +elvST['ERROR_SHORT_CIRCUIT_DATA_LINE_BUS_2=FALSE'] = '${stringTableErrorShortCircuitDataLineBus2False}'; +elvST['ERROR_SHORT_CIRCUIT_DATA_LINE_BUS_2=TRUE'] = '${stringTableErrorShortCircuitDataLineBus2True}'; +elvST['ERROR_TEMP_OR_HUMIDITY_MEASUREMENT=FALSE'] = '${stringTableErrorTempOrHumidityMeasurementFalse}'; +elvST['ERROR_TEMP_OR_HUMIDITY_MEASUREMENT=TRUE'] = '${stringTableErrorTempOrHumidityMeasurementTrue}'; +elvST['ERROR_UNDERVOLTAGE'] = '${stringTableErrorUndervoltageTrue}'; +elvST['ERROR_UNDERVOLTAGE=FALSE'] = '${stringTableErrorUndervoltageFalse}'; +elvST['ERROR_UNDERVOLTAGE=TRUE'] = '${stringTableErrorUndervoltageTrue}'; +elvST['ERROR_UPDATE'] = '${stringTableErrorUpdateTrue}'; +elvST['ERROR_UPDATE=TRUE'] = '${stringTableErrorUpdateTrue}'; +elvST['ERROR_UPDATE=FALSE'] = '${stringTableErrorUpdateFalse}'; +elvST['ERROR_WIND_COMMUNICATION=FALSE'] = '${stringTableErrorWindCommunicationFalse}'; +elvST['ERROR_WIND_COMMUNICATION=TRUE'] = '${stringTableErrorWindCommunicationTrue}'; +elvST['ERROR_WIND_NORTH=TRUE'] = '${stringTableErrorWindNorthTrue}'; +elvST['ERROR_WIND_NORTH=FALSE'] = '${stringTableErrorWindNorthFalse}'; +elvST['EVENT_DELAYTIME'] = '${stringTableEventDelayTime}'; +elvST['EVENT_DELAY_UNIT'] = '${stringTableEventDelayUnit}'; +elvST['EVENT_DELAY_UNIT=100MS'] = '${optionUnit100MS}'; +elvST['EVENT_DELAY_UNIT=H'] = '${optionUnitH}'; +elvST['EVENT_DELAY_UNIT=M'] = '${optionUnitM}'; +elvST['EVENT_DELAY_UNIT=S'] = '${optionUnitS}'; +elvST['EVENT_DELAY_VALUE'] = '${stringTableEventDelayValue}'; +elvST['EVENT_FILTER_NUMBER'] = '${stringTableEventFilterNumber}'; +elvST['EVENT_FILTER_PERIOD'] = '${stringTableEventFilterPeriod}'; +elvST['EVENT_RANDOMTIME_UNIT'] = '${stringTableEventRandomTimeUnit}'; +elvST['EVENT_RANDOMTIME_UNIT=100MS'] = '${optionUnit100MS}'; +elvST['EVENT_RANDOMTIME_UNIT=H'] = '${optionUnitH}'; +elvST['EVENT_RANDOMTIME_UNIT=M'] = '${optionUnitM}'; +elvST['EVENT_RANDOMTIME_UNIT=S'] = '${optionUnitS}'; +elvST['EVENT_RANDOMTIME_VALUE'] = '${stringTableStatusInfoRandom}'; +elvST['EXPECT_AES'] = '${stringTableExpectAES}'; +elvST['EXTERNAL_CLOCK=FALSE'] = '${stringTableExternalClockFalse}'; +elvST['EXTERNAL_CLOCK=TRUE'] = '${stringTableExternalClockTrue}'; +elvST['FREQUENCY_ALTERNATING_LOW_HIGH'] = '${stringTableAlarmFrequencyAlternatingLowHigh}'; +elvST['FREQUENCY_ALTERNATING_LOW_MID_HIGH'] = '${stringTableAlarmFrequencyAlternatingLowMidHigh}'; +elvST['FREQUENCY_FALLING'] = '${stringTableAlarmFrequencyFalling}'; +elvST['FREQUENCY_HIGHON_LONGOFF'] = '${stringTableAlarmFrequencyHighOnLongOff}'; +elvST['FREQUENCY_HIGHON_OFF'] = '${stringTableAlarmFrequencyHighOnOff}'; +elvST['FREQUENCY_INPUT'] = '${stringTableFrequencyInput}'; +elvST['FREQUENCY_LOWON_LONGOFF_HIGHON_LONGOFF'] = '${stringTableAlarmFrequencyLowOnLongOffHighOnLongOff}'; +elvST['FREQUENCY_LOWON_OFF_HIGHON_OFF'] = '${stringTableAlarmFrequencyLowOnOffHighonOff}'; +elvST['FREQUENCY_RISING'] = '${stringTableAlarmFrequencyRising}'; +elvST['FREQUENCY_RISING_AND_FALLING'] = '${stringTableAlarmFrequencyRisingAndFalling}'; +elvST['FREQUENCY'] = '${stringTablePowerMeterFrequency}'; +elvST['FREQUENCY_STATUS=ERROR'] = '${lblValue} ${stringTablePowerMeterFrequency}: ${lblError}'; +elvST['FREQUENCY_STATUS=4'] = '${lblValue} ${stringTablePowerMeterFrequency}: ${lblError}'; +elvST['FREQUENCY_STATUS=NORMAL'] = '${lblValue} ${stringTablePowerMeterFrequency}: ${lblNormal}'; +elvST['FREQUENCY_STATUS=0'] = '${lblValue} ${stringTablePowerMeterFrequency}: ${lblNormal}'; +elvST['FREQUENCY_STATUS=OVERFLOW'] = '${lblValue} ${stringTablePowerMeterFrequency}: ${lblOverflow}'; +elvST['FREQUENCY_STATUS=2'] = '${lblValue} ${stringTablePowerMeterFrequency}: ${lblOverflow}'; +elvST['FREQUENCY_STATUS=UNDERFLOW'] = '${lblValue} ${stringTablePowerMeterFrequency}: ${lblUnderflow}'; +elvST['FREQUENCY_STATUS=3'] = '${lblValue} ${stringTablePowerMeterFrequency}: ${lblUnderflow}'; +elvST['FREQUENCY_STATUS=UNKNOWN'] = '${lblValue} ${stringTablePowerMeterFrequency}: ${lblUnknown}'; +elvST['FREQUENCY_STATUS=1'] = '${lblValue} ${stringTablePowerMeterFrequency}: ${lblUnknown}'; +elvST['FROST_PROTECTION=FALSE'] = '${stringTableFrostProtectionFalse}'; +elvST['FROST_PROTECTION=TRUE'] = '${stringTableFrostProtectionTrue}'; +elvST['FROST_PROTECTION_TEMPERATURE'] = '${stringTableFrostProtectionTemperature}'; +elvST['FUSE_DELAY'] = '${stringTableDimmerFuseDelay}'; +elvST['GENERIC_INPUT_TRANSMITER'] = '${stringTableGenericTransmitterTitle}'; +elvST['GLOBAL_BUTTON_LOCK'] = '${stringTableGlobalButtonLock}'; +elvST['HEATER_STATE=FALSE'] = '${stringTableRainDetectorHeatingOff}'; +elvST['HEATER_STATE=TRUE'] = '${stringTableRainDetectorHeatingOn}'; +elvST['HEATING_CLIMATECONTROL_CL_RECEIVER'] = '${stringTableClimateControlCLReceiverTitle}'; +elvST['HEATING_CLIMATECONTROL_CL_TRANSMITTER'] = '${stringTableHeatingClimateControlCLTransmitterTitle}'; +elvST['HEATING_CLIMATECONTROL_RECEIVER'] = '${stringTableClimateControlReceiverTitle}'; +elvST['HEATING_CLIMATECONTROL_SWITCH_TRANSMITTER'] = '${stringTableHeatingClimateControlSwitchTransmitterTitle}'; +elvST['HEATING_CLIMATECONTROL_TRANSCEIVER'] = '${stringTableClimateControlTransceiverTitle}'; +elvST['HEATING_CLIMATECONTROL_TRANSCEIVER|ACTIVE_PROFILE'] = '${stringTableActiveProfile}'; +elvST['HEATING_CLIMATECONTROL_TRANSCEIVER|CONTROL_MODE'] = '${stringTableControlMode}'; +elvST['HEATING_CLIMATECONTROL_TRANSCEIVER|FROST_PROTECTION=FALSE'] = '${stringTableFrostProtectFalse}'; +elvST['HEATING_CLIMATECONTROL_TRANSCEIVER|FROST_PROTECTION=TRUE'] = '${stringTableFrostProtectTrue}'; +elvST['HEATING_CLIMATECONTROL_TRANSCEIVER|HUMIDITY'] = '${stringTableWeatherHumidity}'; +elvST['HEATING_CLIMATECONTROL_TRANSCEIVER|LEVEL'] = '${stringTableHeatingLevel}'; +elvST['HEATING_CLIMATECONTROL_TRANSCEIVER|PARTY_MODE=FALSE'] = '${stringTablePartyModeFalse}'; +elvST['HEATING_CLIMATECONTROL_TRANSCEIVER|PARTY_MODE=TRUE'] = '${stringTablePartyModeTrue}'; +elvST['HEATING_CLIMATECONTROL_TRANSCEIVER|SET_POINT_MODE'] = '${stringTableSetPointMode}'; +elvST['HEATING_CLIMATECONTROL_TRANSCEIVER|SET_POINT_TEMPERATURE'] = '${stringTableSetPointTemperature}'; +elvST['HEATING_CLIMATECONTROL_TRANSCEIVER|SWITCH_POINT_OCCURED=FALSE'] = '${stringTableSwitchPointOccuredFalse}'; +elvST['HEATING_CLIMATECONTROL_TRANSCEIVER|SWITCH_POINT_OCCURED=TRUE'] = '${stringTableSwitchPointOccurredTrue}'; +elvST['HEATING_CLIMATECONTROL_TRANSCEIVER|VALVE_ADAPTION=FALSE'] = '${stringTableValveAdaptionFalse}'; +elvST['HEATING_CLIMATECONTROL_TRANSCEIVER|VALVE_ADAPTION=TRUE'] = '${stringTableValveAdaptionTrue}'; +elvST['HEATING_CLIMATECONTROL_TRANSCEIVER|WINDOW_STATE=CLOSED'] = '${stringTableWindowStateClosed}'; +elvST['HEATING_CLIMATECONTROL_TRANSCEIVER|WINDOW_STATE=OPEN'] = '${stringTableWindowStateOpen}'; +elvST['HEATING_COOLING=COOLING'] = '${stringTableCooling}'; +elvST['HEATING_COOLING=HEATING'] = '${stringTableHeating}'; +elvST['HEATING_COOLING=1'] = '${stringTableCooling}'; +elvST['HEATING_COOLING=0'] = '${stringTableHeating}'; +elvST['HEATING_KEY_RECEIVER'] = '${stringTableHeatingKeyReceiverTitle}'; +elvST['HEATING_ROOM_TH_RECEIVER'] = '${stringTableHeatingRoomTHReceiverTitle}'; +elvST['HEATING_ROOM_TH_TRANSCEIVER'] = '${stringTableHeatingRoomTHTransceiverTitle}'; +elvST['HEATING_SHUTTER_CONTACT_RECEIVER'] = '${stringTableHeatingShutterContactReceiverTitle}'; +elvST['HIGHEST_ILLUMINATION'] = '${stringTableHighestIllumination}'; +elvST['HIGHEST_ILLUMINATION_STATUS=NORMAL'] = '${lblValue} ${stringTableHighestIllumination}: ${lblNormal}'; +elvST['HIGHEST_ILLUMINATION_STATUS=0'] = '${lblValue} ${stringTableHighestIllumination}: ${lblNormal}'; +elvST['HIGHEST_ILLUMINATION_STATUS=UNKNOWN'] = '${lblValue} ${stringTableHighestIllumination}: ${lblUnknown}'; +elvST['HIGHEST_ILLUMINATION_STATUS=1'] = '${lblValue} ${stringTableHighestIllumination}: ${lblUnknown}'; +elvST['HIGHEST_ILLUMINATION_STATUS=OVERFLOW'] = '${lblValue} ${stringTableHighestIllumination}: ${lblOverflow}'; +elvST['HIGHEST_ILLUMINATION_STATUS=2'] = '${lblValue} ${stringTableHighestIllumination}: ${lblOverflow}'; +elvST['HUMIDITY_ALARM=FALSE'] = '${stringTableHumidityAlarmFalse}'; +elvST['HUMIDITY_ALARM=TRUE'] = '${stringTableHumidityAlarmTrue}'; +elvST['HUMIDITY_LIMITER=FALSE'] = '${stringTableHumidityLimiterFalse}'; +elvST['HUMIDITY_LIMITER=TRUE'] = '${stringTableHumidityLimiterTrue}'; +elvST['HUMIDITY'] = '${stringTableWeatherHumidity}'; +elvST['HUMIDITY_STATUS=NORMAL'] = '${lblValue} ${stringTableWeatherHumidity}: ${lblNormal}'; +elvST['HUMIDITY_STATUS=0'] = '${lblValue} ${stringTableWeatherHumidity}: ${lblNormal}'; +elvST['HUMIDITY_STATUS=UNKNOWN'] = '${lblValue} ${stringTableWeatherHumidity}: ${lblUnknown}'; +elvST['HUMIDITY_STATUS=1'] = '${lblValue} ${stringTableWeatherHumidity}: ${lblUnknown}'; +elvST['HUMIDITY_STATUS=OVERFLOW'] = '${lblValue} ${stringTableWeatherHumidity}: ${lblOverflow}'; +elvST['HUMIDITY_STATUS=2'] = '${lblValue} ${stringTableWeatherHumidity}: ${lblOverflow}'; +elvST['HUMIDITY_STATUS=UNDERFLOW'] = '${lblValue} ${stringTableWeatherHumidity}: ${lblUnderflow}'; +elvST['HUMIDITY_STATUS=3'] = '${lblValue} ${stringTableWeatherHumidity}: ${lblUnderflow}'; +elvST['IDENTIFICATION_MODE_KEY_VISUAL=FALSE'] = '${stringTableIdentificationModeKeyVisualFalse}'; +elvST['IDENTIFICATION_MODE_KEY_VISUAL=TRUE'] = '${stringTableIdentificationModeKeyVisualTrue}'; +elvST['IDENTIFICATION_MODE_LCD_BACKLIGHT=FALSE'] = '${stringTableIdentificationModeLCDBacklightFalse}'; +elvST['IDENTIFICATION_MODE_LCD_BACKLIGHT=TRUE'] = '${stringTableIdentificationModeLCDBacklightTrue}'; +elvST['IDENTIFY_DURATION'] = '${stringTableIdentifyDuration}'; +elvST['IDENTIFY_TARGET_LEVEL'] = '${stringTableIdentifyTargetLevel}'; +elvST['ILLUMINATION'] = '${stringTableBrightness}'; +elvST['ILLUMINATION_STATUS=NORMAL'] = '${lblValue} ${stringTableBrightness}: ${lblNormal}'; +elvST['ILLUMINATION_STATUS=0'] = '${lblValue} ${stringTableBrightness}: ${lblNormal}'; +elvST['ILLUMINATION_STATUS=UNKNOWN'] = '${lblValue} ${stringTableBrightness}: ${lblUnknown}'; +elvST['ILLUMINATION_STATUS=1'] = '${lblValue} ${stringTableBrightness}: ${lblUnknown}'; +elvST['ILLUMINATION_STATUS=OVERFLOW'] = '${lblValue} ${stringTableBrightness}: ${lblOverflow}'; +elvST['ILLUMINATION_STATUS=2'] = '${lblValue} ${stringTableBrightness}: ${lblOverflow}'; +elvST['INHIBIT'] = '${stringTableInhibit}'; +elvST['INHIBIT=FALSE'] = '${stringTableInhibitFalse}'; +elvST['INHIBIT=TRUE'] = '${stringTableInhibitTrue}'; +elvST['INPUT_OUTPUT'] = '${stringTableInputOutput}'; +elvST['INPUT_OUTPUT|BEHAVIOUR'] = '${stringTableInputOutputBehaviour}'; +elvST['INPUT_OUTPUT|BEHAVIOUR=INPUT'] = '${stringTableInputOutputBehaviourInput}'; +elvST['INPUT_OUTPUT|BEHAVIOUR=OUTPUT'] = '${stringTableInputOutputBehaviourOutput}'; +elvST['INPUT_OUTPUT|INPUT_LOCKED'] = '${stringTableInputOutputInputLocked}'; +elvST['INPUT_OUTPUT|INPUT_TYPE'] = '${stringTableInputOutputInputType}'; +elvST['INPUT_OUTPUT|INPUT_TYPE=PUSHBUTTON'] = '${stringTableInputOutputTypePushButton}'; +elvST['INPUT_OUTPUT|INPUT_TYPE=SWITCH'] = '${stringTableInputOutputTypeSwitch}'; +elvST['INPUT_OUTPUT|LONGPRESS_TIME'] = '${stringTableInputOutputLongPressA}'; +elvST['INPUT_OUTPUT|LONG_PRESS_TIME'] = '${stringTableInputOutputLongPressB}'; +elvST['INPUT_OUTPUT|STATE=FALSE'] = '${stringTableInputOutputStateFalse}'; +elvST['INPUT_OUTPUT|STATE=TRUE'] = '${stringTableInputOutputStateTrue}'; +elvST['IP_ADDRESS'] = '${lblIPAddress}'; +elvST['JALOUSIE'] = '${stringTableJalousieTitle}'; +elvST['JALOUSIE|CHANGE_OVER_DELAY'] = '${stringTableBlindChangeOverDelay}'; +elvST['JALOUSIE|LEVEL'] = '${stringTableBlindLevel}'; +elvST['JALOUSIE|LEVEL=OLD_LEVEL'] = '${stringTableJalousieOldLevel}'; +elvST['JALOUSIE|LEVEL=NO_MODIFICATION'] = '${stringTableJalousieNoModification}'; +elvST['JALOUSIE|LEVEL_COMBINED'] = '${stringTableJalousieLevelCombined}'; +elvST['JALOUSIE|LEVEL_SLATS'] = '${stringTableJalousieSlatsLevel}'; +elvST['JALOUSIE|LEVEL_SLATS=OLD_LEVEL'] = '${stringTableJalousieSlatsOldLevel}'; +elvST['JALOUSIE|LEVEL_SLATS=NO_MODIFICATION'] = '${stringTableJalousieSlatsNoModification}'; +elvST['JALOUSIE|REFERENCE_RUNNING_TIME_SLATS'] = '${stringTableJalousieRunningTimeSlats}'; +elvST['JALOUSIE|REFERENCE_RUNNING_TIME_TOP_BOTTOM'] = '${stringTableBlindRunningTimeTopBottom}'; +elvST['JALOUSIE|REFERENCE_RUNNING_TIME_BOTTOM_TOP'] = '${stringTableBlindRunnintTimeBottomTop}'; +elvST['JALOUSIE|REFERENCE_RUN_COUNTER'] = '${stringTableBlindRefRunCounter}'; +elvST['JALOUSIE|STOP'] = '${stringTableBlindStop}'; +elvST['KEY'] = '${stringTableKeyTitle}'; +elvST['KEYMATIC'] = '${stringTableKeyMaticTitle}'; +elvST['KEYMATIC|ANGLE_LOCKED'] = '${stringTableKeyMaticAngleLocked}'; +elvST['KEYMATIC|ANGLE_MAX'] = '${stringTableKeyMaticAngleMax}'; +elvST['KEYMATIC|ANGLE_OPEN'] = '${stringTableKeyMaticAngleOpen}'; +elvST['KEYMATIC|ERROR=CLUTCH_FAILURE'] = '${stringTableKeyMaticErrorClutch}'; +elvST['KEYMATIC|ERROR=MOTOR_ABORTED'] = '${stringTableKeyMaticErrorMotorAborted}'; +elvST['KEYMATIC|HOLD_PWM'] = '${stringTableKeyMaticHoldPWM}'; +elvST['KEYMATIC|HOLD_TIME'] = '${stringTableKeyMaticHoldTime}'; +elvST['KEYMATIC|LED_FLASH_LOCKED'] = '${stringTableKeyMaticLEDFlashLocked}'; +elvST['KEYMATIC|LED_FLASH_UNLOCKED'] = '${stringTableKeyMaticLEDFlashUnlocked}'; +elvST['KEYMATIC|OPEN'] = '${stringTableKeyMaticOpen}'; +elvST['KEYMATIC|RELOCK_DELAY'] = '${stringTableKeyMaticRelockDelay}'; +elvST['KEYMATIC|RELOCK_DELAY=NOT_USED'] = '${stringTableKeyMaticRelockDelayNotUsed}'; +elvST['KEYMATIC|SETUP_DIR'] = '${stringTableKeyMaticSetupDir}'; +elvST['KEYMATIC|SETUP_DIR=LEFT'] = '${stringTableKeyMaticSetupDirLeft}'; +elvST['KEYMATIC|SETUP_DIR=RIGHT'] = '${stringTableKeyMaticSetupDirRight}'; +elvST['KEYMATIC|SETUP_POSITION'] = '${stringTableKeyMaticSetupPosition}'; +elvST['KEYMATIC|STATE=FALSE'] = '${stringTableKeyMaticStateFalse}'; +elvST['KEYMATIC|STATE=TRUE'] = '${stringTableKeyMaticStateTrue}'; +elvST['KEYMATIC|STATE_UNCERTAIN=FALSE'] = '${stringTableKeyMaticStateUncertainFalse}'; +elvST['KEYMATIC|STATE_UNCERTAIN=TRUE'] = '${stringTableKeyMaticStateUncertainTrue}'; +elvST['KEYPRESS_SIGNAL'] = '${stringTableKeyPressSignal}'; +elvST['KEY_TRANSCEIVER'] = '${stringTableKeyTranseiverTitle}'; +elvST['KEY_TRANSCEIVER|CHANNEL_OPERATION_MODE'] = '${stringTableKeyTransceiverChannelOperationMode}'; +elvST['KEY_TRANSCEIVER|CHANNEL_OPERATION_MODE=INACTIVE'] = '${stringTableKeyInactive}'; +elvST['KEY_TRANSCEIVER|CHANNEL_OPERATION_MODE=KEY_BEHAVIOR'] = '${stringTableKeyTransceiverChannelOperationModeKeyBehavior}'; +elvST['KEY_TRANSCEIVER|CHANNEL_OPERATION_MODE=SWITCH_BEHAVIOR'] = '${stringTableKeyTransceiverChannelOperationModeSwitchBehavior}'; +elvST['KEY_TRANSCEIVER|CHANNEL_OPERATION_MODE=BINARY_BEHAVIOR'] = '${stringTableKeyTransceiverChannelOperationModeBinaryBehavior}'; +elvST['KEY_TRANSCEIVER|DBL_PRESS_TIME'] = '${stringTableKeyDblPressTime}'; +elvST['KEY_TRANSCEIVER|LONG_PRESS_TIME'] = '${stringTableKeyLongPressTimeA}'; +elvST['KEY|CHANNEL_FUNCTION'] = '${stringTableKeyChannelFunction}'; +elvST['KEY|CHANNEL_FUNCTION=BINARY_BEHAVIOR'] = '${stringTableKeyBinaryBehavior}'; +elvST['KEY|CHANNEL_FUNCTION=BUTTON_BEHAVIOR'] = '${stringTableKeyButtonBehavior}'; +elvST['KEY|CHANNEL_FUNCTION=INACTIVE'] = '${stringTableKeyInactive}'; +elvST['KEY|CHANNEL_FUNCTION=SWITCH_BEHAVIOR'] = '${stringTableKeySwitchBehavior}'; +elvST['KEY|DBL_PRESS_TIME'] = '${stringTableKeyDblPressTime}'; +elvST['KEY|INPUT_LOCKED'] = '${stringTableKeyInputLocked}'; +elvST['KEY|INPUT_TYPE'] = '${stringTableKeyInputType}'; +elvST['KEY|INPUT_TYPE=PUSHBUTTON'] = '${stringTableKeyInputTypePushButton}'; +elvST['KEY|INPUT_TYPE=SWITCH'] = '${stringTableKeyInputTypeSwitch}'; +elvST['KEY|LCD_LEVEL_INTERP'] = '${stringTableKeyLCDLevelInterp}'; +elvST['KEY|LCD_SYMBOL'] = '${stringTableKeyLCDSymbol}'; +elvST['KEY|LONGPRESS_TIME'] = '${stringTableKeyLongPressTimeB}'; +elvST['KEY|LONG_PRESS_TIME'] = '${stringTableKeyLongPressTimeA}'; +elvST['KEY|MSG_FOR_POS_A'] = '${stringTableKeyMsgPosClosed}'; +elvST['KEY|MSG_FOR_POS_A=CLOSED'] = '${stringTableKeyMsgPosA0}'; +elvST['KEY|MSG_FOR_POS_A=NO_MSG'] = '${stringTableKeyMsgPosA1}'; +elvST['KEY|MSG_FOR_POS_A=OPEN'] = '${stringTableKeyMsgPosA2}'; +elvST['KEY|MSG_FOR_POS_B'] = '${stringTableKeyMsgPosOpen}'; +elvST['KEY|MSG_FOR_POS_B=CLOSED'] = '${stringTableKeyMsgPosA0}'; +elvST['KEY|MSG_FOR_POS_B=NO_MSG'] = '${stringTableKeyMsgPosA1}'; +elvST['KEY|MSG_FOR_POS_B=OPEN'] = '${stringTableKeyMsgPosA2}'; +elvST['KEY|TEXT1'] = '${stringTableKeyText1}'; +elvST['KEY|TEXT2'] = '${stringTableKeyText2}'; +elvST['KEY|TEXTLINE_1'] = '${stringTableKeyTextLine}'; +elvST['KEY|TEXTLINE_2'] = '${stringTableKeyTextLine}'; +elvST['LANGUAGE'] = '${stringTableLanguage}'; +elvST['LANGUAGE=ENGLISH'] = '${stringTableLanguageEnglish}'; +elvST['LANGUAGE=GERMAN'] = '${stringTableLanguageGerman}'; +elvST['LED_DISABLE_CHANNELSTATE'] = '${stringTableLEDDisableChannelState}'; +elvST['LED_DISABLE_LED_DISABLE_SENDSTATE'] = '${stringTableLEDDisableSendState}'; +elvST['LED_ONTIME'] = '${stringTableLEDOnTime}'; +elvST['LED_SLEEP_MODE=OFF'] = '${stringTableLEDSleepModeOff}'; +elvST['LED_SLEEP_MODE=ON'] = '${stringTableLEDSleepModeOn}'; +elvST['LED_STATUS=GREEN'] = '${stringTableLEDStatusGreen}'; +elvST['LED_STATUS=OFF'] = '${stringTableLEDStatusOff}'; +elvST['LED_STATUS=ORANGE'] = '${stringTableLEDStatusOrange}'; +elvST['LED_STATUS=RED'] = '${stringTableLEDStatusRed}'; +elvST['LEVEL'] = '${stringTableLevel}'; +elvST['LEVEL_REAL'] = '${stringTableLevelReal}'; +elvST['LEVEL_STATUS=ERROR'] = '${lblValue} ${stringTableLevelStatus}: ${lblError}'; +elvST['LEVEL_STATUS=4'] = '${lblValue} ${stringTableLevelStatus}: ${lblError}'; +elvST['LEVEL_STATUS=NORMAL'] = '${lblValue} ${stringTableLevelStatus}: ${lblNormal}'; +elvST['LEVEL_STATUS=0'] = '${lblValue} ${stringTableLevelStatus}: ${lblNormal}'; +elvST['LEVEL_STATUS=OVERFLOW'] = '${lblValue} ${stringTableLevelStatus}: ${lblOverflow}'; +elvST['LEVEL_STATUS=2'] = '${lblValue} ${stringTableLevelStatus}: ${lblOverflow}'; +elvST['LEVEL_STATUS=UNDERFLOW'] = '${lblValue} ${stringTableLevelStatus}: ${lblUnderflow}'; +elvST['LEVEL_STATUS=3'] = '${lblValue} ${stringTableLevelStatus}: ${lblUnderflow}'; +elvST['LEVEL_STATUS=UNKNOWN'] = '${lblValue} ${stringTableLevelStatus}: ${lblUnknown}'; +elvST['LEVEL_STATUS=1'] = '${lblValue} ${stringTableLevelStatus}: ${lblUnknown}'; +elvST['LIVE_MODE_RX'] = '${stringTableLiveModeRX}'; +elvST['LOCAL_RESET_DISABLE'] = '${stringTableLocalResetDisable}'; +elvST['LOCAL_RESET_DISABLED'] = '${stringTableLocalResetDisable}'; +elvST['LOGGING'] = '${stringTableLogging}'; +elvST['LOGGING=FALSE'] = '${stringTableLoggingFalse}'; +elvST['LOGGING=OFF'] = '${stringTableLoggingOff}'; +elvST['LOGGING=ON'] = '${stringTableLoggingOn}'; +elvST['LOGGING=TRUE'] = '${stringTableLoggingTrue}'; +elvST['LOGGING_TIME'] = '${stringTableLoggingTime}'; +elvST['LOGIC_AND'] = '${stringTableLogicAND}'; +elvST['LOGIC_ANDINVERS'] = '${stringTableLogicANDINVERS}'; +elvST['LOGIC_COMBINATION'] = '${stringTableLogicCombination}'; +elvST['LOGIC_INACTIVE'] = '${stringTableLogicInactive}'; +elvST['LOGIC_INVERSMINUS'] = '${stringTableLogicINVERSMINUS}'; +elvST['LOGIC_INVERSMUL'] = '${stringTableLogicINVERSMUL}'; +elvST['LOGIC_INVERSPLUS'] = '${stringTableLogicINVERSPLUS}'; +elvST['LOGIC_MINUS'] = '${stringTableLogicMINUS}'; +elvST['LOGIC_MINUSINVERS'] = '${stringTableLogicMINUSINVERS}'; +elvST['LOGIC_MUL'] = '${stringTableLogicMUL}'; +elvST['LOGIC_MULINVERS'] = '${stringTableLogicMULINVERS}'; +elvST['LOGIC_NAND'] = '${stringTableLogicNAND}'; +elvST['LOGIC_NOR'] = '${stringTableLogicNOR}'; +elvST['LOGIC_OR'] = '${stringTableLogicOR}'; +elvST['LOGIC_ORINVERS'] = '${stringTableLogicORINVERS}'; +elvST['LOGIC_PLUS'] = '${stringTableLogicPLUS}'; +elvST['LOGIC_PLUSINVERS'] = '${stringTableLogicPLUSINVERS}'; +elvST['LOGIC_XOR'] = '${stringTableLogicXOR}'; +elvST['LOWBAT=FALSE'] = '${stringTableBatteryOk}'; +elvST['LOWBAT=TRUE'] = '${stringTableBatteryEmpty}'; +elvST['LOWBAT_REPORTING'] = '${stringTableLowbatReporting}'; +elvST['LOWBAT_REPORTING=FALSE'] = '${stringTableLowbatReportingFalse}'; +elvST['LOWBAT_REPORTING=TRUE'] = '${stringTableLowbatReportingTrue}'; +elvST['LOWBAT_SIGNAL'] = '${stringTableLowbatSignal}'; +elvST['LOWERING_MODE'] = '${stringTableClimateControlRTTransceiverLoweringMode}'; +elvST['LOW_BAT=FALSE'] = '${stringTableBatteryOk}'; +elvST['LOW_BAT=TRUE'] = '${stringTableBatteryEmpty}'; +elvST['LOW_BAT_LIMIT'] = '${stringTableBatteryLowBatLimit}'; +elvST['LOWEST_ILLUMINATION'] = '${stringTableLowestIllumination}'; +elvST['LOWEST_ILLUMINATION_STATUS=NORMAL'] = '${lblValue} ${stringTableLowestIllumination}: ${lblNormal}'; +elvST['LOWEST_ILLUMINATION_STATUS=0'] = '${lblValue} ${stringTableLowestIllumination}: ${lblNormal}'; +elvST['LOWEST_ILLUMINATION_STATUS=UNKNOWN'] = '${lblValue} ${stringTableLowestIllumination}: ${lblUnknown}'; +elvST['LOWEST_ILLUMINATION_STATUS=1'] = '${lblValue} ${stringTableLowestIllumination}: ${lblUnknown}'; +elvST['LOWEST_ILLUMINATION_STATUS=OVERFLOW'] = '${lblValue} ${stringTableLowestIllumination}: ${lblOverflow}'; +elvST['LOWEST_ILLUMINATION_STATUS=2'] = '${lblValue} ${stringTableLowestIllumination}: ${lblOverflow}'; +elvST['LUX'] = '${stringTableLux}'; +elvST['MAINS_POWERED'] = '${stringTableMainsPowered}'; +elvST['MAINTENANCE|BLOCKED_PERMANENT'] = '${stringTableBlockedPermanently}'; +elvST['MAINTENANCE|BLOCKED_PERMANENT=FALSE'] = '${stringTableBlockedPermanentFalse}'; +elvST['MAINTENANCE|BLOCKED_PERMANENT=TRUE'] = '${stringTableBlockedPermanentTrue}'; +elvST['MAINTENANCE|BLOCKED_TEMPORARY'] = '${stringTableBlockedTemporarily}'; +elvST['MAINTENANCE|BLOCKED_TEMPORARY=FALSE'] = '${stringTableBlockedTemporaryFalse}'; +elvST['MAINTENANCE|BLOCKED_TEMPORARY=TRUE'] = '${stringTableBlockedTemporaryTrue}'; +elvST['MAINTENANCE|CLEAR_ERROR=ALL'] = '${stringTableClearErrorAll}'; +elvST['MAINTENANCE|CLEAR_ERROR=BLOCKED_PERMANENT'] = '${stringTableClearErrorBlockedPermanent}'; +elvST['MAINTENANCE|CLEAR_ERROR=BLOCKED_TEMPORARY'] = '${stringTableClearErrorBlockedTemporary}'; +elvST['MAINTENANCE|CLEAR_ERROR=SABOTAGE'] = '${stringTableClearErrorSabotage}'; +elvST['MAINTENANCE|CLEAR_ERROR=SABOTAGE_STICKY'] = '${stringTableClearErrorSabotageSticky}'; +elvST['MAINTENANCE|CODE_COMMAND=ERASE'] = '${stringTableCodeCommandErase}'; +elvST['MAINTENANCE|CODE_COMMAND=START_OF_LEARN'] = '${stringTableCodeCommandStartOfLearn}'; +elvST['MAINTENANCE|CODE_COMMAND=STOP_OF_LEARN'] = '${stringTableCodeCommandStopOfLearn}'; +elvST['MAINTENANCE|CODE_ID'] = '${stringTableAccessTransCodeID}'; +elvST['MAINTENANCE|CODE_STATE=CODE_ERASED'] = '${stringTableAccessTransCodeStateCodeErased}'; +elvST['MAINTENANCE|CODE_STATE=IDLE'] = '${stringTableAccessTransCodeStateIdle}'; +elvST['MAINTENANCE|CODE_STATE=KNOWN_CODE_ID_RECEIVED'] = '${stringTableAccessTransCodeStateKnownCodeIDReceived}'; +elvST['MAINTENANCE|CODE_STATE=LEARN_MODE_EXIT_FOR_CODE_WITH_ERROR_DUPLICATE_CODE'] = '${stringTableAccessTransCodeStateLearnModeLearnModeExitWithErrorDuplicateCode}'; +elvST['MAINTENANCE|CODE_STATE=LEARN_MODE_EXIT_FOR_CODE_WITH_SUCCESS'] = '${stringTableAccessTransCodeStateLearnModeLearnModeExitWithSuccess}'; +elvST['MAINTENANCE|CODE_STATE=LEARN_MODE_EXIT_FOR_CODE_WITH_TIMEOUT'] = '${stringTableAccessTransCodeStateLearnModeLearnModeExitWithTimeout}'; +elvST['MAINTENANCE|CODE_STATE=LEARN_MODE_FOR_CODE_ID_STARTED'] = '${stringTableAccessTransCodeStateLearnModeForCodeIDStarted}'; +elvST['MAINTENANCE|CODE_STATE=UNKNOWN_CODE_DETECTED'] = '${stringTableAccessTransCodeStateUnknownCodeDetected}'; +elvST['MAINTENANCE|CODE_USED_01=FALSE'] = '${stringTableAccessTransCodeSCodeUsed01False}'; +elvST['MAINTENANCE|CODE_USED_01=TRUE'] = '${stringTableAccessTransCodeSCodeUsed01True}'; +elvST['MAINTENANCE|CODE_USED_02=FALSE'] = '${stringTableAccessTransCodeSCodeUsed02False}'; +elvST['MAINTENANCE|CODE_USED_02=TRUE'] = '${stringTableAccessTransCodeSCodeUsed02True}'; +elvST['MAINTENANCE|CODE_USED_03=FALSE'] = '${stringTableAccessTransCodeSCodeUsed03False}'; +elvST['MAINTENANCE|CODE_USED_03=TRUE'] = '${stringTableAccessTransCodeSCodeUsed03True}'; +elvST['MAINTENANCE|CODE_USED_04=FALSE'] = '${stringTableAccessTransCodeSCodeUsed04False}'; +elvST['MAINTENANCE|CODE_USED_04=TRUE'] = '${stringTableAccessTransCodeSCodeUsed04True}'; +elvST['MAINTENANCE|CODE_USED_05=FALSE'] = '${stringTableAccessTransCodeSCodeUsed05False}'; +elvST['MAINTENANCE|CODE_USED_05=TRUE'] = '${stringTableAccessTransCodeSCodeUsed05True}'; +elvST['MAINTENANCE|CODE_USED_06=FALSE'] = '${stringTableAccessTransCodeSCodeUsed06False}'; +elvST['MAINTENANCE|CODE_USED_06=TRUE'] = '${stringTableAccessTransCodeSCodeUsed06True}'; +elvST['MAINTENANCE|CODE_USED_07=FALSE'] = '${stringTableAccessTransCodeSCodeUsed07False}'; +elvST['MAINTENANCE|CODE_USED_07=TRUE'] = '${stringTableAccessTransCodeSCodeUsed07True}'; +elvST['MAINTENANCE|CODE_USED_08=FALSE'] = '${stringTableAccessTransCodeSCodeUsed08False}'; +elvST['MAINTENANCE|CODE_USED_08=TRUE'] = '${stringTableAccessTransCodeSCodeUsed08True}'; +elvST['MAINTENANCE|CODE_USED_09=FALSE'] = '${stringTableAccessTransCodeSCodeUsed09False}'; +elvST['MAINTENANCE|CODE_USED_09=TRUE'] = '${stringTableAccessTransCodeSCodeUsed09True}'; +elvST['MAINTENANCE|CODE_USED_10=FALSE'] = '${stringTableAccessTransCodeSCodeUsed10False}'; +elvST['MAINTENANCE|CODE_USED_10=TRUE'] = '${stringTableAccessTransCodeSCodeUsed10True}'; +elvST['MAINTENANCE|CODE_USED_11=FALSE'] = '${stringTableAccessTransCodeSCodeUsed11False}'; +elvST['MAINTENANCE|CODE_USED_11=TRUE'] = '${stringTableAccessTransCodeSCodeUsed11True}'; +elvST['MAINTENANCE|CODE_USED_12=FALSE'] = '${stringTableAccessTransCodeSCodeUsed12False}'; +elvST['MAINTENANCE|CODE_USED_12=TRUE'] = '${stringTableAccessTransCodeSCodeUsed12True}'; +elvST['MAINTENANCE|CODE_USED_13=FALSE'] = '${stringTableAccessTransCodeSCodeUsed13False}'; +elvST['MAINTENANCE|CODE_USED_13=TRUE'] = '${stringTableAccessTransCodeSCodeUsed13True}'; +elvST['MAINTENANCE|CODE_USED_14=FALSE'] = '${stringTableAccessTransCodeSCodeUsed14False}'; +elvST['MAINTENANCE|CODE_USED_14=TRUE'] = '${stringTableAccessTransCodeSCodeUsed14True}'; +elvST['MAINTENANCE|CODE_USED_15=FALSE'] = '${stringTableAccessTransCodeSCodeUsed15False}'; +elvST['MAINTENANCE|CODE_USED_15=TRUE'] = '${stringTableAccessTransCodeSCodeUsed15True}'; +elvST['MAINTENANCE|CODE_USED_16=FALSE'] = '${stringTableAccessTransCodeSCodeUsed16False}'; +elvST['MAINTENANCE|CODE_USED_16=TRUE'] = '${stringTableAccessTransCodeSCodeUsed16True}'; +elvST['MAINTENANCE|CODE_USED_17=FALSE'] = '${stringTableAccessTransCodeSCodeUsed17False}'; +elvST['MAINTENANCE|CODE_USED_17=TRUE'] = '${stringTableAccessTransCodeSCodeUsed17True}'; +elvST['MAINTENANCE|CODE_USED_18=FALSE'] = '${stringTableAccessTransCodeSCodeUsed18False}'; +elvST['MAINTENANCE|CODE_USED_18=TRUE'] = '${stringTableAccessTransCodeSCodeUsed18True}'; +elvST['MAINTENANCE|CODE_USED_19=FALSE'] = '${stringTableAccessTransCodeSCodeUsed19False}'; +elvST['MAINTENANCE|CODE_USED_19=TRUE'] = '${stringTableAccessTransCodeSCodeUsed19True}'; +elvST['MAINTENANCE|CODE_USED_20=FALSE'] = '${stringTableAccessTransCodeSCodeUsed20False}'; +elvST['MAINTENANCE|CODE_USED_20=TRUE'] = '${stringTableAccessTransCodeSCodeUsed20True}'; +elvST['MAINTENANCE|CONFIG_PENDING'] = '${stringTableConfigPending}'; +elvST['MAINTENANCE|ERROR_BATTERY=BATTERY_DEFECT'] = '${stringTableBatteryFailure}'; +elvST['MAINTENANCE|ERROR_BATTERY=NO_ERROR'] = '${stringTableBatteryOk}'; +elvST['MAINTENANCE|ERROR_JAMMED'] = '${stringTableErrorJammed}'; +elvST['MAINTENANCE|ERROR_JAMMED=FALSE'] = '${stringTableErrorJammedFalse}'; +elvST['MAINTENANCE|ERROR_JAMMED=TRUE'] = '${stringTableErrorJammedTrue}'; +elvST['MAINTENANCE|ERROR_OVERHEAT'] = '${stringTableErrorOverheatTrue}'; +elvST['MAINTENANCE|HMW_STICKY_UNREACH'] = '${stringTableStickyUnreach}'; +elvST['MAINTENANCE|LOWBAT'] = '${stringTableBatteryLow}'; +elvST['MAINTENANCE|LOW_BAT'] = '${stringTableBatteryLow}'; +elvST['MAINTENANCE|ON_MIN_LEVEL'] = '${stringTableOnMinLevel}'; +elvST['MAINTENANCE|PWM_AT_LOW_VALVE_POSITION'] = '${stringTablePWMatLowValvePosition}'; +elvST['MAINTENANCE|SABOTAGE'] = '${stringTableSabotage}'; +elvST['MAINTENANCE|SABOTAGE'] = '${stringTableSabotage}'; +elvST['MAINTENANCE|SABOTAGE_STICKY'] = '${stringTableSabotageSticky}'; +elvST['MAINTENANCE|SABOTAGE_STICKY=FALSE'] = '${stringTableSabotageStickyFalse}'; +elvST['MAINTENANCE|SABOTAGE_STICKY=TRUE'] = '${stringTableSabotageStickyTrue}'; +elvST['MAINTENANCE|SENSOR_ERROR'] = '${stringTableSensorError}'; +elvST['MAINTENANCE|STICKY_BATTERY=BATTERY_DEFECT'] = '${stringTableBatteryFailure}'; +elvST['MAINTENANCE|STICKY_BATTERY=BATTERY_WAS_DEFECT'] = '${stringTableBatteryWasDefect}'; +elvST['MAINTENANCE|STICKY_POWER=POWER_FAILURE'] = '${stringTablePowerNotAvailable}'; +elvST['MAINTENANCE|STICKY_POWER=WAS_POWER_FAILURE'] = '${stringTablePowerWasNotAvailable}'; +elvST['MAINTENANCE|STICKY_SABOTAGE=SABOTAGE'] = '${stringTableSabotage}'; +elvST['MAINTENANCE|STICKY_SABOTAGE=WAS_SABOTAGED'] = '${stringTableSabotageContactWasActive}'; +elvST['MAINTENANCE|STICKY_UNREACH'] = '${stringTableStickyUnreach}'; +elvST['MAINTENANCE|UNREACH'] = '${stringTableUnreach}'; +elvST['MAINTENANCE|USER_AUTHORIZATION_01'] = '${stringTableUserAuthorization01}'; +elvST['MAINTENANCE|USER_AUTHORIZATION_01=FALSE'] = '${stringTableUserAuthorization01false}'; +elvST['MAINTENANCE|USER_AUTHORIZATION_01=TRUE'] = '${stringTableUserAuthorization01true}'; +elvST['MAINTENANCE|USER_AUTHORIZATION_02'] = '${stringTableUserAuthorization02}'; +elvST['MAINTENANCE|USER_AUTHORIZATION_02=FALSE'] = '${stringTableUserAuthorization02false}'; +elvST['MAINTENANCE|USER_AUTHORIZATION_02=TRUE'] = '${stringTableUserAuthorization02true}'; +elvST['MAINTENANCE|USER_AUTHORIZATION_03'] = '${stringTableUserAuthorization03}'; +elvST['MAINTENANCE|USER_AUTHORIZATION_03=FALSE'] = '${stringTableUserAuthorization03false}'; +elvST['MAINTENANCE|USER_AUTHORIZATION_03=TRUE'] = '${stringTableUserAuthorization03true}'; +elvST['MAINTENANCE|USER_AUTHORIZATION_04'] = '${stringTableUserAuthorization04}'; +elvST['MAINTENANCE|USER_AUTHORIZATION_04=FALSE'] = '${stringTableUserAuthorization04false}'; +elvST['MAINTENANCE|USER_AUTHORIZATION_04=TRUE'] = '${stringTableUserAuthorization04true}'; +elvST['MAINTENANCE|USER_AUTHORIZATION_05'] = '${stringTableUserAuthorization05}'; +elvST['MAINTENANCE|USER_AUTHORIZATION_05=FALSE'] = '${stringTableUserAuthorization05false}'; +elvST['MAINTENANCE|USER_AUTHORIZATION_05=TRUE'] = '${stringTableUserAuthorization05true}'; +elvST['MAINTENANCE|USER_AUTHORIZATION_06'] = '${stringTableUserAuthorization06}'; +elvST['MAINTENANCE|USER_AUTHORIZATION_06=FALSE'] = '${stringTableUserAuthorization06false}'; +elvST['MAINTENANCE|USER_AUTHORIZATION_06=TRUE'] = '${stringTableUserAuthorization06true}'; +elvST['MAINTENANCE|USER_AUTHORIZATION_07'] = '${stringTableUserAuthorization07}'; +elvST['MAINTENANCE|USER_AUTHORIZATION_07=FALSE'] = '${stringTableUserAuthorization07false}'; +elvST['MAINTENANCE|USER_AUTHORIZATION_07=TRUE'] = '${stringTableUserAuthorization07true}'; +elvST['MAINTENANCE|USER_AUTHORIZATION_08'] = '${stringTableUserAuthorization08}'; +elvST['MAINTENANCE|USER_AUTHORIZATION_08=FALSE'] = '${stringTableUserAuthorization08false}'; +elvST['MAINTENANCE|USER_AUTHORIZATION_08=TRUE'] = '${stringTableUserAuthorization08true}'; +elvST['MANU_MODE'] = '${stringTableClimateControlRTTransceiverManuMode}'; +elvST['MEASURED_VALUE'] = '${lblReading}'; +elvST['MEASURED_VALUE_STATUS=ERROR'] = '${lblReading}: ${lblError}'; +elvST['MEASURED_VALUE_STATUS=NORMAL'] = '${lblReading}: ${lblNormal}'; +elvST['MEASURED_VALUE_STATUS=OVERFLOW'] = '${lblReading}: ${lblOverflow}'; +elvST['MEASURED_VALUE_STATUS=UNDERFLOW'] = '${lblReading}: ${lblUnderflow}'; +elvST['MEASURED_VALUE_STATUS=UNKNOWN'] = '${lblReading}: ${lblUnknown}'; +elvST['MIN_MAX_VALUE_NOT_RELEVANT_FOR_MANU_MODE'] = '${stringTableMinMaxNotRelevantForManuMode}'; +elvST['MIOB_DIN_CONFIG'] = '${stringTableMiobDinConfig}'; +elvST['MOD_EM8BIT_TRANSMITTER'] = '${stringTable8BitTransmitterTitle}'; +elvST['MOD_EM8BIT_TRANSMITTER|DATA_INPUT_PROPERTIE_IN0'] = '${stringTableTransmitterDataInputPropertie0}'; +elvST['MOD_EM8BIT_TRANSMITTER|DATA_INPUT_PROPERTIE_IN1'] = '${stringTableTransmitterDataInputPropertie1}'; +elvST['MOD_EM8BIT_TRANSMITTER|DATA_INPUT_PROPERTIE_IN2'] = '${stringTableTransmitterDataInputPropertie2}'; +elvST['MOD_EM8BIT_TRANSMITTER|DATA_INPUT_PROPERTIE_IN3'] = '${stringTableTransmitterDataInputPropertie3}'; +elvST['MOD_EM8BIT_TRANSMITTER|DATA_INPUT_PROPERTIE_IN4'] = '${stringTableTransmitterDataInputPropertie4}'; +elvST['MOD_EM8BIT_TRANSMITTER|DATA_INPUT_PROPERTIE_IN5'] = '${stringTableTransmitterDataInputPropertie5}'; +elvST['MOD_EM8BIT_TRANSMITTER|DATA_INPUT_PROPERTIE_IN6'] = '${stringTableTransmitterDataInputPropertie6}'; +elvST['MOD_EM8BIT_TRANSMITTER|DATA_INPUT_PROPERTIE_IN7'] = '${stringTableTransmitterDataInputPropertie7}'; +elvST['MOD_EM8BIT_TRANSMITTER|DATA_STABILITY_FILTER_TIME'] = '${stringTableTransmitterDataStabilityFilterTime}'; +elvST['MOD_EM8BIT_TRANSMITTER|DATA_TRANSMISSION_CONDITION'] = '${stringTableTransmitterDataTransmissionCondition}'; +elvST['MOD_EM8BIT_TRANSMITTER|DATA_TRANSMISSION_CONDITION=LEVEL_CHANGE_DATA[HIGH_to_LOW]'] = '${stringTableTransmitterDataTransmissionCondition0}'; +elvST['MOD_EM8BIT_TRANSMITTER|DATA_TRANSMISSION_CONDITION=LEVEL_CHANGE_DATA[LOW_to_HIGH]'] = '${stringTableTransmitterDataTransmissionCondition1}'; +elvST['MOD_EM8BIT_TRANSMITTER|DATA_TRANSMISSION_CONDITION=LEVEL_CHANGE_DATA[LOW_to_HIGH_and_HIGH_to_LOW]'] = '${stringTableTransmitterDataTransmissionCondition2}'; +elvST['MOD_EM8BIT_TRANSMITTER|DATA_TRANSMISSION_CONDITION=NEW_DATA_STABLE_FOR_TIME_DEFAULT_ENABLE'] = '${stringTableTransmitterDataTransmissionCondition3}'; +elvST['MOD_EM8BIT_TRANSMITTER|DATA_TRANSMISSION_CONDITION=NEW_DATA_SEND_IMMEDIATELY_DEFAULT_ENABLE'] = '${stringTableTransmitterDataTransmissionCondition4}'; +elvST['MOD_EM8BIT_TRANSMITTER|DATA_TRANSMISSION_CONDITION=NEW_DATA_STABLE_FOR_TIME_DEFAULT_DISABLE'] = '${stringTableTransmitterDataTransmissionCondition5}'; +elvST['MOD_EM8BIT_TRANSMITTER|DATA_TRANSMISSION_CONDITION=NEW_DATA_SEND_IMMEDIATELY_DEFAULT_DISABLE'] = '${stringTableTransmitterDataTransmissionCondition6}'; +elvST['MOD_EM8BIT_TRANSMITTER|STATE'] = '${stringTableTransmitterState}'; +elvST['MODUS_BUTTON_LOCK'] = '${stringTableModusButtonLock}'; +elvST['MOISTURE_DETECTED=TRUE'] = '${stringTableMoistureDetectedTrue}'; +elvST['MOISTURE_DETECTED=FALSE'] = '${stringTableMoistureDetectedFalse}'; +elvST['MOTION=FALSE'] = '${stringTableMotionDetectorMotionFalse}'; +elvST['MOTION=TRUE'] = '${stringTableMotionDetectorMotionTrue}'; +elvST['MOTIONDETECTOR_TRANSCEIVER'] = '${stringTableMotionDetectorTitle}'; +elvST['MOTION_ACTIVE_TIME'] = '${stringTableMotionDetectorMotionActiveTime}'; +elvST['MOTION_DETECTION_ACTIVE=FALSE'] = '${stringTableMotionDetectorMotionDetectionActiveFalse}'; +elvST['MOTION_DETECTION_ACTIVE=TRUE'] = '${stringTableMotionDetectorMotionDetectionActiveTrue}'; +elvST['MOTION_DETECTOR'] = '${stringTableMotionDetectorTitle}'; +elvST['MOTION_DETECTOR'] = '${stringTableMotionDetectorTitle}'; +elvST['MOTION_DETECTOR|ERROR=0'] = '${stringTableSabotageContactOk}'; +elvST['MOTION_DETECTOR|ERROR=7'] = '${stringTableMotionDetectorErrorSabotage}'; +elvST['MOTION_DETECTOR|ERROR=SABOTAGE'] = '${stringTableMotionDetectorErrorSabotage}'; +elvST['MOTION_DETECTOR|MIN_INTERVAL'] = '${stringTableMotionDetectorMinInterval}'; +elvST['MULTI_MODE_INPUT_TRANSMITTER'] = '${stringTableMultiModeInputTransmitterTitle}'; +elvST['MULTICAST_ROUTER_MODULE_ENABLED'] = '${stringTableMulticastRouterModuleEnabled}'; +elvST['NOT_USED'] = '${stringTableNotUsed}'; +elvST['OLD_LEVEL'] = '${stringTableDimmerOldLevel}'; +elvST['ON_TIME'] = '${stringTableDimmerOnTime}'; +elvST['OPERATING_VOLTAGE'] = '${stringTableOperationVoltage}'; +elvST['OPERATING_VOLTAGE_STATUS'] = '${stringTableOperationVoltageState}'; +elvST['OPERATING_VOLTAGE_STATUS=EXTERNAL'] = '${lblValue} ${stringTableOperationVoltageState}: ${lblExternal}'; +elvST['OPERATING_VOLTAGE_STATUS=3'] = '${stringTableOperationVoltageState}: ${lblExternal}'; +elvST['OPERATING_VOLTAGE_STATUS=NORMAL'] = '${stringTableOperationVoltageState}: ${lblNormal}'; +elvST['OPERATING_VOLTAGE_STATUS=0'] = '${stringTableOperationVoltageState}: ${lblNormal}'; +elvST['OPERATING_VOLTAGE_STATUS=UNKNOWN'] = '${stringTableOperationVoltageState}: ${lblUnknown}'; +elvST['OPERATING_VOLTAGE_STATUS=1'] = '${stringTableOperationVoltageState}: ${lblUnknown}'; +elvST['OPERATING_VOLTAGE_STATUS=OVERFLOW'] = '${stringTableOperationVoltageState}: ${lblOverflow}'; +elvST['OPERATING_VOLTAGE_STATUS=2'] = '${stringTableOperationVoltageState}: ${lblOverflow}'; +elvST['OPTICAL_ALARM_SELECTION=BLINKING_ALTERNATELY_REPEATING'] = '${stringTableAlarmBlinkingAlternatelyRepeating}'; +elvST['OPTICAL_ALARM_SELECTION=BLINKING_BOTH_REPEATING'] = '${stringTableAlarmBlinkingBothRepeating}'; +elvST['OPTICAL_ALARM_SELECTION=CONFIRMATION_SIGNAL_0'] = '${stringTableAlarmConfirmingSignal0}'; +elvST['OPTICAL_ALARM_SELECTION=CONFIRMATION_SIGNAL_1'] = '${stringTableAlarmConfirmingSignal1}'; +elvST['OPTICAL_ALARM_SELECTION=CONFIRMATION_SIGNAL_2'] = '${stringTableAlarmConfirmingSignal2}'; +elvST['OPTICAL_ALARM_SELECTION=DISABLE_OPTICAL_SIGNAL'] = '${stringTableAlarmDisableOpticalSignal}'; +elvST['OPTICAL_ALARM_SELECTION=DOUBLE_FLASHING_REPEATING'] = '${stringTableAlarmDoubleFlashingRepeating}'; +elvST['OPTICAL_ALARM_SELECTION=FLASHING_BOTH_REPEATING'] = '${stringTableAlarmFlashingBothRepeating}'; +elvST['OPTICAL_SIGNAL_RECEIVER'] = '${stringTableOpticalSignalReceiver}'; +elvST['OVERTEMP_LEVEL'] = '${stringTableDimmerOverTempLevel}'; +elvST['PARAM_SELECT'] = '${stringTableParamSelect}'; +elvST['PARAM_SELECT=INACTIVE'] = '${stringTableParamSelectInactive}'; +elvST['PARAM_SELECT=T1'] = '${stringTableParamSelectT1}'; +elvST['PARAM_SELECT=T1-T2'] = '${stringTableParamSelectT1MinusT2}'; +elvST['PARAM_SELECT=T2'] = '${stringTableParamSelectT2}'; +elvST['PARAM_SELECT=T2-T1'] = '${stringTableParamSelectT2MinusT1}'; +elvST['PARTY_MODE_SUBMIT'] = '${stringTablePartyModeSubmit}'; +elvST['PARTY_SET_POINT_TEMPERATURE'] = '${stringTableClimateControlRegPartyValue}'; +elvST['PARTY_START_DAY'] = '${stringTablePartyStartDay}'; +elvST['PARTY_START_MONTH'] = '${stringTablePartyStartMonth}'; +elvST['PARTY_START_TIME'] = '${stringTablePartyStartTime}'; +elvST['PARTY_START_YEAR'] = '${stringTablePartyStartYear}'; +elvST['PARTY_STOP_DAY'] = '${stringTablePartyStopDay}'; +elvST['PARTY_STOP_MONTH'] = '${stringTablePartyStopMonth}'; +elvST['PARTY_STOP_TIME'] = '${stringTablePartyStopTime}'; +elvST['PARTY_STOP_YEAR'] = '${stringTablePartyStopYear}'; +elvST['PARTY_TEMPERATURE'] = '${stringTablePartyTemperature}'; +elvST['PARTY_TIME_END'] = '${stringTableClimateControlRegPartyEndTime}'; +elvST['PARTY_TIME_START'] = '${stringTableClimateControlRegPartyStartTime}'; +elvST['PASSAGE_COUNTER_VALUE'] = '${stringTablePassageCounterValue}'; +elvST['PASSAGE_COUNTER_OVERFLOW=FALSE'] = '${stringTablePassageCounterOverflowFalse}'; +elvST['PASSAGE_COUNTER_OVERFLOW=TRUE'] = '${stringTablePassageCounterOverflowTrue}'; +elvST['LAST_PASSAGE_DIRECTION=TRUE'] = '${stringTableLastPassageDirectionTrue}'; +elvST['LAST_PASSAGE_DIRECTION=FALSE'] = '${stringTableLastPassageDirectionFalse}'; +elvST['CURRENT_PASSAGE_DIRECTION=FALSE'] = '${stringTableCurrentPassageDirectionFalse}'; +elvST['CURRENT_PASSAGE_DIRECTION=TRUE'] = '${stringTableCurrentPassageDirectionTrue}'; +elvST['PASSAGE_DETECTOR_COUNTER_TRANSMITTER'] = '${stringTablePassageDetectorCounterTransmitterTitle}'; +elvST['PASSAGE_DETECTOR_COUNTER_TRANSMITTER|CHANNEL_OPERATION_MODE'] = '${stringTablePassageDetectorCounterTransmitterChannelOperationMode}'; +elvST['PASSAGE_DETECTOR_COUNTER_TRANSMITTER|COND_TX_DECISION_ABOVE'] = '${stringTablePassageDetectorCounterTransmitterCondTxCondTXDecisionAbove}'; +elvST['PASSAGE_DETECTOR_COUNTER_TRANSMITTER|COND_TX_DECISION_BELOW'] = '${stringTablePassageDetectorCounterTransmitterCondTxCondTXDecisionBelow}'; +elvST['PASSAGE_DETECTOR_COUNTER_TRANSMITTER|COND_TX_THRESHOLD_HI'] = '${stringTablePassageDetectorCounterTransmitterCondTxThresholdHi}'; +elvST['PASSAGE_DETECTOR_COUNTER_TRANSMITTER|COND_TX_THRESHOLD_LO'] = '${stringTablePassageDetectorCounterTransmitterCondTxThresholdLo}'; +elvST['PASSAGE_DETECTOR_DIRECTION_TRANSMITTER'] = '${stringTablePassageDetectorDirectionTitle}'; +elvST['PERMISSION_STATE=FALSE'] = '${stringTablePermissionStateFalse}'; +elvST['PERMISSION_STATE=TRUE'] = '${stringTablePermissionStateTrue}'; +elvST['PEER_NEEDS_BURST'] = '${stringTablePeerNeedsBurst}'; +elvST['PIR_OPERATION_MODE'] = '${stringTablePirOperationMode}'; +elvST['PIR_SENSITIVITY'] = '${stringTableSensorSensivity}'; +elvST['PIR_OPERATION_MODE_ECO'] = '${pirOperationModeEco}'; +elvST['PIR_OPERATION_MODE_NORMAL'] = '${pirOperationModeNormal}'; +elvST['PIR_OPERATION_MODE_OFF'] = '${lblOff}'; +elvST['POSITION_SAVE_TIME'] = '${stringTablePositionSaveTime}'; +elvST['POWER_MAINS_FAILURE=FALSE'] = '${stringTablePowerMainsFailureFalse}'; +elvST['POWER_MAINS_FAILURE=TRUE'] = '${stringTablePowerMainsFailureTrue}'; +elvST['POWERMETER_IEC1|ENERGY_COUNTER'] = '${stringTablePowerMeterEnergyCounter}'; +elvST['POWERMETER_IEC1|GAS_ENERGY_COUNTER'] = '${stringTablePowerMeterEnergyCounterGas}'; +elvST['POWERMETER_IEC1|GAS_POWER'] = '${stringTableGasConsumption}'; +elvST['POWERMETER_IEC1|IEC_ENERGY_COUNTER'] = '${stringTablePowerMeterIECEnergyCounter}'; +elvST['POWERMETER_IEC1|IEC_POWER'] = '${stringTableIECPowerMeterPower}'; +elvST['POWERMETER_IEC1|POWER'] = '${stringTablePowerMeterPower}'; +elvST['POWERMETER_IEC2|IEC_ENERGY_COUNTER'] = '${stringTablePowerMeterIECEnergyCounter}'; +elvST['POWERMETER_IEC2|IEC_POWER'] = '${stringTableIECPowerMeterPower}'; +elvST['POWERMETER_IGL|ENERGY_COUNTER'] = '${stringTablePowerMeterEnergyCounter}'; +elvST['POWERMETER_IGL|GAS_ENERGY_COUNTER'] = '${stringTablePowerMeterEnergyCounterGas}'; +elvST['POWERMETER_IGL|GAS_POWER'] = '${stringTableGasConsumption}'; +elvST['POWERMETER_IGL|POWER'] = '${stringTablePowerMeterPower}'; +elvST['POWERMETER|AVERAGING'] = '${stringTablePowerMeterAveraging}'; +elvST['POWERMETER|CURRENT'] = '${stringTableCurrent}'; +elvST['POWERMETER|ENERGY_COUNTER'] = '${stringTablePowerMeterEnergyCounter}'; +elvST['POWERMETER|FREQUENCY'] = '${stringTablePowerMeterFrequency}'; +elvST['POWERMETER|POWER'] = '${stringTablePowerMeterPower}'; +elvST['POWERMETER|TX_MINDELAY'] = '${stringTablePowerMeterTxMinDelay}'; +elvST['POWERMETER|TX_THRESHOLD_CURRENT'] = '${stringTablePowerMeterTxThresholdCurrent}'; +elvST['POWERMETER|TX_THRESHOLD_FREQUENCY'] = '${stringTablePowerMeterTxThresholdFrequency}'; +elvST['POWERMETER|TX_THRESHOLD_POWER'] = '${stringTablePowerMeterTxThresholdPower}'; +elvST['POWERMETER|TX_THRESHOLD_VOLTAGE'] = '${stringTablePowerMeterTxThresholdVoltage}'; +elvST['POWERMETER|VOLTAGE'] = '${stringTableVoltage}'; +elvST['POWERUP_ACTION'] = '${stringTableDimmerPowerUpAction}'; +elvST['POWERUP_JUMPTARGET'] = '${stringTableDimmerPowerUpAction}'; +elvST['POWERUP_OFF'] = '${stringTablePowerUpOFF}'; +elvST['POWERUP_OFFDELAY_VALUE'] = '${stringTableOffDelayValue}'; +elvST['POWERUP_ON'] = '${stringTablePowerUpON}'; +elvST['POWERUP_ONDELAY_UNIT'] = '${stringTableOnDelayUnit}'; +elvST['POWERUP_ONDELAY_UNIT=10M'] = '${optionUnit10M}'; +elvST['POWERUP_ONDELAY_UNIT=10S'] = '${optionUnit10S}'; +elvST['POWERUP_ONDELAY_UNIT=1M'] = '${optionUnit1M}'; +elvST['POWERUP_ONDELAY_UNIT=1S'] = '${optionUnit1S}'; +elvST['POWERUP_ONDELAY_UNIT=5M'] = '${optionUnit5M}'; +elvST['POWERUP_ONDELAY_UNIT=5S'] = '${optionUnit5S}'; +elvST['POWERUP_ONDELAY_VALUE'] = '${stringTableOnDelayValue}'; +elvST['POWERUP_OFFTIME_UNIT'] = '${stringTableOffTimeUnit}'; +elvST['POWERUP_ONTIME_UNIT'] = '${stringTableOnTimeUnit}'; +elvST['POWERUP_ONTIME_UNIT=10M'] = '${optionUnit10M}'; +elvST['POWERUP_ONTIME_UNIT=10S'] = '${optionUnit10S}'; +elvST['POWERUP_ONTIME_UNIT=1M'] = '${optionUnit1M}'; +elvST['POWERUP_ONTIME_UNIT=1S'] = '${optionUnit1S}'; +elvST['POWERUP_ONTIME_UNIT=5M'] = '${optionUnit5M}'; +elvST['POWERUP_ONTIME_UNIT=5S'] = '${optionUnit5S}'; +elvST['POWERUP_ONTIME_UNIT=H'] = '${optionUnitH}'; +elvST['POWERUP_ONTIME_VALUE'] = '${stringTableOnTimeValue}'; +elvST['POWER_SUPPLY'] = '${stringTablePowerSupply}'; +elvST['POWER|BAT_LEVEL'] = '${stringTableBatteryCapacity}'; +elvST['POWER|LOWBAT=FALSE'] = '${stringTableBatteryOk}'; +elvST['POWER|LOWBAT=TRUE'] = '${stringTableBatteryEmpty}'; +elvST['POWER|USBH_POWERFAIL=FALSE'] = '${stringTableUSBHostActive}'; +elvST['POWER|USBH_POWERFAIL=TRUE'] = '${stringTableUSBHostNotActive}'; +elvST['POWER|U_SOURCE_FAIL=FALSE'] = '${stringTablePowerSupplyOk}'; +elvST['POWER|U_SOURCE_FAIL=TRUE'] = '${stringTablePowerSupplyNotOk}'; +elvST['POWER|U_USBD_OK=FALSE'] = '${stringTableUSBNotActive}'; +elvST['POWER|U_USBD_OK=TRUE'] = '${stringTableUSBActive}'; +elvST['PRESENCEDETECTOR_TRANSCEIVER'] = '${stringTablePresenceDetectorTitle}'; +elvST['PRESENCEDETECTOR_TRANSCEIVER|MIN_INTERVAL'] = '${stringTableMotionDetectorMinInterval}'; +elvST['PRESENCE_DETECTION_ACTIVE=FALSE'] = '${stringTablePresenceDetectionActiveFalse}'; +elvST['PRESENCE_DETECTION_ACTIVE=TRUE'] = '${stringTablePresenceDetectionActiveTrue}'; +elvST['PRESENCE_DETECTION_STATE=FALSE'] = '${stringTablePresenceDetectionStateFalse}'; +elvST['PRESENCE_DETECTION_STATE=TRUE'] = '${stringTablePresenceDetectionStateTrue}'; +elvST['PRESS_LONG'] = '${stringTableKeyPressLong}'; +elvST['PRESS_LONG=TRUE'] = '${stringTableKeyPressLongTrue}'; +elvST['PRESS_LONG_RELEASE'] = '${stringTableKeyPressLongRelease}'; +elvST['PRESS_LONG_RELEASE=TRUE'] = '${stringTableKeyPressLongRelease}'; +elvST['PRESS_LONG_START'] = '${stringTableKeyPressLongStart}'; +elvST['PRESS_LONG_START=TRUE'] = '${stringTableKeyPressLongStart}'; +elvST['PRESS_SHORT'] = '${stringTableKeyPressShort}'; +elvST['PRESS_SHORT=TRUE'] = '${stringTableKeyPressShortTrue}'; +elvST['PROCESS=NOT_STABLE'] = '${stringTableProcessNotStableGeneric}'; +elvST['PROCESS=STABLE'] = '${stringTableProcessStableGeneric}'; +elvST['PROCESS=STABLE'] = '${stringTableProcessStableGeneric}'; +elvST['PULSE_SENSOR'] = '${stringTablePulseSensorTitle}'; +elvST['PULSE_SENSOR|SEQUENCE_OK'] = '${stringTablePulseSensorSequenceOk}'; +elvST['PULSE_SENSOR|SEQUENCE_PULSE_1'] = '${stringTablePulseSensorSequencePulse1}'; +elvST['PULSE_SENSOR|SEQUENCE_PULSE_1=NOT_USED'] = '${stringTablePulseSensorSequencePulse1Unused}'; +elvST['PULSE_SENSOR|SEQUENCE_PULSE_2'] = '${stringTablePulseSensorSequencePulse2}'; +elvST['PULSE_SENSOR|SEQUENCE_PULSE_2=NOT_USED'] = '${stringTablePulseSensorSequencePulse2Unused}'; +elvST['PULSE_SENSOR|SEQUENCE_PULSE_3'] = '${stringTablePulseSensorSequencePulse3}'; +elvST['PULSE_SENSOR|SEQUENCE_PULSE_3=NOT_USED'] = '${stringTablePulseSensorSequencePulse3Unused}'; +elvST['PULSE_SENSOR|SEQUENCE_PULSE_4'] = '${stringTablePulseSensorSequencePulse4}'; +elvST['PULSE_SENSOR|SEQUENCE_PULSE_4=NOT_USED'] = '${stringTablePulseSensorSequencePulse4Unused}'; +elvST['PULSE_SENSOR|SEQUENCE_PULSE_5'] = '${stringTablePulseSensorSequencePulse5}'; +elvST['PULSE_SENSOR|SEQUENCE_PULSE_5=NOT_USED'] = '${stringTablePulseSensorSequencePulse5Unused}'; +elvST['PULSE_SENSOR|SEQUENCE_TOLERANCE'] = '${stringTablePulseSensorSequenceTolerance}'; +elvST['RADIATOR_THERMOSTAT'] = '${stringTableRadiatorThermostatTitle}'; +elvST['RAIN_DETECTION_TRANSMITTER'] = '${stringTableRainDetector}'; +elvST['RAINDETECTOR'] = '${stringTableRainDetector}'; +elvST['RAINDETECTOR_HEAT|STATE=FALSE'] = '${stringTableRainDetectorHeatingOff}'; +elvST['RAINDETECTOR_HEAT|STATE=TRUE'] = '${stringTableRainDetectorHeatingOn}'; +elvST['RAINDETECTOR|COND_TX_THRESHOLD_HI'] = '${stringTableRainDetectorCondTxThresholdHi}'; +elvST['RAINDETECTOR|COND_TX_THRESHOLD_LO'] = '${stringTableRainDetectorCondTxThresholdLo}'; +elvST['RAINDETECTOR|EVENT_FILTERTIME'] = '${stringTableRainDetectorEventFilterTime}'; +elvST['RAINDETECTOR|EVENT_RELEASE_FILTER_TIME'] = '${stringTableRainDetectorEventReleaseFilterTime}'; +elvST['RAINDETECTOR|STATE=DRY'] = '${stringTableRainDetectorDry}'; +elvST['RAINDETECTOR|STATE=RAIN'] = '${stringTableRainDetectorRain}'; +elvST['RAINDETECTOR|STATE_HIGH_HOLD_TIME'] = '${stringTableRainDetectorStateHighHoldTime}'; +elvST['RAMP_STOP'] = '${stringTableDimmerRampStop}'; +elvST['RAMP_TIME'] = '${stringTableDimmerRampTime}'; +elvST['RAMP_TIME_UNIT'] = '${stringTableRampTimeUnit}'; +elvST['RAMP_TIME_UNIT=D'] = '${stringTableRampTimeUnitD}'; +elvST['RAMP_TIME_UNIT=H'] = '${stringTableRampTimeUnitH}'; +elvST['RAMP_TIME_UNIT=M'] = '${stringTableRampTimeUnitM}'; +elvST['RAMP_TIME_UNIT=S'] = '${stringTableRampTimeUnitS}'; +elvST['RAMP_TIME_UNIT=10MS'] = '${stringTableRampTimeUnit10MS}'; +elvST['RAMP_TIME_VALUE'] = '${stringTableRampTimeValue}'; +elvST['REDUCE_LEVEL'] = '${stringTableDimmerReduceLevel}'; +elvST['REDUCE_TEMP_LEVEL'] = '${stringTableDimmerReduceTempLevel}'; +elvST['REFERENCE_RUNNING_TIME_BOTTOM_TOP_UNIT'] = '${stringTableTimeBottomTopUnit}'; +elvST['REFERENCE_RUNNING_TIME_BOTTOM_TOP_VALUE'] = '${stringTableTimeBottomTopValue}'; +elvST['REFERENCE_RUNNING_TIME_TOP_BOTTOM_UNIT'] = '${stringTableTimeTopBottomUnit}'; +elvST['REFERENCE_RUNNING_TIME_TOP_BOTTOM_VALUE'] = '${stringTableTimeTopBottomValue}'; +elvST['REFERENCE_RUNNING_TIME_SLATS_UNIT'] = '${stringTableTimeSlatsUnit}'; +elvST['REFERENCE_RUNNING_TIME_SLATS_VALUE'] = '${stringTableTimeSlatsValue}'; +elvST['REMOTECONTROL_RECEIVER'] = '${stringTableRemoteControlReceiver}'; +elvST['REPEATED_LONG_PRESS_TIMEOUT_UNIT'] = '${stringTableKeyLongPressTimeOutUnit}'; +elvST['REPEATED_LONG_PRESS_TIMEOUT_UNIT=100ms'] = '${optionUnit100MS}'; +elvST['REPEATED_LONG_PRESS_TIMEOUT_UNIT=H'] = '${optionUnitH}'; +elvST['REPEATED_LONG_PRESS_TIMEOUT_UNIT=M'] = '${optionUnitM}'; +elvST['REPEATED_LONG_PRESS_TIMEOUT_UNIT=S'] = '${optionUnitS}'; +elvST['REPEATED_LONG_PRESS_TIMEOUT_VALUE'] = '${stringTableKeyLongPressTimeOutValue}'; +elvST['RESET_MOTION'] = '${stringTableResetStatus}'; +elvST['RESET_PRESENCE'] = '${stringTableResetStatus}'; +elvST['RESTART_BUTTONPRESS'] = '${stringTableRestartButtonPress}'; +elvST['RESTART_BUTTONPRESS_IF_WAS_ON'] = '${stringTableRestartButtonPressIfWasOn}'; +elvST['RESTART_LAST'] = '${stringTableRestartLast}'; +elvST['RESTART_OFF'] = '${stringTableRestartOff}'; +elvST['RGB'] = '${stringTableRGBWColorValue}'; +elvST['RGBW'] = '${stringTableRGBWColorValue}'; +elvST['RGBW_AUTOMATIC'] = '${stringTableRGBWAutomaticTitle}'; +elvST['RGBW_AUTOMATIC|COLOR_CHANGE_SPEED'] = '${stringTableRGBWColorChangeSpeed}'; +elvST['RGBW_AUTOMATIC|PROGRAM'] = '${stringTableRGBWProgram}'; +elvST['RGBW_COLOR'] = '${stringTableRGBWColorTitle}'; +elvST['RGBW_COLOR|COLOR'] = '${stringTableRGBWColorValue}'; +elvST['RGBW_COLOR|WHITE_ADJUSTMENT_VALUE_BLUE'] = '${stringTableRGBWWhiteAdjustmentBlue}'; +elvST['RGBW_COLOR|WHITE_ADJUSTMENT_VALUE_GREEN'] = '${stringTableRGBWWhiteAdjustmentGreen}'; +elvST['RGBW_COLOR|WHITE_ADJUSTMENT_VALUE_RED'] = '${stringTableRGBWWhiteAdjustmentRed}'; +elvST['ROTARY_CONTROL_TRANSCEIVER'] = '${stringTableRotaryControlTransceiverTitle}'; +elvST['ROTARY_HANDLE_SENSOR'] = '${stringTableRHSTitle}'; +elvST['ROTARY_HANDLE_SENSOR|ERROR=SABOTAGE'] = '${stringTableRHSErrorSabotage}'; +elvST['ROTARY_HANDLE_SENSOR|MSG_FOR_POS_A'] = '${stringTableRHSMsgPosA}'; +elvST['ROTARY_HANDLE_SENSOR|MSG_FOR_POS_A=CLOSED'] = '${stringTableRHSMsgPosClosed}'; +elvST['ROTARY_HANDLE_SENSOR|MSG_FOR_POS_A=NO_MSG'] = '${stringTableRHSMsgPosNoMsg}'; +elvST['ROTARY_HANDLE_SENSOR|MSG_FOR_POS_A=OPEN'] = '${stringTableRHSMsgPosOpen}'; +elvST['ROTARY_HANDLE_SENSOR|MSG_FOR_POS_A=TILTED'] = '${stringTableRHSMsgPosTilted}'; +elvST['ROTARY_HANDLE_SENSOR|MSG_FOR_POS_B'] = '${stringTableRHSMsgPosB}'; +elvST['ROTARY_HANDLE_SENSOR|MSG_FOR_POS_B=CLOSED'] = '${stringTableRHSMsgPosClosed}'; +elvST['ROTARY_HANDLE_SENSOR|MSG_FOR_POS_B=NO_MSG'] = '${stringTableRHSMsgPosNoMsg}'; +elvST['ROTARY_HANDLE_SENSOR|MSG_FOR_POS_B=OPEN'] = '${stringTableRHSMsgPosOpen}'; +elvST['ROTARY_HANDLE_SENSOR|MSG_FOR_POS_B=TILTED'] = '${stringTableRHSMsgPosTilted}'; +elvST['ROTARY_HANDLE_SENSOR|MSG_FOR_POS_C'] = '${stringTableRHSMsgPosC}'; +elvST['ROTARY_HANDLE_SENSOR|MSG_FOR_POS_C=CLOSED'] = '${stringTableRHSMsgPosClosed}'; +elvST['ROTARY_HANDLE_SENSOR|MSG_FOR_POS_C=NO_MSG'] = '${stringTableRHSMsgPosNoMsg}'; +elvST['ROTARY_HANDLE_SENSOR|MSG_FOR_POS_C=OPEN'] = '${stringTableRHSMsgPosOpen}'; +elvST['ROTARY_HANDLE_SENSOR|MSG_FOR_POS_C=TILTED'] = '${stringTableRHSMsgPosTilted}'; +elvST['ROTARY_HANDLE_SENSOR|STATE=CLOSED'] = '${stringTableRHSStateClosed}'; +elvST['ROTARY_HANDLE_SENSOR|STATE=OPEN'] = '${stringTableRHSStateOpen}'; +elvST['ROTARY_HANDLE_SENSOR|STATE=TILTED'] = '${stringTableRHSStateTilted}'; +elvST['ROTARY_HANDLE_TRANSCEIVER'] = '${stringTableRHSTitle}'; +elvST['ROTARY_HANDLE_TRANSCEIVER|MSG_FOR_POS_A'] = '${stringTableRHSMsgPosA}'; +elvST['ROTARY_HANDLE_TRANSCEIVER|MSG_FOR_POS_A=CLOSED'] = '${stringTableRHSMsgPosClosed}'; +elvST['ROTARY_HANDLE_TRANSCEIVER|MSG_FOR_POS_A=NO_MSG'] = '${stringTableRHSMsgPosNoMsg}'; +elvST['ROTARY_HANDLE_TRANSCEIVER|MSG_FOR_POS_A=OPEN'] = '${stringTableRHSMsgPosOpen}'; +elvST['ROTARY_HANDLE_TRANSCEIVER|MSG_FOR_POS_A=TILTED'] = '${stringTableRHSMsgPosTilted}'; +elvST['ROTARY_HANDLE_TRANSCEIVER|MSG_FOR_POS_B'] = '${stringTableRHSMsgPosB}'; +elvST['ROTARY_HANDLE_TRANSCEIVER|MSG_FOR_POS_B=CLOSED'] = '${stringTableRHSMsgPosClosed}'; +elvST['ROTARY_HANDLE_TRANSCEIVER|MSG_FOR_POS_B=NO_MSG'] = '${stringTableRHSMsgPosNoMsg}'; +elvST['ROTARY_HANDLE_TRANSCEIVER|MSG_FOR_POS_B=OPEN'] = '${stringTableRHSMsgPosOpen}'; +elvST['ROTARY_HANDLE_TRANSCEIVER|MSG_FOR_POS_B=TILTED'] = '${stringTableRHSMsgPosTilted}'; +elvST['ROTARY_HANDLE_TRANSCEIVER|MSG_FOR_POS_C'] = '${stringTableRHSMsgPosC}'; +elvST['ROTARY_HANDLE_TRANSCEIVER|MSG_FOR_POS_C=CLOSED'] = '${stringTableRHSMsgPosClosed}'; +elvST['ROTARY_HANDLE_TRANSCEIVER|MSG_FOR_POS_C=NO_MSG'] = '${stringTableRHSMsgPosNoMsg}'; +elvST['ROTARY_HANDLE_TRANSCEIVER|MSG_FOR_POS_C=OPEN'] = '${stringTableRHSMsgPosOpen}'; +elvST['ROTARY_HANDLE_TRANSCEIVER|MSG_FOR_POS_C=TILTED'] = '${stringTableRHSMsgPosTilted}'; +elvST['ROTARY_HANDLE_TRANSCEIVER|STATE=CLOSED'] = '${stringTableRHSStateClosed}'; +elvST['ROTARY_HANDLE_TRANSCEIVER|STATE=OPEN'] = '${stringTableRHSStateOpen}'; +elvST['ROTARY_HANDLE_TRANSCEIVER|STATE=TILTED'] = '${stringTableRHSStateTilted}'; +elvST['ROTARY_HANDLE_TRANSCEIVER|STATE=UNKNOWN'] = '${stringTableRHSStateUnknown}'; +elvST['ROUTER_MODULE_ENABLED'] = '${stringTableRouterModuleEnabled}'; +elvST['RS485_IDLE_TIME'] = '${stringTableRS485IdleTime}'; +elvST['RSSI_DEVICE'] = '${stringTableRSSIDevice}'; +elvST['RSSI_PEER'] = '${stringTableRSSIPeer}'; +elvST['SABOTAGE=FALSE'] = '${stringTableSabotageContactOk}'; +elvST['SABOTAGE=TRUE'] = '${stringTableSabotageContactWasActive}'; +elvST['SABOTAGE_MSG'] = '${stringTableSabotageMsg}'; +elvST['SABOTAGE|SHAKING'] = '${stringTableSabotageContact}'; +elvST['SECTION'] = '${stringTableSection}'; +elvST['SECTION_STATUS=NORMAL'] = '${stringTableSectionStatusNormal}'; +elvST['SECTION_STATUS=UNKNOWN'] = '${stringTableSectionStatusUnknown}'; +elvST['SELF_CALIBRATION_RESULT=FALSE'] = '${stringTableSelfCalibrationResultFalse}'; +elvST['SELF_CALIBRATION_RESULT=TRUE'] = '${stringTableSelfCalibrationResultTrue}'; +elvST['SELF_CALIBRATION=START'] = '${stringTableSelfCalibrationStart}'; +elvST['SELF_CALIBRATION=STOP'] = '${stringTableSelfCalibrationStop}'; +elvST['SENSOR=FALSE'] = '${stringTableSensorFalse}'; +elvST['SENSOR=TRUE'] = '${stringTableSensorTrue}'; +elvST['SENSOR_ERROR=FALSE'] = '${stringTableSensorErrorFalse}'; +elvST['SENSOR_ERROR=TRUE'] = '${stringTableSensorErrorTrue}'; +elvST['SENSOR_FOR_CARBON_DIOXIDE'] = '${stringTableSensorCO2Title}'; +elvST['SENSOR_FOR_CARBON_DIOXIDE|EVENT_FILTERTIME'] = '${stringTableSensorCO2EventFilterTime}'; +elvST['SENSOR_FOR_CARBON_DIOXIDE|MSG_FOR_POS_A'] = '${stringTableSensorCO2MsgPosA0}'; +elvST['SENSOR_FOR_CARBON_DIOXIDE|MSG_FOR_POS_A=LEVEL_NORMAL'] = '${stringTableSensorCO2MsgPosA1}'; +elvST['SENSOR_FOR_CARBON_DIOXIDE|MSG_FOR_POS_A=NO_MSG'] = '${stringTableSensorCO2MsgPosA2}'; +elvST['SENSOR_FOR_CARBON_DIOXIDE|MSG_FOR_POS_B'] = '${stringTableSensorCO2MsgPosB0}'; +elvST['SENSOR_FOR_CARBON_DIOXIDE|MSG_FOR_POS_B=LEVEL_ADDED'] = '${stringTableSensorCO2MsgPosB3}'; +elvST['SENSOR_FOR_CARBON_DIOXIDE|MSG_FOR_POS_B=LEVEL_ADDED_STRONG'] = '${stringTableSensorCO2MsgPosB4}'; +elvST['SENSOR_FOR_CARBON_DIOXIDE|MSG_FOR_POS_B=LEVEL_NORMAL'] = '${stringTableSensorCO2MsgPosB2}'; +elvST['SENSOR_FOR_CARBON_DIOXIDE|MSG_FOR_POS_B=NO_MSG'] = '${stringTableSensorCO2MsgPosB1}'; +elvST['SENSOR_FOR_CARBON_DIOXIDE|MSG_FOR_POS_C'] = '${stringTableSensorCO2MsgPosC0}'; +elvST['SENSOR_FOR_CARBON_DIOXIDE|MSG_FOR_POS_C=LEVEL_ADDED'] = '${stringTableSensorCO2MsgPosC3}'; +elvST['SENSOR_FOR_CARBON_DIOXIDE|MSG_FOR_POS_C=LEVEL_ADDED_STRONG'] = '${stringTableSensorCO2MsgPosC4}'; +elvST['SENSOR_FOR_CARBON_DIOXIDE|MSG_FOR_POS_C=LEVEL_NORMAL'] = '${stringTableSensorCO2MsgPosC2}'; +elvST['SENSOR_FOR_CARBON_DIOXIDE|MSG_FOR_POS_C=NO_MSG'] = '${stringTableSensorCO2MsgPosC1}'; +elvST['SENSOR_FOR_CARBON_DIOXIDE|MSG_FOR_POS_D'] = '${stringTableSensorCO2MsgPosD0}'; +elvST['SENSOR_FOR_CARBON_DIOXIDE|MSG_FOR_POS_D=LEVEL_ADDED'] = '${stringTableSensorCO2MsgPosD3}'; +elvST['SENSOR_FOR_CARBON_DIOXIDE|MSG_FOR_POS_D=LEVEL_ADDED_STRONG'] = '${stringTableSensorCO2MsgPosD4}'; +elvST['SENSOR_FOR_CARBON_DIOXIDE|MSG_FOR_POS_D=LEVEL_NORMAL'] = '${stringTableSensorCO2MsgPosD2}'; +elvST['SENSOR_FOR_CARBON_DIOXIDE|MSG_FOR_POS_D=NO_MSG'] = '${stringTableSensorCO2MsgPosD1}'; +elvST['SENSOR_FOR_CARBON_DIOXIDE|STATE=LEVEL_ADDED'] = '${stringTableSensorCO2LevelHigh}'; +elvST['SENSOR_FOR_CARBON_DIOXIDE|STATE=LEVEL_ADDED_STRONG'] = '${stringTableSensorCO2LevelStrong}'; +elvST['SENSOR_FOR_CARBON_DIOXIDE|STATE=LEVEL_NORMAL'] = '${stringTableSensorCO2LevelOk}'; +elvST['SENSOR_RANGE_2G'] = '${stringTableSensorRange2G}'; +elvST['SENSOR_RANGE_4G'] = '${stringTableSensorRange4G}'; +elvST['SENSOR_RANGE_8G'] = '${stringTableSensorRange8G}'; +elvST['SENSOR_RANGE_16G'] = '${stringTableSensorRange16G}'; +elvST['SENSOR_SENSITIVITY'] = '${stringTableSensorSensivity}'; +elvST['SENSOR_WINDOW'] = '${stringTableSensorWindowTitle}'; +elvST['SENSOR_WINDOW|EVENT_DELAYTIME'] = '${stringTableSensorWindowEventDelayTime}'; +elvST['SENSOR_WINDOW|EVENT_DELAYTIME=NOT_USED'] = '${stringTableActorWindowStatusInfoNotUsed}'; +elvST['SENSOR_WINDOW|LEVEL'] = '${stringTableActorWindowLevel}'; +elvST['SENSOR_WINDOW|TIPTRONIC_STATE=TIPTRONIC_UNKNOWN_STATE1'] = '${stringTableActorWindowTT_12}'; +elvST['SENSOR_WINDOW|TIPTRONIC_STATE=TIPTRONIC_UNKNOWN_STATE2'] = '${stringTableActorWindowTT_13}'; +elvST['SENSOR_WINDOW|TIPTRONIC_STATE=TIPTRONIC_WINDOW_IN_SHEV_POSITION'] = '${stringTableActorWindowTT_14}'; +elvST['SENSOR_WINDOW|TIPTRONIC_STATE=TT_CLOSES_FROM_TILT_POSITION'] = '${stringTableActorWindowTT_6}'; +elvST['SENSOR_WINDOW|TIPTRONIC_STATE=TT_COULT_BE_OPEND_MANUAL_IN_TURN_POSITION'] = '${stringTableActorWindowTT_10}'; +elvST['SENSOR_WINDOW|TIPTRONIC_STATE=TT_INITIAL_OPERATION'] = '${stringTableActorWindowTT_15}'; +elvST['SENSOR_WINDOW|TIPTRONIC_STATE=TT_IS_IN_TILT_POSITION_FULL_OPEND'] = '${stringTableActorWindowTT_5}'; +elvST['SENSOR_WINDOW|TIPTRONIC_STATE=TT_IS_IN_TILT_POSITION_PARTITIAL_OPEND'] = '${stringTableActorWindowTT_4}'; +elvST['SENSOR_WINDOW|TIPTRONIC_STATE=TT_IS_UNLOCKED_IN_TILT_POSITION_VENT_FRAME_IS_DUE'] = '${stringTableActorWindowTT_2}'; +elvST['SENSOR_WINDOW|TIPTRONIC_STATE=TT_IS_UNLOCKED_IN_TURN_POSITION_VENT_FRAME_IS_DUE'] = '${stringTableActorWindowTT_9}'; +elvST['SENSOR_WINDOW|TIPTRONIC_STATE=TT_LOCKED'] = '${stringTableActorWindowTT_0}'; +elvST['SENSOR_WINDOW|TIPTRONIC_STATE=TT_LOCKS_FROM_TILT_POSITION'] = '${stringTableActorWindowTT_7}'; +elvST['SENSOR_WINDOW|TIPTRONIC_STATE=TT_OPENS_IN_TILT_POSITION'] = '${stringTableActorWindowTT_3}'; +elvST['SENSOR_WINDOW|TIPTRONIC_STATE=TT_UNLOCKS_IN_TILT_POSITION'] = '${stringTableActorWindowTT_1}'; +elvST['SENSOR_WINDOW|TIPTRONIC_STATE=TT_UNLOCKS_IN_TURN_POSITION'] = '${stringTableActorWindowTT_8}'; +elvST['SENSOR_WINDOW|TIPTRONIC_STATE=TT_VENT_FRAME_IS_DUE_WINDOW_LOCKS_FROM_TURN_POSITION'] = '${stringTableActorWindowTT_11}'; +elvST['SENSOR_WINDOW|WINDOW_TYPE=TIPTRONIC_SHEV_TILT'] = '${stringTableSensorWindowType_6}'; +elvST['SENSOR_WINDOW|WINDOW_TYPE=TIPTRONIC_SHEV_TURN'] = '${stringTableSensorWindowType_5}'; +elvST['SENSOR_WINDOW|WINDOW_TYPE=TIPTRONIC_TOPLIGHT'] = '${stringTableSensorWindowType_3}'; +elvST['SENSOR_WINDOW|WINDOW_TYPE=TIPTRONIC_TURN'] = '${stringTableSensorWindowType_4}'; +elvST['SENSOR_WINDOW|WINDOW_TYPE=TIPTRONIC_TURN_AND_TILT'] = '${stringTableSensorWindowType_1}'; +elvST['SENSOR_WINDOW|WINDOW_TYPE=TIPTRONIC_TURN_AND_TILT_TURN_LOCKED'] = '${stringTableSensorWindowType_2}'; +elvST['SENSOR_WINDOW|WINDOW_TYPE=TIPTRONIC_UNKNOWN_WINDOW_TYPE'] = '${stringTableSensorWindowType_0}'; +elvST['SENSOR_WINDOW|WIN_RELEASE=FALSE'] = '${stringTableActorWindowReleaseFalse}'; +elvST['SENSOR_WINDOW|WIN_RELEASE=TRUE'] = '${stringTableActorWindowReleaseTrue}'; +elvST['SENSOR|INPUT_LOCKED'] = '${stringTableSensorInputLocked}'; +elvST['SERVO_TRANSMITTER|LEVEL'] = '${stringTableServoLevel}'; +elvST['SERVO_TRANSMITTER|ACTIVITY_STATE=DOWN'] = '${stringTableDimmerActivityStateDown}'; +elvST['SERVO_TRANSMITTER|ACTIVITY_STATE=UNKNOWN'] = '${stringTableServoActivityStateUnknown}'; +elvST['SERVO_TRANSMITTER|ACTIVITY_STATE=UP'] = '${stringTableDimmerActivityStateUp}'; +elvST['SERVO_TRANSMITTER|ACTIVITY_STATE=STABLE'] = '${stringTableProcessStableBlindDimmerTransmitter}'; +elvST['SERVO_VIRTUAL_RECEIVER'] = '${stringTableServoTitle}'; +elvST['SERVO_VIRTUAL_RECEIVER|LEVEL'] = '${stringTableServoLevel}'; +elvST['SERVO_VIRTUAL_RECEIVER|RAMP_TIME'] = '${stringTableServoRamp}'; +elvST['SET_TEMPERATURE'] = '${stringTableClimateControlRTTransceiverSetTemperature}'; +elvST['SHUTTER_CONTACT'] = '${stringTableShutterContactTitle}'; +elvST['SHUTTER_CONTACT_HMIP'] = '${stringTableShutterContactTitle}'; +elvST['SHUTTER_CONTACT_HMIP|ERROR=SABOTAGE'] = '${stringTableShutterContactErrorSabotage}'; +elvST['SHUTTER_CONTACT_HMIP|MSG_FOR_POS_A'] = '${stringTableShutterContactHmIPMsgPosA0}'; +elvST['SHUTTER_CONTACT_HMIP|MSG_FOR_POS_A=CLOSED'] = '${stringTableShutterContactHmMsgPosA1}'; +elvST['SHUTTER_CONTACT_HMIP|MSG_FOR_POS_A=NO_MSG'] = '${stringTableShutterContactMsgPosA2}'; +elvST['SHUTTER_CONTACT_HMIP|MSG_FOR_POS_A=OPEN'] = '${stringTableShutterContactMsgPosA3}'; +elvST['SHUTTER_CONTACT_HMIP|MSG_FOR_POS_B'] = '${stringTableShutterContactHmIPMsgPosB0}'; +elvST['SHUTTER_CONTACT_HMIP|MSG_FOR_POS_B=CLOSED'] = '${stringTableShutterContactMsgPosB1}'; +elvST['SHUTTER_CONTACT_HMIP|MSG_FOR_POS_B=NO_MSG'] = '${stringTableShutterContactMsgPosB2}'; +elvST['SHUTTER_CONTACT_HMIP|MSG_FOR_POS_B=OPEN'] = '${stringTableShutterContactMsgPosB3}'; +elvST['SHUTTER_CONTACT_HMIP|STATE=CLOSED'] = '${stringTableShutterContactStateFalse}'; +elvST['SHUTTER_CONTACT_HMIP|STATE=FALSE'] = '${stringTableShutterContactStateFalse}'; +elvST['SHUTTER_CONTACT_HMIP|STATE=OPEN'] = '${stringTableShutterContactStateTrue}'; +elvST['SHUTTER_CONTACT_HMIP|STATE=TRUE'] = '${stringTableShutterContactStateTrue}'; +elvST['SHUTTER_CONTACT|ERROR=SABOTAGE'] = '${stringTableShutterContactErrorSabotage}'; +elvST['SHUTTER_CONTACT|MSG_FOR_POS_A'] = '${stringTableShutterContactMsgPosA0}'; +elvST['SHUTTER_CONTACT|MSG_FOR_POS_A=CLOSED'] = '${stringTableShutterContactMsgPosA1}'; +elvST['SHUTTER_CONTACT|MSG_FOR_POS_A=NO_MSG'] = '${stringTableShutterContactMsgPosA2}'; +elvST['SHUTTER_CONTACT|MSG_FOR_POS_A=OPEN'] = '${stringTableShutterContactMsgPosA3}'; +elvST['SHUTTER_CONTACT|MSG_FOR_POS_B'] = '${stringTableShutterContactMsgPosB0}'; +elvST['SHUTTER_CONTACT|MSG_FOR_POS_B=CLOSED'] = '${stringTableShutterContactMsgPosB1}'; +elvST['SHUTTER_CONTACT|MSG_FOR_POS_B=NO_MSG'] = '${stringTableShutterContactMsgPosB2}'; +elvST['SHUTTER_CONTACT|MSG_FOR_POS_B=OPEN'] = '${stringTableShutterContactMsgPosB3}'; +elvST['SHUTTER_CONTACT|STATE=CLOSED'] = '${stringTableShutterContactStateFalse}'; +elvST['SHUTTER_CONTACT|STATE=FALSE'] = '${stringTableShutterContactStateFalse}'; +elvST['SHUTTER_CONTACT|STATE=OPEN'] = '${stringTableShutterContactStateTrue}'; +elvST['SHUTTER_CONTACT|STATE=TRUE'] = '${stringTableShutterContactStateTrue}'; +elvST['SHUTTER_TRANSMITTER|ACTIVITY_STATE=DOWN'] = '${stringTableShutterActivityStateDown}'; +elvST['SHUTTER_TRANSMITTER|ACTIVITY_STATE=UNKNOWN'] = '${stringTableShutterActivityStateUnknown}'; +elvST['SHUTTER_TRANSMITTER|ACTIVITY_STATE=UP'] = '${stringTableShutterActivityStateUp}'; +elvST['SHUTTER_TRANSMITTER|ACTIVITY_STATE=STABLE'] = '${stringTableProcessStableShutterTransmitter}'; +elvST['SHUTTER_TRANSMITTER|LEVEL'] = '${stringTableBlindLevel}'; +elvST['SHUTTER_TRANSMITTER|LEVEL_STATUS=ERROR'] = '${lblValue} ${stringTableBlindLevel}: ${lblError}'; +elvST['SHUTTER_TRANSMITTER|LEVEL_STATUS=4'] = '${lblValue} ${stringTableBlindLevel}: ${lblError}'; +elvST['SHUTTER_TRANSMITTER|LEVEL_STATUS=NORMAL'] = '${lblValue} ${stringTableBlindLevel}: ${lblNormal}'; +elvST['SHUTTER_TRANSMITTER|LEVEL_STATUS=0'] = '${lblValue} ${stringTableBlindLevel}: ${lblNormal}'; +elvST['SHUTTER_TRANSMITTER|LEVEL_STATUS=OVERFLOW'] = '${lblValue} ${stringTableBlindLevel}: ${lblOverflow}'; +elvST['SHUTTER_TRANSMITTER|LEVEL_STATUS=2'] = '${lblValue} ${stringTableBlindLevel}: ${lblOverflow}'; +elvST['SHUTTER_TRANSMITTER|LEVEL_STATUS=UNDERFLOW'] = '${lblValue} ${stringTableBlindLevel}: ${lblUnderflow}'; +elvST['SHUTTER_TRANSMITTER|LEVEL_STATUS=3'] = '${lblValue} ${stringTableBlindLevel}: ${lblUnderflow}'; +elvST['SHUTTER_TRANSMITTER|LEVEL_STATUS=UNKNOWN'] = '${lblValue} ${stringTableBlindLevel}: ${lblUnknown}'; +elvST['SHUTTER_TRANSMITTER|LEVEL_STATUS=1'] = '${lblValue} ${stringTableBlindLevel}: ${lblUnknown}'; +elvST['SHUTTER_TRANSMITTER|LEVEL_2'] = '${stringTableJalousieSlatsLevel}'; +elvST['SHUTTER_TRANSMITTER|LEVEL_2_STATUS=ERROR'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblError}'; +elvST['SHUTTER_TRANSMITTER|LEVEL_2_STATUS=4'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblError}'; +elvST['SHUTTER_TRANSMITTER|LEVEL_2_STATUS=NORMAL'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblNormal}'; +elvST['SHUTTER_TRANSMITTER|LEVEL_2_STATUS=0'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblNormal}'; +elvST['SHUTTER_TRANSMITTER|LEVEL_2_STATUS=OVERFLOW'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblOverflow}'; +elvST['SHUTTER_TRANSMITTER|LEVEL_2_STATUS=2'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblOverflow}'; +elvST['SHUTTER_TRANSMITTER|LEVEL_2_STATUS=UNDERFLOW'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblUnderflow}'; +elvST['SHUTTER_TRANSMITTER|LEVEL_2_STATUS=3'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblUnderflow}'; +elvST['SHUTTER_TRANSMITTER|LEVEL_2_STATUS=UNKNOWN'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblUnknown}'; +elvST['SHUTTER_TRANSMITTER|LEVEL_2_STATUS=1'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblUnknown}'; +elvST['SHUTTER_TRANSMITTER|PROCESS=NOT_STABLE'] = '${stringTableProcessNotStableShutterTransmitter}'; +elvST['SHUTTER_TRANSMITTER|PROCESS=STABLE'] = '${stringTableProcessStableShutterTransmitter}'; +elvST['SHUTTER_VIRTUAL_RECEIVER'] = '${stringTableShutterVirtualReceiverTitle}'; +elvST['SHUTTER_VIRTUAL_RECEIVER|ACTIVITY_STATE=DOWN'] = '${stringTableShutterActivityStateDown}'; +elvST['SHUTTER_VIRTUAL_RECEIVER|ACTIVITY_STATE=UNKNOWN'] = '${stringTableShutterActivityStateUnknown}'; +elvST['SHUTTER_VIRTUAL_RECEIVER|ACTIVITY_STATE=UP'] = '${stringTableShutterActivityStateUp}'; +elvST['SHUTTER_VIRTUAL_RECEIVER|ACTIVITY_STATE=STABLE'] = '${stringTableProcessStableShutterTransmitter}'; +elvST['SHUTTER_VIRTUAL_RECEIVER|LEVEL'] = '${stringTableBlindLevel}'; +elvST['SHUTTER_VIRTUAL_RECEIVER|LEVEL_STATUS=ERROR'] = '${lblValue} ${stringTableBlindLevel}: ${lblError}'; +elvST['SHUTTER_VIRTUAL_RECEIVER|LEVEL_STATUS=4'] = '${lblValue} ${stringTableBlindLevel}: ${lblError}'; +elvST['SHUTTER_VIRTUAL_RECEIVER|LEVEL_STATUS=NORMAL'] = '${lblValue} ${stringTableBlindLevel}: ${lblNormal}'; +elvST['SHUTTER_VIRTUAL_RECEIVER|LEVEL_STATUS=0'] = '${lblValue} ${stringTableBlindLevel}: ${lblNormal}'; +elvST['SHUTTER_VIRTUAL_RECEIVER|LEVEL_STATUS=OVERFLOW'] = '${lblValue} ${stringTableBlindLevel}: ${lblOverflow}'; +elvST['SHUTTER_VIRTUAL_RECEIVER|LEVEL_STATUS=2'] = '${lblValue} ${stringTableBlindLevel}: ${lblOverflow}'; +elvST['SHUTTER_VIRTUAL_RECEIVER|LEVEL_STATUS=UNDERFLOW'] = '${lblValue} ${stringTableBlindLevel}: ${lblUnderflow}'; +elvST['SHUTTER_VIRTUAL_RECEIVER|LEVEL_STATUS=3'] = '${lblValue} ${stringTableBlindLevel}: ${lblUnderflow}'; +elvST['SHUTTER_VIRTUAL_RECEIVER|LEVEL_STATUS=UNKNOWN'] = '${lblValue} ${stringTableBlindLevel}: ${lblUnknown}'; +elvST['SHUTTER_VIRTUAL_RECEIVER|LEVEL_STATUS=1'] = '${lblValue} ${stringTableBlindLevel}: ${lblUnknown}'; +elvST['SHUTTER_VIRTUAL_RECEIVER|LEVEL_2'] = '${stringTableJalousieSlatsLevel}'; +elvST['SHUTTER_VIRTUAL_RECEIVER|LEVEL_2_STATUS=ERROR'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblError}'; +elvST['SHUTTER_VIRTUAL_RECEIVER|LEVEL_2_STATUS=4'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblError}'; +elvST['SHUTTER_VIRTUAL_RECEIVER|LEVEL_2_STATUS=NORMAL'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblNormal}'; +elvST['SHUTTER_VIRTUAL_RECEIVER|LEVEL_2_STATUS=0'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblNormal}'; +elvST['SHUTTER_VIRTUAL_RECEIVER|LEVEL_2_STATUS=OVERFLOW'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblOverflow}'; +elvST['SHUTTER_VIRTUAL_RECEIVER|LEVEL_2_STATUS=2'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblOverflow}'; +elvST['SHUTTER_VIRTUAL_RECEIVER|LEVEL_2_STATUS=UNDERFLOW'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblUnderflow}'; +elvST['SHUTTER_VIRTUAL_RECEIVER|LEVEL_2_STATUS=3'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblUnderflow}'; +elvST['SHUTTER_VIRTUAL_RECEIVER|LEVEL_2_STATUS=UNKNOWN'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblUnknown}'; +elvST['SHUTTER_VIRTUAL_RECEIVER|LEVEL_2_STATUS=1'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblUnknown}'; +elvST['SHUTTER_VIRTUAL_RECEIVER|STOP'] = '${stringTableBlindStop}'; +elvST['SHUTTER_VIRTUAL_RECEIVER|PROCESS=STABLE'] = '${stringTableProcessStableShutterTransmitter}'; +elvST['SHUTTER_VIRTUAL_RECEIVER|PROCESS=NOT_STABLE'] = '${stringTableProcessNotStableShutterTransmitter}'; +elvST['SIGNAL'] = '${stringTableSignal}'; +elvST['SIGNAL_CHIME'] = '${stringTableSignalChimeTitle}'; +elvST['SIGNAL_CHIME|ACT_NUM'] = '${stringTableSignalChimeActNum}'; +elvST['SIGNAL_CHIME|ACT_TYP'] = '${stringTableSignalChimeActType}'; +elvST['SIGNAL_CHIME|ON_TIME'] = '${stringTableSignalChimeOnTime}'; +elvST['SIGNAL_CHIME|STATE=FALSE'] = '${stringTableSignalChimeStateFalse}'; +elvST['SIGNAL_CHIME|STATE=TRUE'] = '${stringTableSignalChimeStateTrue}'; +elvST['SIGNAL_LED'] = '${stringTableSignalLEDTitle}'; +elvST['SIGNAL_LED|ACT_NUM'] = '${stringTableSignalLEDActNum}'; +elvST['SIGNAL_LED|ACT_TYP'] = '${stringTableSignalLEDActType}'; +elvST['SIGNAL_LED|ON_TIME'] = '${stringTableSignalLEDOnTime}'; +elvST['SIGNAL_LED|STATE=FALSE'] = '${stringTableSignalLEDStateFalse}'; +elvST['SIGNAL_LED|STATE=TRUE'] = '${stringTableSignalLEDStateTrue}'; +elvST['SIGNAL_TONE'] = '${stringTableSignalTone}'; +elvST['SIGNAL_TONE=HIGH'] = '${stringTableSignalToneHigh}'; +elvST['SIGNAL_TONE=LOW'] = '${stringTableSignalToneLow}'; +elvST['SIGNAL_TONE=MID'] = '${stringTableSignalToneMid}'; +elvST['SIGNAL_TONE=VERY_HIGH'] = '${stringTableSignalToneVeryHigh}'; +elvST['SIMPLE_SWITCH_RECEIVER'] = '${stringTableSimpleSwitchReceiverTitle}'; +elvST['SMOKE_DETECTOR_ALARM_STATUS=IDLE_OFF'] = '${stringTableStateIdleOff}'; +elvST['SMOKE_DETECTOR_ALARM_STATUS=INTRUSION_ALARM'] = '${stringTableStateIntrusionAlarm}'; +elvST['SMOKE_DETECTOR_ALARM_STATUS=PRIMARY_ALARM'] = '${stringTableStatePrimaryAlarm}'; +elvST['SMOKE_DETECTOR_ALARM_STATUS=SECONDARY_ALARM'] = '${stringTableStateSecondaryAlarm}'; +elvST['SMOKE_DETECTOR_COMMAND=COMMUNICATION_TEST'] = '${stringTableCommandCommunicationTest}'; +elvST['SMOKE_DETECTOR_COMMAND=COMMUNICATION_TEST_REPEATED'] = '${stringTableCommandCommunicationTestRepeated}'; +elvST['SMOKE_DETECTOR_COMMAND=INTRUSION_ALARM'] = '${stringTableCommandIntrusionAlarm}'; +elvST['SMOKE_DETECTOR_COMMAND=INTRUSION_ALARM_OFF'] = '${stringTableCommandIntrusionAlarmOff}'; +elvST['SMOKE_DETECTOR_COMMAND=SMOKE_TEST'] = '${stringTableCommandSmokeTest}'; +elvST['SMOKE_DETECTOR_EVENT=ALARM_OFF'] = '${stringTableEventAlarmOff}'; +elvST['SMOKE_DETECTOR_EVENT=ALARM_OFF_REPEATED'] = '${stringTableEventAlarmOffRepeated}'; +elvST['SMOKE_DETECTOR_EVENT=INTRUSION_ALARM'] = '${stringTableEventIntrusionAlarm}'; +elvST['SMOKE_DETECTOR_EVENT=INTRUSION_ALARM_REPEATED'] = '${stringTableEventIntrusionAlarmRepeated}'; +elvST['SMOKE_DETECTOR_EVENT=LOW_BAT'] = '${stringTableEventLowBat}'; +elvST['SMOKE_DETECTOR_EVENT=LOW_BAT_REPEATED'] = '${stringTableEventLowBatRepeated}'; +elvST['SMOKE_DETECTOR_EVENT=PRIMARY_ALARM'] = '${stringTableEventPrimaryAlarm}'; +elvST['SMOKE_DETECTOR_EVENT=SECONDARY_ALARM'] = '${stringTableEventSecondaryAlarm}'; +elvST['SMOKE_DETECTOR_TEAM'] = '${stringTableSmokeDetectorTitle}'; +elvST['SMOKE_DETECTOR_TEAM_V2'] = '${stringTableSmokeDetectorTitle}'; +elvST['SMOKE_DETECTOR_TEAM_V2|STATE=FALSE'] = '${stringTableSmokeDetectorStateFalse}'; +elvST['SMOKE_DETECTOR_TEAM_V2|STATE=TRUE'] = '${stringTableSmokeDetectorStateTrue}'; +elvST['SMOKE_DETECTOR_TEAM|STATE=FALSE'] = '${stringTableSmokeDetectorStateFalse}'; +elvST['SMOKE_DETECTOR_TEAM|STATE=TRUE'] = '${stringTableSmokeDetectorStateTrue}'; +elvST['SMOKE_DETECTOR_TEST_RESULT=COMMUNICATION_TEST_OK'] = '${stringTableCommunicatingTestOK}'; +elvST['SMOKE_DETECTOR_TEST_RESULT=COMMUNICATION_TEST_SENT'] = '${stringTableCommunicatingTestSent}'; +elvST['SMOKE_DETECTOR_TEST_RESULT=NONE'] = '${stringTableSystemTestNone}'; +elvST['SMOKE_DETECTOR_TEST_RESULT=SMOKE_TEST_FAILED'] = '${stringTableSystemTestFailure}'; +elvST['SMOKE_DETECTOR_TEST_RESULT=SMOKE_TEST_OK'] = '${stringTableSystemTestOK}'; +elvST['SMOKE_DETECTOR|ERROR_ALARM_TEST=ALARM_TEST_FAILED'] = '${stringTableSmokeDetectorAlarmTestFailure}'; +elvST['SMOKE_DETECTOR|ERROR_ALARM_TEST=NO_ERROR'] = '${stringTableSmokeDetectorAlarmTestOK}'; +elvST['SMOKE_DETECTOR|ERROR_SMOKE_CHAMBER=DEGRADED_SMOKE_CHAMBER'] = '${stringTableSmokeDetectorSmokeChamberFailure}'; +elvST['SMOKE_DETECTOR|ERROR_SMOKE_CHAMBER=NO_ERROR'] = '${stringTableSmokeDetectorSmokeChamberOK}'; +elvST['SMOKE_DETECTOR|REPEAT_ENABLE'] = '${stringTableSmokeDetectorRepeatEnable}'; +elvST['SMOKE_DETECTOR|STATE=FALSE'] = '${stringTableSmokeDetectorStateFalse}'; +elvST['SMOKE_DETECTOR|STATE=TRUE'] = '${stringTableSmokeDetectorStateTrue}'; +elvST['SOFTONOFF'] = '${stringTableSoftOnOff}'; +elvST['SOUND_ID'] = '${stringTableSoundID}'; +elvST['SMOKE_LEVEL'] = '${stringTableSmokeLevel}'; +elvST['SOUND_LONG'] = '${stringTableSoundLong}'; +elvST['SOUND_LONG_LONG'] = '${stringTableSoundLongLong}'; +elvST['SOUND_LONG_SHORT'] = '${stringTableSoundLongShort}'; +elvST['SOUND_LONG_SHORT_SHORT'] = '${stringTableSoundLongShortShort}'; +elvST['SOUND_NO_SOUND'] = '${stringTableSoundNoSound}'; +elvST['SOUND_SHORT'] = '${stringTableSoundShort}'; +elvST['SOUND_SHORT_SHORT'] = '${stringTableSoundShortShort}'; +elvST['SPEED_MULTIPLIER'] = '${stringTableSpeedMultiplier}'; +elvST['STANDBY_TIME'] = '${stringTableStandByTime}'; +elvST['STATE=FALSE'] = '${stringTableStateFalse}'; +elvST['STATE=TRUE'] = '${stringTableStateTrue}'; +elvST['STATE_RESET_RECEIVER'] = '${stringTableStateResetReceiverTitle}'; +elvST['STATUSINFO_MINDELAY'] = '${stringTableStatusInfoMinDelay}'; +elvST['STATUSINFO_RANDOM'] = '${stringTableStatusInfoRandom}'; +elvST['STATUS_INDICATOR'] = '${stringTableStatusIndicatorTitle}'; +elvST['STATUS_INDICATOR|INHIBIT=FALSE'] = '${stringTableStatusIndicatorInhibitFalse}'; +elvST['STATUS_INDICATOR|INHIBIT=TRUE'] = '${stringTableStatusIndicatorInhibitTrue}'; +elvST['STATUS_INDICATOR|ON_TIME'] = '${stringTableStatusIndicatorOnTime}'; +elvST['STATUS_INDICATOR|STATE=FALSE'] = '${stringTableStatusIndicatorStateFalse}'; +elvST['STATUS_INDICATOR|STATE=TRUE'] = '${stringTableStatusIndicatorStateTrue}'; +elvST['STATUS_MESSAGE_TEXT_ALIGNMENT_LEFT_ALIGNED'] = '${stringTableStatusMessageTextAligmentLeftAligned}'; +elvST['SUBMIT'] = '${stringTableSubmit}'; +elvST['SWITCH'] = '${stringTableSwitchTitle}'; +elvST['SWITCH_ACTUATOR'] = '${stringTableSwitchTitle}'; +elvST['SWITCH_INTERFACE'] = '${stringTableSwitchInterfaceTitle}'; +elvST['SWITCH_INTERFACE|PRESS'] = '${stringTableSwitchInterfacePress}'; +elvST['SWITCH_INTERFACE|STATE=FALSE'] = '${stringTableSwitchInterfaceStateFalse}'; +elvST['SWITCH_INTERFACE|STATE=TRUE'] = '${stringTableSwitchInterfaceStateTrue}'; +elvST['SWITCH_PANIC'] = '${stringTableSirenSwitchPanicTitle}'; +elvST['SWITCH_SENSOR'] = '${stringTableSwitchSensorTitle}'; +elvST['SWITCH_TRANSMIT'] = '${stringTableSwitchTransmitTitle}'; +elvST['SWITCH_TRANSMIT|TWO_POINT_HYSTERESIS'] = '${stringTableSwitchTransmitTwoPointHysteresis}'; +elvST['SWITCH_VIRTUAL_RECEIVER'] = '${stringTableSwitchVirtualReceiverTitle}'; +elvST['SWITCH|AES_ACTIVE'] = '${stringTableSwitchAESActive}'; +elvST['SWITCH|ON_TIME'] = '${stringTableSwitchOnTime}'; +elvST['SWITCH|STATE=FALSE'] = '${stringTableSwitchStateFalse}'; +elvST['SWITCH|STATE=TRUE'] = '${stringTableSwitchStateTrue}'; +elvST['SWITCH|STATUSINFO_RANDOM_A'] = '${stringTableStatusInfoRandomA}'; +elvST['TACTILE_SWITCH'] = '${stringTableTactileSwitch}'; +elvST['TACTILE_SWITCH=FALSE'] = '${stringTableTactileSwitchFalse}'; +elvST['TACTILE_SWITCH=TRUE'] = '${stringTableTactileSwitchTrue}'; +elvST['TEMP_HUMIDITY_PARTICULATE_MATTER_TRANSMITTER|INTERVAL_UNIT'] = '${stringTableTempHumidityParticulateMatterUnit}'; +elvST['TEMP_HUMIDITY_PARTICULATE_MATTER_TRANSMITTER|INTERVAL_VALUE'] = '${stringTableTempHumidityParticulateMatterValue}'; +elvST['TEMPERATUREFALL_MODUS'] = '${stringTableTemperatureModus}'; +elvST['TEMPERATUREFALL_VALUE'] = '${stringTableTemperatureValue}'; +elvST['TEMPERATUREFALL_WINDOW_OPEN'] = '${stringTableTemperatureWindowOpen}'; +elvST['TEMPERATUREFALL_WINDOW_OPEN_TIME_PERIOD'] = '${stringTableTemperatureOpenTimePeriod}'; +elvST['TEMPERATURE_COMFORT'] = '${stringTableTemperatureComfort}'; +elvST['TEMPERATURE_LIMITER=FALSE'] = '${stringTableTemperatureLimiterFalse}'; +elvST['TEMPERATURE_LIMITER=TRUE'] = '${stringTableTemperatureLimiterTrue}'; +elvST['TEMPERATURE_LOWERING'] = '${stringTableTemperatureLowering}'; +elvST['TEMPERATURE_MAXIMUM'] = '${stringTableTemperatureMaximum}'; +elvST['TEMPERATURE_MINIMUM'] = '${stringTableTemperatureMinimum}'; +elvST['TEMPERATURE_OFFSET'] = '${stringTableTemperatureOffset}'; +elvST['TEMPERATURE_OUT_OF_RANGE=FALSE'] = '${stringTableTemperatureOutOfRangeFalse}'; +elvST['TEMPERATURE_OUT_OF_RANGE=TRUE'] = '${stringTableTemperatureOutOfRangeTrue}'; +elvST['THERMALCONTROL_TRANSMIT'] = '${stringTableThermalControlTitle}'; +elvST['TILT_SENSOR'] = '${stringTableTiltSensorTitle}'; +elvST['TILT_SENSOR|EVENT_FILTERTIME'] = '${stringTableTiltSensorEventFilterTime}'; +elvST['TILT_SENSOR|MSG_FOR_POS_A'] = '${stringTableTiltSensorMsgPosA0}'; +elvST['TILT_SENSOR|MSG_FOR_POS_A=CLOSED'] = '${stringTableTiltSensorMsgPosA1}'; +elvST['TILT_SENSOR|MSG_FOR_POS_A=NO_MSG'] = '${stringTableTiltSensorMsgPosA2}'; +elvST['TILT_SENSOR|MSG_FOR_POS_A=OPEN'] = '${stringTableTiltSensorMsgPosA3}'; +elvST['TILT_SENSOR|MSG_FOR_POS_B'] = '${stringTableTiltSensorMsgPosB0}'; +elvST['TILT_SENSOR|MSG_FOR_POS_B=CLOSED'] = '${stringTableTiltSensorMsgPosB1}'; +elvST['TILT_SENSOR|MSG_FOR_POS_B=NO_MSG'] = '${stringTableTiltSensorMsgPosB2}'; +elvST['TILT_SENSOR|MSG_FOR_POS_B=OPEN'] = '${stringTableTiltSensorMsgPosB3}'; +elvST['TILT_SENSOR|STATE=FALSE'] = '${stringTableTiltSensorStateFalse}'; +elvST['TILT_SENSOR|STATE=TRUE'] = ' ${stringTableTiltSensorStateTrue}'; +elvST['TIME_OF_OPERATION'] = '${stringTableTimeOfOperation}'; +elvST['TIME_OF_OPERATION_STATUS=NORMAL'] = '${lblValue} ${stringTableTimeOfOperation}: ${lblNormal}'; +elvST['TIME_OF_OPERATION_STATUS=0'] = '${lblValue} ${stringTableTimeOfOperation}: ${lblNormal}'; +elvST['TIME_OF_OPERATION_STATUS=UNKNOWN'] = '${lblValue} ${stringTableTimeOfOperation}: ${lblUnknown}'; +elvST['TIME_OF_OPERATION_STATUS=1'] = '${lblValue} ${stringTableTimeOfOperation}: ${lblUnknown}'; +elvST['TIME_OF_OPERATION_STATUS=OVERFLOW'] = '${lblValue} ${stringTableTimeOfOperation}: ${lblOverflow}'; +elvST['TIME_OF_OPERATION_STATUS=2'] = '${lblValue} ${stringTableTimeOfOperation}: ${lblOverflow}'; +elvST['TRANSMIT_DEV_TRY_MAX'] = '${stringTableTransmitDevTryMax}'; +elvST['TRANSMIT_TRY_MAX'] = '${stringTableTransmitTryMax}'; +elvST['TX_MINDELAY'] = '${stringTableTxMinDelay}'; +elvST['TX_MINDELAY_UNIT'] = '${stringTableTxMinDelayUnit}'; +elvST['TX_MINDELAY_UNIT=100MS'] = '${optionUnit100MS}'; +elvST['TX_MINDELAY_UNIT=H'] = '${optionUnitH}'; +elvST['TX_MINDELAY_UNIT=M'] = '${optionUnitM}'; +elvST['TX_MINDELAY_UNIT=S'] = '${optionUnitS}'; +elvST['TX_MINDELAY_VALUE'] = '${stringTableTxMinDelayValue}'; +elvST['TX_THRESHOLD_PERCENT'] = '${stringTableTxThresholdPercent}'; +elvST['TX_THRESHOLD_POWER'] = '${stringTablePowerMeterTxThresholdPower}'; +elvST['UNIVERSAL_LIGHT_RECEIVER'] = '${stringTableUniversalLightReceiverTitle}'; +elvST['UNIVERSAL_LIGHT_RECEIVER|ERROR_LIMIT'] = '${stringTableErrorLimitULR}'; +elvST['UNIVERSAL_LIGHT_RECEIVER|ERROR_LIMIT=FALSE'] = '${stringTableErrorLimitULR_False}'; +elvST['UNIVERSAL_LIGHT_RECEIVER|ERROR_LIMIT=TRUE'] = '${stringTableErrorLimitULR_True}'; +elvST['UNIVERSAL_LIGHT_RECEIVER|ERROR_CONTROL_GEAR_FAILURE'] = '${stringTableErrorGearFailure}'; +elvST['UNIVERSAL_LIGHT_RECEIVER|ERROR_CONTROL_GEAR_FAILURE=FALSE'] = '${stringTableErrorGearFailure_False}'; +elvST['UNIVERSAL_LIGHT_RECEIVER|ERROR_CONTROL_GEAR_FAILURE=TRUE'] = '${stringTableErrorGearFailure_True}'; +elvST['UNIVERSAL_LIGHT_RECEIVER|ERROR_LAMP_FAILURE'] = '${stringTableErrorLampFailureULR}'; +elvST['UNIVERSAL_LIGHT_RECEIVER|ERROR_LAMP_FAILURE=FALSE'] = '${stringTableErrorLampFailureULR_False}'; +elvST['UNIVERSAL_LIGHT_RECEIVER|ERROR_LAMP_FAILURE=TRUE'] = '${stringTableErrorLampFailureULR_True}'; +elvST['UNIVERSAL_LIGHT_RECEIVER|LEVEL'] = '${lblColorBrightness}'; +elvST['UNREACH=FALSE'] = '${stringTableUnreachFalse}'; +elvST['UNREACH=TRUE'] = '${stringTableUnreachTrue}'; +elvST['UPDATE_PENDING'] = '${stringTableUpdatePending}'; +elvST['UPDATE_PENDING=FALSE'] = '${stringTableUpdatePendingFalse}'; +elvST['UPDATE_PENDING=TRUE'] = '${stringTableUpdatePendingTrue}'; +elvST['USER_COLOR'] = '${stringTableSubmit}'; +elvST['USER_PROGRAM'] = '${stringTableSubmit}'; +elvST['VALUE_8BIT'] = '${lblValue}'; +elvST['VALVE_MAXIMUM_POSITION'] = '${stringTableValveMaximumPosition}'; +elvST['VALVE_STATE'] = '${stringTableClimateControlRTTransceiverVentPos}'; +elvST['VALVE_STATE=ADAPTION_DONE'] = '${stringTableValveStateAdaptionDone}'; +elvST['VALVE_STATE=ADAPTION_IN_PROGRESS'] = '${stringTableValveStateAdaptionInProgress}'; +elvST['VALVE_STATE=ADJUSTMENT_TOO_BIG'] = '${stringTableValveStateAdjTooBig}'; +elvST['VALVE_STATE=ADJUSTMENT_TOO_SMALL'] = '${stringTableValveStateAdjToSmall}'; +elvST['VALVE_STATE=ERROR_POSITION'] = '${stringTableValveStateErrorPosition}'; +elvST['VALVE_STATE=RUN_TO_START'] = '${stringTableValveStateRunToStart}'; +elvST['VALVE_STATE=STATE_NOT_AVAILABLE'] = '${stringTableValveStateNotAvailable}'; +elvST['VALVE_STATE=TOO_TIGHT'] = '${stringTableValveStateToTight}'; +elvST['VALVE_STATE=WAIT_FOR_ADAPTION'] = '${stringTableValveStateWaitForAdaption}'; +elvST['VENT_CLOSED'] = '${stringTableVentClosed}'; +elvST['VENT_OPEN'] = '${stringTableVentOpen}'; +elvST['VIR-LG-ONOFF-CH|LEVEL=FALSE'] = '${stringTableStateFalse}'; +elvST['VIR-LG-ONOFF-CH|LEVEL=TRUE'] = '${stringTableStateTrue}'; +elvST['VIRTUAL_DIMMER'] = '${stringTableVirtualDimmerTitle}'; +elvST['VIRTUAL_DIMMER|ERROR=LOAD_FAILURE'] = '${stringTableVirtualDimmerErrorLoadFailure}'; +elvST['VIRTUAL_DIMMER|ERROR_OVERHEAT'] = '${stringTableDimmerErrorOverheat}'; +elvST['VIRTUAL_DIMMER|ERROR_OVERLOAD'] = '${stringTableDimmerErrorOverload}'; +elvST['VIRTUAL_DIMMER|ERROR_REDUCED'] = '${stringTableDimmerErrorReduced}'; +elvST['VIRTUAL_DIMMER|LOGIC_COMBINATION'] = '${stringTableLogicCombination}'; +elvST['VIRTUAL_DIMMER|POWERUP_ACTION'] = '${stringTableVirtualDimmerPowerUpAction}'; +elvST['VIRTUAL_DIMMER|RAMP_STOP'] = '${stringTableDimmerRampStop}'; +elvST['VIRTUAL_DIMMER|STATUSINFO_RANDOM'] = '${stringTableVirtualDimmerStatusInfoRandom}'; +elvST['VIRTUAL_DUAL_WHITE_COLOR|LEVEL'] = '${stringTableDualWhiteColorLevel}'; +elvST['VIRTUAL_DUAL_WHITE_COLOR|LEVEL_REAL'] = '${stringTableDualWhiteColorLevelReal}'; +elvST['VIRTUAL_DUAL_WHITE_COLOR|OLD_LEVEL'] = '${stringTableDualWhiteColorOldLevel}'; +elvST['VIRTUAL_DUAL_WHITE_COLOR|RAMP_STOP'] = '${stringTableDualWhiteColorRampStop}'; +elvST['VIRTUAL_DUAL_WHITE_COLOR|RAMP_TIME'] = '${stringTableDualWhiteColorRampTime}'; +elvST['VIRTUAL_KEY'] = '${stringTableVirtualKeyTitle}'; +elvST['VIRTUAL_KEY|LEVEL'] = '${stringTableVirtualKeyLevel}'; +elvST['VOLTAGE'] = '${stringTableVoltage}'; +elvST['VOLTAGE_0'] = '${stringTableVoltage0}'; +elvST['VOLTAGE_100'] = '${stringTableVoltage100}'; +elvST['VOLTAGE_STATUS=NORMAL'] = '${lblValue} ${stringTableVoltage}: ${lblNormal}'; +elvST['VOLTAGE_STATUS=0'] = '${lblValue} ${stringTableVoltage}: ${lblNormal}'; +elvST['VOLTAGE_STATUS=OVERFLOW'] = '${lblValue} ${stringTableVoltage}: ${lblOverflow}'; +elvST['VOLTAGE_STATUS=1'] = '${lblValue} ${stringTableVoltage}: ${lblOverflow}'; +elvST['VOLTAGE_STATUS=UNDERFLOW'] = '${lblValue} ${stringTableVoltage}: ${lblUnderflow}'; +elvST['VOLTAGE_STATUS=2'] = '${lblValue} ${stringTableVoltage}: ${lblUnderflow}'; +elvST['VOLTAGE_STATUS=UNKNOWN'] = '${lblValue} ${stringTableVoltage}: ${lblUnknown}'; +elvST['VOLTAGE_STATUS=3'] = '${lblValue} ${stringTableVoltage}: ${lblUnknown}'; +elvST['VOLUME_0'] = '{stringTableVolume0}'; +elvST['VOLUME_10'] = '{stringTableVolume1}'; +elvST['VOLUME_100$'] = '{stringTableVolume10}'; +elvST['VOLUME_20'] = '{stringTableVolume2}'; +elvST['VOLUME_30'] = '{stringTableVolume3}'; +elvST['VOLUME_40'] = '{stringTableVolume4}'; +elvST['VOLUME_50'] = '{stringTableVolume5}'; +elvST['VOLUME_60'] = '{stringTableVolume6}'; +elvST['VOLUME_70'] = '{stringTableVolume7}'; +elvST['VOLUME_80'] = '{stringTableVolume8}'; +elvST['VOLUME_90'] = '{stringTableVolume9}'; +elvST['WAKEUP_BEHAVIOUR'] = '${stringTableButtonResponseWithoutChannelChooser}'; +elvST['WAKEUP_BEHAVIOUR_STATUS_MSG_CONFIRMATION'] = '${stringTableBehaviourStatusMsgConfirmation}'; +elvST['WAKEUP_BEHAVIOUR_STATUS_MSG_RESISTANCE'] = '${stringTableBehaviourStatusMsgResistance}'; +elvST['WAKEUP_BEHAVIOUR_STATUS_SIGNALIZATION_CONFIRMATION'] = '${stringTableBehaviourStatusSignalizationConfirmation}'; +elvST['WAKEUP_DEFAULT_CHANNEL'] = '${stringTableWakeupDefaultChannel}'; +elvST['WALLMOUNTED_THERMOSTAT'] = '${stringTableWallMountedThermostatTitle}'; +elvST['WATERDETECTIONSENSOR'] = '${stringTableWDSTitle}'; +elvST['WATERDETECTIONSENSOR|EVENT_FILTERTIME'] = '${stringTableWDSEventFilterTime}'; +elvST['WATERDETECTIONSENSOR|EVENT_FILTERTIME'] = '${stringTableWDSEventFilterTime}'; +elvST['WATERDETECTIONSENSOR|MSG_FOR_POS_A'] = '${stringTableWDSMsgPosA0}'; +elvST['WATERDETECTIONSENSOR|MSG_FOR_POS_A=DRY'] = '${stringTableWDSMsgPosA1}'; +elvST['WATERDETECTIONSENSOR|MSG_FOR_POS_A=NO_MSG'] = '${stringTableWDSMsgPosA2}'; +elvST['WATERDETECTIONSENSOR|MSG_FOR_POS_B'] = '${stringTableWDSMsgPosB0}'; +elvST['WATERDETECTIONSENSOR|MSG_FOR_POS_B=DRY'] = '${stringTableWDSMsgPosB1}'; +elvST['WATERDETECTIONSENSOR|MSG_FOR_POS_B=NO_MSG'] = '${stringTableWDSMsgPosB2}'; +elvST['WATERDETECTIONSENSOR|MSG_FOR_POS_B=WATER'] = '${stringTableWDSMsgPosB3}'; +elvST['WATERDETECTIONSENSOR|MSG_FOR_POS_B=WET'] = '${stringTableWDSMsgPosB4}'; +elvST['WATERDETECTIONSENSOR|MSG_FOR_POS_C'] = '${stringTableWDSMsgPosC0}'; +elvST['WATERDETECTIONSENSOR|MSG_FOR_POS_C=NO_MSG'] = '${stringTableWDSMsgPosC1}'; +elvST['WATERDETECTIONSENSOR|MSG_FOR_POS_C=WATER'] = '${stringTableWDSMsgPosC2}'; +elvST['WATERDETECTIONSENSOR|MSG_FOR_POS_C=WET'] = '${stringTableWDSMsgPosC3}'; +elvST['WATERDETECTIONSENSOR|STATE=DRY'] = '${stringTableWDSStateDry}'; +elvST['WATERDETECTIONSENSOR|STATE=WATER'] = '${stringTableWDSStateWater}'; +elvST['WATER_DETECTION_TRANSMITTER'] = '${stringTableWaterDetectionTransmitterTitle}'; +elvST['WATER_DETECTION_TRANSMITTER|ALARMSTATE=FALSE'] = '${stringTableWeatherTransmitAlarmEventFalse}'; +elvST['WATER_DETECTION_TRANSMITTER|ALARMSTATE=TRUE'] = '${stringTableWeatherTransmitAlarmEventTrue}'; +elvST['WATERDETECTIONSENSOR|STATE=WET'] = '${stringTableWDSStateWet}'; +elvST['WATERLEVEL_DETECTED=TRUE'] = '${stringTableWaterLevelDetectedTrue}'; +elvST['WATERLEVEL_DETECTED=FALSE'] = '${stringTableWaterLevelDetectedFalse}'; +elvST['WEATHER'] = '${stringTableWeatherTitle}'; +elvST['WEATHER_RECEIVER'] = '${stringTableWeatherReceiver}'; +elvST['WEATHER_TRANSMIT|ALARMSTATE=FALSE'] = '${stringTableWeatherTransmitAlarmEventFalse}'; +elvST['WEATHER_TRANSMIT|ALARMSTATE=TRUE'] = '${stringTableWeatherTransmitAlarmEventTrue}'; +elvST['WEATHER_TRANSMIT|HUMIDITY'] = '${stringTableWeatherHumidity}'; +elvST['WEATHER_TRANSMIT|TEMPERATURE'] = '${stringTableWeatherTemperature}'; +elvST['# WEATHER SENSOR'] = ''; +elvST['AIR_PRESSURE'] = '${stringTableWeatherAirPressure}'; +elvST['BRIGHTNESS'] = '${stringTableWeatherBrightness}'; +elvST['RAINING'] = '${stringTableWeatherRaining}'; +elvST['RAINING=FALSE'] = '${stringTableWeatherRainingFalse}'; +elvST['RAINING=TRUE'] = '${stringTableWeatherRainingTrue}'; +elvST['RAIN_COUNTER'] = '${stringTableWeatherRainCounter}'; +elvST['RAIN_COUNTER_OVERFLOW=TRUE'] = '${stringTableWeatherRainCounterOverflowTrue}'; +elvST['RAIN_COUNTER_OVERFLOW=FALSE'] = '${stringTableWeatherRainCounterOverflowFalse}'; +elvST['RAIN_COUNTER_STATUS=NORMAL'] = '${lblValue} ${stringTableWeatherRainCounter}: ${lblNormal}'; +elvST['RAIN_COUNTER_STATUS=0'] = '${lblValue} ${stringTableWeatherRainCounter}: ${lblNormal}'; +elvST['RAIN_COUNTER_STATUS=UNKNOWN'] = '${lblValue} ${stringTableWeatherRainCounter}: ${lblUnknown}'; +elvST['RAIN_COUNTER_STATUS=1'] = '${lblValue} ${stringTableWeatherRainCounter}: ${lblUnknown}'; +elvST['STORM_LOWER_THRESHOLD'] = '${stringTableWeatherStormLowerThres}'; +elvST['STORM_UPPER_THRESHOLD'] = '${stringTableWeatherStormUpperThres}'; +elvST['SUNSHINEDURATION'] = '${stringTableWeatherSunshineDuration}'; +elvST['SUNSHINEDURATION_OVERFLOW=FALSE'] = '${stringTableWeatherSunshineDurationOverflowFalse}'; +elvST['SUNSHINEDURATION_OVERFLOW=TRUE'] = '${stringTableWeatherSunshineDurationOverflowTrue}'; +elvST['SUNSHINE_THRESHOLD'] = '${stringTableWeatherSunshineThres}'; +elvST['SUNSHINE_THRESHOLD_OVERRUN'] = '${stringTableWeatherSunshineThresOverrunTitle}'; +elvST['SUNSHINE_THRESHOLD_OVERRUN=FALSE'] = '${stringTableWeatherSunshineThresOverrunFalse}'; +elvST['SUNSHINE_THRESHOLD_OVERRUN=TRUE'] = '${stringTableWeatherSunshineThresOverrunTrue}'; +elvST['TEMPERATURE'] = '${stringTableWeatherTemperature}'; +elvST['WIND_DIR'] = '${stringTableWeatherWindDir}'; +elvST['WIND_DIR_STATUS=NORMAL'] = '${lblValue} ${stringTableWeatherWindDir}: ${lblNormal}'; +elvST['WIND_DIR_STATUS=0'] = '${lblValue} ${stringTableWeatherWindDir}: ${lblNormal}'; +elvST['WIND_DIR_STATUS=UNKNOWN'] = '${lblValue} ${stringTableWeatherWindDir}: ${lblUnknown}'; +elvST['WIND_DIR_STATUS=1'] = '${lblValue} ${stringTableWeatherWindDir}: ${lblUnknown}'; +elvST['WIND_DIRECTION'] = '${stringTableWeatherWindDir}'; +elvST['WIND_DIR_RANGE'] = '${stringTableWeatherWindDirRange}'; +elvST['WIND_DIR_RANGE_STATUS=NORMAL'] = '${lblValue} ${stringTableWeatherWindDirRange}: ${lblNormal}'; +elvST['WIND_DIR_RANGE_STATUS=0'] = '${lblValue} ${stringTableWeatherWindDirRange}: ${lblNormal}'; +elvST['WIND_DIR_RANGE_STATUS=UNKNOWN'] = '${lblValue} ${stringTableWeatherWindDirRange}: ${lblUnknown}'; +elvST['WIND_DIR_RANGE_STATUS=1'] = '${lblValue} ${stringTableWeatherWindDirRange}: ${lblUnknown}'; +elvST['WIND_DIR_RANGE_STATUS=OVERFLOW'] = '${lblValue} ${stringTableWeatherWindDirRange}: ${lblOverflow}'; +elvST['WIND_DIR_RANGE_STATUS=2'] = '${lblValue} ${stringTableWeatherWindDirRange}: ${lblOverflow}'; +elvST['WIND_DIRECTION_RANGE'] = '${stringTableWeatherWindDirRange}'; +elvST['WIND_SPEED'] = '${stringTableWeatherWindSpeed}'; +elvST['WIND_SPEED_STATUS=NORMAL'] = '${lblValue} ${stringTableWeatherWindSpeed}: ${lblNormal}'; +elvST['WIND_SPEED_STATUS=0'] = '${lblValue} ${stringTableWeatherWindSpeed}: ${lblNormal}'; +elvST['WIND_SPEED_STATUS=UNKNOWN'] = '${lblValue} ${stringTableWeatherWindSpeed}: ${lblUnknown}'; +elvST['WIND_SPEED_STATUS=1'] = '${lblValue} ${stringTableWeatherWindSpeed}: ${lblUnknown}'; +elvST['WIND_SPEED_STATUS=OVERFLOW'] = '${lblValue} ${stringTableWeatherWindSpeed}: ${lblOverflow}'; +elvST['WIND_SPEED_STATUS=2'] = '${lblValue} ${stringTableWeatherWindSpeed}: ${lblOverflow}'; +elvST['WIND_SPEED_RESULT_SOURCE'] = '${stringTableWeatherWindSpeedResultSource}'; +elvST['WIND_SPEED_RESULT_SOURCE=AVERAGE_VALUE'] = '${stringTableWeatherWindSpeedResultSourceAverage}'; +elvST['WIND_SPEED_RESULT_SOURCE=MAX_VALUE'] = '${stringTableWeatherWindSpeedResultSourceMax}'; +elvST['WIND_THRESHOLD_OVERRUN=FALSE'] = '${stringTableWeatherWindThresholdOverrunFalse}'; +elvST['WIND_THRESHOLD_OVERRUN=TRUE'] = '${stringTableWeatherWindThresholdOverrunTrue}'; +elvST['# END WEATHER SENSOR'] = ''; +elvST['WEEK_PROGRAM_CHANNEL_LOCKS'] = '${stringTableWeekProgramChannelLocks}'; +elvST['WEEK_PROGRAM_TARGET_CHANNEL_LOCKS'] = '${stringTableWeekProgramTargetChannelLocks}'; +elvST['WEEK_PROGRAM_TARGET_CHANNEL_LOCK=MANU_MODE'] = '${stringTableWeekProgramTargetChannelLockManu}'; +elvST['WEEK_PROGRAM_TARGET_CHANNEL_LOCK=AUTO_MODE_WITH_RESET'] = '${stringTableWeekProgramTargetChannelLockAutoReset}'; +elvST['WEEK_PROGRAM_TARGET_CHANNEL_LOCK=AUTO_MODE_WITHOUT_RESET'] = '${stringTableWeekProgramTargetChannelLockAuto}'; +elvST['WHITE'] = '${stringTableColorTemperature}'; +elvST['WINDOW_DRIVE_RECEIVER'] = '${stringTableDoorWindowDriveReceiverTitle}'; +elvST['WINDOW_DRIVE_RECEIVER|STOP'] = '${stringTableDoorCommandStop}'; +elvST['WINDOW_DRIVE_RECEIVER|LEVEL=NO_VENTILATION'] = '${stringTableWindowStateClosed}'; +elvST['WINDOW_DRIVE_RECEIVER|LEVEL=VENTILATION'] = '${stringTableWindowStateOpen}'; +elvST['WINDOW_OPEN_REPORTING'] = '${stringTableWindowOpenReporting}'; +elvST['WINDOW_OPEN_REPORTING=FALSE'] = '${stringTableWindowOpenReportingFalse}'; +elvST['WINDOW_OPEN_REPORTING=TRUE'] = '${stringTableWindowOpenReportingTrue}'; +elvST['WINDOW_STATE'] = '${stringTableWindowState}'; +elvST['WINDOW_SWITCH_RECEIVER'] = '${stringTableWindowSwitchReceiver}'; +elvST['WINMATIC'] = '${stringTableWinMaticTitle}'; +elvST['WINMATIC|ERROR=MOTOR_TILT_ERROR'] = '${stringTableWinMaticErrorMotorTilt}'; +elvST['WINMATIC|ERROR=MOTOR_TURN_ERROR'] = '${stringTableWinMaticErrorMotorTurn}'; +elvST['WINMATIC|LEVEL'] = '${stringTableWinMaticLevel}'; +elvST['WINMATIC|LEVEL=LOCKED'] = '${stringTableWinMaticLevelLocked}'; +elvST['WINMATIC|MOUNT_SIDE'] = '${stringTableWinMaticMountSide}'; +elvST['WINMATIC|MOUNT_SIDE=LEFT'] = '${stringTableWinMaticMountSideLeft}'; +elvST['WINMATIC|MOUNT_SIDE=RIGHT'] = '${stringTableWinMaticMountSideRight}'; +elvST['WINMATIC|PULL_FORCE'] = '${stringTableWinMaticPullForce}'; +elvST['WINMATIC|PUSH_FORCE'] = '${stringTableWinMaticPushForce}'; +elvST['WINMATIC|RELOCK_DELAY'] = '${stringTableWinMaticReLockDelay}'; +elvST['WINMATIC|RELOCK_DELAY=NOT_USED'] = '${stringTableWinMaticReLockDelayNotUsed}'; +elvST['WINMATIC|SPEED'] = '${stringTableWinMaticSpeed}'; +elvST['WINMATIC|STATE_UNCERTAIN=FALSE'] = '${stringTableWinMaticStateUncertainFalse}'; +elvST['WINMATIC|STATE_UNCERTAIN=TRUE'] = '${stringTableWinMaticStateUncertainTrue}'; +elvST['WINMATIC|STOP'] = '${stringTableWinMaticStop}'; +elvST['WINMATIC|TILT_MAX'] = '${stringTableWinMaticTiltMax}'; +elvST['WP_OPTIONS=NOP'] = '${stringTableWPOptionsNop}'; +elvST['WP_OPTIONS=OFF'] = '${stringTableWPOptionsOff}'; +elvST['WP_OPTIONS=ON'] = '${stringTableWPOptionsOn}'; +elvST['WS_CS'] = '${stringTableWSCS}'; +elvST['WS_TH'] = '${stringTableWSTH}'; +elvST['minutes'] = '${stringTableMinute}'; +elvST['15Min'] = '${optionUnit15M}'; +elvST['30Min'] = '${optionUnit30M}'; +elvST['60Min'] = '${optionUnit60M}'; +elvST['120Min'] = '${optionUnit120M}'; +elvST['ACTIVITY_STATE=DOWN'] = '${stringTableActivityStateDown}'; +elvST['ACTIVITY_STATE=UNKNOWN'] = '${stringTableActivityStateUnknown}'; +elvST['ACTIVITY_STATE=UP'] = '${stringTableActivityStateUp}'; +elvST['ACTIVITY_STATE=STABLE'] = '${stringTableActivityStable}'; +elvST['COLOR_TEMPERATURE'] = '${optionColorTemperature}'; +elvST['HUE'] = '${optionHue}'; +elvST['SATURATION'] = '${optionSaturation}'; +elvST['SOUNDFILE=INTERNAL_SOUNDFILE'] = '${stringTableInternalSoundFile}'; +elvST['SOUNDFILE=RANDOM_SOUNDFILE'] = '${stringTableRandomSoundFile}'; +elvST['SOUNDFILE=OLD_VALUE'] = '${stringTableOldValueSoundFile}'; +elvST['SOUNDFILE=DO_NOT_CARE'] = '${stringTableDoNotCareSoundFile}'; +elvST['MASS_CONCENTRATION_PM_1'] = '${stringTableMassConc10}'; +elvST['MASS_CONCENTRATION_PM_1_STATUS=NORMAL'] = '${stringTableMassConc10} ${lblStatus} ${lblNormal}'; +elvST['MASS_CONCENTRATION_PM_1_STATUS=UNKNOWN'] = '${stringTableMassConc10} ${lblStatus} ${lblUnknown}'; +elvST['MASS_CONCENTRATION_PM_1_STATUS=OVERFLOW'] = '${stringTableMassConc10} ${lblStatus} ${lblOverflow}'; +elvST['MASS_CONCENTRATION_PM_1_24H_AVERAGE'] = '${stringTableMassConc10} ${lbl24Average}'; +elvST['MASS_CONCENTRATION_PM_1_24H_AVERAGE_STATUS=NORMAL'] = '${stringTableMassConc10} ${lbl24Average} ${lblStatus} ${lblNormal}'; +elvST['MASS_CONCENTRATION_PM_1_24H_AVERAGE_STATUS=UNKNOWN'] = '${stringTableMassConc10} ${lbl24Average} ${lblStatus} ${lblUnknown}'; +elvST['MASS_CONCENTRATION_PM_1_24H_AVERAGE_STATUS=OVERFLOW'] = '${stringTableMassConc10} ${lbl24Average} ${lblStatus} ${lblOverflow}'; +elvST['MASS_CONCENTRATION_PM_2_5'] = '${stringTableMassConc25}'; +elvST['MASS_CONCENTRATION_PM_2_5_STATUS=NORMAL'] = '${stringTableMassConc25} ${lblStatus} ${lblNormal}'; +elvST['MASS_CONCENTRATION_PM_2_5_STATUS=UNKNOWN'] = '${stringTableMassConc25} ${lblStatus} ${lblUnknown}'; +elvST['MASS_CONCENTRATION_PM_2_5_STATUS=OVERFLOW'] = '${stringTableMassConc25} ${lblStatus} ${lblOverflow}'; +elvST['MASS_CONCENTRATION_PM_2_5_24H_AVERAGE'] = '${stringTableMassConc25} ${lbl24Average}'; +elvST['MASS_CONCENTRATION_PM_2_5_24H_AVERAGE_STATUS=NORMAL'] = '${stringTableMassConc25} ${lbl24Average} ${lblStatus} ${lblNormal}'; +elvST['MASS_CONCENTRATION_PM_2_5_24H_AVERAGE_STATUS=UNKNOWN'] = '${stringTableMassConc25} ${lbl24Average} ${lblStatus} ${lblUnknown}'; +elvST['MASS_CONCENTRATION_PM_2_5_24H_AVERAGE_STATUS=OVERFLOW'] = '${stringTableMassConc25} ${lbl24Average} ${lblStatus} ${lblOverflow}'; +elvST['MASS_CONCENTRATION_PM_10'] = '${stringTableMassConc100}'; +elvST['MASS_CONCENTRATION_PM_10_STATUS=NORMAL'] = '${stringTableMassConc100} ${lblStatus} ${lblNormal}'; +elvST['MASS_CONCENTRATION_PM_10_STATUS=UNKNOWN'] = '${stringTableMassConc100} ${lblStatus} ${lblUnknown}'; +elvST['MASS_CONCENTRATION_PM_10_STATUS=OVERFLOW'] = '${stringTableMassConc100} ${lblStatus} ${lblOverflow}'; +elvST['MASS_CONCENTRATION_PM_10_24H_AVERAGE'] = '${stringTableMassConc100} ${lbl24Average}'; +elvST['MASS_CONCENTRATION_PM_10_24H_AVERAGE_STATUS=NORMAL'] = '${stringTableMassConc100} ${lbl24Average} ${lblStatus} ${lblNormal}'; +elvST['MASS_CONCENTRATION_PM_10_24H_AVERAGE_STATUS=UNKNOWN'] = '${stringTableMassConc100} ${lbl24Average} ${lblStatus} ${lblUnknown}'; +elvST['MASS_CONCENTRATION_PM_10_24H_AVERAGE_STATUS=OVERFLOW'] = '${stringTableMassConc100} ${lbl24Average} ${lblStatus} ${lblOverflow}'; +elvST['NUMBER_CONCENTRATION_PM_1'] = '${stringTableNumberConc10}'; +elvST['NUMBER_CONCENTRATION_PM_1_STATUS=NORMAL'] = '${stringTableNumberConc10} ${lblStatus} ${lblNormal}'; +elvST['NUMBER_CONCENTRATION_PM_1_STATUS=UNKNOWN'] = '${stringTableNumberConc10} ${lblStatus} ${lblUnknown}'; +elvST['NUMBER_CONCENTRATION_PM_1_STATUS=OVERFLOW'] = '${stringTableNumberConc10} ${lblStatus} ${lblOverflow}'; +elvST['NUMBER_CONCENTRATION_PM_2_5'] = '${stringTableNumberConc25}'; +elvST['NUMBER_CONCENTRATION_PM_2_5_STATUS=NORMAL'] = '${stringTableNumberConc25} ${lblStatus} ${lblNormal}'; +elvST['NUMBER_CONCENTRATION_PM_2_5_STATUS=UNKNOWN'] = '${stringTableNumberConc25} ${lblStatus} ${lblUnknown}'; +elvST['NUMBER_CONCENTRATION_PM_2_5_STATUS=OVERFLOW'] = '${stringTableNumberConc25} ${lblStatus} ${lblOverflow}'; +elvST['NUMBER_CONCENTRATION_PM_10'] = '${stringTableNumberConc100}'; +elvST['NUMBER_CONCENTRATION_PM_10_STATUS=NORMAL'] = '${stringTableNumberConc100} ${lblStatus} ${lblNormal}'; +elvST['NUMBER_CONCENTRATION_PM_10_STATUS=UNKNOWN'] = '${stringTableNumberConc100} ${lblStatus} ${lblUnknown}'; +elvST['NUMBER_CONCENTRATION_PM_10_STATUS=OVERFLOW'] = '${stringTableNumberConc100} ${lblStatus} ${lblOverflow}'; +elvST['TYPICAL_PARTICLE_SIZE'] = '${stringTableTypicalParticelSize}'; +elvST['TYPICAL_PARTICLE_SIZE_STATUS=NORMAL'] = '${stringTableTypicalParticelSize} ${lblStatus} ${lblNormal}'; +elvST['TYPICAL_PARTICLE_SIZE_STATUS=UNKNOWN'] = '${stringTableTypicalParticelSize} ${lblStatus} ${lblUnknown}'; +elvST['TYPICAL_PARTICLE_SIZE_STATUS=OVERFLOW'] = '${stringTableTypicalParticelSize} ${lblStatus} ${lblOverflow}'; +/* +Übersetzt den Inhalt der HTML-Elemente ... +und +*/ +st_setStringTableValues = function() +{ + var translation; + + //In ... eingeschlossene Wörter übersetzen + var temp = document.getElementsByClassName('stringtable_value'); + + var wrappers = new Array(); + for (var i=0; i... + var temp = document.getElementsByClassName('stringtable_select'); + + var selboxes = new Array(); + for (var i = 0, len = temp.length; i < len; i++) + { + selboxes[i] = temp[i]; + } + + for (var i=0; i + var temp = document.getElementsByClassName('stringtable_input'); + + var input = new Array(); + for (var i = 0, len = temp.length; i < len; i++) + { + input[i] = temp[i]; + } + + for (var i = 0; i < input.length; i ++) + { + input[i].value = st_getValue(input[i].value).escapeHTML(); + input[i].className += "_translated"; + } + +}; + +//Eingabeparameter +//context: |(=)? +//context: | +//context: +//Rückgabeparameter: +//return: übersetzung, wenn context gefunden in den Spezialisierungsgraden: +// 1. |(=)? +// 2. | +// 3. +// sonst: value, wenn value aus dem context extrahiert werden kann +// sonst: context wird wieder zurückgegeben. +st_getValue = function(context) +{ + var translation; + var tokens; + var channel_type; + var value_id_assign; //Inhalt: = + var value_id; + var value; + + //Voller context vorhanden?========================================= + translation = elvST[context]; + + if (translation && translation != "") return translation; + //================================================================== + + //Gibt es einen Eintrag nur mit value_id_assign?==================== + tokens = context.split('|'); + value_id_assign = ""; + + if (tokens.length > 1) + { + //channel_type = tokens[0]; + value_id_assign = tokens[1]; + translation = elvST[ value_id_assign ]; + if (translation && translation != "") return translation; + } + //================================================================== + + //Gibt es einen Eintrag nur mit dem Variablennamen?================= + tokens = context.split('='); + value = ""; + + if (tokens.length > 1) + { + //value_id = tokens[0]; + value = tokens[1]; + translation = elvST[ value ]; + if (translation && translation != "") return translation; + else if (value && value != "") return value; + } + //================================================================== + + //Gibt es einen Eintrag im INPUT-Feld?============================== + + tokens = context.split(" "); + translation = ""; + + for (var i = 0; i < tokens.length; i++) + { + if (typeof elvST[tokens[i]] != 'undefined') + { + tokens[i] = elvST[tokens[i]]; + } + translation += tokens[i] + " "; + } + if (translation && translation != "") return translation; + //================================================================== + + if (value_id_assign && value_id_assign != "") return value_id_assign; + else return context; +}; +/** + * expand.js + * JavaScript Erweiterungen. + **/ + +Singleton = { + create: function(base, members) + { + var _members = ""; + if (typeof(members) != "undefined") { var _members = members; } + var singleton = Class.create(base, _members); + return new singleton(); + } +}; + +Interface = { + + /** + * Erstellt eine neue Schnittstelle + **/ + create: function(members) + { + return members; + }, + + /** + * Prüft, ob ein Objekt eine spezielle Schnittstelle implementiert + **/ + isImplemented: function(obj, iface) + { + for (name in iface) + { + if (typeof(obj[name]) == "undefined") { return false; } + } + return true; + } + +}; + +Array.prototype.ex_joinItem = function(name, separator) +{ + var _separator = " "; + var result = ""; + + if (typeof(separator) != "undefined") { _separator = separator; } + + if (0 < this.length) + { + result = this[0][name]; + for (var i = 1, len = this.length; i < len; i++) + { + result += separator + this[i][name]; + } + } + + return result; +}; + +/** + * Wie join, nur dass jeweils eine Eigenschaft verkettet wird + **/ +Array.prototype.ex_joinProperty = function(name, separator) +{ + var _separator = " "; + var result = ""; + + if (typeof(separator) != "undefined") { _separator = separator; } + + if (0 < this.length) + { + result = this[0][name](); + for (var i = 1, len = this.length; i < len; i++) + { + result += separator + this[i][name](); + } + } + + return result; +}; + +/** + * Sortiert ein Array anhand eines Elements + * name: Bezeichnung des Elements + * sortReverse: Optional. Dreht die Sortierreihenfolge um + **/ +Array.prototype.ex_sortBy = function(name, sortReverse) +{ + this.sort(function(a,b) { return Object.ex_compare(a[name], b[name]); }); + if (sortReverse) { this.reverse(); } + + return this; +}; + +/** + * Sortiert eine Array anhand einer Eigenschaft + * name: Bezeichnung der Eigenschaft + * sortReverse: Optional. Dreht die Sortierreihenfolge um + **/ +Array.prototype.ex_sortByProperty = function(name, sortReverse) +{ + this.sort(function(a, b) { return Object.ex_compare(a[name](), b[name]()); }); + if (sortReverse) { this.reverse(); } + + return this; +}; + +/** + * Vergleicht zwei Objekte + **/ +Object.ex_compare = function(objA, objB) +{ + if (typeof(objA.ex_compareTo) != "undefined") { return objA.ex_compareTo(objB); } + else { return 0; } +}; + +/** + * Vergleicht eine Zahl mit einer anderen + **/ +Number.prototype.ex_compareTo = function(other) +{ + if (typeof(other) == "number") { return (this - other); } + else { return 0; } +}; + +/** + * Vergleicht zwei Zeichenketten (case-insensitiv) + **/ +String.prototype.ex_compareTo = function(other) +{ + if (typeof(other) == "string") + { + var strA = this.toLowerCase(); + var strB = other.toLowerCase(); + + return strA.localeCompare(strB, undefined, {numeric: true, sensitivity: 'base'}); + } + + return 0; +}; + +/** + * Ermittelt, ob ein Element in einem Array vorhanden ist + **/ +Array.prototype.ex_contains = function(item) +{ + return (0 <= this.indexOf(item)); +}; + +/** + * Fügt einem Array ein Element hinzu, falls + * dieses noch nicht enthalten ist. + **/ +Array.prototype.ex_pushUnique = function(item) +{ + if (!this.ex_contains(item)) { this.push(item); } + return this; +}; + +String.prototype.reverse = function () { + var result = ""; + for (var i = (this.length-1); i >= 0 ; i--) { + result += this[i]; + } + return result; +};/******************************************************************************* + * xmlhttprequest.js + * Browserunabhängiger Zugriff auf das XMLHttpRequest-Objekt. + * + * Autor : Falk Werner + * Erstellt am: 04.06.2008 + ******************************************************************************/ + +/*############################################################################*/ +/*# Funktionen #*/ +/*############################################################################*/ + +/******************************************************************************* + * XMLHttpRequest_create () + * Erstellt browserunabhängig ein neuen XMLHttpRequest-Objekt. + * + * Dieser Code wurde inspiriert von folgendem Buch: + * Titel : Ajax - schnell und kompakt + * Autor : Christian Wenz + * Verlag: entwickler.press (Software & Support verlag GmbH) + * ISBN : 978-3-939084-81-5 + ******************************************************************************/ +XMLHttpRequest_create = function () +{ + var xmlHttp = null; + + if ( window.XMLHttpRequest ) + { + xmlHttp = new XMLHttpRequest(); + } + else if ( window.ActiveXObject ) + { + try + { + xmlHttp = new ActiveXObject("Msxml2.XMLHTTP"); + } + catch (ex) + { + try + { + xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); + } + catch (ex) + { + // leer + } + } + } + + return xmlHttp; +}; + +/******************************************************************************* + * XMLHttpRequest_supported () + * Prüft, ob das XMLHttpRequest-Objekt verfügbar ist. + * + * Rückgabe: + * true - Das XMLHttpRequest-Objekt ist verfügbar. + * false - Das XMLHttpRequest-Objekt ist NICHT verfügbar. + ******************************************************************************/ +XMLHttpRequest_supported = function () +{ + var request = XMLHttpRequest_create(); + + if (null !== xmlHttpRequest) { return true; } + else { return false; } +}; +/** + * httploader.js + **/ + +/** + * Lädt XML- bzw Textdateien synchron. + **/ +HttpLoader = new function() +{ + /*####################*/ + /*# Private Elemente #*/ + /*####################*/ + + /** + * Lädt synchron Daten und gibt das XMLHttpRequest-Objekt zurück. + **/ + var load = function(method, url, data) + { + var xhr = XMLHttpRequest_create(); + + if (null !== xhr) + { + xhr.open(method, url, false); + xhr.send(data); + if ((xhr.status != 200) && (xhr.status !== 0)) { xhr = null; } + } + + return xhr; + }; + + /*########################*/ + /*# Öffentliche Elemente #*/ + /*########################*/ + + /** + * Lädt einen Text synchron. + **/ + this.getText = function(url) + { + var xhr = load("GET", url, null); + + if (null !== xhr) { return xhr.responseText; } + else { return ""; } + }; + + /** + * Lädt ein XML-Dokument synchron. + **/ + this.getXML = function(url) + { + var xhr = load("GET", url, null); + + if (null !== xhr) { return xhr.responseXML; } + else { return null; } + }; + +}(); +/** + * eq3.js + **/ + +/** + * Namensraum eQ3 + **/ +eQ3 = {}; + +/** + * Singleton für systemweite Hilfsfunktionen + **/ +eQ3.system = { + + MAX_OBJECT_ID: 1000000, //< größte Id, die ein Objekt haben kann + + m_objects: {}, //< Enthält alle registierten Objekte + m_id: 0, //< vorgeschlagene Id für das nächste Objekt + m_objectCount: 0, //< Aktuelle Anzahl der registrieten Objekte (zu Debug-Zwecken) + + /** + * @fn m_getNextFreeId + * @brief Liefert die nächste freie Id, die einem Objekt zugewiesen + * werden kann. + **/ + m_getNextFreeId: function() + { + var MAX_OBJECT_ID = eQ3.system.MAX_OBJECT_ID; + var objects = eQ3.system.m_objects; + var id = eQ3.system.m_id; + var count = 0; + + while ( typeof(objects[id]) != "undefined" ) + { + id++; + if (id > MAX_OBJECT_ID) { id = 0; } + + count++; + if (count > MAX_OBJECT_ID) { throw new Error("max. object count reached"); } + } + + if (id < MAX_OBJECT_ID) { eQ3.system.m_id = id + 1; } + else { eQ3.system.m_id = 0; } + + return id; + }, + + /** + * @fn registerObject + * @brief Weist einem Objekt eine Id zu, über die es angesprochen werden kann + */ + registerObject: function(object) + { + var id = eQ3.system.m_getNextFreeId(); + eQ3.system.m_objects[id] = object; + eQ3.system.m_objectCount++; + + return id; + }, + + /** + * @fn unregisterObject + * @brief Gibt eine Objekt-Id frei. + **/ + unregisterObject: function(id) + { + if ( typeof(eQ3.system.m_objects[id]) != "undefined" ) + { + eQ3.system.m_objects[id] = undefined; + eQ3.system.m_objectCount--; + } + }, + + /** + * @fn getObjectById + * @brief liefert ein registriertes Objekt anhand seiner Id. + **/ + getObjectById: function(id) + { + return eQ3.system.m_objects[id]; + } + +}; + +/** + * @fn $o + * @brief Shortcut für eq3.system.getObjectById + **/ +$o = eQ3.system.getObjectById; + + +/** + * Klasse für allgemeine Ereignisse + **/ +eQ3.Event = Class.create({ + + /** + * Konstruktor. Erstellt ein neues Ereignis. + **/ + initialize: function() + { + this.reset(); + }, + + /** + * Fügt einen neuen Event-Listener hinzu. + * Falls ein Listener bereits existiert, wird er kein zweites Mal hinzugefügt. + **/ + add: function(listener) + { + if (!this.m_listeners.ex_contains(listener)) + { + this.m_listeners.push(listener); + } + return this; + }, + + /** + * Entfernt einen Event-Listener. + **/ + remove: function(listener) + { + this.m_listeners = this.m_listeners.without(listener); + return this; + }, + + /** + * Löst das Ereinigs aus + **/ + fire: function(source, event) + { + var listeners = this.m_listeners.clone(); + listeners.each(function(listener) { listener(source, event); }); + return this; + }, + + /** + * Setzt das Ereignis zurück. + * Löscht alle angemeldeten Event-Handler. + **/ + reset: function() + { + this.m_listeners = []; + return this; + } + +}); +/** + * debug.js + **/ + +/** + * Debug-Schnittstelle + **/ +Debug = Singleton.create({ + isEnabled: true, + + /** + * Wirft eine Exception, falls eine Zusicherung nicht + * eingehalten werden kann. + **/ + assert: function(expression, message) + { + if (true !== expression) + { + if (typeof(message) != "undefined") { throw new Error("assertion failed: " + message); } + else { throw new Error("assertions failed"); } + } + } +}); +/** + * jsonrpc.js + * JSON-RPC + * + * JSON-RPC Spezifikation: http://json-rpc.org/wiki/specification + * + * Autor: Falk Werner + **/ + +/** + * Allgemeine JSON-RPC Fehler + **/ +JSONRPC_ERROR = +{ + INVALID_JSON: + { + "result": null, + "error" : {"code": 200, "text": "invalid response"}, + "id" : null + } +}; + +/** + * + **/ +jsonrpc_check = function(response) +{ + if ((null === response) || + ("undefined" == typeof(response["result"])) || + ("undefined" == typeof(response["error"]))) + { + response = JSONRPC_ERROR.INVALID_JSON; + } + + return response; +}; + +/** + * JSON-RPC Aufruf. + * Falls der Parameter callback nicht angegeben ist, handelt es sich um + * einen asynchronen Aufruf. + **/ +jsonrpc = function(url, method, params, callback) +{ + if (typeof(callback) != "undefined") { return jsonrpc_async(url, method, params, callback); } + else { return jsonrpc_sync(url, method, params); } +}; + +/** + * Asynchroner JSON-RPC Aufruf. + **/ +jsonrpc_async = function(url, method, params, callback) +{ + var user_callback = callback; + var xhr = XMLHttpRequest_create(); + + xhr.open("POST", url, true); + xhr.setRequestHeader("Content-Type", "application/json"); + xhr.onreadystatechange = function() + { + if (4 == xhr.readyState) + { + var result = null; + if ((0 === xhr.status) || (200 == xhr.status)) + { + try { result = eval("(" + xhr.responseText + ")"); } + catch (ex) { result = null; } + } + if (user_callback) { user_callback(jsonrpc_check(result)); } + } + }; + xhr.send(Object.toJSON({"version": "1.1", "method": method, "params": params })); + + return true; +}; + +/** + * Sychroner JSON-RPC Aufruf. + **/ +jsonrpc_sync = function(url, method, params) +{ + var result = null; + var xhr = XMLHttpRequest_create(); + + xhr.open("POST", url, false); + xhr.setRequestHeader("Content-Type", "application/json"); + xhr.send(Object.toJSON({"version": "1.1", "method": method, "params": params })); + if ((0 === xhr.status) || (200 == xhr.status)) + { + try { result = eval("(" + xhr.responseText + ")"); } + catch (ex) { result = null; } + } + return jsonrpc_check(result); +}; + +/** + * JSON-RPC Aufruf ohne Rückgabewert. + **/ +jsonrpc_notify = function(url, method, params) +{ + var xhr = XMLHttpRequest_create(); + xhr.open("POST", url, true); + xhr.setRequestHeader("Content-Type", "application/json"); + xhr.send(Object.toJSON({"version": "1.1", "method": method, "params": params})); +}; +function showSecurityDialog() { + + var fileSecHint = "/etc/config/userAckSecurityHint", + result = homematic('CCU.existsFile', {'file': fileSecHint}); + + if(! result) { + + var lang = getLang(); + + var url = "/pages/msg/securityFirstStart_"+lang+".htm"; + + var req = jQuery.ajax({ + url : url +"?sid=" + SessionId, + cache: false, + dataType: "html" + }); + + req.done(function(data) { + //new FirstSecurityDialog(translateKey("thSafetyNote"), translateKey("dialogSecurityFirstStart"), function (action) { + var dlg = new FirstSecurityDialog(translateKey("thSafetyNote"), data, function (action) { + /* + action can be + 0 - user selected NO + 1 - user selected YES + */ + if (action == 1) { + jQuery(".Layer0").show(); + homematic("CCU.setSecurityHint"); + if (getProduct() >= 3) { + WebUI.enter(StartPage); + new InstallWizard(); + } else { + WebUI.enter(StartPage); + } + } + }, "html"); + }); + + req.fail(function(data) { + conInfo("Security not available"); + }); + } +}; + +/** + * drag.js + * Drag & Drop + **/ + +Drag = function(element, event, callback) +{ + + var m_x = (document.all) ? window.event.clientX : event.pageX; + var m_y = (document.all) ? window.event.clientY : event.pageY; + var m_element = element; + var m_callback = callback; + var m_top = m_y - element.offsetTop; + var m_left = m_x - element.offsetLeft; + + /** + * Callback. Wird beim Bewegen der Maus aufgerufen + **/ + var onMouseMove = function(event) + { + m_x = (document.all) ? window.event.clientX : event.pageX; + m_y = (document.all) ? window.event.clientY : event.pageY; + + if (m_element !== null) + { + Element.setStyle(m_element, { + top : (m_y - m_top ) + "px", + left: (m_x - m_left) + "px" + }); + } + }; + + /** + * Callback. Wird beim Loslassen der Maus aufgerufen + **/ + var onMouseUp = function(event) + { + var x = (document.all) ? window.event.clientX : event.pageX; + var y = (document.all) ? window.event.clientY : event.pageY; + + Event.stopObserving(document, "mousemove", onMouseMove); + Event.stopObserving(document, "mouseip", onMouseUp); + + if (m_callback) { m_callback(m_element, x, y); } + }; + + Element.absolutize(m_element); + Element.setStyle(m_element, {marginTop: "0px", marginLeft: "0px"}); // BugFix: relativ positionierte Elemente werden über margin ausgerichtet, absolutize() setzz dies jedoch nicht zurück + Element.observe(document, "mousemove", onMouseMove); + Element.observe(document, "mouseup", onMouseUp); + +}; +/** + * configdata.js + **/ + +/** + * @fileOverview Daten für die Konfgurationsseiten + * @author F. Werner (eQ-3) + **/ + +ConfigData = Singleton.create({ + + initialize: function() + { + this.isPresent = false; + this.showMessage = false; + }, + + check: function(callback) + { + this.callback = callback; + if (this.isPresent === false) + { + this.isPresent = true; + new ConfigDataLoader(callback); + //this.configDataLoader.showMessage(); + //this.showMessage = true; + } + else + { + if (callback) { callback(); } + } + }, + + reload: function(callback) { + //var loader = new ConfigDataLoader(callback); + this.isPresent = false; + this.showMessage = true; + this.configDataLoader = new ConfigDataLoader(callback); + this.configDataLoader.showMessage(); + }, + + handleReloadDone: function() { + //Shall be called in callback function of reload function + this.isPresent = true; + if (this.showMessage) { this.configDataLoader.hideMessage(); } + }, + + + load: function() { + if ((typeof measureLoadingConfigData != "undefined") && (measureLoadingConfigData == true)) {console.log("Start ConfigDataLoader"); console.time(); } + this.configDataLoader = new ConfigDataLoader(function() { + if ((typeof measureLoadingConfigData != "undefined") && (measureLoadingConfigData == true)) {console.timeEnd(); } + conInfo("Config data ready to use"); + jQuery("#PagePath").css('color',"white"); + // With a CCU without devices the elem PagePath isn't available sometimes at this point, + // so the color doesn't change to white. The next line prevents that. + window.setTimeout(function() {jQuery("#PagePath").css('color',"white");},100); + ConfigData.isPresent = true; + if (ConfigData.showMessage) { this.hideMessage(); } + if (ConfigData.callback) { ConfigData.callback(); } + }); + }, + + destroy: function() + { + this.isPresent = false; + } + +}); + +ConfigDataLoader = Class.create({ + + initialize: function(callback) + { + var that = this; + + this.TASKLIST = [ + {name: "WEBUILOADER_DEVICES" , action: function() { DeviceList.reload(that); }}, + {name: "WEBUILOADER_ROOMS" , action: function() { RoomList.reload(that); }}, + {name: "WEBUILOADER_FUNCTIONS", action: function() { SubsectionList.reload(that); }} + ]; + this.m_currentTask = -1; + this.m_callback = callback; + this.ready(); + }, + + showMessage: function() { + var screenWidth = WebUI.getWidth(); + var screenHeight = WebUI.getHeight(); + var frameWidth = ConfigDataLoader.CONTENT_WIDTH; + var frameHeight = ConfigDataLoader.CONTENT_HEIGHT; + var frameX = parseInt((screenWidth - frameWidth ) / 2); + var frameY = parseInt((screenHeight - frameHeight) / 2); + + this.m_layer = document.createElement("div"); + this.m_layer.className = "DialogLayer"; + + this.m_frame = new UI.Frame() + .setTitle(translateKey('infoLoadConfigData')) + .setContentSize(frameWidth, frameHeight) + .setPosition(frameX, frameY) + .add(new UI.Text() + .setPosition(10, 10) + .setWidth(frameWidth - 10) + //.setHtml(ConfigDataLoader.CONTENT) + .setHtml("" + translateKey('infoLoadConfigDataPlsWait')) + ); + + this.m_layer.appendChild(this.m_frame.getElement()); + Layer.add(this.m_layer); + }, + + hideMessage: function() { + this.m_frame.dispose(); + Layer.remove(this.m_layer); + }, + + ready: function() + { + this.m_currentTask++; + if (this.m_currentTask < this.TASKLIST.length) + { + this.TASKLIST[this.m_currentTask].action(); + } + else + { + if (this.m_callback) { this.m_callback(); } + } + }, + + reportLoadingState: function(state) + { + var width = parseInt((this.m_currentTask + state) * 100); + //this.m_frame.setTitle(ConfigDataLoader.TITLE + " (" + width + "%)"); + this.m_frame.setTitle(translateKey('infoLoadConfigData') + " (" + width + "%)"); + } + +}); + +ConfigDataLoader.CONTENT_WIDTH = 320; +ConfigDataLoader.CONTENT_HEIGHT = 60; +ConfigDataLoader.TITLE = translateKey('infoLoadConfigData'); +ConfigDataLoader.CONTENT = "" + translateKey('infoLoadConfigDataPlsWait'); +/** + * webui.js + * Allgemeine Funktionen der Web-Oberfläche. + **/ + +WebUI = Singleton.create({ + HEADER_HEIGHT: 72, // Höhe der Kopfzeile + MENUBAR_HEIGHT: 34, // Höhe der Navigationsleiste + FOOTER_HEIGHT: 47, // Höhe der Fußleiste + BOTTOM_HEIGHT: 27, // Höhe des weißen Bereichs unter der Seite + MIN_WIDTH: 750, + MIN_HEIGHT: 400, + + serviceMessageCount: 0, + + initialize: function() + { + this.STATIC_HEIGHT = this.HEADER_HEIGHT + this.MENUBAR_HEIGHT + this.FOOTER_HEIGHT + this.BOTTOM_HEIGHT; + + this.currentPage = null; // Aktuelle Seite + this.currentPageOptions = null; // Argumente der aktuellen Seite + this.previousPage = null; // Vorherige Seite + this.previousPageOptions = null; // Argumente der vorherigen Seite + }, + + /*########################*/ + /*# Öffentliche Elemente #*/ + /*########################*/ + + start: function() + { + + var isFF = navigator.userAgent.indexOf("Firefox") !== -1; + + if (! ConfigData.isPresent) { + ConfigData.load(); + } else { + window.setTimeout(function() { + jQuery("#PagePath").text(translateKey('startPage')).css('color',"white"); + jQuery("#footer table tbody tr").html(""); + }, 100); + } + this.USERNAME = jQuery.trim(homematic('User.getUserFirstName', {'userID': userId})); + + if ((this.USERNAME == "") || (typeof this.USERNAME == "undefined")) { + this.USERNAME = jQuery.trim(homematic('User.getUserName', {'userID': userId})); + } + + this.USERLANGUAGE = homematic('User.getLanguage', {'userID': userId}); + this.HIDESTICKYUNREACH = (homematic("CCU.getStickyUnreachState", {}) == 0 ) ? false : true ; + userIsNoExpert = homematic('User.isNoExpert', {"id": userId}); + + // Refresher starten + iseRefrCycle = 3; + conInfo("Refreshing started."); + if (((typeof preventInterfaceCheck == "undefined") || (! preventInterfaceCheck)) && (PLATFORM == 'Central')) {new iseRefresher(iseRefrCycle);} + iseRefrTimer = 0; + checkDutyCycleInterval = 60; + + var bodyElem = $("body"); + + if (!isFF) { + bodyElem.innerHTML = ""; + } + // Dummy-Element + var dummyElement = document.createElement("div"); + dummyElement.id = "dummy"; + Element.setStyle(dummyElement, {display:"none"}); + bodyElem.appendChild(dummyElement); + + // Globale Werte (SessionId) + var globalValues = document.createElement("div"); + globalValues.id = "global_values"; + Element.setStyle(globalValues, {display: "none", visibility: "hidden"}); + var globalValuesForm = document.createElement("form"); + globalValuesForm.action = "#"; + var globalValuesSid = document.createElement("global_sid"); + globalValuesSid.id = "global_sid"; + globalValuesSid.type = "hidden"; + globalValuesSid.name = "sid"; + globalValuesSid.value = SessionId; + globalValuesForm.appendChild(globalValuesSid); + globalValues.appendChild(globalValuesForm); + bodyElem.appendChild(globalValues); + + // picDiv: Vergrößerte Bild von HomeMatic Geräten und Kanälen + var picDiv = document.createElement("div"); + picDiv.id = "picDiv"; + Element.setStyle(picDiv, { + position: "absolute", + left: "0px", + top: "0px", + width: "250px", + height: "250px", + zIndex: "9999", + visibility: "hidden", + margin: "0", + padding: "0", + backgroundColor: WebUI.getColor("white") + }); + bodyElem.appendChild(picDiv); + jg_250 = new jsGraphics("picDiv"); + InitGD(jg_250, 250); + + // Elemente für Popup-Fenster der ersten Ebene + var trLayer = document.createElement("div"); + trLayer.id = "trlayer"; + Element.setStyle(trLayer, { + position: "absolute", + top: "0", + left: "0", + width: "100%", + height: "100%", + zIndex: "149", // 259 + backgroundImage: "url('/ise/img/tr50.gif')", + display: "none" + }); + bodyElem.appendChild(trLayer); + + var centerBox = document.createElement("div"); + centerBox.id = "centerbox"; + Element.setStyle(centerBox, { + position: "absolute", + zIndex: "159", // 299 + width: "100%", + top: "50%", + display: "none" + }); + bodyElem.appendChild(centerBox); + + var progressBox = document.createElement("div"); + progressBox.id = "progressbox"; + Element.setStyle(progressBox, { + position: "absolute", + zIndex: "159", // 299 + width: "100%", + top: "50%", + display: "none" + }); + bodyElem.appendChild(progressBox); + + // Elemente für Popup-Fenster der zweiten Ebene + var trLayer2 = document.createElement("div"); + trLayer2.id = "trlayer2"; + Element.setStyle(trLayer2, { + position: "absolute", + top: "0", + left: "0", + width: "100%", + height: "100%", + backgroundImage: "url('/ise/img/tr50.gif')", + display: "none" + }); + bodyElem.appendChild(trLayer2); + + var centerBox2 = document.createElement("div"); + centerBox2.id = "centerbox2"; + Element.setStyle(centerBox2, { + position: "absolute", + zIndex: "299", + width: "100%", + top: "50%", + display: "none" + }); + bodyElem.appendChild(centerBox2); + + // Elemente für den Seiteninhalt + Layer.init(); + var layer0 = document.createElement("div"); + Element.addClassName(layer0, "Layer0"); + Layer.add(layer0); + + var header = document.createElement("div"); + header.id = "header"; + header.lang = this.USERLANGUAGE; + layer0.appendChild(header); + + var menuBar = document.createElement("div"); + menuBar.id = "menubar"; + layer0.appendChild(menuBar); + + var content = document.createElement("div"); + content.id = "content"; + content.tabIndex = 1; + Element.setStyle(content, {cursor: "wait"}); + layer0.appendChild(content); + + var footer = document.createElement("div"); + footer.id = "footer"; + layer0.appendChild(footer); + + // Weitere Elemente + var popupContainer = document.createElement("div"); + popupContainer.id = "popup_container"; + Element.setStyle(popupContainer, {display: "none"}); + bodyElem.appendChild(popupContainer); + + var canvas = document.createElement("div"); + canvas.id = "canvas"; + Element.setStyle(canvas, {display: "none"}); + bodyElem.appendChild(canvas); + + + jQuery(".Layer0").hide(); + HeaderBar.load(); + + if (!forceUpdate) { + jQuery("#AlarmServiceMsg").show(); + MainMenu.create($("menubar")); + } + + // MainMenu.show(); + // mainMenu = createMainMenu($("menubar")); + $("content").style.cursor = "default"; + + + var fileSecHint = "/etc/config/userAckSecurityHint", + result = homematic('CCU.existsFile', {'file': fileSecHint}), + securityDialogDisplayed = false; + + + + if (result) { + if (!isFF) { + jQuery(".Layer0").show(); + WebUI.enter(StartPage); + } else { + WebUI.enter(StartPage); + jQuery(".Layer0").fadeIn(1000, function() {jQuery("#webuiloader_wrapper").remove();}); + } + + } else { + showSecurityDialog(); + securityDialogDisplayed = true; + } + if (PLATFORM == 'Central') { + if ((typeof preventInterfaceCheck == "undefined") || (! preventInterfaceCheck)) + { + regaMonitor = new ReGaMonitor(); + InterfaceMonitor.start(); + } + homematic.com.init(); + + // Initialize the clickhandler of the duty cycle element + window.setTimeout(function () { + showDutyCycle(); + }, 1); + + // Check the dutyCycle and carrierSense periodically + new PeriodicalExecuter(function () { + showDutyCycle(); + }, checkDutyCycleInterval); + + if (getProduct() >= 3) { + + /* See SPHM-566 + if (!homematic('CCU.existsFile', {'file': LegacyAPIMigrationDialog.CONFIRM_FILE})) { + + // Get the number of HmIP devices without the HmIP-RCV-50 + var countHmIPDevices = 0; + homematic("Interface.listDevices", {"interface": "HmIP-RF"}, function (deviceList) { + if (deviceList) { + for (var i = 0; i < deviceList.length; i++) { + var device = deviceList[i]; + if (device.children.length > 0 && (device.type != "HmIP-RCV-50")) { + countHmIPDevices++; + } + } + + // When the number of HmIP devices is > 0 (this is not the case with a factory new CCU) then show the HmIP-RCV-50 migration hint. + if (countHmIPDevices > 0) { + MessageBox.show(translateKey("dialogMigrationRCV50Title"), translateKey("dialogMigrationRCV50"), function () { + homematic("CCU.createFile", {'file': LegacyAPIMigrationDialog.CONFIRM_FILE}, function (result) { + conInfo("createFile " + LegacyAPIMigrationDialog.CONFIRM_FILE + " - result: " + result); + }); + }, 600, 200); + } else { + homematic("CCU.createFile", {'file': LegacyAPIMigrationDialog.CONFIRM_FILE}, function (result) { + conInfo("createFile " + LegacyAPIMigrationDialog.CONFIRM_FILE + " - result: " + result); + }); + } + } + }); + } + */ + + var usrName = userName.replace(/[ \/\xC4\xD6\xDC\xE4\xF6\xFC\xDF]/g, function(m) { + return { + ' ': ';', + '/': '', + '\xC4': 'AE', + '\xD6': 'OE', + '\xDC': 'UE', + '\xE4': 'ae', + '\xF6': 'oe', + '\xFC': 'ue', + '\xDF': 'ss' + }[m]; + }); + + var usrPwd = homematic('User.hasUserPWD', {'userID': userId}); + if (usrPwd == false) { + var result = homematic('CCU.existsFile', {'file': "/etc/config/userprofiles/userAckInstallWizard_" + usrName}); + if (!result) { + var checkUpdateContentRunning = window.setInterval(function () { + if (!bUpdateContentRunning) { + clearInterval(checkUpdateContentRunning); + new InstallWizard(getUPL()); + } + }, 100); + } else if (!homematic('CCU.existsFile', {'file': "/etc/config/firewallConfigured"})) { + new DialogChooseSecuritySettings(true); + } + } else { + // Admin password set + // Firewall settings not yet set (default) + if ((getUPL() == UPL_ADMIN) && (!homematic('CCU.existsFile', {'file': "/etc/config/firewallConfigured"}))) { + new DialogChooseSecuritySettings(true); + } + + // User password set + // The User will see a hint that new firewall settings are active + if ((getUPL() == UPL_USER) && (!homematic('CCU.existsFile', {'file': "/etc/config/userprofiles/userAckInstallWizard_" + usrName}))) { + new MessageBox.show(translateKey("dglUserNewFwSettingsTitle"), translateKey("dglUserNewFwSettingsContent")); + homematic("CCU.setUserAckInstallWizard", {'userName': usrName}); + } + + // open the systemLanguage config dialog if no systemLanguage was selected yet + if (homematic('CCU.getSystemLanguage') === 'none') { + CreatePopup(ID_SYSTEM_LANGUAGE_CONFIG); + } + } + } + } else { + WebUI.serviceMessageCount = setServiceMessage(); + new PeriodicalExecuter(function () { + var newServiceMessageCount = setServiceMessage(); + if ((newServiceMessageCount != WebUI.serviceMessageCount) && (WebUI.currentPage == ServiceMessagesPage)) { + WebUI.serviceMessageCount = newServiceMessageCount; + WebUI.reload(); + } + }, 5); + } + }, + + /** + * Read-Only. Breite des Browserfensters (Pixel). + */ + getWidth: function() + { + var width = 0; + + if (window.innerWidth) + { + width = window.innerWidth; + } + else if ((window.document.documentElement) && + (window.document.documentElement.clientWidth)) + { + width = window.document.documentElement.clientWidth; + } + else + { + width = window.document.body.offsetWidth; + } + + return width; + }, + + /** + * Read-Only. Höhe des Browserfensters (Pixel). + */ + getHeight: function() + { + var height = 0; + + if (window.innerHeight) + { + height = window.innerHeight; + } + else if ((window.document.documentElement) && + (window.document.documentElement.clientHeight)) + { + height = window.document.documentElement.clientHeight; + } + else + { + height = window.document.body.offsetHeight; + } + + return height; + }, + + setContent: function(contentElement) + { + var contentBody = $("content"); + if (contentBody) + { + contentBody.innerHTML = ""; + contentBody.appendChild(contentElement); + } + else + { + throw new Error("content not defined"); + } + }, + + /** + * Lädt eine Seite. + */ + enter: function(page, options) + { + Debug.assert(Interface.isImplemented(page, IPage), "WebUI.enter: Interface IPage not implemented"); + + if (this.currentPage) { this.currentPage.leave(); } + + this.previousPage = this.currentPage; + this.previousPageOptions = this.currentPageOptions; + this.currentPage = page; + this.currentPageOptions = options; + + this.currentPage.enter(options); + window.name = 'ccu-main-window'; + window.setTimeout(() => { + if(jQuery(':focus').length === 0) { + jQuery('#content')[0].focus(); + } + }, 200); + }, + + reload: function() + { + if (this.currentPage) + { + this.currentPage.leave(); + this.currentPage.enter(this.currentPageOptions); + } + }, + + /** + * Zurück zur vorherigen Seite. + */ + goBack: function() + { + if (null !== this.previousPage) { this.enter(this.previousPage, this.previousPageOptions); } + }, + + /** + * @var m_isColorMapLoaded + * @brief [intern] Gibt an, ob die Farbtabelle bereits geladen ist + **/ + m_isColorMapLoaded: false, + + /** + * @var m_colorMap + * @brief [intern] Farbtabelle + **/ + m_colorMap: {}, + + /** + * @fn getColor + * @brief Liefert den Wert einer Systemfarbe anhand ihrer Id. + * + * @param colorId [string] Id des Systemfarbe + * @return [string] Farbwert + **/ + getColor: function(colorId) + { + if (false == this.m_isColorMapLoaded) + { + this.m_loadColorMap(); + } + + var color = this.m_colorMap[colorId]; + + if (typeof(color) != "string") + { + throw new Error("WebUI.getColor: unknown color id (" + colorId + ")"); + } + + return color; + }, + + /** + * @fn m_loadColorMap + * @brief [intern] Lädt die Farbtabelle + **/ + m_loadColorMap: function() + { + this.m_colorMap = homematic("WebUI.getColors"); + this.m_isColorMapLoaded = true; + } + +}); +/** + * @file controlbtn.js + * @brief ControlBtn + **/ + +ControlBtn = { + + CLASSNAME_ON : "ControlBtnOn", //< CSS-Klasse "aktiv" + CLASSNAME_OFF: "ControlBtnOff", //< CSS-Klasse "inaktiv" + CLASSNAME_PUSHED: "ControlBtnPushed", //< CSS-Klasse "gedrückt" + + /** + * Entfernt alle ControlBtn-Klassenamen von dem Element + **/ + removeClassNames: function(element) + { + if (element) + { + $(element).removeClassName(this.CLASSNAME_ON); + $(element).removeClassName(this.CLASSNAME_OFF); + $(element).removeClassName(this.CLASSNAME_PUSHED); + } + }, + + /** + * Zeigt das Element als aktiven ControlBtn an + **/ + on: function(element) + { + if (element) + { + this.removeClassNames(element); + $(element).addClassName(this.CLASSNAME_ON); + } + }, + + /** + * Zeigt das Element als inaktiven ControlBrn an + **/ + off: function(element) + { + if (element) + { + this.removeClassNames(element); + $(element).addClassName(this.CLASSNAME_OFF); + } + }, + + /** + * Zeigt das Element als gedrückten ControlBtn an + **/ + pushed: function(element) + { + if (element) + { + this.removeClassNames(element); + $(element).addClassName(this.CLASSNAME_PUSHED); + } + } + +}; + +// ControlBtn for JQuery generated Ids +JControlBtn = { + CLASSNAME_ON : "ControlBtnOn", //< CSS-Klasse "aktiv" + CLASSNAME_OFF: "ControlBtnOff", //< CSS-Klasse "inaktiv" + CLASSNAME_PUSHED: "ControlBtnPushed", //< CSS-Klasse "gedrückt" + + /** + * Entfernt alle ControlBtn-Klassenamen von dem Element + **/ + removeClass: function(element) + { + if (element) + { + element.removeClass(this.CLASSNAME_ON); + element.removeClass(this.CLASSNAME_OFF); + element.removeClass(this.CLASSNAME_PUSHED); + } + }, + + /** + * Zeigt das Element als aktiven ControlBtn an + **/ + on: function(element) + { + if (element) + { + this.removeClass(element); + element.addClass(this.CLASSNAME_ON); + } + }, + + /** + * Zeigt das Element als inaktiven ControlBrn an + **/ + off: function(element) + { + if (element) + { + this.removeClass(element); + element.addClass(this.CLASSNAME_OFF); + } + }, + + /** + * Zeigt das Element als gedrückten ControlBtn an + **/ + pushed: function(element) + { + if (element) + { + this.removeClass(element); + element.addClass(this.CLASSNAME_PUSHED); + } + }, + + /** + * Zeigt das Element kurz gedrückt an und geht dann wieder in den inaktiven Zustand + */ + pressed: function(element) + { + var self = this; + if (element) + { + this.on(element); + window.setTimeout(function() {self.off(element);}, 250); + } + } +};/** + * @file cursor.js + * @brief Zugriff auf den Cursor + **/ + +/** + * Cursor-Objekt + **/ +Cursor = { + + NORMAL: "auto", //< normaler Cursor + WAIT : "wait", //< Sanduhr + + /** + * Setzt den Cursor-Typ. + * @param cursorType Cursor-Typ + **/ + set: function( cursorType) + { + document.body.style.cursor = cursorType; + } + +}; + +const isValidRegex = function(possiblyValidRegex) +{ + try + { + const r = new RegExp(possiblyValidRegex); + } + catch(err) + { + return false; + } + + return true; +} + +/** + * stringfilter.js + **/ + +/** + * Konstrukor. Filter für Zeichenketten + **/ +StringFilter = function(name, callback) +{ + /*####################*/ + /*# Private Elemente #*/ + /*####################*/ + + + var m_name = name; + var m_callback = callback; + + var m_id = name.replace(/\,/g, "_"); + var m_value = localStorage.getItem(m_id) || ""; + var m_textId = m_id + "Text"; + + var isSet = function() + { + return (m_value !== ""); + }; + + /*########################*/ + /*# Öffentliche Elemente #*/ + /*########################*/ + + /** + * Liefert den HTML-Code des Filters + **/ + this.getHTML = function(colspan) + { + var _colspan_ = colspan; + if (typeof(_colspan_) == "undefined") { _colspan_ = 1; } + + return StringFilter.TEMPLATE.process({ + colspan: _colspan_, + name : m_name, + id : m_id, + textId : m_textId, + isSet : isSet(), + value : m_value + }); + }; + + /** + * Zeigt den Filter an. + **/ + this.show = function() + { + var filterElement = $(m_id); + var textElement = $(m_textId); + + if ((typeof oFilterStorage != "undefined")) { + if (oFilterStorage[m_name] && oFilterStorage[m_name] != null) { + textElement.value = oFilterStorage[name]; + } + } else { + oFilterStorage = {}; + } + + if (typeof oTimerStorage == "undefined") { + oTimerStorage = {}; + } + + if ((filterElement) && (textElement)) + { + filterElement.show(); + textElement.focus(); + } + }; + + /** + * Prüft, ob der Filter auf einen Text zutrifft + **/ + this.match = function(text) + { + if (false === isSet()) { return true; } + + var patternList = m_value.toLowerCase().split("|"); + //var patternList = m_value.split("|"); + text = text.toLowerCase(); + + let searchString = m_value.toLowerCase(); + if(isValidRegex(searchString)) + { + var r = new RegExp(searchString); + if (r.test(text) === true) { return true; } + + return false; + } + else + { + for (var i = 0, len = patternList.length; i < len; i++) + { + if (0 <= text.indexOf(patternList[i])) { return true; } + } + + return false; + } + }; + + /** + * Schließt den Filter und ruft dei Callback-Funktion auf + **/ + this.set = function() + { + if ($(m_textId)) { + var storageTime = 300000; // 5 Minutes + m_value = $(m_textId).value; + // Store the search term for 5 Minutes + // After that, check if another search term exists. + if (typeof oFilterStorage != "undefined") { + if (oFilterStorage[m_name] != m_value) { + oFilterStorage[m_name] = m_value; + if (oTimerStorage[m_name]) { + clearTimeout(oTimerStorage[m_name]); + } + oTimerStorage[m_name] = window.setTimeout(function() { + oFilterStorage[m_name] = null; + },storageTime); + } else { + // Restart the timer + clearTimeout(oTimerStorage[m_name]); + oTimerStorage[m_name] = window.setTimeout(function() { + oFilterStorage[m_name] = null; + },storageTime); + } + } + } + if ($(m_id)) { $(m_id).hide(); } + localStorage.setItem(m_id, $(m_textId).value); + if (m_callback) { m_callback(); } + }; + + /** + * Schließt den Filter ohne Änderungen zu übernehmen + **/ + this.close = function() + { + if ($(m_textId)) { $(m_textId).value = m_value; } + if ($(m_id)) { $(m_id).hide(); } + }; + + /** + * Setzt den Filter zurück + **/ + this.reset = function() + { + m_value = ""; + localStorage.removeItem(m_id); + this.close(); + }; + + /** + * Prüft, ob Enter oder ESC gedrückt wurde und schließt den Filter entsprechend + */ + this.checkEnterEsc = function(key) + { + switch (key) { + case 13: + this.set(); + break; + case 27: + this.close(); + break; + } + }; + + /*###################*/ + /*# Initialisierung #*/ + /*###################*/ + + +}; + +StringFilter.TEMPLATE = TrimPath.parseTemplate(STRINGFILTER_JST); +/** + * listfilter.js + **/ + +/** + * Konstruktor. ListFilter + **/ +ListFilter = Class.create({ + + /** + * Konstruktor + **/ + initialize: function(name, list, callback) + { + this.name = name; + this.list = list.clone(); + this.callback = callback; + this.id = name.replace(/\./g, "_"); + this.formId = this.id + "Form"; + var self = this; + function fltrHandler() { + self.restoreFilters(); + eQ3.HomeMatic.Event.unsubscribe('DeviceListPageLoaded', fltrHandler); + } + eQ3.HomeMatic.Event.subscribe('DeviceListPageLoaded', fltrHandler); + }, + + restoreFilters: function() { + var filterValues = localStorage.getItem(this.id); + if(filterValues) { + try { + filterValues = JSON.parse(filterValues); + var values = $(this.formId).values; + for (var i = 0, len = values.length; i < len; i++) { + if(filterValues.indexOf(values[i].value) !== -1) { + values[i].checked = true; + } + } + this.set(); + } catch(e) { console.log(e); } + } + }, + + /** + * Prüft, ob der Filter aktiv ist + **/ + isSet: function() + { + for (var i = 0, len = this.list.length; i < len; i++) + { + if (true === this.list[i]._selected) { return true; } + } + return false; + }, + + /** + * Wählt ein Listenelement aus + **/ + select: function(id, selected) + { + for (var i = 0, len = this.list.length; i < len; i++) + { + if (id == this.list[i].id) + { + this.list[i]._selected = selected; + break; + } + } + }, + + /** + * Prüft, ob ein Listenelement ausgewählt ist + **/ + isSelected: function(id) + { + for (var i = 0, len = this.list.length; i < len; i++) + { + if (id == this.list[i].id) { return this.list._selected; } + } + return false; + }, + + /** + * Liefert den HTML-Code des Filters + **/ + getHTML: function() + { + return ListFilter.TEMPLATE.process({ + list : this.list, + isSet : this.isSet(), + name : this.name, + id : this.id, + formId: this.formId + }); + }, + + matchString: function(str) + { + if (false === this.isSet()) { return true; } + + for (var i = 0, len = this.list.length; i < len; i++) + { + if (true === this.list[i]._selected) + { + if (this.list[i].name == str) { return true; } + } + } + return false; + }, + + matchStringArray: function(list) + { + if (false === this.isSet()) { return true; } + + for (var i = 0, len = this.list.length; i < len; i++) + { + if (true === this.list[i]._selected) + { + var name = this.list[i].name; + if (0 <= list.indexOf(name)) { return true; } + } + } + return false; + }, + + matchArray: function(list) + { + if (false === this.isSet()) { return true; } + + for (var i = 0, len = this.list.length; i < len; i++) + { + if (true === this.list[i]._selected) + { + var id = this.list[i].id; + for (var j = 0; j < list.length; j++) + { + if (list[j].id == id) { return true; } + } + } + } + return false; + }, + + /** + * Schließt den Filter und ruft die Callback-Funktion auf + **/ + set: function() + { + if ($(this.formId)) + { + var values = $(this.formId).values; + var filterValues = []; + + for (var i = 0, len = values.length; i < len; i++) + { + this.select(values[i].value, values[i].checked); + if(values[i].checked) filterValues.push(values[i].value); + } + + if ($(this.id)) { + $(this.id).hide(); + try {jQuery("#"+ this.id).draggable("destroy");} catch (e) {} + } + // JSON.stringify encodes an array twice??? + localStorage.setItem(this.id, JSON.parse(JSON.stringify(filterValues))); + if (this.callback) { this.callback(); } + } + }, + + /** + * Schließt den Filter ohne Änderungen zu übernhemen + **/ + close: function() + { + if ($(this.formId)) + { + var values = $(this.formId).values; + + for (var i = 0, len = values.length; i < len; i++) + { + values[i].checked = this.isSelected(values[i].value); + } + } + + if ($(this.id)) { + $(this.id).hide(); + //try {jQuery("#"+ this.id).draggable("destroy");} catch (e) {} + } + //try {if (this.callback) { this.callback(); } } catch (e) {}; + }, + + /** + * Setzt den Filter zurück + **/ + reset: function() + { + for (var i = 0, len = this.list.length; i < len; i++) + { + this.list[i]._selected = false; + } + + localStorage.removeItem(this.id); + this.close(); + } + +}); + +ListFilter.TEMPLATE = TrimPath.parseTemplate(LISTFILTER_JST); +/** + * ui.js + **/ + +/** + * Namensraum für UI-Komponenten + **/ +UI = { }; + +/** + * Basisklasse für UI-Komponenten + **/ +UI.Component = Class.create({ + + /** + * Konstruktor. Erstellt eine UI-Komponente + **/ + initialize: function() + { + this.m_isEnabled = true; + this.m_element = document.createElement("div"); + }, + + /** + * Liefert das DOM-Element der Komponente + **/ + getElement: function() + { + return this.m_element; + }, + + setName: function(name) + { + this.m_element.name = name; + return this; + }, + + /** + * Setzt die Breite der Komponente in Pixeln + **/ + setWidth: function(width) + { + Element.setStyle(this.m_element, { + width: parseInt(width) + "px" + }); + return this; + }, + + /** + * Setzt die Höhe der Komponente in Pixeln + **/ + setHeight: function(height) + { + Element.setStyle(this.m_element, { + height: parseInt(height) + "px" + }); + return this; + }, + + /** + * Setzt die Position der Komponente + **/ + setPosition: function(x, y) + { + Element.setStyle(this.m_element, { + top : parseInt(y) + "px", + left: parseInt(x) + "px" + }); + return this; + }, + + /** + * Ermittelt, ob die Komponente aktiv ist + **/ + isEnabled: function() + { + return this.m_isEnabled; + }, + + /** + * Aktiviert bzw. Deaktiviert die Komponente. + **/ + setIsEnabled: function(isEnabled) + { + if (isEnabled) { this.enable(); } + else { this.disable(); } + + return this; + }, + + /** + * Setzt die Komponente auf aktiv. + **/ + enable: function() + { + if (this.m_overlay) { Element.remove(this.m_overlay); } + this.m_overlay = null; + this.m_isEnabled = true; + return this; + }, + + /** + * Setzt die Komponente auf inaktiv. + **/ + disable: function() + { + if (!this.m_overlay) + { + this.m_overlay = document.createElement("div"); + this.m_overlay.className = "UIDisabled"; + this.m_element.appendChild(this.m_overlay); + } + this.m_isEnabled = false; + return this; + }, + + /** + * Entfernt die Komponente + **/ + dispose: function() + { + Element.remove(this.m_element); + return this; + } + +}); + +UI.InputComponent = Class.create(UI.Component, { + + initialize: function() + { + this.m_isEnabled = true; + this.m_element = document.createElement("div"); + }, + + enable: function() + { + if (this.m_isEnabled === false) + { + this.m_element.disabled = false; + this.m_element.readonly = true; + this.m_isEnabled = true; + } + return this; + }, + + disable: function() + { + if (this.m_isEnabled === true) + { + this.m_element.disabled = true; + this.m_element.readonly = false; + this.m_isEnabled = false; + } + return this; + } + +}); + +/** + * Basisklasse für UI-Container + **/ +UI.Container = Class.create(UI.Component, { + + /** + * Erstellt einen UI-Container + **/ + initialize: function() + { + this.m_isEnabled = true; + this.m_element = document.createElement("div"); + this.m_content = m_element; + }, + + /** + * Fügt dem Container eine neue Komponente hinzu + **/ + add: function(component) + { + this.m_components.push(component); + this.m_content.appendChild(component.getElement()); + return this; + }, + + /** + * Entfernt eine Komponente aus dem Container + **/ + remove: function(component) + { + this.m_components = this.m_components.without(component); + component.dispose(); + return this; + }, + + /** + * Entfernt den Container und alle seine Komponenten + **/ + dispose: function() + { + var components = this.m_components; + components.each(function(component) { + this.remove(component); + }, this); + Element.remove(this.m_element); + return this; + } + +}); +/** + * frame.js + **/ + +/** + * Rahmen für Dialog-Fenster + **/ +UI.Frame = Class.create(UI.Container, { + + initialize: function() + { + var _this_ = this; + + this.m_isEnabled = true; + this.m_components = []; + + this.m_contentWidth = UI.Frame.DEFAULT_CONTENT_WIDTH; + this.m_contentHeight = UI.Frame.DEFAULT_CONTENT_HEIGHT; + + this.m_element = document.createElement("div"); + this.m_element.className = UI.Frame.CLASS_NAME; + + this.m_title = document.createElement("div"); + this.m_title.className = UI.Frame.TITLE_CLASS; + this.m_title.appendChild(document.createTextNode(UI.Frame.DEFAULT_TITLE)); + Event.observe(this.m_title, "mousedown", function(event) { + new Drag(_this_.m_element, event); + }); + this.m_element.appendChild(this.m_title); + + this.m_content = document.createElement("div"); + this.m_content.className = UI.Frame.CONTENT_CLASS; + this.m_element.appendChild(this.m_content); + + this.m_resize(); + }, + + /** + * Aktualisiert die Abmessungen des Frames + **/ + m_resize: function() + { + this.m_width = this.m_contentWidth + (2 * UI.Frame.BORDER_SIZE); + this.m_height = this.m_contentHeight + (3 * UI.Frame.BORDER_SIZE) + UI.Frame.TITLE_HEIGHT; + + Element.setStyle(this.m_element, { + width : this.m_width + "px", + height: this.m_height + "px" + }); + Element.setStyle(this.m_title, { + top : UI.Frame.BORDER_SIZE + "px", + left : UI.Frame.BORDER_SIZE + "px", + width : this.m_contentWidth + "px", + height: UI.Frame.TITLE_HEIGHT + "px", + lineHeight: UI.Frame.TITLE_HEIGHT + "px" + }); + Element.setStyle(this.m_content, { + top : ((2 * UI.Frame.BORDER_SIZE) + UI.Frame.TITLE_HEIGHT) + "px", + left : UI.Frame.BORDER_SIZE + "px", + width : this.m_contentWidth + "px", + height: this.m_contentHeight + "px" + }); + + return this; + }, + + /** + * Setzt die Höhe und Breite des Content-Bereichs. + **/ + setContentSize: function(contentWidth, contentHeight) + { + this.m_contentWidth = parseInt(contentWidth); + this.m_contentHeight = parseInt(contentHeight); + + this.m_resize(); + return this; + }, + + /** + * Liefert die Breite des Content-Bereichs in Pixeln + **/ + getContentWidth: function() + { + return this.m_contentWidth; + }, + + /** + * Liefert die Höhe des Content-Bereichs in Pixeln + **/ + getContentHeight: function() + { + return this.m_contentHeight; + }, + + /** + * Liefert die Gesamtbreite des Frames in Pixlen + **/ + getWidth: function() + { + return this.m_width; + }, + + /** + * Liefert die Gesamthöhe des Frames in Pixeln + **/ + getHeight: function() + { + return this.m_height; + }, + + /** + * Setzt den Titel + **/ + setTitle: function(title) + { + this.m_title.innerHTML = ""; + this.m_title.appendChild(document.createTextNode(title)); + return this; + }, + + _enable: function() + { + this.m_isEnabled = true; + Element.removeClassName(this.m_element, UI.Frame.CLASS_NAME_DISABLED); + Element.removeClassName(this.m_title, UI.Frame.TITLE_CLASS_DISABLED); + Element.removeClassName(this.m_content, UI.Frame.CONTENT_CLASS_DISABLED); + return this; + }, + + _disable: function() + { + this.m_isEnabled = false; + Element.addClassName(this.m_element, UI.Frame.CLASS_NAME_DISABLED); + Element.addClassName(this.m_title, UI.Frame.TITLE_CLASS_DISABLED); + Element.addClassName(this.m_content, UI.Frame.CONTENT_CLASS_DISABLED); + return this; + } + +}); + +/** + * Konstanten + **/ +UI.Frame.DEFAULT_CONTENT_WIDTH = 320; +UI.Frame.DEFAULT_CONTENT_HEIGHT = 240; +UI.Frame.DEFAULT_TITLE = "UI.Frame"; +UI.Frame.TITLE_HEIGHT = 20; +UI.Frame.BORDER_SIZE = 2; +UI.Frame.CLASS_NAME = "UIFrame"; +UI.Frame.TITLE_CLASS = "UIFrameTitle"; +UI.Frame.CONTENT_CLASS = "UIFrameContent"; +UI.Frame.CLASS_NAME_DISABLED = "UIFrameDisabled"; +UI.Frame.TITLE_CLASS_DISABLED = "UIFrameTitleDisabled"; +UI.Frame.CONTENT_CLASS_DISABLED = "UIFrameContentDisabled"; +/** + * label.js + **/ + +/** + * Einzeliges Textfeld + **/ +UI.Label = Class.create(UI.Component, { + + /** + * Konstruktor. Erstellt ein einzeiliges Textfeld. + **/ + initialize: function() + { + this.m_isEnabled = true; + + this.m_element = document.createElement("div"); + this.m_element.className = UI.Label.CLASS_NAME; + this.m_element.appendChild(document.createTextNode(UI.Label.DEFAULT_TEXT)); + }, + + /** + * Setzt den Text des Labels + **/ + setText: function(text) + { + this.m_element.innerHTML = ""; + this.m_element.appendChild(document.createTextNode(text)); + return this; + }, + + /** + * Setzt die Breite des Labels. + * Neben numerischen Angaben ist auch der Wert "auto" erlaubt. + **/ + setWidth: function(width) + { + if (width != "auto") { width = parseInt(width) + "px"; } + Element.setStyle(this.m_element, { width: width }); + return this; + }, + + /** + * Setzt die Höhe des Labels. + * Neben numerischen Angaben ist auch der Wert "auto" erlaubt. + * Es wird immer auch die Zeilenhöhe gesetzt! + **/ + setHeight: function(height) + { + var lineHeight = "100%"; + if (height != "auto") + { + height = parseInt(height) + "px"; + lineHeight = height; + } + + Element.setStyle(this.m_element, { + height : height, + lineHeight: lineHeight}); + return this; + } + +}); + +/** + * Konstanten + **/ +UI.Label.CLASS_NAME = "UILabel"; +UI.Label.DEFAULT_TEXT = "UI.Label"; +/** + * ui.text.js + **/ + +UI.Text = Class.create(UI.Component, { + + /** + * Konstruktor. Erzeugt ein neues Textfeld. + **/ + initialize: function() + { + this.m_isEnabled = true; + + this.m_text = document.createElement("span"); + this.m_text.appendChild(document.createTextNode(UI.Text.DEFAULT_TEXT)); + + this.m_element = document.createElement("div"); + this.m_element.className = UI.Text.CLASS_NAME; + this.m_element.appendChild(this.m_text); + }, + + /** + * Setzt den Text-Inhalt des Textfeldes + **/ + setText: function(text) + { + this.m_text.innerHTML = ""; + this.m_text.appendChild(document.createTextNode(text)); + return this; + }, + + /** + * Setzt den HTML-Inhalt des Textfeldes + **/ + setHtml: function(html) + { + this.m_text.innerHTML = html; + return this; + }, + + setID : function(id) { + this.m_text.setAttribute("id",id); + return this; + }, + + setAlignment: function(alignment) + { + Element.setStyle(this.m_element, {"textAlign": alignment}); + return this; + }, + + setStyle: function(style) + { + Element.setStyle(this.m_element, style); + return this; + }, + + /** + * Setzt die Breite des Labels. + * Neben numerischen Angaben ist auch der Wert "auto" erlaubt. + **/ + setWidth: function(width) + { + if (width != "auto") { width = parseInt(width) + "px"; } + Element.setStyle(this.m_element, { width: width }); + return this; + }, + + /** + * Setzt die Höhe des Labels. + * Neben numerischen Angaben ist auch der Wert "auto" erlaubt. + **/ + setHeight: function(height) + { + if (height != "auto") { height = parseInt(height) + "px"; } + Element.setStyle(this.m_element, { height : height }); + return this; + }, + + setClass: function(name) + { + this.m_element.className = name; + return this; + }, +}); + +/** + * Konstanten + **/ +UI.Text.CLASS_NAME = "UIText"; +UI.Text.DEFAULT_TEXT = "UI Text"; +/** + * scrollpane.js + **/ + +UI.ScrollPane = Class.create(UI.Container, { + + /** + * Konstruktor. Erstellt eine neue ScrollPane + **/ + initialize: function() + { + this.m_isEnabled = true; + this.m_components = []; + + this.m_element = document.createElement("div"); + this.m_element.className = UI.ScrollPane.CLASS_NAME; + + this.m_content = document.createElement("div"); + this.m_content.className = UI.ScrollPane.CONTENT_CLASS_NAME; + this.m_element.appendChild(this.m_content); + + this.setWidth(UI.ScrollPane.DEFAULT_WIDTH) + .setHeight(UI.ScrollPane.DEFAULT_HEIGHT); + }, + + /** + * Setzt die Breite der Komponente in Pixeln + **/ + setWidth: function(width) + { + Element.setStyle(this.m_element, { + width: parseInt(width) + "px" + }); + Element.setStyle(this.m_content, { + width: parseInt(width) + "px" + }); + return this; + }, + + /** + * Setzt die Höhe der Komponente in Pixeln + **/ + setHeight: function(height) + { + Element.setStyle(this.m_element, { + height: parseInt(height) + "px" + }); + Element.setStyle(this.m_content, { + height: parseInt(height) + "px" + }); + return this; + } + +}); + +UI.ScrollPane.CLASS_NAME = "UIScrollPane"; +UI.ScrollPane.CONTENT_CLASS_NAME = "UIScrollPaneContent"; +UI.ScrollPane.DEFAULT_WIDTH = 100; +UI.ScrollPane.DEFAULT_HEIGHT = 100; + +/** + * button.js + **/ + +/** + * Button + **/ +UI.Button = Class.create(UI.Component, { + + /** + * Konstrukor. Erstellt einen neuen Button + **/ + initialize: function() + { + var _this_ = this; + + this.m_isEnabled = true; + this.m_action = null; + + this.m_element = document.createElement("div"); + this.m_element.className = UI.Button.CLASS_NAME; + Element.setStyle(this.m_element, { + width : UI.Button.DEFAULT_WIDTH + "px", + height: UI.Button.DEFAULT_HEIGHT + "px" + }); + + this.m_text = document.createElement("div"); + this.m_text.className = UI.Button.TEXT_CLASS_NAME; + this.m_text.appendChild(document.createTextNode(UI.Button.DEFAULT_TEXT)); + Element.setStyle(this.m_text, { + top: UI.Button.BORDER_SIZE + "px", + left: UI.Button.BORDER_SIZE + "px", + width: (UI.Button.DEFAULT_WIDTH - (2 * UI.Button.BORDER_SIZE)) + "px", + height: (UI.Button.DEFAULT_HEIGHT - (2 * UI.Button.BORDER_SIZE)) + "px", + lineHeight: (UI.Button.DEFAULT_HEIGHT - (2 * UI.Button.BORDER_SIZE)) + "px" + }); + Event.observe(this.m_text, "click", function(event) { + if (_this_.m_action) { _this_.m_action(event); } + }); + Event.observe(this.m_text, "mouseover", this._onMouseOver); + Event.observe(this.m_text, "mouseout" , this._onMouseOut); + Event.observe(this.m_text, "mousedown", this._onMouseDown); + Event.observe(this.m_text, "mouseup" , this._onMouseUp); + this.m_element.appendChild(this.m_text); + + }, + + /** + * Setzt den Text des Button + **/ + setText: function(text) + { + this.m_text.innerHTML = ""; + this.m_text.appendChild(document.createTextNode(text)); + return this; + }, + + setId: function(id) { + this.m_text.id = id; + return this; + }, + + /** + * Setzt den OnClick-EventHandler + **/ + setAction: function(action, context) + { + if (typeof(context) != "undefined") { this.m_action = action.bind(context); } + else { this.m_action = action; } + return this; + }, + + _onMouseOver: function(event) + { + //this.className = "UIButtonHighlight"; + }, + + _onMouseOut: function(event) + { + //this.className = "UIButtonText"; + }, + + _onMouseDown: function(event) + { + //this.className = "UIButtonPressed"; + }, + + _onMouseUp: function(event) + { + //this.className = "UIButtonHighlight"; + } + +}); + +UI.Button.TEXT_CLASS_NAME = "UIButtonText StdButton"; +UI.Button.CLASS_NAME = "UIButton"; +UI.Button.HIGHLIGHT_CLASS_NAME = "UIButtonHighlight"; +UI.Button.DEFAULT_TEXT = "UI.Button"; +UI.Button.BORDER_SIZE = 0; +UI.Button.DEFAULT_WIDTH = 150; +UI.Button.DEFAULT_HEIGHT = 22; +/** + * textedit.js + **/ + +/** + * Text-Eingabefeld + **/ +UI.TextEdit = Class.create(UI.InputComponent, { + + initialize: function() + { + this.m_isEnabled = true; + + this.m_element = document.createElement("input"); + this.m_element.className = UI.TextEdit.CLASS_NAME; + this.m_element.type = "text"; + this.m_element.value = UI.TextEdit.DEFAULT_VALUE; + }, + + setText: function(text) + { + this.m_element.value = text; + return this; + }, + + getText: function() + { + return this.m_element.value; + } + + +}); + +UI.TextEdit.CLASS_NAME = "UITextEdit"; +UI.TextEdit.DEFAULT_VALUE = "";/** + * textedit.js + **/ + +/** + * Text-Eingabefeld + **/ +UI.PasswordEdit = Class.create(UI.InputComponent, { + + initialize: function() + { + this.m_isEnabled = true; + + this.m_element = document.createElement("input"); + this.m_element.className = UI.PasswordEdit.CLASS_NAME; + this.m_element.type = "password"; + this.m_element.value = UI.PasswordEdit.DEFAULT_VALUE; + }, + + setText: function(text) + { + this.m_element.value = text; + return this; + }, + + getText: function() + { + return this.m_element.value; + } + + +}); + +UI.PasswordEdit.CLASS_NAME = "UITextEdit"; +UI.PasswordEdit.DEFAULT_VALUE = "";/** + * textarea.js + **/ + +/** + * @fileOverview UI.Textarea + * @author F. Werner (eQ-3) + **/ + +/** + * @class UI.Textarea + **/ +UI.Textarea = Class.create(UI.InputComponent, { + + initialize: function() + { + this.isEnabled = true; + + this.m_element = document.createElement("textarea"); + this.m_element.className = UI.Textarea.CLASS_NAME; + Element.writeAttribute(this.m_element, "wrap", "off"); + this.m_element.value = UI.Textarea.DEFAULT_VALUE; + }, + + setText: function(text) + { + this.m_element.value = text; + return this; + }, + + setID : function(id) { + this.m_element.setAttribute("id",id); + return this; + }, + + setName : function(name) { + this.m_element.setAttribute("name",name); + return this; + }, + + setWrap: function(isWrap) + { + if (isWrap) { Element.writeAttribute(this.m_element, "wrap", "soft"); } + else { Element.writeAttribute(this.m_element, "wrap", "off"); } + + return this; + }, + + getText: function() + { + return this.m_element.value; + }, + + enableResize: function() { + Element.setStyle(this.m_element, {"resize": "both"}); + return this; + }, + + disableResize: function() { + Element.setStyle(this.m_element, {"resize": "none"}); + return this; + } + +}); + +UI.Textarea.CLASS_NAME = "UITextArea"; +UI.Textarea.DEFAULT_VALUE = ""; +/** + * listbox.js + **/ + +/** + * Auswahl aus einer Liste + **/ +UI.ListBox = Class.create(UI.InputComponent, { + + /** + * Konstruktor. Erstellt eine neue Listbox + **/ + initialize: function() + { + this.m_isEnabled = true; + this.m_onChangeHandler = this.m_onChange.bind(this); + + this.m_items = []; + + this.m_element = document.createElement("select"); + this.m_element.className = UI.ListBox.CLASS_NAME; + Event.observe(this.m_element, "change", this.m_onChangeHandler); + }, + + m_onChange: function(event) + { + if (this.m_onChangeCallback) + { + this.m_onChangeCallback(this.getSelectedItem()); + } + }, + + getSelectedItem: function() + { + return this.m_items[this.m_element.selectedIndex]; + }, + + setOnChangeCallback: function(onChangeCallback) + { + this.m_onChangeCallback = onChangeCallback; + return this; + }, + + add: function(item) + { + var option = document.createElement("option"); + option.appendChild(document.createTextNode(item.name)); + this.m_element.appendChild(option); + this.m_items.push(item); + return this; + }, + + remove: function(item) + { + /* todo */ + }, + + selectItem: function(item) + { + return this.selectIndex(this.m_items.indexOf(item)); + }, + + /** + * @fn selectItemById + * Wählt ein + **/ + selectItemById: function(id) + { + var items = this.m_items; + + for (var i = 0, len = items.length; i < len; i++) + { + var item = items[i]; + if (item.id == id) { this.selectIndex(i); } + } + + return this; + }, + + selectIndex: function(index) + { + this.m_element.selectedIndex = index; + return this; + } + + + + +}); + +UI.ListBox.CLASS_NAME = "UIListbox";/** + * ui.checkbox.js + **/ + +UI.Checkbox = Class.create(UI.Component, { + + /** + * Konstruktor. Erzeugt eine neue Checkbox. + **/ + initialize: function() + { + this.m_isEnabled = true; + this.m_action = null; + + this.m_checkbox = document.createElement("input"); + this.m_checkbox.type = "checkbox"; + this.m_checkbox.checked = UI.Checkbox.DEFAUT_CHECKED; + Event.observe(this.m_checkbox, "click", this.onChange.bind(this)); + + this.m_text = document.createElement("span"); + this.m_text.appendChild(document.createTextNode(UI.Checkbox.DEFALUT_TEXT)); + + this.m_element = document.createElement("div"); + this.m_element.className = UI.Checkbox.CLASS_NAME; + this.m_element.appendChild(this.m_checkbox); + this.m_element.appendChild(this.m_text); + }, + + setText: function(text) + { + this.m_text.innerHTML = ""; + this.m_text.appendChild(document.createTextNode(text)); + return this; + }, + + setIsChecked: function(isChecked) + { + this.m_checkbox.checked = isChecked; + return this; + }, + + isChecked: function() + { + return this.m_checkbox.checked; + }, + + /** + * Setzt die Breite des Labels. + * Neben numerischen Angaben ist auch der Wert "auto" erlaubt. + **/ + setWidth: function(width) + { + if (width != "auto") { width = parseInt(width) + "px"; } + Element.setStyle(this.m_element, { width: width }); + return this; + }, + + /** + * Setzt die Höhe des Labels. + * Neben numerischen Angaben ist auch der Wert "auto" erlaubt. + **/ + setHeight: function(height) + { + if (height != "auto") { height = parseInt(height) + "px"; } + Element.setStyle(this.m_element, { height : height }); + return this; + }, + + setAction: function(action, context) + { + this.m_action = action.bind(context); + return this; + }, + + onChange: function() + { + if (this.m_action) + { + this.m_action(this); + } + } + +}); + +UI.Checkbox.CLASS_NAME = "UICheckbox"; +UI.Checkbox.DEFAULT_TEXT = "UI Checkbox"; +UI.Checkbox.DEFAULT_CHECKED = false;/** + * image.js + **/ + +/** + * Image + **/ +UI.Image = Class.create(UI.Component, { + + /** + * Konstruktor. Erstellt ein Image + **/ + initialize: function() + { + this.m_isEnabled = true; + + this.m_element = document.createElement("img"); + this.m_element.className = UI.Image.CLASS_NAME; + }, + + setPath: function(path) + { + this.m_element.alt = ""; + this.m_element.src = path; + return this; + }, + + setId: function(id) + { + this.m_element.id = id; + return this; + }, + + getId: function() + { + return this.m_element.id; + } +}); + +/** + * Konstanten + **/ +UI.Image.CLASS_NAME = "UIImage"; +/** + * room.js + * Raum. + **/ + +Room = Class.create({ + + /** + * Konstruktor + **/ + initialize: function(data) + { + this.id = ""; + this.name = ""; + this.description = ""; + this.channelIds = []; + + this.addChannelEvent = new eQ3.Event(); + this.removeChannelEvent = new eQ3.Event(); + + this.update(data); + }, + + /** + * Aktualisiert den Raum + **/ + update: function(data) + { + var channelIds = this.channelIds.clone(); + channelIds.each(function(id) { this.removeChannel(id); }, this); + + this.id = data["id"]; // Id + this.name = data["name"]; // Name + this.description = data["description"]; // Beschreibung + this.channelIds = []; // Ids der Kanäle + + data["channelIds"].each(function(id) { this.addChannel(id); }, this); + }, + + /** + * Fügt einen Kanal hinzu. + * writeBack: [bool] Optional: false. Falls true, wird die Änderung an die HomeMatic Zentrale übermittelt. + **/ + addChannel: function(channelId, writeBack) + { + if (!this.channelIds.ex_contains(channelId)) + { + if (writeBack) { homematic("Room.addChannel", {id: this.id, channelId: channelId}); } + this.channelIds.push(channelId); + this.addChannelEvent.fire(this, {channelId: channelId}); + } + }, + + /** + * Entfernt einen Kanal. + * writeBack: [bool] Optional: false. Falls true, wird die Änderung an die HomeMatic Zentrale übermittelt. + **/ + removeChannel: function(channelId, writeBack) + { + if (this.channelIds.ex_contains(channelId)) + { + if (writeBack) { homematic("Room.removeChannel", {id: this.id, channelId: channelId}); } + this.channelIds = this.channelIds.without(channelId); + this.removeChannelEvent.fire(this, {channelId: channelId}); + } + }, + + /** + * Prüft, ob ein Kanal in dem Raum definiert ist. + **/ + contains: function(channelId) + { + return (0 <= this.channelIds.indexOf(channelId)); + }, + + /** + * Liefert die Ids aller Programme, die wenigesten einen Kanal des Raums verwenden + **/ + listProgramIds: function() + { + return homematic("Room.listProgramIds", {id: this.id}); + } + +}); + +/** + * roomlist.js + * Raumliste. + **/ + +/** + * Raumliste. + **/ +RoomList = Singleton.create({ + + /** + * Konstruktor + **/ + initialize: function() + { + this.addEvent = new eQ3.Event(); + this.removeEvent = new eQ3.Event(); + + this.m_rooms = {}; + }, + + /** + * Callback. Aktualisiert einen Raum. + **/ + update: function(data, callback) + { + var room; + + if (data !== null) + { + var id = data["id"]; + room = this.m_rooms[id]; + + if (typeof(room) != "undefined") + { + room.update(data); + } + else + { + room = new Room(data); + this.m_rooms[id] = room; + this.addEvent.fire(this, {room: room}); + } + } + + if (callback) { callback(); } + return room; + }, + + /** + * Liefert die Liste aller Räume. + **/ + list: function() + { + return Object.values(this.m_rooms); + }, + + /** + * Initialisiert die Raumliste. + **/ + reload: function(loader) + { + var _this_ = this; + var _loader_ = loader; + + homematic("Room.getAll", null, function(rooms) { + if (rooms) + { + for (var i = 0, len = rooms.length; i < len; i++) + { + _this_.update(rooms[i]); + } + } +// _loader_.reportLoadingState(1); + _loader_.ready(); + }); + }, + + /** + * Startet die Aktualiserung eines Raums. + **/ + beginUpdate: function(id, callback) + { + var _this_ = this; + var _callback_ = callback; + + homematic("Room.get", {"id": id}, function(data) { _this_.update(data, _callback_); }); + }, + + /** + * Ermittelt einen Raum anhand seiner Id. + **/ + get: function(id) + { + var room = this.m_rooms[id]; + if (typeof(room) != "undefined") { return room; } + else { return null; } + }, + + remove: function(room) + { + var channelIds = room.channelIds.clone(); + + delete this.m_rooms[room.id]; + channelIds.each(function(id) { room.removeChannel(id); }); + this.removeEvent.fire(this, {room: room}); + } + +}); +/** + * subsection.js + * Gewerk. + **/ + +Subsection = Class.create({ + + /** + * Konstruktor + **/ + initialize: function(data) + { + this.id = ""; + this.name = ""; + this.description = ""; + this.channelIds = []; + + this.addChannelEvent = new eQ3.Event(); + this.removeChannelEvent = new eQ3.Event(); + + this.update(data); + }, + + /** + * Aktualisiert den Raum + **/ + update: function(data) + { + var channelIds = this.channelIds.clone(); + channelIds.each(function(id) { this.removeChannel(id); }, this); + + this.id = data["id"]; // Id + this.name = data["name"]; // Name + this.description = data["description"]; // Beschreibung + this.channelIds = []; // Ids der Kanäle + + data["channelIds"].each(function(id) { this.addChannel(id); }, this); + }, + + /** + * Fügt einen Kanal hinzu. + * writeback: [bool] Optional (false). Falls true, wird die Änderung an die HomeMatic Zentrale übermittelt. + **/ + addChannel: function(channelId, writeBack) + { + if (!this.channelIds.ex_contains(channelId)) + { + if (writeBack) { homematic("Subsection.addChannel", {id: this.id, channelId: channelId}); } + this.channelIds.push(channelId); + this.addChannelEvent.fire(this, {channelId: channelId}); + } + }, + + /** + * Entfernt einen Kanal. + * writeBack: [bool] Optional (false). Falls true, wird die Änderung an die HomeMatic Zentrale übermittelt. + **/ + removeChannel: function(channelId, writeBack) + { + if (this.channelIds.ex_contains(channelId)) + { + if (writeBack) { homematic("Subsection.removeChannel", {id: this.id, channelId: channelId}); } + this.channelIds = this.channelIds.without(channelId); + this.removeChannelEvent.fire(this, {channelId: channelId}); + } + }, + + /** + * Prüft, ob ein Kanal in dem Raum definiert ist. + **/ + contains: function(channelId) + { + return (0 <= this.channelIds.indexOf(channelId)); + }, + + /** + * Liefert die Ids aller Programme, die mindestens einen Kanal in dem Gewerk verwenden + **/ + listProgramIds: function() + { + return homematic("Subsection.listProgramIds", {id: this.id}); + } + +}); +/** + * SubsectionList.js + * Gewerkeliste. + **/ + +/** + * Gewerkeliste + **/ +SubsectionList = Singleton.create({ + + /** + * Konstruktor + **/ + initialize: function() + { + this.addEvent = new eQ3.Event(); + this.removeEvent = new eQ3.Event(); + + this.m_subsections = {}; + }, + + /** + * Callback. Aktualiert ein Gewerk. + **/ + update: function(data, callback) + { + var subsection; + + if (data !== null) + { + var id = data["id"]; + subsection = this.m_subsections[id]; + + if (typeof(subsection) != "undefined") + { + subsection.update(data); + } + else + { + subsection = new Subsection(data); + this.m_subsections[id] = subsection; + this.addEvent.fire(this, {subsection: subsection}); + } + } + + if (callback) { callback(); } + return subsection; + }, + + /** + * Liefert die Liste aller Gewerke. + **/ + list: function() + { + return Object.values(this.m_subsections); + }, + + /** + * Lädt die Gewerkeliste erneut + **/ + reload: function(loader) + { + var _this_ = this; + var _loader_ = loader; + + homematic("Subsection.getAll", null, function(subsections) { + if (subsections) + { + subsections.each(function (subsection) { _this_.update(subsection); }); + } +// _loader_.reportLoadingState(1); + _loader_.ready(); + }); + }, + + /** + * Startet die Aktualisierung eines Gewerks. + **/ + beginUpdate: function(id, callback) + { + var _this_ = this; + var _callback_ = callback; + + homematic("Subsection.get", {"id": id}, function(data) { _this_.update(data, _callback_); }); + }, + + /** + * Liefert ein Gewerk anhand seiner Id. + **/ + get: function(id) + { + return this.m_subsections[id]; + }, + + remove: function(subsection) + { + var channelIds = subsection.channelIds.clone(); + + delete this.m_subsections[subsection.id]; + channelIds.each(function(id) { subsection.removeChannel(id); }); + this.removeEvent.fire(this, {subsection: subsection}); + } + +}); +/** + * devicetype.js + **/ + +/** + * Gerätetyp. + **/ +DeviceType = Class.create({ + + initialize: function(id) + { + this.id = id; + this.name = id; + this.description = DEV_getDescription(id); + }, + + isDeletable: function() + { + return DeviceTypeList.isDeletable(this); + }, + + /** + * Liefert den HTML-Code eines Thumbnails für das Gerät. + **/ + getThumbnailHTML: function(formName) + { + return DeviceTypeList.getThumbnailHTML(this.id, formName); + }, + + /** + * Liefert den HTML-Code eines Bildes für das Gerät. + **/ + getImageHTML: function(formName) + { + return DeviceTypeList.getImageHTML(this.id, formName); + } + +});/** + * devicetypelist.js + **/ + +/** + * Liste der verfügbaren Gerätetypen. + **/ +DeviceTypeList = Singleton.create({ + THUMBNAIL_SIZE: 50, // Größe eines (quadratischen) Thumbnails + IMAGE_SIZE: 250, // Größe eines (quadratischen) Bildes + + /** + * Liste der nicht löschbaren Gerätetypen + **/ + m_undeletableTypeNames: [ + "HM-CCU-1", + "HM-RCV-50", + "HMW-RCV-50", + "HmIP-RCV-50", + "HM-Sec-SD-Team", + "HM-Sec-SD-2-Team", + "HmIP-CCU3", + "RPI-RF-MOD", + "HmIP-RFUSB" + ], + + /** + * Konstruktor + **/ + initialize: function() + { + this.deviceTypes = {}; // verfügbare Gerätetypen + + for (var i = 0, len = DEV_LIST.length; i < len; i++) + { + var deviceType = new DeviceType(DEV_LIST[i]); + this.deviceTypes[deviceType.id] = deviceType; + } + + this.unknownType = this.deviceTypes["DEVICE"]; + }, + + /** + * Ermittelt, ob ein Gerät von diesem Typ gelöscht werden kann. + **/ + isDeletable: function(deviceType) + { + return !this.m_undeletableTypeNames.ex_contains(deviceType.name); + }, + + /** + * Erstellt den HTML-Code zu einem Bild bzw. Thumbnail + **/ + getPictureHTML: function(typeId, formName, size) + { + var wrapper, canvas, jg, result; + + wrapper = document.createElement("div"); + Element.setStyle(wrapper, {display: "none"}); + $("body").appendChild(wrapper); + + canvas = document.createElement("div"); + wrapper.appendChild(canvas); + Element.setStyle(canvas, { + position: "absolute", + left: "0px", + top: "0px" + }); + + jg = new jsGraphics(canvas); + InitGD(jg, size); + Draw(jg, typeId, size, formName); + + result = wrapper.innerHTML; + + Element.remove(wrapper); + return result; + }, + + /** + * Liefert die Liste aller Gerätetypen. + **/ + listDeviceTypes: function() + { + return Object.values(this.deviceTypes); + }, + + /** + * Liefert einen Geratetypen anhand seiner Id + **/ + getDeviceType: function(id) + { + var deviceType = this.deviceTypes[id]; + + if (typeof(deviceType) != "undefined") { return deviceType; } + else { return this.unknownType; } + }, + + /** + * Liefert den HTML-Code eines Thumbnails + **/ + getThumbnailHTML: function(typeId, formName) + { + return this.getPictureHTML(typeId, formName, this.THUMBNAIL_SIZE); + }, + + /** + * Liefert den HTML-Code eines Bildes + **/ + getImageHTML: function(typeId, formName) + { + return this.getPictureHTML(typeId, formName, this.IMAGE_SIZE); + } + +}); + +/** + * channel.js + **/ + +/** + * Kanal + **/ +Channel = Class.create({ + /** + * Konstruktor + **/ + + initialize: function(device, data) + { + var self = this; + var devAddress = data["address"].split(":")[0], + devMode, arBlindFW; + + + // Set the master parameter UNIVERSAL_LIGHT_MAX_CAPABILITIES of the HmIP-DRG-DALI Gateway as meta data + // Channels 1 - 32 = connected dali devices. Here we need only set the meta data for those channels where a device is connected. + // The first channel with no connected device has the UNIVERSAL_LIGHT_MAX_CAPABILITIES set to 5. All following channels don't have a device connected, so we can skip the rest. + // + // For the group channels 33 - 48 we need all UNIVERSAL_LIGHT_MAX_CAPABILITIES. + if ((device.typeName == "HmIP-DRG-DALI")) { + if (data.channelType == "UNIVERSAL_LIGHT_RECEIVER") { + var maxCap = data.daliMaxCapabilities; + if ((typeof maxCap == "undefined") || (maxCap == "undefined")) { + var maxCap = homematic("Interface.getMasterValue", { + "interface": "HmIP-RF", + "address": data.address, + "valueKey": "UNIVERSAL_LIGHT_MAX_CAPABILITIES" + }); + homematic("Interface.setMetadata", { + "objectId": data.id, "dataId": "maxCap", "value": maxCap + }); + } + this.daliMaxCapabilities = maxCap; // currently used for determining the target channels of the weekly program. + } + } + + + this.updateEvent = new eQ3.Event(); + + var chType = data["channelType"]; + + // This adds the attribute virtChCounter to the virtual channels + if (chType.indexOf("_VIRTUAL_RECEIVER") != -1) { + if (typeof virtChCounter == "undefined") { + virtChCounter = 1; + this.virtChCounter = virtChCounter; + } else { + if (virtChCounter < 3) { + virtChCounter++; + this.virtChCounter = virtChCounter; + } else { + delete virtChCounter; + } + } + } else { + delete virtChCounter; + } + + window.setTimeout(function() {delete virtChCounter;},15000); // Fallback to ensure this global var is being deleted after not in use anymore. + + if ((device.deviceType.description.indexOf("HmIPW-DRBL4") != -1) + || (device.deviceType.description.indexOf("HmIP-DRBLI4") != -1) + || (device.deviceType.description.indexOf("HmIP-BBL") != -1) + || (device.deviceType.description.indexOf("HmIP-BBL-2") != -1) + || (device.deviceType.description.indexOf("HmIP-BBL-I") != -1) + || (device.deviceType.description.indexOf("HmIP-FBL") != -1) + + ) { + if (chType.indexOf("BLIND_TRANSMITTER") != -1 || chType.indexOf("BLIND_VIRTUAL_RECEIVER") != -1) { + if (typeof devToConfigure != "undefined" || typeof blindChAddress == "undefined" || blindChAddress != devAddress) { + blindChAddress = devAddress; + var devDescr = homematic("Interface.getDeviceDescription", {"interface": "HmIP-RF", "address":devAddress}); + if (devDescr) { + blindFw = devDescr.firmware; + arBlindFW = blindFw.split("."); + fwGTE16 = (arBlindFW[0] > 1 || ((arBlindFW[0] = 1) && (arBlindFW[1] >= 6))); + window.setTimeout(function() {delete blindChAddress; delete blindFw; delete fwGTE16;},10000); + } + } + + + if (typeof fwGTE16 != "undefined" && fwGTE16) { + homematic("Interface.getMetadata_crRFD", {"interface": "HmIP-RF", "objectId": data["address"], "dataId": "channelMode"}, function(result) { + if (result == "") { + self.changedMultiMode = "shutter"; + data["channelType"] = data["channelType"].replace("BLIND", "SHUTTER"); + + homematic("Interface.setMetadata_crRFD", { + "interface" : "HmIP-RF", + "objectId" : data["address"], + "dataId" : "channelMode", + "value" : self.changedMultiMode + }); + + homematic("Interface.setMetadata", { + "objectId" : data["address"], + "dataId" : "channelMode", + "value" : self.changedMultiMode + }); + + } else { + self.changedMultiMode = result; + if (result == "shutter") { + data["channelType"] = data["channelType"].replace("BLIND", "SHUTTER"); + } + } + self.update(device, data); + }); + } else { + // Fw. < 1.6 - The default channel type is always BLIND + // Check if meta data already available. If not create them. + homematic("Interface.getMetadata_crRFD", {"interface": "HmIP-RF", "objectId": data["address"], "dataId": "channelMode"}, function(result) { + if (result == "") { + devMode = "blind"; + + homematic("Interface.setMetadata_crRFD", { + "interface" : "HmIP-RF", + "objectId" : data["address"], + "dataId" : "channelMode", + "value" : devMode + }); + + homematic("Interface.setMetadata", { + "objectId" : data["address"], + "dataId" : "channelMode", + "value" : devMode + }); + } + }); + } + } + } else { + this.changedMultiMode = ""; + } + + this.update(device, data); + }, + + /** + * Aktualisiert die Kanaldaten + **/ + update: function(device, data) + { + var deviceType = device.deviceType, + chnMultiMode; + + if ((device) && (data)) + { + this.id = data["id"]; + this.name = data["name"]; + this.nameExtention = ""; + this.address = data["address"]; + this.deviceId = data["deviceId"]; + this.device = device; + this.deviceType = deviceType; + this.virtChannelType = ""; // for HmIPW-DRBLx + this.typeName = deviceType.name; + this.typeDescription = deviceType.description; + this.channelType = data["channelType"]; + this.partnerId = data["partnerId"]; + this.groupId = (this.id < this.partnerId) ? this.id + "_" + this.partnerId : this.partnerId + "_" +this.id; + this.index = data["index"]; + this.category = translateKey(Channel.getCategoryName(data["category"])); + this.mode = translateKey(Channel.getModeName(data["mode"])); + this.isAesAvailable = data["isAesAvailable"]; + this.isLogged = data["isLogged"]; + this.isVisible = data["isVisible"]; + this.isReadyConfig = data["isReady"]; + this.isVirtual = data["isVirtual"]; + this.isLogable = data["isLogable"]; + this.isReadable = data["isReadable"]; + this.isWritable = data["isWritable"]; + this.isEventable = data["isEventable"]; + this.isInternal = data["isInternal"] + + if (typeof data["mode_multi_mode"] != "undefined") { + this.multiMode = data["mode_multi_mode"]; + } else { + if (this.changedMultiMode != "") { + this.multiMode = this.changedMultiMode; + } + } + + if ((ConfigData.isPresent) && (this.channelType == "MULTI_MODE_INPUT_TRANSMITTER")) { + if (! isNaN(this.multiMode)) { + data.multiMode = this.multiMode; + homematic("Interface.setMetadata", {"objectId": data.id, "dataId": "channelMode", "value": this.multiMode}); + } + } + + this.isUsable = (this.isWritable && data["isUsable"]); + this.thumbnailHTML = deviceType.getThumbnailHTML(this.index); + this.imageHTML = deviceType.getImageHTML(this.index); + } + + this.m_extendName(); + + this.rooms = this.m_getRooms(); + this.subsections = this.m_getSubsections(); + + + }, + + m_extendName: function() { + var ext = getExtendedDescription({"deviceType":this.typeName,"channelType": this.channelType,"channelID": this.id, "channelAddress": this.address,"channelIndex" : this.index, "isVisible" : this.isVisible, "multiMode" : this.multiMode}); + if (ext.length > 0) { + this.nameExtention += "
" + ext; + } + this.m_setWiredBlind(); + }, + + /** + * Ermittelt alls Räume, in denen der Kanal definiert ist + **/ + m_getRooms: function() + { + var result = []; + var rooms = RoomList.list(); + var id = this.id; + + rooms.each(function(room) { + if (room.contains(id)) { result.push(room); } + }); + + return result; + }, + + /** + * Ermittelt alls Gewerke, in denen der Kanal definiert ist + **/ + m_getSubsections: function() + { + var result = []; + var subsections = SubsectionList.list(); + var id = this.id; + + subsections.each(function(subsection) { + if (subsection.contains(id)) { result.push(subsection); } + }); + + return result; + }, + + m_setWiredBlind: function() { + if (((this.typeDescription.indexOf("HmIPW-") != -1) && (this.channelType.indexOf("BLIND_") != -1)) + || (this.typeDescription.toLocaleLowerCase() == "hmip-drbli4") + || (this.typeDescription.toLocaleLowerCase() == "hmip-bbl-2") + ) { + + if (this.channelType.indexOf("BLIND_WEEK_PROFILE") == -1) { + var curType = ""; + + curType = (this.multiMode == "shutter") ? this.channelType.replace("BLIND", "SHUTTER") : this.channelType; + + this.virtChannelType = curType; + + var ext = getExtendedDescription({ + "deviceType": this.typeName, + "channelType": this.virtChannelType, + "channelID": this.id, + "channelAddress": this.address, + "channelIndex": this.index, + "isVisible": this.isVisible + }); + if (ext.length > 0) { + this.nameExtention = "
" + ext; + } + } + } + }, + + getVirtChannelType : function() { + return this.virtChannelType; + }, + + changeChannelDescription: function() { + this.m_setWiredBlind(); + }, + + /** + * Legt den Namen des Kanals fest + **/ + setName: function(name) + { + if (this.name != name) + { + var result = homematic("Channel.setName", {id: this.id, name: name}); + if (typeof(result) == "string") + { + this.name = result; + this.updateEvent.fire(this, {reason: "setName", isUsable: this.name}); + } + } + + return this.name; + }, + + /** + * Legt fest, ob der Kanal für normale Anwender sichtbar ist + **/ + setVisibility: function(isVisible) + { + if (this.isVisible != isVisible) + { + var result = homematic("Channel.setVisibility", {id: this.id, isVisible: isVisible}); + if (typeof(result) == "boolean") + { + this.isVisible = result; + this.updateEvent.fire(this, {reason: "setVisibility", isUsable: this.isVisible}); + } + } + + return this.isVisible; + }, + + /** + * Legt fest, ob der Kanal für normale Anwender bedienbar ist + **/ + setUsability: function(isUsable) + { + if (this.isUsable != isUsable) + { + var result = homematic("Channel.setUsability", {id: this.id, isUsable: isUsable}); + if (typeof(result) == "boolean") + { + this.isUsable = result; + this.updateEvent.fire(this, {reason: "setUsability", isUsable: this.isUsable}); + } + } + + return this.isUsable; + }, + + /** + * Legt fest, ob der Kanal protokolliert wird + **/ + setLogging: function(isLogged) + { + if (this.isLogged != isLogged) + { + var result = homematic("Channel.setLogging", {id: this.id, isLogged: isLogged}); + if (typeof(result) == "boolean") + { + this.isLogged = result; + this.updateEvent.fire(this, {reason: "setLogging", isLogged: this.isLogged}); + } + } + + return this.isLogged; + }, + + getMultiMode: function(mode) { + return this.changedMultiMode; + }, + + setMultiMode: function(mode) { + this.changedMultiMode = mode; + this.updateEvent.fire(this, {reason: "setMultiMode", changedMultiMode: this.changedMultiMode}); + }, + + + /** + * Legt den Übertragungsmodus des Kanals fest. + **/ + setMode: function(mode) + { + + if (this.mode != mode) + { + var result = homematic("Channel.setMode", {id: this.id, mode: Channel.getMode(mode)}); + if (typeof(result) == "string") + { + this.mode = translateKey(Channel.getModeName(result)); + this.updateEvent.fire(this, {reason: "setMode", mode: this.mode}); + } + } + return this.mode; + }, + + getName: function() + { + return this.name; + }, + + /** + * Liefert die Kanalgruppe + **/ + getChannelGroup: function() + { + return DeviceList.getChannelGroup(this.groupId); + }, + + addToRoom: function(room) + { + if (!this.rooms.ex_contains(room)) + { + this.rooms.push(room); + this.rooms.ex_sortBy("name"); + this.updateEvent.fire(this, {reason: "addToRoom", room: room}); + } + }, + + removeFromRoom: function(room) + { + if (this.rooms.ex_contains(room)) + { + this.rooms = this.rooms.without(room); + this.rooms.ex_sortBy("name"); + this.updateEvent.fire(this, {reason: "removeFromRoom", room: room}); + } + }, + + /** + * Fügt dem Kanal ein Gewerk hinzu. + * Diese Methode dient lediglich zur Aktualisierung des Datenmodells. + * Um den Kanal einem Gewerk hinzuzufügen, sollte + * Subsection.addChannel(channel, true) + * verwendet werden. + **/ + addToSubsection: function(subsection) + { + if (!this.subsections.ex_contains(subsection)) + { + this.subsections.push(subsection); + this.subsections.ex_sortBy("name"); + this.updateEvent.fire(this, {reason: "addToSubsection", subsection: subsection}); + } + }, + + /** + * Entfernt den Kanal aus einem Gewerk. + * Diese Methode dient lediglich zur Aktualisierung des Datenmodells. + * Um den Kanal aus dem Gewerk zu löschen, sollte + * Subsection.removeChannel(channel, true) + * verwendet werden. + **/ + removeFromSubsection: function(subsection) + { + if (this.subsections.ex_contains(subsection)) + { + this.subsections = this.subsections.without(subsection); + this.subsections.ex_sortBy("name"); + this.updateEvent.fire(this, {reason: "removeFroSubsections", subsection: subsection}); + } + }, + + + /** + * Liefert eine Liste sämtlicher Programme (Ids), die den Kanal verwenden + **/ + listProgramIds: function() + { + return homematic("Channel.listProgramIds", {"id": this.id}); + }, + + /** + * Liefert eine Liste sämtlicher Programme (Ids), die den Kanal verwenden + **/ + hasProgramIds: function() + { + return homematic("Channel.hasProgramIds", {"id": this.id}); + }, + + /** + * Ermittelt, ob der Kanal den Funktionstest unterstützt. + **/ + supportsComTest: function() + { + return this.isEventable; + } + +}); + +/*##############*/ +/*# Konstanten #*/ +/*##############*/ + +Channel.CATEGORY = +{ + NONE: "lblChannelNotLinkable", + SENDER: "lblSender", + RECEIVER: "lblReceiver" + +}; + +Channel.MODE = +{ + DEFAULT: "lblStandard", + AES : "lblSecured" +}; + +Channel.INVALID_ID = ""; + +/*########################*/ +/*# Statische Funktionen #*/ +/*########################*/ + +/** + * Liefert den Übertragungsmodus anhand seines Namens. + **/ +Channel.getMode = function(modeName) +{ + switch (modeName) + { + //case translateKey(Channel.MODE.DEFAULT): return "MODE_DEFAULT"; + //case translateKey(Channel.MODE.AES) : return "MODE_AES"; + case "Standard" : return "MODE_DEFAULT"; + case "Gesichert" : return "MODE_AES"; + default: return "MODE_DEFAULT"; + } +}; + +/** + * Liefert den Namen eines Übertragungs-Modus + **/ +Channel.getModeName = function(mode) +{ + switch (mode) + { + case "MODE_DEFAULT": return Channel.MODE.DEFAULT; + case "MODE_AES": return Channel.MODE.AES; + default: return Channel.MODE.DEFAULT; + } +}; + +/** + * Liefert den Namen einer Kategorie. + **/ +Channel.getCategoryName = function(category) +{ + switch (category) + { + case "CATEGORY_NONE": return Channel.CATEGORY.NONE; + case "CATEGORY_SENDER": return Channel.CATEGORY.SENDER; + case "CATEGORY_RECEIVER": return Channel.CATEGORY.RECEIVER; + default: return Channel.CATEGORY.NONE; + } +}; +/** + * channelgroup.js + **/ + +/** + * Kanalgruppe. + **/ +ChannelGroup = Class.create({ + + /** + * Konstruktor + **/ + initialize: function(device, channel) + { + this.m_updateChannelHandler = this.m_onUpdateChannel.bind(this); + + this.id = channel.groupId; + this.device = device; + this.typeName = device.deviceType.name; + this.typeDescription = device.deviceType.description; + this.channels = []; + this.thumbnailHTML = null; + this.imageHTML = null; + + this.update(device, channel); + }, + + /** + * Aktualisiert die Kanalgruppe + **/ + update: function(device, channel) + { + if ((device) && (channel)) + { + var deviceType = device.deviceType; + + channel.updateEvent.add(this.m_updateChannelHandler); + + this.channels.ex_pushUnique(channel); + this.channels.ex_sortBy("index"); + this.formName = this.channels.ex_joinItem("index", "+"); + this.name = this.channels.ex_joinItem("name", " "); + this.address = this.channels.ex_joinItem("address", " "); + this.thumbnailHTML = deviceType.getThumbnailHTML(this.formName); + this.imageHTML = deviceType.getImageHTML(this.formName); + } + + this.isUsable = false; + this.isVisible = false; + this.isLogged = false; + this.categories = []; + this.modes = []; + this.rooms = []; + this.subsections = []; + + this.channels.each(function(channel) { + this.isUsable |= channel.isUsable; + this.isVisible |= channel.isVisible; + this.isLogged |= channel.isLogged; + this.categories.push(channel.category); + this.modes.push(channel.mode); + this.rooms = this.rooms.concat(channel.rooms); + this.subsections = this.subsections.concat(channel.subsections); + }, this); + + this.categories = this.categories.uniq(); + this.modes = this.modes.uniq(); + this.rooms = this.rooms.uniq().ex_sortBy("name"); + this.subsections = this.subsections.uniq().ex_sortBy("name"); + }, + + m_onUpdateChannel: function(channel, eventArgs) + { + this.update(this.device, channel); + }, + + addSubsection: function(subsection) + { + if (!this.subsections.ex_contains(subsection)) + { + this.subsections.push(subsection); + this.subsections.ex_sortBy("name"); + } + }, + + removeSubsection: function(subsection) + { + if (this.subsections.ex_contains(subsection)) + { + this.subsections = this.subsections.without(subsection); + } + }, + + /** + * Liefert die Ids aller Programme, welche mindestens einen Kanal der Gruppe verwenden + **/ + listProgramIds: function() + { + var ids = []; + this.channels.each(function(channel) { + ids = ids.concat(homematic("Channel.listProgramIds", {"id": channel.id})); + }); + return ids.uniq(); + } + +}); + +/** + * device.js + **/ + +/** + * HomeMatic Gerät. + **/ +Device = Class.create({ + + /** + * Konstruktor + **/ + initialize: function(data) + { + this.m_updateChannelHandler = this.m_onUpdateChannel.bind(this); + + this.update(data); + }, + + /** + * Aktualisiert die Gerätedaten + **/ + update: function(data) + { + if (data) + { + var deviceType = DeviceTypeList.getDeviceType(data["type"]); + + this.id = data["id"]; + this.name = data["name"]; + this.address = data["address"]; + + // For debugging only + this.rfAddress = ""; + if (showRFAddress) { + var self = this; + homematic("Device.getRFAddressByAddress", {"address": this.address}, function(result) { + self.rfAddress = "

0x" + parseInt(result.split(":")[1]).toString(16); + }); + } + // End debugging + + this.interfaceName = data["interface"]; + this.interfaceDisplayName = data["interface_displayname"]; + this.isReadyConfig = data["isReady"]; + this.enabledServiceMsg = (data["enabledServiceMsg"] == "true") ? true : false; + this.thumbnailHTML = deviceType.getThumbnailHTML(); + this.imageHTML = deviceType.getImageHTML(); + this.deviceType = deviceType; + this.typeName = deviceType.name; + this.typeDescription = deviceType.description; + this.isDeletable = deviceType.isDeletable(); + this.isOperateGroupOnly = (data["operateGroupOnly"] == "true") ? true : false; + this.deviceInputCheck = false; + + this.channels = new Array(); + this.groups = new Array(); + this.singles = new Array(); + data["channels"].each(function(data) { + var channel = DeviceList.updateChannel(this, data); + channel.updateEvent.add(this.m_updateChannelHandler); + this.channels.push(channel); + + if (channel.partnerId == Channel.INVALID_ID) + { + this.singles.push(channel); + } + else + { + var group = DeviceList.updateChannelGroup(this, channel); + this.groups.ex_pushUnique(group); + } + }, this); + } + + this.isWritable = false; + this.isVisible = false; + this.isUsable = false; + this.isLogged = false; + this.isLogable = false; + this.categories = []; + this.modes = []; + this.rooms = []; + this.subsections = []; + + this.channels.each(function(channel) { + this.isWritable |= channel.isWritable; + this.isVisible |= channel.isVisible; + this.isUsable |= channel.isUsable; + this.isLogged |= channel.isLogged; + this.isLogable |= channel.isLogable; + this.categories.push(channel.category); + this.modes.push(channel.mode); + this.rooms = this.rooms.concat(channel.rooms); + this.subsections = this.subsections.concat(channel.subsections); + }, this); + + this.categories = this.categories.uniq(); + this.modes = this.modes.uniq(); + this.rooms = this.rooms.uniq().ex_sortBy("name"); + this.subsections = this.subsections.uniq().ex_sortBy("name"); + }, + + /** + * Startet die Aktualisierung der Werte des Gerätestatus + **/ + updateStatus:function(deviceStatus, rssiListHmRF) + { + // catch DUTY_CYCLE or DUTYCYCLE + if (typeof(deviceStatus.DUTY_CYCLE) !== "undefined") + this.DUTY_CYCLE = !!+deviceStatus.DUTY_CYCLE; + if (typeof(deviceStatus.DUTYCYCLE) !== "undefined") + this.DUTY_CYCLE = !!+deviceStatus.DUTYCYCLE; + + // catch OPERATING_VOLTAGE + if (typeof(deviceStatus.OPERATING_VOLTAGE) !== "undefined") + this.OPERATING_VOLTAGE = deviceStatus.OPERATING_VOLTAGE; + + // catch SABOTAGE + if (typeof(deviceStatus.SABOTAGE) !== "undefined") + this.SABOTAGE = !!+deviceStatus.SABOTAGE; + + // catch UNREACH + if (typeof(deviceStatus.UNREACH) !== "undefined") + this.UNREACH = !!+deviceStatus.UNREACH; + + // catch ERROR_OVERHEAT + if (typeof(deviceStatus.ERROR_OVERHEAT) !== "undefined") + this.ERROR_OVERHEAT = !!+deviceStatus.ERROR_OVERHEAT; + + // catch LOWBAT or LOW_BAT + if (typeof(deviceStatus.LOWBAT) !== "undefined") + this.LOWBAT = !!+deviceStatus.LOWBAT; + if (typeof(deviceStatus.LOW_BAT) !== "undefined") + this.LOWBAT = !!+deviceStatus.LOW_BAT; + + // catch CONFIG_PENDING + if (typeof(deviceStatus.CONFIG_PENDING) !== "undefined") + this.CONFIG_PENDING = !!+deviceStatus.CONFIG_PENDING; + + // catch UPDATE_PENDING + if (typeof(deviceStatus.UPDATE_PENDING) !== "undefined") + this.UPDATE_PENDING = !!+deviceStatus.UPDATE_PENDING; + + // catch RSSI_DEVICE and RSSI_PEER + // in case of a BidCos-RF device we take the RSSI + // values fron the supplied rssiListHmRF + if (this.interfaceName === 'BidCos-RF') + { + if (rssiListHmRF !== null) + { + var address = this.address; + var rssiInfo = rssiListHmRF.find(function(x) { return x.name === address }); + + if (rssiInfo !== null && typeof(rssiInfo) !== 'undefined' && + rssiInfo.partner !== null && typeof(rssiInfo.partner) !== 'undefined') + { + var rssiData = rssiInfo.partner[0].rssiData; + this.RSSI_DEVICE = rssiData[0]; + this.RSSI_PEER = rssiData[1]; + if(this.RSSI_DEVICE === 65536) + this.RSSI_DEVICE = -65535; + if(this.RSSI_PEER === 65536) + this.RSSI_PEER = -65535; + } + } + } + else + { + if (typeof(deviceStatus.RSSI_DEVICE) !== "undefined") + this.RSSI_DEVICE = deviceStatus.RSSI_DEVICE; + + if (typeof(deviceStatus.RSSI_PEER) !== "undefined") + this.RSSI_PEER = deviceStatus.RSSI_PEER; + } + + // update/calculate the web colors for displaying + // the RSSI values like in devconfig + if (this.RSSI_DEVICE !== null || this.RSSI_PEER !== null) + this.updateRssiColors(); + + // now we update the table cell with a pregenerated HTML + var cell = document.getElementById('DeviceStatus' + this.id); + if (cell !== null && typeof(cell) !== 'undefined') + { + var html = ''; + + if (this.enabledServiceMsg === false) + html += 'NO SERVICEMSG
'; + + if (this.CONFIG_PENDING === true) + html += 'CONFIG
'; + + if (this.UPDATE_PENDING === true) + html += 'UPDATE
'; + + if (this.LOWBAT === true) + html += 'LOWBAT
'; + + if (this.UNREACH === true) + html += 'UNREACH
'; + + if (this.ERROR_OVERHEAT === true) + html += 'OVERHEAT
'; + + if (this.SABOTAGE === true) + html += 'SABOTAGE
'; + + if (this.OPERATING_VOLTAGE && parseFloat(this.OPERATING_VOLTAGE) > 0) + html += parseFloat(this.OPERATING_VOLTAGE).toFixed(1) + ' V
'; + + if (this.RSSI_DEVICE && this.RSSI_DEVICE > -65535) + html += this.RSSI_DEVICE + ' dBm 
'; + + if (this.RSSI_PEER && this.RSSI_PEER > -65535) + html += this.RSSI_PEER + ' dBm 
'; + + if (this.DUTY_CYCLE === true) + html += 'DUTYCYCLE
'; + + cell.innerHTML = html; + } + }, + + /** + * Startet die Aktualisierung der RSSI Werte + **/ + updateRssiColors:function() + { + var getColorCode = function(rssi) + { + var RSSI_BAD = -120.0; + var RSSI_MEDIUM = -100.0; + var RSSI_GOOD = -20.0; + + var rssi_color = function(lower_bound, upper_bound, rssi) + { + var result = 256 * (rssi - lower_bound) / (upper_bound - lower_bound); + if (result < 0) result = 0; + if (result > 255) result = 255; + return Math.round(result); + }; + + if (rssi > -65535) + { + var red = rssi_color(RSSI_GOOD, RSSI_MEDIUM, rssi); + var green = rssi_color(RSSI_BAD, RSSI_MEDIUM, rssi); + return "#" + ('00'+(red).toString(16)).substr(-2) + + ('00'+(green).toString(16)).substr(-2) + + "00"; + } + else + return "#000000"; + }; + + this.rssiDeviceColor = getColorCode(this.RSSI_DEVICE); + this.rssiPeerColor = getColorCode(this.RSSI_PEER); + }, + + updateInterfaceDisplayName: function(interfaceDisplayName) { + this.interfaceDisplayName = interfaceDisplayName; + var devInterfaceDisplayNameCell = document.getElementById('DeviceInterfaceDisplayName' + this.id); + if (devInterfaceDisplayNameCell !== null && typeof(devInterfaceDisplayNameCell) !== 'undefined') { + devInterfaceDisplayNameCell.innerHTML = interfaceDisplayName; + } + }, + /** + * Legt den Namen des Geräts fest. + **/ + setName: function(name) + { + if (name != this.name) + { + var result = homematic("Device.setName", {id: this.id, name: name}); + if (typeof(result) == "string") + { + this.name = result; + } + } + + return this.name; + }, + + setUsable: function(isUsable) + { + }, + + setVisible: function(isVisible) + { + }, + + setLogging: function(isLogged) + { + }, + + /** + * Legt fest, ob das Geraet Servicemeldungen auslöst oder nicht + **/ + setEnabledServiceMsg: function(enabledServiceMsg) + { + if (this.enabledServiceMsg != enabledServiceMsg) + { + var result = homematic("Device.setEnabledServiceMsg", {id: this.id, isEnabled: enabledServiceMsg}); + if (typeof(result) == "boolean" && result === true) + { + this.enabledServiceMsg = enabledServiceMsg; + } + } + + return this.enabledServiceMsg; + }, + + setDeviceInputCheck: function() { + this.deviceInputCheck = true; + }, + + getDeviceInputCheck: function() { + return this.deviceInputCheck; + }, + + m_onUpdateChannel: function(channel, eventArgs) + { + this.update(); + }, + + addSubsection: function(subsection) + { + if (!this.subsections.ex_contains(subsection)) + { + this.subsections.push(subsection); + this.subsections.ex_sortBy("name"); + } + }, + + removeSubsection: function(subsection) + { + if (this.subsections.ex_contains(subsection)) + { + this.subsections = this.subsections.without(subsection); + } + }, + + getName: function() + { + return this.name; + }, + + /** + * Liefert den HTML-Code des Geräte-Vorschau-Bildes + **/ + getThumbnailHTML: function() + { + if (this.thumbnailHTML === null) + { + this.thumbnailHTML = this.deviceType.getThumbnailHTML(); + } + + return this.thumbnailHTML; + }, + + /** + * Liefert den HTML-Code des Gerätebildes + **/ + getImageHTML: function() + { + if (this.imageHTML === null) + { + this.imageHTML = this.deviceType.getImageHTML(); + } + + return this.imageHTML; + }, + + /** + * Liefert die Ids der Programme, die mindestens einen Kanal des Geräts verwenden + **/ + listProgramIds: function() + { + return homematic("Device.listProgramIds", {id: this.id}); + }, + + /** + * Ermittelt, ob das Gerät direkte Verknüpfungen oder Programme besitzt. + **/ + hasLinksOrPrograms: function(callback) + { + if (this.interfaceName != "HmIP-RF") { + homematic("Device.hasLinksOrPrograms", {id: this.id}, callback); + } else { + var self = this; + var result = false; + + var arLinkPeers = homematic("Interface.getLinkPeers", {'interface': this.interfaceName, 'address': this.address}); + jQuery.each(arLinkPeers, function(index,val) { + var linkPeerAddress = val.split(":")[0]; + if (self.address != linkPeerAddress) { + result = true; + return; // leave the each loop + } + }); + + // No links available, check if the device is used within programs + if (!result) { + result = homematic("Device.hasPrograms", {'id': this.id}); + } + + if (callback) { + callback(result); + } + } + }, + + /** + * Asynchron. Versucht ein Gerät zu löschen. + **/ + remove: function(flags, callback) + { + var _this_ = this; + var _callback_ = callback; + + homematic("Interface.deleteDevice", { + "interface": this.interfaceName, + address: this.address, + flags: flags + }, function(result, error) { + if (result === true) + { + // DeviceList.removeDevice(_this_); + } + if (_callback_) { _callback_(result, error); } + }); + } + +}); +/** + * devicelist.js + * Geräteliste. + **/ + +/** + * Geräteliste. + **/ +DeviceList = Singleton.create({ + + /** + * Konstruktor + **/ + initialize: function() + { + this.m_addRoomHandler = this.m_onAddRoom.bind(this); + this.m_removeRoomHandler = this.m_onRemoveRoom.bind(this); + this.m_addChannelToRoomHandler = this.m_onAddChannelToRoom.bind(this); + this.m_removeChannelFromRoomHandler = this.m_onRemoveChannelFromRoom.bind(this); + + this.m_addSubsectionHandler = this.m_onAddSubsection.bind(this); + this.m_removeSubsectionHandler = this.m_onRemoveSubsection.bind(this); + this.m_addChannelToSubsectionHandler = this.m_onAddChannelToSubsection.bind(this); + this.m_removeChannelFromSubsectionHandler = this.m_onRemoveChannelFromSubsection.bind(this); + + this.addEvent = new eQ3.Event(); + this.removeEvent = new eQ3.Event(); + + this.devices = {}; + this.channels = {}; + this.groups = {}; + }, + + /** + * Aktualisiert ein Gerät + **/ + updateDevice: function(data, callback) + { + var device; + + if (data !== null) + { + var id = data["id"]; + device = this.devices[id]; + data["interface_displayname"] = this.loadIfDisplayName(data); + + if (typeof(device) != "undefined") + { + device.update(data); + } + else + { + device = new Device(data); + this.devices[id] = device; + this.addEvent.fire(this, {device: device}); + } + } + + if (callback) { callback(); } + return device; + }, + + /** + * Aktualisiert einen Kanal + **/ + updateChannel: function(device, data) + { + var channel; + + if (data !== null) + { + var id = data["id"]; + channel = this.channels[id]; + + if (typeof(channel) != "undefined") + { + channel.update(device, data); + } + else + { + channel = new Channel(device, data); + this.channels[id] = channel; + } + } + + return channel; + }, + + /** + * Aktualisiert eine Kanalgruppe + **/ + updateChannelGroup: function(device, channel) + { + var id = channel.groupId; + var group = this.groups[id]; + + if (typeof(group) != "undefined") + { + group.update(device, channel); + } + else + { + group = new ChannelGroup(device, channel); + this.groups[id] = group; + } + + return group; + }, + + /** + * Entfernt ein Gerät aus dem Datenmodell + **/ + removeDevice: function(device) + { + // alert("removeDevice: " + device.id); + + delete this.devices[device.id]; + device.groups.each(function(group) { delete this.groups[group.id]; }, this); + device.channels.each(function(channel) { delete this.channels[channel.id]; }, this); + + this.removeEvent.fire(this, {device: device}); + }, + + /** + * Liefert die Liste aller Geräte. + **/ + listDevices: function() + { + return Object.values(this.devices); + }, + + /** + * Liefert die Liste aller Kanalgruppen. + **/ + listChannelGroups: function() + { + return Object.values(this.groups); + }, + + /** + * Liefert die Liste aller Kanäle. + **/ + listChannels: function() + { + return Object.values(this.channels); + }, + + /** + * Liefert die Liste aller Kanäle ohne Gruppen-Partner. + **/ + listSingleChannels: function() + { + var singles = new Array(); + for (var id in m_devices) { singles = singles.concat(m_devices[id].SingleChannels()); } + return singles; + }, + + loadBidCosGateways: function() + { + this.BidCosGateways=[]; + this.allBidCosDevsList = homematic("Interface.listDevices", {"interface": "BidCos-RF"}); + var rfGateways = homematic("BidCoS_RF.getConfigurationRF"); + if (rfGateways) { + for (i = 0, len = rfGateways.interfaces.length; i < len; i++) { + var gateway = rfGateways.interfaces[i]; + if (gateway.type === globalLGWTypes.HMLGW2) { + this.BidCosGateways.push( + new BidcosRfPage.Gateway() + .setGatewayClass("RF") + .setType(gateway.type) + .setUserName((gateway.userName.length > 0) ? gateway.userName : gateway.serialNumber) + .setAddress(gateway.serialNumber) + .setKey(gateway.encryptionKey) + .setIP(gateway.ipAddress) + ); + } + } + this.BidCosGateways.sort((a, b) => a.m_userName.localeCompare(b.m_userName, undefined, { numeric: true, sensitivity: 'base' })); + for (i = 0, len = this.BidCosGateways.length; i < len; i++) { + DeviceListPage.INTERFACES.push({id:this.BidCosGateways[i].m_userName, name:this.BidCosGateways[i].m_userName}); + } + } + }, + + loadIfDisplayName: function(data) + { + if (typeof this.BidCosGateways === 'undefined') { this.loadBidCosGateways(); } + var dispname = data["interface"]; + if ( this.allBidCosDevsList && this.BidCosGateways.length > 0 && data["interface"] === "BidCos-RF") { + var idx = this.allBidCosDevsList.findIndex(({ address }) => address === data["address"]); + if (idx > -1) { + var _device= this.allBidCosDevsList[idx]; + var gwIdx = this.BidCosGateways.findIndex(({ m_address }) => m_address === _device["interface"]); + if ( gwIdx > -1 ) { + dispname = (this.BidCosGateways[gwIdx].m_userName.length > 0) ? this.BidCosGateways[gwIdx].m_userName : _device["interface"]; + } + } + } + return dispname; + }, + /** + * Lädt die Geräteliste erneut + **/ + reload: function(loader) + { + eQ3.HomeMatic.Event.subscribe("delete", function(type, data) { + var address = data; + var device = DeviceList.getDeviceByAddress(address); + + if (device) { DeviceList.removeDevice(device); } + }); + RoomList.addEvent.add(this.m_addRoomHandler); + RoomList.removeEvent.add(this.m_removeRoomHandler); + SubsectionList.addEvent.add(this.m_addSubsectionHandler); + SubsectionList.removeEvent.add(this.m_removeSubsectionHandler); + + var _loader_ = loader; + var _this_ = this; + var _ids_ = []; + var current = 0; + + var typeCCU1 = "HM-CCU-1"; + + var loadNext = function() + { + if (current < _ids_.length) + { + _this_.beginUpdateDevice(_ids_[current], loadNext); + current++; + _loader_.reportLoadingState(current / _ids_.length); + } + else + { + _loader_.ready(); + } + }; + + this.devices = {}; + this.channels = {}; + this.groups = {}; + + var self=this; + homematic("Device.listAllDetail", null, function(deviceList) { + // alert("after listAllDetail devices: " + deviceList); + jQuery.each(deviceList, function (index, data) { + // console.dir (data); + if (data !== null && (data["type"] != typeCCU1)) + { + var id = data["id"]; + var device = self.devices[id]; + data["interface_displayname"] = self.loadIfDisplayName(data); + + if (typeof(device) != "undefined") + { + device.update(data); + } + else + { + device = new Device(data); + self.devices[id] = device; + self.addEvent.fire(this, {device: device}); + } + } + }); + loader.ready(); + }); +/** + homematic("Device.listAll", null, function(ids) { + if (ids !== null) + { + _ids_ = ids; + loadNext(); + } + else + { + loader.ready(); + } + }); + */ + }, + + /** + * Startet die Aktualisierung des Status aller Geräte. + **/ + updateDeviceStatus:function() + { + var _this_ = this; + + homematic("Interface.rssiInfo", {"interface": "BidCos-RF"}, function(rssiInfo) { + for (var id in _this_.devices) + { + var device = _this_.devices[id]; + if (device !== null && typeof(device) !== 'undefined' && device.interfaceName !== 'VirtualDevices') + { + homematic("Device.listStatus", {"id": device.id, "address": device.address, "interface": device.interfaceName}, function(data) { + if (data !== null && typeof(data) !== 'undefined') + { + var id = data["ID"]; + if (id !== null && typeof(id) !== 'undefined') + { + var device = _this_.devices[id]; + if (device !== null && typeof(device) !== 'undefined') + device.updateStatus(data, rssiInfo); + } + } + }); + } + } + }); + }, + + updateInterfaceDisplayName:function(addr,gwName) { + var _this_ = this; + for (var id in _this_.devices) { + var device = _this_.devices[id]; + if (device.address === addr) { + device.updateInterfaceDisplayName(gwName); + } + } + }, + + /** + * Startet die Akualisierung eines Geräts. + **/ + beginUpdateDevice:function(id, callback) + { + var _this_ = this; + var _callback_ = callback; + + homematic("Device.get", {"id": id}, function(data) { _this_.updateDevice(data, _callback_); }); + }, + + /** + * Liefert ein Gerät anhand seiner Id. + **/ + getDevice: function(id) + { + return this.devices[id]; + }, + + /** + * Liefert ein Gerät anhand seiner Seriennummer. + **/ + getDeviceByAddress: function(address) + { + for (var id in this.devices) + { + var device = this.devices[id]; + if (device.address == address) + { + return device; + } + } + + return undefined; + }, + + /** + * Liefert eine Kanalgruppe anhand ihrer Id + **/ + getChannelGroup: function(id) + { + return this.groups[id]; + }, + + /** + * Liefert einen Kanal anhand seiner Id. + **/ + getChannel: function(id) + { + return this.channels[id]; + }, + + /** + * Liefert einen Kanal anhand seiner Seriennummer. + **/ + getChannelByAddress: function(address) + { + for (var id in this.channels) + { + var channel = this.channels[id]; + if (channel.address == address) + { + return channel; + } + } + + return undefined; + }, + + /** + * Event-Handler. + * Wird aufgerufen, sobald ein Raum hinzugefügt wurde. + **/ + m_onAddRoom: function(roomList, eventArgs) + { + var room = eventArgs.room; + room.addChannelEvent.add(this.m_addChannelToRoomHandler); + room.removeChannelEvent.add(this.m_removeChannelFromRoomHandler); + + room.channelIds.each(function(id) { + var channel = DeviceList.getChannel(id); + if (channel) { channel.addToRoom(room); } + }); + }, + + /** + * Event-Handler. + * Wird aufgerufen, sobald ein Raum gelöscht wurde. + **/ + m_onRemoveRoom: function(roomList, eventArgs) + { + var room = eventArgs.room; + room.addChannelEvent.add(this.m_addChannelToRoomHandler); + room.removeChannelEvent.add(this.m_removeChannelFromRoomHandler); + + room.channelIds.each(function(id) { + var channel = DeviceList.getChannel(id); + if (channel) { channel.removeFromRoom(room); } + }); + }, + + /** + * Event-Handler. + * Wird aufgerufen, sobald ein Kanal einem Raum hinzugefügr wurde. + **/ + m_onAddChannelToRoom: function(room, eventArgs) + { + var channel = this.channels[eventArgs.channelId]; + if (channel) { channel.addToRoom(room); } + }, + + /** + * Event-Handler. + * Wird aufgerufen, sobald ein Kanal aus einem Raum entfernt wurde. + **/ + m_onRemoveChannelFromRoom: function(room, eventArgs) + { + var channel = this.channels[eventArgs.channelId]; + if (channel) { channel.removeFromRoom(room); } + }, + + /** + * Event-Handler. + * Wird aufgerufen, sobald ein neues Gewerk hinzugefügt wurde. + **/ + m_onAddSubsection: function(subsectionList, eventArgs) + { + var subsection = eventArgs.subsection; + subsection.addChannelEvent.add(this.m_addChannelToSubsectionHandler); + subsection.removeChannelEvent.add(this.m_removeChannelFromSubsectionHandler); + + subsection.channelIds.each(function(id) { + var channel = DeviceList.getChannel(id); + if (channel) { channel.addToSubsection(subsection); } + }); + }, + + /** + * Event-Handler. + * Wird aufgerufen, sobald ein Gewerk gelöscht wurde. + **/ + m_onRemoveSubsection: function(subsectionList, eventArgs) + { + var subsection = eventArgs.subsection; + subsection.addChannelEvent.add(this.m_addChannelToSubsectionHandler); + subsection.removeChannelEvent.add(this.m_removeChannelFromSubsectionHandler); + + subsection.channelIds.each(function(id) { + var channel = DeviceList.getChannel(id); + if (channel) { channel.removeFromSubsection(subsection); } + }); + }, + + /** + * Event-Handler. + * Wird aufgerufen, sobald ein Kanal einem Gewerk hinzugefügt wurde. + **/ + m_onAddChannelToSubsection: function(subsection, eventArgs) + { + var channel = this.channels[eventArgs.channelId]; + if (channel) { channel.addToSubsection(subsection); } + }, + + /** + * Event-Handler. + * Wird aufgerufen, sobald ein Kanal aus einem Gewerk entfernt wurde. + **/ + m_onRemoveChannelFromSubsection: function(subsection, eventArgs) + { + var channel = this.channels[eventArgs.channelId]; + if (channel) { channel.removeFromSubsection(subsection); } + } + +}); +/** + * layer.js + * Ebenen + **/ + +/** + * Ebenenverwaltung. + **/ +Layer = new function() +{ + /*####################*/ + /*# Private Elemente #*/ + /*####################*/ + + var Z_INDEX_INCR = 100; // Inkrement für den Ebenenindex + + var m_container = null; // Container für die Ebenen + var m_maxIndex = 0; // Maximal vergebener Index + var m_layer = {}; // Speichert die Indizes aller Ebenen + + /** + * Ermittelt den maximalen Z-Index. + **/ + var getMaxIndex = function() + { + var maxIndex = 0; + + for (id in m_layer) + { + var index = m_layer[id]; + if (index > maxIndex) { maxIndex = index; } + } + + return maxIndex; + }; + + /*########################*/ + /*# Öffentliche Elemente #*/ + /*########################*/ + + /** + * Initialisiert die Ebenenverwaltung. + **/ + this.init = function() + { + m_container = document.createElement("div"); + m_maxIndex = 0; + m_layer = {}; + + Element.addClassName(m_container, "LayerContainer"); + $("body").appendChild(m_container); + }; + + /** + * Fügt eine Ebene hinzu. + **/ + this.add = function(layer) + { + m_maxIndex = getMaxIndex() + Z_INDEX_INCR; + layer._layerId = m_maxIndex; + m_layer[layer._layerId] = m_maxIndex; + + Element.setStyle(layer, {"zIndex": m_maxIndex, "position": "absolute"}); + m_container.appendChild(layer); + }; + + /** + * Entfernt eine Ebene. + **/ + this.remove = function(layer) + { + try { + delete(m_layer[layer._layerId]); + m_maxIndex = getMaxIndex(); + m_container.removeChild(layer); + } catch(e) {}; + }; + +}(); +/** + * dialogbox.js + * Autor: Falk Werner, eQ-3 Entwicklung GmbH + **/ + +/** + * Allgmeine Dialogbox für die Kommunikation mit dem Benutzer. + **/ +DialogBox = function(callback, width, height) +{ + /*####################*/ + /*# Private Elemente #*/ + /*####################*/ + + var DEFAULT_CONTENT_WIDTH = 320; // Konstante. Standardbreite des Arbeitsbereichs + var DEFAULT_CONTENT_HEIGHT = 80; // Konstante. Standardhöhe des Arbeitsbereichs + var TITLE_HEIGHT = 20; // Konstante. Höhe der Titelleiste + var FOOTER_HEIGHT = 40; // Konstante. Höhe der Fußleiste + var BORDER_WIDTH = 2; // Konstante. Breite des Dialog-Rahmens + var BUTTON_HEIGHT = 32; // Konstante. Höhe eines Buttons + var BUTTON_WIDTH = 100; // Konstante. Breite eines Buttons + var BUTTON_BORDER = 1; // Konstante. Rahmenbreite eines Buttons + + var m_wrapper; // DOM-Element. Dialog-Hintergrund + var m_dialog; // DOM-Element. Dialogfenster + var m_title; // DOM-Element. Dialog-Titel + var m_content; // DOM-Element. Inhalt + var m_footer; // DOM-Element. Fußleiste + var m_callback = callback; // Rückruffunktion + + /** + * Interne Klasse. + **/ + var DialogBoxButton = function(caption, dialogResult, style) + { + /*####################*/ + /*# Private Elemente #*/ + /*####################*/ + + var m_button; // DOM-Element. Button + var m_caption; // DOM-Element. Beschriftung + var m_onClickListener; // onClick-Ereignis + var m_dialogResult = dialogResult; // Rückgabewert + + /** + * onClick-Ereignis-Handler. + **/ + var onClick = function() + { + if (m_callback) { m_callback(dialogResult); } + }; + + /*########################*/ + /*# Öffentliche Elemente #*/ + /*########################*/ + + /** + * Setzt die Beschriftung des Buttons. + **/ + this.setCaption = function(caption) + { + if ("undefined" != typeof(caption)) + { + m_caption.innerHTML = ""; + m_caption.appendChild(document.createTextNode(caption)); + } + }; + + /** + * Ermittelt das DOM-Element. + **/ + this.getElement = function() + { + return m_button; + }; + + /*###################*/ + /*# Initialisierung #*/ + /*###################*/ + + // Button-Style + if ("undefined" == typeof(style["width"])) { style["width"] = BUTTON_WIDTH + "px"; } + if ("undefined" == typeof(style["float"])) { style["float"] = "left"; } + style["height"] = BUTTON_HEIGHT + "px"; + style["margin"] = parseInt((FOOTER_HEIGHT - BUTTON_HEIGHT) / 2) + "px"; + + // Button-Beschriftung + m_caption = document.createElement("div"); + Element.addClassName(m_caption, "DialogButtonCaption"); + Element.setStyle(m_caption, + { + "margin" : BUTTON_BORDER + "px", + "lineHeight": (BUTTON_HEIGHT - (2 * BUTTON_BORDER)) + "px" + }); + m_caption.appendChild(document.createTextNode(caption)); + + // Button-Element + var margin = parseInt((FOOTER_HEIGHT - BUTTON_HEIGHT - (2 * BUTTON_BORDER)) / 2); + m_button = document.createElement("div"); + Element.addClassName(m_button, "DialogButton"); + Element.setStyle(m_button, style); + m_button.appendChild(m_caption); + + // Event-Handler + m_onClickListener = onClick.bindAsEventListener(this); + Event.observe(m_caption, "click", m_onClickListener); + }; + + /*########################*/ + /*# Öffentliche Elemente #*/ + /*########################*/ + + /** + * Zeigt die Dialogbox an. + **/ + this.show = function() + { + Layer.add(m_wrapper); + m_wrapper.show(); + }; + + /** + * Schließt die Dialogbox und entfernt sie aus dem DOM. + **/ + this.close = function() + { + Layer.remove(m_wrapper); + }; + + /** + * Setzt den Titel der Dialogbox. + **/ + this.setTitle = function(title) + { + m_title.innerHTML = ""; + m_title.appendChild(document.createTextNode(title)); + }; + + /** + * Setzt den Inhalt der Dialogbox mit einem HTML-Text. + **/ + this.setContentHTML = function(contentHTML) + { + m_content.innerHTML = contentHTML; + }; + + /** + * Setzt den Inhalt der Dialogbox mit einem DOM-Element. + **/ + this.setContent = function(content) + { + m_content.innerHTML = ""; + m_content.appendChild(content); + }; + + /** + * Fügt dem Dialog einen Button hinzu. + **/ + this.addButton = function(caption, dialogResult, style) + { + var button = new DialogBoxButton(caption, dialogResult, style); + m_footer.appendChild(button.getElement()); + + return button; + }; + + /*###################*/ + /*# Initialisierung #*/ + /*###################*/ + + var contentHeight = DEFAULT_CONTENT_HEIGHT; + var contentWidth = DEFAULT_CONTENT_WIDTH; + if ("undefined" != typeof(height)) { contentHeight = height; } + if ("undefined" != typeof(width )) { contentWidth = width; } + + var dialogWidth = contentWidth + (2 * BORDER_WIDTH); + var dialogHeight = contentHeight + TITLE_HEIGHT + FOOTER_HEIGHT + (4 * BORDER_WIDTH); + + // Titelleiste + m_title = document.createElement("div"); + Element.addClassName(m_title, "DialogBoxTitle"); + Element.setStyle(m_title, + { + "top" : BORDER_WIDTH + "px", + "left" : BORDER_WIDTH + "px", + "width" : contentWidth + "px", + "height": TITLE_HEIGHT + "px" + }); + + // Arbeitsbereich + m_content = document.createElement("div"); + Element.addClassName(m_content, "DialogBoxContent"); + Element.setStyle(m_content, + { + "top" : TITLE_HEIGHT + (2 * BORDER_WIDTH) + "px", + "left" : BORDER_WIDTH + "px", + "width" : contentWidth + "px", + "height": contentHeight + "px" + }); + + // Fußleiste + m_footer = document.createElement("div"); + Element.addClassName(m_footer, "DialogBoxFooter"); + Element.setStyle(m_footer, + { + "top" : TITLE_HEIGHT + contentHeight + (3 * BORDER_WIDTH) + "px", + "left" : BORDER_WIDTH + "px", + "width" : contentWidth + "px", + "height": FOOTER_HEIGHT + "px" + }); + + // Dialog + m_dialog = document.createElement("div"); + Element.addClassName(m_dialog, "DialogBox"); + Element.setStyle(m_dialog, + { + "top" : parseInt((WebUI.getHeight() - dialogHeight) / 2) + "px", + "left" : parseInt((WebUI.getWidth() - dialogWidth) / 2) + "px", + "width" : dialogWidth + "px", + "height": dialogHeight + "px" + }); + m_dialog.appendChild(m_title); + m_dialog.appendChild(m_content); + m_dialog.appendChild(m_footer); + new Draggable(m_dialog); + + // Dialog-Rahmen + m_wrapper = document.createElement("div"); + Element.addClassName(m_wrapper, "DialogBoxWrapper"); + m_wrapper.appendChild(m_dialog); +}; + +/** + * DialogResult + * Vordefinierte Rückgabewerte der DialogBox. + **/ +DialogResult = +{ + "ABORT" : -1, + "CANCEL": -2, + "IGNORE": -3, + "NO" : -4, + "NONE" : -5, + "OK" : -6, + "RETRY" : -7, + "YES" : -8 +}; + +/** + * messagebox.js + * Autor: Falk Werner, eQ-3 Entwicklung GmbH + **/ + + +MessageBox = Class.create({ + + initialize: function() + { + var screenWidth = WebUI.getWidth(); + var screenHeight = WebUI.getHeight(); + var frameWidth = MessageBox.DEFAULT_CONTENT_WIDTH + 20; + var frameHeight = MessageBox.DEFAULT_CONTENT_HEIGHT + 50; + var frameX = parseInt((screenWidth - frameWidth) / 2); + var frameY = parseInt((screenHeight - frameHeight) / 2); + + this.msgBox; + this.screenWidth = screenWidth; + this.screenHeight = screenHeight; + this.m_action = null; + this.frameWidth = frameWidth; + this.frameHeight = frameHeight; + + this.m_layer = document.createElement("div"); + + this.m_layer.className = "DialogLayer"; + + this.m_content = new UI.Text() + .setText("") + .setPosition(10, 10) + .setWidth(this.frameWidth - 20) + .setHeight(this.frameHeight - 50); + + this.m_okButton = new UI.Button() + .setPosition(parseInt((this.frameWidth - 150) / 2), this.frameHeight - 30) + .setText("OK") + .setAction(this.ok, this); + + this.m_frame = new UI.Frame() + .setTitle("Info") + .setContentSize(this.frameWidth, this.frameHeight) + .setPosition(frameX, frameY) + .add(this.m_content) + .add(this.m_okButton); + + this.m_layer.appendChild(this.m_frame.getElement()); + Layer.add(this.m_layer); + + }, + + setId: function(id) + { + this.m_layer.id = id; + return this; + }, + + centerBarGraph: function(id) + { + jQuery("#" + id).css("padding-left" , parseInt((this.frameWidth - 150) / 2)); + }, + + setTitle: function(title) + { + this.m_frame.setTitle(title); + return this; + }, + + setContentSize: function(width, height) + { + this.m_content.setWidth(width); + this.m_frame.setContentSize(parseInt(width) + 20, parseInt(height) + 50); + this.m_content.setWidth(width); + this.m_content.setHeight(height); + this.m_okButton.setPosition(parseInt(((width - 140) / 2)), parseInt(height) + 10); + this.m_frame.setPosition(parseInt((this.screenWidth - width) / 2),parseInt((this.screenHeight - this.m_frame.getHeight()) / 2) ); + return this; + }, + + hideOkButton: function() + { + jQuery(".UIButton").hide(); + }, + + setText: function(text) + { + this.m_content.setText(text); + return this; + }, + + centerText: function() + { + jQuery(".UIText").addClass("alignCenter"); + }, + + setHtml: function(html) + { + this.m_content.setHtml(html); + return this; + }, + + setAction: function(action, context) + { + if (typeof(context) != "undefined") { this.m_action = action.bind(context); } + else { this.m_action = action; } + + return this; + }, + + ok: function() + { + Layer.remove(this.m_layer); + if (typeof this.m_action == "function") { this.m_action(); } + }, + + setOkButtonText: function(lbl) { + this.m_okButton.setText(lbl); + } + +}); + +MessageBox.DEFAULT_CONTENT_HEIGHT = 80; +MessageBox.DEFAULT_CONTENT_WIDTH = 320; + +MessageBox.show = function(title, content, callback, width, height, id, barGraphId, btnText) +{ + this.msgBox = new MessageBox(); + this.msgBox.setTitle(title); + this.msgBox.setHtml(content); + + translatePage(".DialogLayer"); + + if (callback && callback != "") + { + this.msgBox.setAction(callback); + } + + if ((width && width != "") && (height && height != "")) + { + this.msgBox.setContentSize(width, height); + } + + if (typeof btnText != "undefined") { + this.msgBox.setOkButtonText(btnText); + } + + if (id) { + this.msgBox.setId(id); + } + + if (barGraphId) { + this.msgBox.hideOkButton(); + this.msgBox.centerBarGraph(barGraphId); + } + +}; + +MessageBox.setText = function(txt) { + this.msgBox.setText(txt); +}; + +MessageBox.centerText = function() { + this.msgBox.centerText(); +}; + +MessageBox.setHtml = function(html) { + this.msgBox.setHtml(html); +}; + +MessageBox.close = function() { + this.msgBox.ok(); +}; + +MessageBox.setContentSize =function(width, height) { + this.msgBox.setContentSize(width, height); +}; +/** + * yesnodialog.js + **/ + +/** + * Dialogbox mit den Schaltflächen "Ja" und "Neine" + * Normalerweise wird als content Text übergeben, + * wenn contentType 'html' gesetzt ist, kann auch HTML übergeben werden. + * Die Höhe des Dialoges sollte sich dynamisch der Contentgröße anpassen. + **/ +YesNoDialog = Class.create({ + + initialize: function(title, content, callback, contentType) + { + var _this_ = this; + + this.RESULT_NO = 0; + this.RESULT_YES = 1; + + this.m_contentType = contentType; + this.m_callback = callback; + this.m_layer = document.createElement("div"); + this.m_layer.className = "YesNoDialogLayer"; + this.content = content; + + var dialog = document.createElement("div"); + dialog.className = "YesNoDialog"; + + var titleElement = document.createElement("div"); + titleElement.className = "YesNoDialogTitle"; + titleElement.appendChild(document.createTextNode(title)); + titleElement.onmousedown = function(event) { new Drag(this.parentNode, event); }; + dialog.appendChild(titleElement); + + var contentWrapper = document.createElement("div"); + contentWrapper.className = "YesNoDialogContentWrapper"; + + this.contentElement = document.createElement("div"); + this.contentElement.className = "YesNoDialogContent"; + + if (this.m_contentType == "html") { + this.contentElement.innerHTML = content; + } else { + this.contentElement.appendChild(document.createTextNode(content)); + } + + contentWrapper.appendChild(this.contentElement); + + dialog.appendChild(contentWrapper); + + var footer = document.createElement("div"); + footer.className= "YesNoDialogFooter"; + + var yesButton = document.createElement("div"); + yesButton.className = "YesNoDialog_yesButton borderRadius5px colorGradient50px"; + yesButton.appendChild(document.createTextNode(translateKey('dialogYes'))); + yesButton.onclick = function() { _this_.yes(); }; + yesButton.id="btnYes"; + footer.appendChild(yesButton); + + var noButton = document.createElement("div"); + noButton.className = "YesNoDialog_noButton borderRadius5px colorGradient50px"; + noButton.appendChild(document.createTextNode(translateKey('dialogNo'))); + noButton.onclick = function() { _this_.no(); }; + noButton.id = "btnNo"; + footer.appendChild(noButton); + + dialog.appendChild(footer); + + this.m_layer.appendChild(dialog); + Layer.add(this.m_layer); + + this.run(); + + translatePage(".YesNoDialog"); + this.setHeight(); + }, + + //This is the starting point + run: function() { + + }, + + close: function(result) + { + Layer.remove(this.m_layer); + if (this.m_callback) { this.m_callback(result); } + }, + + yes: function() + { + this.close(YesNoDialog.RESULT_YES); + }, + + no: function() + { + this.close(YesNoDialog.RESULT_NO); + }, + + btnTextYes: function(btnTxt) { + jQuery(".YesNoDialog_yesButton").text(btnTxt); + }, + + btnYesHide: function() { + jQuery("#btnYes").addClass("hidden"); + }, + + btnYesShow: function() { + jQuery("#btnYes").removeClass("hidden"); + }, + + btnTextNo: function(btnTxt) { + jQuery(".YesNoDialog_noButton").text(btnTxt); + }, + + btnNoHide: function() { + jQuery("#btnNo").addClass("hidden"); + }, + + btnNoShow: function() { + jQuery("#btnNo").removeClass("hidden"); + }, + + setHeight: function() { + var heightContentWrapper = jQuery(".YesNoDialogContentWrapper").height(), + yesNoElm = jQuery(".YesNoDialog"), + footerElm = jQuery(".YesNoDialogFooter"); + + yesNoElm.css("height", heightContentWrapper + 78); + footerElm.css("top", heightContentWrapper + 26); + yesNoElm.css("top", (window.innerHeight / 2) - (yesNoElm.height() / 2)); + }, + + resetHeight: function() { + this.setHeight(); + }, + + // Here we can change the default class of the content element + setContentClass: function (cl) { + this.contentElement.className = cl; + }, + + setWidth: function(dlgWidth) { + var defaultWith = 600, + offsetWidth = 4, + offsetPosYesButton = 109, + offsetDialogHeight = 78, + offsetDialogFooterHeight = 26; + + var width = dlgWidth - offsetWidth, + yesButtonPos = dlgWidth - offsetPosYesButton, + position = jQuery(".YesNoDialog").position(); + + // dlgWidth = (defaultWith < dlgWidth) ? defaultWith : dlgWidth; + + jQuery(".YesNoDialog").width(dlgWidth).css({left: position.left + ((defaultWith - dlgWidth) / 2)}); + jQuery(".YesNoDialogTitle").width(width); + jQuery(".YesNoDialogContentWrapper").width(width); + jQuery(".YesNoDialogFooter").width(width); + jQuery(".YesNoDialog_yesButton").css("left", yesButtonPos); + + //Dialoghöhe an Content anpassen. + jQuery(".YesNoDialog").css("height", jQuery(".YesNoDialogContentWrapper").height() + offsetDialogHeight); + jQuery(".YesNoDialogFooter").css("top", jQuery(".YesNoDialogContentWrapper").height() + offsetDialogFooterHeight); + } + +}); + +YesNoDialog.RESULT_NO = 0; +YesNoDialog.RESULT_YES = 1; +/** + * euladialog.js + **/ + +/** + * Dialogbox mit den Schaltflächen "Ja" und "Neine" + * Normalerweise wird als content Text übergeben, + * wenn contentType 'html' gesetzt ist, kann auch HTML übergeben werden. + * Die Höhe des Dialoges sollte sich dynamisch der Contentgröße anpassen. + **/ +EulaDialog = Class.create({ + + initialize: function(title, content, callback, contentType) + { + var _this_ = this; + + this.m_contentType = contentType; + this.m_callback = callback; + this.m_layer = document.createElement("div"); + this.m_layer.className = "EulaDialogLayer"; + + var dialog = document.createElement("div"); + dialog.className = "EulaDialog"; + + var titleElement = document.createElement("div"); + titleElement.className = "EulaDialogTitle"; + titleElement.appendChild(document.createTextNode(title)); + titleElement.onmousedown = function(event) { new Drag(this.parentNode, event); }; + dialog.appendChild(titleElement); + + var contentWrapper = document.createElement("div"); + contentWrapper.className = "EulaDialogContentWrapper"; + + var contentElement = document.createElement("div"); + contentElement.className = "EulaDialogContent"; + + if (this.m_contentType == "html") { + contentElement.innerHTML = content; + } else { + contentElement.appendChild(document.createTextNode(content)); + } + + contentWrapper.appendChild(contentElement); + + dialog.appendChild(contentWrapper); + + var footer = document.createElement("div"); + footer.className= "EulaDialogFooter"; + + var chkBox = document.createElement("div"); + chkBox.className = "EulaDialog_checkBox"; + + var yesCheckBox = document.createElement("input"); + yesCheckBox.type = "checkBox"; + yesCheckBox.id = "eulaReadId"; + chkBox.appendChild(yesCheckBox); + + chkBox.appendChild(document.createTextNode(translateKey('acceptEula'))); + + yesCheckBox.onchange = function() { + if (jQuery(this).is(":checked")) { + jQuery("#yesBtn").show(); + } else { + jQuery("#yesBtn").hide(); + } + }; + + footer.appendChild(chkBox); + + var yesButton = document.createElement("div"); + yesButton.className = "EulaDialog_yesButton borderRadius5px colorGradient50px"; + yesButton.id = "yesBtn"; + yesButton.appendChild(document.createTextNode(translateKey('dialogEulaBtnInstall'))); + yesButton.onclick = function() { _this_.yes(); }; + footer.appendChild(yesButton); + + + var noButton = document.createElement("div"); + noButton.className = "EulaDialog_noButton borderRadius5px colorGradient50px"; + noButton.appendChild(document.createTextNode(translateKey('dialogEulaBtnCancel'))); + noButton.onclick = function() { _this_.no(); }; + footer.appendChild(noButton); + + dialog.appendChild(footer); + + this.m_layer.appendChild(dialog); + + Layer.add(this.m_layer); + + if (jQuery(".EulaDialogContentWrapper").height() >= 400) { + jQuery(".EulaDialogContentWrapper").css("height", 400); + jQuery(".EulaDialogContentWrapper").css("overflow", "scroll"); + } + + //AG sorgt dafür, daß die Dialoghöhe sich dynamisch dem Content anpasst. + jQuery(".EulaDialog").css("height", jQuery(".EulaDialogContentWrapper").height() + 108); + jQuery(".EulaDialogFooter").css("top", jQuery(".EulaDialogContentWrapper").height() + 26); + + jQuery("#yesBtn").hide(); + this.centerDialog(); + + + + }, + + close: function(result) + { + Layer.remove(this.m_layer); + if (this.m_callback) { this.m_callback(result); } + }, + + yes: function() + { + this.close(EulaDialog.RESULT_YES); + }, + + no: function() + { + this.close(EulaDialog.RESULT_NO); + }, + + centerDialog: function() { + var dialog = jQuery(".EulaDialog"), + top = ((jQuery(".EulaDialogLayer").height() / 2) - (jQuery(dialog).height() / 2)); + jQuery(dialog).css({"top":top, "margin-top": ""}); + } + +}); + +EulaDialog.RESULT_NO = 0; +EulaDialog.RESULT_YES = 1; +/** + * firstsecuritydialog.js + **/ + + +FirstSecurityDialog = Class.create({ + + initialize: function(title, content, callback, contentType) + { + var _this_ = this; + + this.m_contentType = contentType; + this.m_callback = callback; + this.m_layer = document.createElement("div"); + this.m_layer.className = "EulaDialogLayer"; + + var dialog = document.createElement("div"); + dialog.className = "EulaDialog"; + + var titleElement = document.createElement("div"); + titleElement.className = "EulaDialogTitle"; + titleElement.appendChild(document.createTextNode(title)); + titleElement.onmousedown = function(event) { new Drag(this.parentNode, event); }; + dialog.appendChild(titleElement); + + var contentWrapper = document.createElement("div"); + contentWrapper.className = "EulaDialogContentWrapper"; + var contentElement = document.createElement("div"); + contentElement.className = "EulaDialogContent"; + + + if (this.m_contentType == "html") { + contentElement.innerHTML = content; + } else { + contentElement.appendChild(document.createTextNode(content)); + } + + contentWrapper.appendChild(contentElement); + + dialog.appendChild(contentWrapper); + + var pwdElement = document.createElement("div"); + pwdElement.className = "EulaDialogContent"; + pwdElement.id = "pwdLine"; + pwdElement.style = "visibility:hidden; text-align:center"; + pwdElement.appendChild(document.createTextNode(translateKey("lblAttentionNoPasswd"))); + pwdElement.innerHTML = translateKey("lblAttentionNoPasswd"); + contentWrapper.appendChild(pwdElement); + + var pwd = homematic('User.hasUserPWD', {'userID': userId}, function(result) { + if ((result == false) || (result == null)) { + jQuery("#pwdLine").css("visibility","visible"); + } + }); + + var footer = document.createElement("div"); + footer.className= "EulaDialogFooter"; + + var chkBox = document.createElement("div"); + chkBox.className = "EulaDialog_checkBox"; + + var yesCheckBox = document.createElement("input"); + yesCheckBox.type = "checkBox"; + yesCheckBox.id = "eulaReadId"; + chkBox.appendChild(yesCheckBox); + + chkBox.appendChild(document.createTextNode(translateKey('dialogLblAckSecurityHint'))); + + yesCheckBox.onchange = function() { + if (jQuery(this).is(":checked")) { + jQuery("#yesBtn").show(); + } else { + jQuery("#yesBtn").hide(); + } + }; + + footer.appendChild(chkBox); + + var yesButton = document.createElement("div"); + yesButton.className = "EulaDialog_yesButton borderRadius5px colorGradient50px"; + yesButton.id = "yesBtn"; + yesButton.appendChild(document.createTextNode(translateKey('btnNext'))); + yesButton.onclick = function() { _this_.yes(); }; + footer.appendChild(yesButton); + + + //var noButton = document.createElement("div"); + //noButton.className = "EulaDialog_noButton borderRadius5px colorGradient50px"; + //noButton.appendChild(document.createTextNode(translateKey('dialogEulaBtnCancel'))); + //noButton.onclick = function() { _this_.no(); }; + //footer.appendChild(noButton); + + dialog.appendChild(footer); + + this.m_layer.appendChild(dialog); + + Layer.add(this.m_layer); + + if (jQuery(".EulaDialogContentWrapper").height() >= 400) { + jQuery(".EulaDialogContentWrapper").css("height", 400); + jQuery(".EulaDialogContentWrapper").css("overflow", "scroll"); + } + + //AG sorgt dafür, daß die Dialoghöhe sich dynamisch dem Content anpasst. + jQuery(".EulaDialog").css("height", jQuery(".EulaDialogContentWrapper").height() + 108); + jQuery(".EulaDialogFooter").css("top", jQuery(".EulaDialogContentWrapper").height() + 26); + + jQuery("#yesBtn").hide(); + this.centerDialog(); + + + + }, + + close: function(result) + { + Layer.remove(this.m_layer); + if (this.m_callback) { this.m_callback(result); } + }, + + yes: function() + { + this.close(EulaDialog.RESULT_YES); + }, + + no: function() + { + this.close(EulaDialog.RESULT_NO); + }, + + centerDialog: function() { + var dialog = jQuery(".EulaDialog"), + top = ((jQuery(".EulaDialogLayer").height() / 2) - (jQuery(dialog).height() / 2)); + jQuery(dialog).css({"top":top, "margin-top": ""}); + } + +}); + +EulaDialog.RESULT_NO = 0; +EulaDialog.RESULT_YES = 1; +/** + * channelchosser.js + **/ + +/** + * Einfache Kanalauswahl. + **/ + +ChannelChooser = Singleton.create({ + + SHOW_READABLE: 0x1, // zeigt lesbare Kanäle an + SHOW_WRITABLE: 0x2, // zeigt schreibbare Kanäle an + SHOW_EVENTABLE: 0x4, // zeigt Kanäle mit Ereignisbehandlung an + SHOW_ALL: 0x7, // zeigt alle Kanäle an + + FAV_CHANNELS: 0, + PRG_CONDITION: 1, + PRG_ACTIVITY: 2, + + SORT_FN: { + NAME : function(channels, reverse) { return channels.ex_sortBy("name", reverse); }, + DESCRIPTION: function(channels, reverse) { return channels.ex_sortBy("typeDescription", reverse); }, + //ADDRESS : function(channels, reverse) { return channels.ex_sortBy("address", reverse); }, + + // Sorting by serial number changed. + ADDRESS : function(channels, reverse) { + var arSortedChannels = []; + jQuery.each(channels.sort(function(a,b) { + var ar1 = a.address.split(":"), + ar2 = b.address.split(":"); + + if (ar1[0] == ar2[0]) { + return (parseInt(ar1[1]) - parseInt(ar2[1])); + } + }), function(index, ch) { + arSortedChannels.push(ch); + }); + return arSortedChannels; + }, + + ROOM_NAMES : function(channels, reverse) { + channels.sort(function(a, b) { return Object.ex_compare(a.rooms.ex_joinItem("name"), b.rooms.ex_joinItem("name")); }); + return (reverse) ? channels.reverse() : channels; + }, + FUNC_NAMES : function(channels, reverse) { + channels.sort(function(a, b) { return Object.ex_compare(a.subsections.ex_joinItem("name"), b.subsections.ex_joinItem("name")); }); + return (reverse) ? channels.reverse() : channels; + } + }, + + PREFIX: "ChannelChooser", // Prefix für Ids der Tabellenzeilen + WRAPPER_ID: "ChannelChooserWrapper", // Id des Wrapper-Elements + HIGHLIGHT_CLASS: "ChannelChooserCell_Highlight", // Klasse für hervorgehobene Tabellenzellen + + /** + * Konstruktor + **/ + initialize: function() + { + this.HmIPIdentifier = "HmIP-RF"; + this.HmIPWIdentifier = "HmIP-RF"; + this.VirtualDevicesIdentifier = "VirtualDevices"; + this.template = TrimPath.parseTemplate(CHANNELCHOOSER_JST); + this.arWGDScreenOrder = []; + this.WGDStartChannelPerScreen = {}; + this.WGDChannelInUse = []; + this.WGDdevice = ""; + this.arWGDTiles = []; + this.noMoreDaliChannels = false; + }, + + sortByAddress: function(channels) { + console.log("channels", channels); + }, + + /** + * Wendet alle Filter auf einen Kanal an. + **/ + match: function(channel) + { + return ((hasUPL(UPL_ADMIN) | channel.isVisible) && + ((this.showReadable & channel.isReadable) || + (this.showWritable & channel.isWritable) || + (this.showEventable & channel.isEventable)) && + (this.showVirtual | !channel.isVirtual) && + (this.NameFilter.match(channel.name)) && + (this.DescriptionFilter.match(channel.typeDescription)) && + (this.AddressFilter.match(channel.address)) && + (this.RoomFilter.matchArray(channel.rooms)) && + (this.FuncFilter.matchArray(channel.subsections))); + }, + + setMetaData: function(objectId, dataId, val) { + homematic("Interface.setMetadata", {"objectId": objectId, "dataId": dataId, "value": val}); + }, + + filterHmIPChannels4ProgramConditions: function(channel, arChannels) { + var channelTypeName = channel.typeName.toLowerCase(), + oDevice, oMaintChannel, deviceMode, endOfScreens = false; + + conInfo("filterHmIPChannels4ProgramConditions"); + // If the channel is visible and no KEY_TRANSCEIVER or *_WEEK_PROFILE then show the channel + if (channel + && (channel.channelType != "KEY_TRANSCEIVER") + && (channel.channelType != "UNIVERSAL_LIGHT_RECEIVER") + && (channel.channelType != "DISPLAY_INPUT_TRANSMITTER") + && (channel.channelType != "DISPLAY_LEVEL_INPUT_TRANSMITTER") + && (channel.channelType != "DISPLAY_THERMOSTAT_INPUT_TRANSMITTER") + && (channel.channelType != "MULTI_MODE_INPUT_TRANSMITTER") + && (channel.channelType.indexOf("_WEEK_PROFILE") == -1) + ) { + arChannels.push(channel); + } + + // If the channel is a KEY_TRANSCEIVER and the device type no HmIP-PS / PSM (-IT/-CH/-PE/-UK) / PDT /PCBS then show the channel + // A key press of the internal button doesn't work for the above-named devices + if ((channel.channelType == "KEY_TRANSCEIVER") + && channel + && (channelTypeName != "hmip-ps") + && (channelTypeName.indexOf("hmip-psm") == -1) + && (channelTypeName != "hmip-pdt") + && (channelTypeName != "hmip-pdt-uk") + && (channelTypeName != "hmip-pcbs") + ) { + arChannels.push(channel); + } + + if (channel.channelType == "UNIVERSAL_LIGHT_RECEIVER") { + if (channelTypeName == "hmip-rgbw") { + oMaintChannel = DeviceList.getChannelByAddress(channel.address.split(":")[0] + ":0"); // The maintenance channel stores the deviceMode + deviceMode = parseInt(homematic("Interface.getMetadata", { + "objectId": oMaintChannel.id, + "dataId": "deviceMode" + })); + + switch (deviceMode) { + case 0: + case 1: + // RGB/RGBW Mode + if (channel.index == 1) { + arChannels.push(channel); + } + break; + case 2: + // Tunable White Mode + if (channel.index == 1 || channel.index == 2) { + arChannels.push(channel); + } + break; + default: + // PWM Mode - all channels visible + arChannels.push(channel); + } + } + + if (channelTypeName == "hmip-drg-dali") { + if ((channel.index != 0) && (channel.index <= 32)) { + // Dali channels 1 - 32 + if (this.noMoreDaliChannels == false) { + chnDescription = homematic("Interface.getParamset", { + "interface": "HmIP-RF", + "address": channel.address, + "paramsetKey": "MASTER" + }); + + if (parseInt(chnDescription["DALI_ADDRESS"]) != 255) { + arChannels.push(channel); + // Store UNIVERSAL_LIGHT_MAX_CAPABILITIES as meta data + // Because the user might have connected another DALI device to this channel we must set the meta data each time + //this is not necessary anymore - this.setMetaData(channel.id, "maxCap", chnDescription["UNIVERSAL_LIGHT_MAX_CAPABILITIES"]); + } else { + this.noMoreDaliChannels = true; + } + } + + } else if ((channel.index == 0) || (channel.id >= 33)) { + // Maintenance and group channels + arChannels.push(channel); + } + } + } + + if (((channel.channelType == "DISPLAY_INPUT_TRANSMITTER") || (channel.channelType == "DISPLAY_LEVEL_INPUT_TRANSMITTER") || (channel.channelType == "DISPLAY_THERMOSTAT_INPUT_TRANSMITTER")) && ((channelTypeName == "hmipw-wgd") || (channelTypeName == "hmipw-wgd-pl"))) { + var wgdScreenOrder, screenEndID = "END", counter, chnDescription, curDevice, tilesA = [1, 3, 7], tilesB = [0, 1], + loop, + self = this; + if (channel.index == 41) { + arChannels.push(channel); + } else { + curDevice = channel.device.address; // Do this only once per device + if (this.WGDdevice != curDevice) { + this.WGDdevice = channel.device.address; + oDevice = DeviceList.getDeviceByAddress(channel.address.split(":")[0]); // The device stores the screen order + wgdScreenOrder = homematic("Interface.getMetadata", {"objectId": oDevice.id, "dataId": "screenOrder"}); + this.arWGDScreenOrder = wgdScreenOrder.split(","); + this.WGDStartChannelPerScreen = (this.arWGDScreenOrder.length < 10) ? { + 0: 1, + 1: 9, + 2: 17, + 3: 25, + 4: 33 + } : {0: 1, 1: 9, 2: 17, 3: 25, 4: 33, 5: 42, 6: 44, 7: 46, 8: 48, 9: 50}; + this.WGDChannelInUse = []; + this.arWGDTiles = []; + + // Get number of tiles + chnDescription = homematic("Interface.getParamset", { + "interface": "HmIP-RF", + "address": curDevice + ":0", + "paramsetKey": "MASTER" + }); + loop = ((this.arWGDScreenOrder.length < 10)) ? 5 : 10; + + for (var loopx = 1; loopx <= loop; loopx++) { + this.arWGDTiles.push(chnDescription["SCREEN_LAYOUT_TILE_LAYOUT_" + loopx]); + } + + jQuery.each(this.arWGDScreenOrder, function (index, screen) { + if ((!endOfScreens) && (screen != screenEndID)) { + counter = (screen <= 4) ? tilesA[self.arWGDTiles[screen]] : tilesB[self.arWGDTiles[screen]]; + for (loop = self.WGDStartChannelPerScreen[screen]; loop <= (self.WGDStartChannelPerScreen[screen] + counter); loop++) { + self.WGDChannelInUse.push(loop); + } + } else { + endOfScreens = true; + } // return false doesn't work because of a problem with the build-system + }); + } + + if (this.WGDChannelInUse.indexOf(channel.index) != -1) { + arChannels.push(channel); + } + } + } + + if (channel.channelType == "MULTI_MODE_INPUT_TRANSMITTER") { + if (channelTypeName == "elv-sh-bm-s") { + var channelMode = parseInt(homematic("Interface.getMetadata", { + "objectId": channel.id, + "dataId": "channelMode" + })); + if (channelMode != 0) { + arChannels.push(channel); + } + } else if ((channelTypeName == "hmip-flc") || (channelTypeName == "hmip-fdc")) { + var channelMode = parseInt(homematic("Interface.getMasterValue", { + "interface": this.HmIPIdentifier, + "address": channel.address, + "valueKey": "CHANNEL_OPERATION_MODE" + })); + + if (channelMode != 0) { + arChannels.push(channel); + } + + } else { + arChannels.push(channel); + } + return arChannels; + } + + }, + + filterHmIPChannels4ProgramActivities: function(channel, arChannels) { + conInfo("filterHmIPChannels4ProgramActivities"); + var channelTypeName = channel.typeName.toLowerCase(), + oMaintChannel, deviceMode, endOfScreens = false; + + if (channel) { + if (channelTypeName == "hmip-wkp") { + if ((channel.channelType == "MAINTENANCE") || ((channel.channelType == "ACCESS_TRANSCEIVER") && (channel.index % 2 != 0))) { + arChannels.push(channel); + } + } else if (channel.channelType == "UNIVERSAL_LIGHT_RECEIVER") { + if (channelTypeName == "hmip-rgbw") { + oMaintChannel = DeviceList.getChannelByAddress(channel.address.split(":")[0] + ":0"); // The maintenance channel stores the deviceMode + deviceMode = parseInt(homematic("Interface.getMetadata", { + "objectId": oMaintChannel.id, + "dataId": "deviceMode" + })); + + switch (deviceMode) { + case 0: + case 1: + // RGB/RGBW Mode + if (channel.index == 1) { + arChannels.push(channel); + } + break; + case 2: + // Tunable White Mode + if (channel.index == 1 || channel.index == 2) { + arChannels.push(channel); + } + break; + default: + // PWM Mode - all channels visible + arChannels.push(channel); + } + } + + if (channelTypeName == "hmip-drg-dali") { + if ((channel.index != 0) && (channel.index <= 32)) { + // Dali channels 1 - 32 + if (this.noMoreDaliChannels == false) { + chnDescription = homematic("Interface.getParamset", { + "interface": "HmIP-RF", + "address": channel.address, + "paramsetKey": "MASTER" + }); + + if (parseInt(chnDescription["DALI_ADDRESS"]) != 255) { + arChannels.push(channel); + // Store UNIVERSAL_LIGHT_MAX_CAPABILITIES as meta data if not yet available + // Because the user might have connected another DALI device to this channel we must set the meta data each time + //this is not necessary anymore - this.setMetaData(channel.id, "maxCap", chnDescription["UNIVERSAL_LIGHT_MAX_CAPABILITIES"]); + } else { + this.noMoreDaliChannels = true; + } + } + + } else if ((channel.index == 0) || (channel.id >=33)) { + // Maintenance and group channels + arChannels.push(channel); + } + } + + if ((channelTypeName == "hmip-lsc") && (channel.index == 1)) { + arChannels.push(channel); + } + + + } else if (((channel.channelType == "DISPLAY_INPUT_TRANSMITTER") || (channel.channelType == "DISPLAY_LEVEL_INPUT_TRANSMITTER") || (channel.channelType == "DISPLAY_THERMOSTAT_INPUT_TRANSMITTER")) && ((channelTypeName == "hmipw-wgd") || (channelTypeName == "hmipw-wgd-pl"))) { + var wgdScreenOrder, screenEndID = "END", counter, chnDescription, curDevice, tilesA = [1,3,7], tilesB = [0,1], loop, + self = this; + if (channel.index == 41) { + arChannels.push(channel); + } else { + curDevice = channel.device.address; // Do this only once per device + if (this.WGDdevice != curDevice) { + this.WGDdevice = channel.device.address; + oDevice = DeviceList.getDeviceByAddress(channel.address.split(":")[0]); // The device stores the screen order + wgdScreenOrder = homematic("Interface.getMetadata", {"objectId": oDevice.id, "dataId": "screenOrder"}); + this.arWGDScreenOrder = wgdScreenOrder.split(","); + this.WGDStartChannelPerScreen = (this.arWGDScreenOrder.length < 10) ? {0: 1, 1: 9, 2: 17, 3: 25, 4: 33} : {0: 1, 1: 9, 2: 17, 3: 25, 4: 33, 5: 42, 6: 44, 7: 46, 8: 48, 9: 50}; + this.WGDChannelInUse = []; + this.arWGDTiles = []; + + // Get number of tiles + chnDescription = homematic("Interface.getParamset", {"interface": "HmIP-RF", "address": curDevice + ":0", "paramsetKey": "MASTER"}); + loop = ((this.arWGDScreenOrder.length < 10)) ? 5 : 10; + + for(var loopx = 1; loopx <= loop; loopx++) { + this.arWGDTiles.push(chnDescription["SCREEN_LAYOUT_TILE_LAYOUT_" + loopx]); + } + + jQuery.each(this.arWGDScreenOrder, function(index,screen) { + if ((! endOfScreens) && (screen != screenEndID)) { + counter = (screen <= 4) ? tilesA[self.arWGDTiles[screen]] : tilesB[self.arWGDTiles[screen]]; + for (loop = self.WGDStartChannelPerScreen[screen]; loop <= (self.WGDStartChannelPerScreen[screen] + counter); loop++) { + self.WGDChannelInUse.push(loop); + } + } else {endOfScreens = true;} // return false doesn't work because of a problem with the build-system + }); + } + + if (this.WGDChannelInUse.indexOf(channel.index) != -1) { + arChannels.push(channel); + } + } + } else { + if (channelTypeName != "hmip-esi") { + arChannels.push(channel); + } + } + } + return arChannels; + }, + + filterOsramLightify: function(channel, arChannels) { + conInfo("filterOsramLightify"); + if (! isNonCCUDevice(channel)) { + arChannels.push(channel); + } + return arChannels; + }, + + filterGateway: function(channel, arChannels) { + conInfo("filterGateway"); + if (! isNonCCUGateway(channel)) { + arChannels.push(channel); + } + return arChannels; + }, + + /** + * Filtert eine Kanalliste + **/ + filter: function(channels) + { + this.noMoreDaliChannels = false; + var result = new Array(); + + channels.each(function(channel) { + var self = this; + if (this.match(channel)) { + + if ((channel.device.interfaceName == this.HmIPIdentifier) || (channel.device.interfaceName == this.HmIPWIdentifier)) { + if ((this.src == this.PRG_CONDITION) || (this.src == this.FAV_CHANNELS)) { + this.filterHmIPChannels4ProgramConditions(channel, result); + } else if (this.src == this.PRG_ACTIVITY) { + this.filterHmIPChannels4ProgramActivities(channel, result); + } else { + result.push(channel); + } + } else if (channel.device.interfaceName == this.VirtualDevicesIdentifier) { + if (this.src == this.PRG_CONDITION) { + this.filterOsramLightify(channel, result); + } else if (this.src == this.PRG_ACTIVITY) { + this.filterGateway(channel, result); + } else { + result.push(channel); + } + } else { + result.push(channel); + } + } + }, this); + return result; + }, + + /** + * Sortiert eine Kanalliste + **/ + sort: function(channels) + { + var sort_fn = this.SORT_FN[this.sortId]; + + if (typeof(sort_fn) != "undefined") { return sort_fn(channels, this.sortDescend); } + else { return channels; } + }, + + /** + * Schließt das Dialogfenster + **/ + close: function(result) + { + picDivHide(jg_250); + Layer.remove(this.layer); + if (this.callback) { this.callback(result); } + }, + + /** + * Startet die Aktualisierung der Anzeige + **/ + beginUpdateView: function() + { + Element.setStyle(ChannelChooser.layer, {cursor: "wait"}); + window.setTimeout("ChannelChooser.updateView();", 1); + }, + + /** + * Zeigt den Dialog an + **/ + show: function(callback, options, src) + { + if (src) { + this.src = src; + } else { + this.src = 0; + } + this.showVirtual = false; + this.sortId = "NAME"; + this.sortDescend = false; + this.callback = callback; + this.showReadable = (0 !== (options & this.SHOW_READABLE)); + this.showWritable = (0 !== (options & this.SHOW_WRITABLE)); + this.showEventable = (0 !== (options & this.SHOW_EVENTABLE)); + + + this.channels = DeviceList.listChannels(); + + var rooms = RoomList.list().ex_sortBy("name"); + var funcs = SubsectionList.list().ex_sortBy("name"); + this.NameFilter = new StringFilter("ChannelChooser.NameFilter", this.beginUpdateView); + this.DescriptionFilter = new StringFilter("ChannelChooser.DescriptionFilter", this.beginUpdateView); + this.AddressFilter = new StringFilter("ChannelChooser.AddressFilter", this.beginUpdateView); + this.RoomFilter = new ListFilter("ChannelChooser.RoomFilter", rooms, this.beginUpdateView); + this.FuncFilter = new ListFilter("ChannelChooser.FuncFilter", funcs, this.beginUpdateView); + + this.layer = document.createElement("div"); + this.layer.id = this.WRAPPER_ID; + Layer.add(this.layer); + + this.beginUpdateView(); + + + }, + + /** + * Wählt einen Kanal aus + **/ + select: function(str_id) + { + var id = str_id.substring(this.PREFIX.length); + this.close(id); + }, + + /** + * Bricht den Dialog ab + **/ + abort: function() + { + this.close(); + }, + + /** + * Setzt die Sortierreihenfolge + **/ + sortBy: function(sortId) + { + if (this.sortId == sortId) { this.sortDescend = !this.sortDescend; } + else { this.sortDescend = false; } + this.sortId = sortId; + + this.beginUpdateView(); + }, + + /** + * Blendet virtuelle Kanäle ein bzw. aus + **/ + toggleVirtualChannels: function() + { + this.showVirtual = !this.showVirtual; + + this.beginUpdateView(); + }, + + /** + * Setzt alle Filter zurück + **/ + resetFilters: function() + { + this.NameFilter.reset(); + this.DescriptionFilter.reset(); + this.AddressFilter.reset(); + this.RoomFilter.reset(); + this.FuncFilter.reset(); + + this.beginUpdateView(); + }, + + /** + * Callback. Aktualisiert die Anzeige. + **/ + updateView: function() + { + Element.setStyle(this.layer, {"cursor": "default"}); + this.layer.innerHTML = this.template.process({ + PREFIX : this.PREFIX, + sortId : this.sortId, + sortDescend : this.sortDescend, + showVirtual : this.showVirtual, + nameFilter : this.NameFilter, + descriptionFilter: this.DescriptionFilter, + addressFilter : this.AddressFilter, + roomFilter : this.RoomFilter, + funcFilter : this.FuncFilter, + channels : this.sort(this.filter(this.channels)) + //channels : this.filter(this.channels) + }); + + jQuery(".j_expertChannel").show(); + + translateJSTemplate("#ChannelChooserDialog"); + translatePage(".j_rooms, .j_functions"); + + // Add extended channel description + jQuery(".j_extChnDescr").each(function(index) { + try { + var elmDescr = jQuery(this).text().split("_"), + channelAddress = elmDescr[1], + ch = DeviceList.getChannelByAddress(channelAddress), + deviceType = ch.deviceType.id, + j_descrElem = jQuery(this); + + if ((ch.channelType != "MULTI_MODE_INPUT_TRANSMITTER") && (deviceType != "HmIP-WKP")) { + j_descrElem.html(getExtendedDescription({ + "deviceType": deviceType, + "channelAddress": channelAddress, + "channelIndex": channelAddress.split(":")[1] + })); + } else { + if (deviceType == "HmIP-WKP") { + // Channel 1 AND 2 = User 1, Channel 3 AND 4 = User 2 and so on - but we want to show only the first user channel + var chn = parseInt(channelAddress.split(":")[1]), + arUsrNr = ["","1","","2","","3","","4","","5","","6","","7","","8",""]; + + if (chn != 0) { + j_descrElem.html(translateKey("lblUser") + " " + arUsrNr[chn]); + } else { + j_descrElem.html(""); + } + } else { + // MULTI_MODE_INPUT_TRANSMITTER + homematic("Interface.getMetadata", {"objectId": ch.id, "dataId": "channelMode"}, function (result) { + result = (result == "null") ? 1 : result; + j_descrElem.html(translateKey("chType_MULTI_MODE_INPUT_TRANSMITTER_" + result)); + }); + } + } + } catch(e) { + conInfo(e); + } + }); + + DeviceList.updateDeviceStatus(); + } +}); +/** + * multichannelchosser.js + **/ + +/** + * Kanal-Mehrfachauswahl. + **/ +MultiChannelChooser = Singleton.create({ + SHOW_READABLE: 0x1, // zeigt lesbare Kanäle an + SHOW_WRITABLE: 0x2, // zeigt schreibbare Kanäle an + SHOW_EVENTABLE: 0x4, // zeigt Kanäle mit Ereignisbehandlung an + SHOW_ALL: 0x7, // zeigt alle Kanäle an + + SORT_FN: { + NAME : function(channels, reverse) { return channels.ex_sortBy("name", reverse); }, + DESCRIPTION: function(channels, reverse) { return channels.ex_sortBy("typeDescription", reverse); }, + //ADDRESS : function(channels, reverse) { return channels.ex_sortBy("address", reverse); }, + + // Sorting by serial number changed. + ADDRESS : function(channels, reverse) { + var arSortedChannels = []; + jQuery.each(channels.sort(function(a,b) { + var ar1 = a.address.split(":"), + ar2 = b.address.split(":"); + + if (ar1[0] == ar2[0]) { + return (parseInt(ar1[1]) - parseInt(ar2[1])); + } + }), function(index, ch) { + arSortedChannels.push(ch); + }); + return arSortedChannels; + }, + + ROOM_NAMES : function(channels, reverse) + { + channels.sort(function(a, b) { return Object.ex_compare(a.rooms.ex_joinItem("name"), b.rooms.ex_joinItem("name")); }); + return (reverse) ? channels.reverse() : channels; + }, + + FUNC_NAMES : function(channels, reverse) + { + channels.sort(function(a, b) { return Object.ex_compare(a.subsections.ex_joinItem("name"), b.subsections.ex_joinItem("name")); }); + return (reverse) ? channels.reverse() : channels; + } + }, + + PREFIX: "MultiChannelChooser", + WRAPPER_ID: "MultiChannelChooserWrapper", + HIGHLIGHT_CLASS: "MultiChannelChooserCell_Highlight", + + initialize: function() + { + this.HmIPIdentifier = "HmIP-RF"; + this.HmIPWIdentifier = "HmIP-Wired"; + this.template = TrimPath.parseTemplate(MULTI_CHANNELCHOOSER_JST); + this.arWGDScreenOrder = []; + this.WGDStartChannelPerScreen = {}; + this.WGDChannelInUse = []; + this.WGDdevice = ""; + this.arWGDTiles = []; + this.noMoreDaliChannels = false; + }, + + /** + * Wendet alle Filter auf einen Kanal an. + **/ + match: function(channel) + { + return ((!channel._hidden) && + (hasUPL(UPL_ADMIN) | channel.isVisible) && + ((this.showReadable & channel.isReadable) || + (this.showWritable & channel.isWritable) || + (this.showEventable & channel.isEventable)) && + (this.showVirtual | !channel.isVirtual) && + (this.NameFilter.match(channel.name)) && + (this.DescriptionFilter.match(channel.typeDescription)) && + (this.AddressFilter.match(channel.address)) && + (this.RoomFilter.matchArray(channel.rooms)) && + (this.FuncFilter.matchArray(channel.subsections))); + }, + + setMetaData: function(objectId, dataId, val) { + homematic("Interface.setMetadata", {"objectId": objectId, "dataId": dataId, "value": val}); + }, + + filterHmIPChannels: function(channel, arChannels) { + conInfo("filterHmIPChannels"); + var channelTypeName = channel.typeName.toLowerCase(), + oMaintChannel, deviceMode; + + if (channel.isVisible + && (channel.channelType != "ACCESSPOINT_GENERIC_RECEIVER") + && (channel.channelType != "DISPLAY_INPUT_TRANSMITTER") + && (channel.channelType != "DISPLAY_LEVEL_INPUT_TRANSMITTER") + && (channel.channelType != "DISPLAY_THERMOSTAT_INPUT_TRANSMITTER") + && (channel.channelType != "UNIVERSAL_LIGHT_RECEIVER") + ) {arChannels.push(channel);} + + if (((channel.channelType == "DISPLAY_INPUT_TRANSMITTER") || (channel.channelType == "DISPLAY_LEVEL_INPUT_TRANSMITTER") || (channel.channelType == "DISPLAY_THERMOSTAT_INPUT_TRANSMITTER")) && ((channelTypeName == "hmipw-wgd")) || ((channelTypeName == "hmipw-wgd-pl"))) { + var wgdScreenOrder, screenEndID = "END", counter, chnDescription, curDevice, tilesA = [1,3,7], tilesB = [0,1], loop, endOfScreens = false, + self = this; + if (channel.index == 41) { + arChannels.push(channel); + } else { + curDevice = channel.device.address; // Do this only once per device + if (this.WGDdevice != curDevice) { + this.WGDdevice = channel.device.address; + oDevice = DeviceList.getDeviceByAddress(channel.address.split(":")[0]); // The device stores the screen order + wgdScreenOrder = homematic("Interface.getMetadata", {"objectId": oDevice.id, "dataId": "screenOrder"}); + this.arWGDScreenOrder = wgdScreenOrder.split(","); + this.WGDStartChannelPerScreen = (this.arWGDScreenOrder.length < 10) ? {0: 1, 1: 9, 2: 17, 3: 25, 4: 33} : {0: 1, 1: 9, 2: 17, 3: 25, 4: 33, 5: 42, 6: 44, 7: 46, 8: 48, 9: 50}; + this.WGDChannelInUse = []; + this.arWGDTiles = []; + + // Get number of tiles + chnDescription = homematic("Interface.getParamset", {"interface": "HmIP-RF", "address": curDevice + ":0", "paramsetKey": "MASTER"}); + loop = ((this.arWGDScreenOrder.length < 10)) ? 5 : 10; + + for(var loopx = 1; loopx <= loop; loopx++) { + this.arWGDTiles.push(chnDescription["SCREEN_LAYOUT_TILE_LAYOUT_" + loopx]); + } + + jQuery.each(this.arWGDScreenOrder, function(index,screen) { + if ((! endOfScreens) && (screen != screenEndID)) { + counter = (screen <= 4) ? tilesA[self.arWGDTiles[screen]] : tilesB[self.arWGDTiles[screen]]; + for (loop = self.WGDStartChannelPerScreen[screen]; loop <= (self.WGDStartChannelPerScreen[screen] + counter); loop++) { + self.WGDChannelInUse.push(loop); + } + } else {endOfScreens = true;} // return false doesn't work because of a problem with the build-system + }); + } + + if (this.WGDChannelInUse.indexOf(channel.index) != -1) { + arChannels.push(channel); + } + } + } + + if (channel.channelType == "UNIVERSAL_LIGHT_RECEIVER") { + + if (channelTypeName == "hmip-lsc") { + arChannels.push((channel)); + } + + if (channelTypeName == "hmip-rgbw") { + oMaintChannel = DeviceList.getChannelByAddress(channel.address.split(":")[0] + ":0"); // The maintenance channel stores the deviceMode + deviceMode = parseInt(homematic("Interface.getMetadata", { + "objectId": oMaintChannel.id, + "dataId": "deviceMode" + })); + + switch (deviceMode) { + case 0: + case 1: + // RGB/RGBW Mode + if (channel.index == 1) { + arChannels.push(channel); + } + break; + case 2: + // Tunable White Mode + if (channel.index == 1 || channel.index == 2) { + arChannels.push(channel); + } + break; + default: + // PWM Mode - all channels visible + arChannels.push(channel); + } + } + + if (channelTypeName == "hmip-drg-dali") { + if ((channel.index != 0) && (channel.index <= 32)) { + // Dali channels 1 - 32 + if (this.noMoreDaliChannels == false) { + chnDescription = homematic("Interface.getParamset", { + "interface": "HmIP-RF", + "address": channel.address, + "paramsetKey": "MASTER" + }); + + if (parseInt(chnDescription["DALI_ADDRESS"]) != 255) { + arChannels.push(channel); + // Store UNIVERSAL_LIGHT_MAX_CAPABILITIES as meta data + // Because the user might have connected another DALI device to this channel we must set the meta data each time + //this is not necessary anymore - this.setMetaData(channel.id, "maxCap", chnDescription["UNIVERSAL_LIGHT_MAX_CAPABILITIES"]); + } else { + this.noMoreDaliChannels = true; + } + } + + } else if ((channel.index == 0) || (channel.id >=33)) { + // Maintenance and group channels + arChannels.push(channel); + } + } + } + + return arChannels; + }, + + filter: function(channels) + { + this.noMoreDaliChannels = false; + var result = new Array(); + + channels.each(function(channel) { + var self = this; + if (this.match(channel)) { + if (channel.device.interfaceName == this.HmIPIdentifier || channel.device.interfaceName == this.HmIPWIdentifier) { + this.filterHmIPChannels(channel, result); + } else { + result.push(channel); + } + } + }, this); + return result; + }, + + /** + * Sortiert eine Kanalliste + **/ + sort: function(channels) + { + var sort_fn = this.SORT_FN[this.sortId]; + + if (typeof(sort_fn) != "undefined") { return sort_fn(channels, this.sortDescend); } + else { return channels; } + }, + + /** + * Startet die Aktualisierung der Anzeige + **/ + beginUpdateView: function() + { + Element.setStyle(MultiChannelChooser.layer, {cursor: "wait"}); + window.setTimeout("MultiChannelChooser.updateView();", 1); + }, + + /** + * Schließt das Dialogfenster + **/ + close: function(result) + { + picDivHide(jg_250); + Layer.remove(this.layer); + if (this.callback) { this.callback(result); } + }, + + /** + * Konstruktor. Versteckter Kanal + **/ + HiddenChannel: function(id) + { + /*####################*/ + /*# Private Elemente #*/ + /*####################*/ + + var m_id = id; + + /*########################*/ + /*# Öffentliche Elemente #*/ + /*########################*/ + + this._hidden = true; // markiert den Kanal als versteckt + this._selected = true; // markiert den Kanal als ausgewählt + + /** + * Liefert die Id des Kanals + **/ + this.Id = function() + { + return m_id; + }; + + }, + + /** + * Zeigt den Dialog an + **/ + show: function(title, ids, callback, options) + { + this.showVirtual = false; + this.sortId = "NAME"; + this.sortDescend = false; + this.callback = callback; + this.options = options; + this.title = title; + this.showReadable = (0 !== (options & ChannelChooser.SHOW_READABLE)); + this.showWritable = (0 !== (options & ChannelChooser.SHOW_WRITABLE)); + this.showEventable = (0 !== (options & ChannelChooser.SHOW_EVENTABLE)); + + this.channels = DeviceList.listChannels(); + this.channels.each(function(channel) { + channel._selected = ids.ex_contains(channel.id); + channel._hidden = false; + }, this); + + // Die Kanäle, die im Posteingang schon einem Raum oder Gewerk zugeordnet + // wurden, existieren noch nicht in der Geräteliste. + // Diese Kanäle werden hier als "versteckte" Kanäle behandelt. + ids.each(function(id) { + if (null === DeviceList.getChannel(id)) + { + this.channels.push(new HiddenChannel(id)); + } + }); + + var rooms = RoomList.list().ex_sortBy("name"); + var funcs = SubsectionList.list().ex_sortBy("name"); + + this.NameFilter = new StringFilter("MultiChannelChooser.NameFilter", this.beginUpdateView); + this.DescriptionFilter = new StringFilter("MultiChannelChooser.DescriptionFilter", this.beginUpdateView); + this.AddressFilter = new StringFilter("MultiChannelChooser.AddressFilter", this.beginUpdateView); + this.RoomFilter = new ListFilter("MultiChannelChooser.RoomFilter", rooms, this.beginUpdateView); + this.FuncFilter = new ListFilter("MultiChannelChooser.FuncFilter", funcs, this.beginUpdateView); + + this.layer = document.createElement("div"); + this.layer.id = this.WRAPPER_ID; + Layer.add(this.layer); + + this.beginUpdateView(); + }, + + /** + * Wählt einen Kanal aus + **/ + ok: function() + { + var ids = new Array(); + + this.channels.each(function(channel) { + if (true === channel._selected) { ids.push(channel.id); } + }); + + this.close(ids); + }, + + /** + * Bricht den Dialog ab + **/ + abort: function() + { + this.close(); + }, + + /** + * Wählt einen Kanal aus bzw. ab + **/ + select: function(id, checkBox) + { + this.channels.each(function(channel) { + if (channel.id == id) + { + channel._selected = checkBox.checked; + } + }); + }, + + /** + * Setzt die Sortierreihenfolge + **/ + sortBy: function(sortId) + { + if (this.sortId == sortId) { this.sortDescend = !this.sortDescend; } + else { this.sortDescend = false; } + this.sortId = sortId; + + this.beginUpdateView(); + }, + + /** + * Blendet virtuelle Kanäle ein bzw. aus + **/ + toggleVirtualChannels: function() + { + this.showVirtual = !this.showVirtual; + + this.beginUpdateView(); + }, + + /** + * Setzt alle Filter zurück + **/ + resetFilters: function() + { + this.NameFilter.reset(); + this.DescriptionFilter.reset(); + this.AddressFilter.reset(); + this.RoomFilter.reset(); + this.FuncFilter.reset(); + + this.beginUpdateView(); + }, + + /** + * Callback. Aktualisiert die Anzeige. + **/ + updateView: function() + { + Element.setStyle(this.layer, {"cursor": "default"}); + this.layer.innerHTML = this.template.process({ + PREFIX : this.PREFIX, + title : this.title, + sortId : this.sortId, + sortDescend : this.sortDescend, + showVirtual : this.showVirtual, + nameFilter : this.NameFilter, + descriptionFilter: this.DescriptionFilter, + addressFilter : this.AddressFilter, + roomFilter : this.RoomFilter, + funcFilter : this.FuncFilter, + //channels : this.sort(this.filter(this.channels)) // causes problems with (multi)channelchooser.jst + channels : this.filter(this.channels) + }); + + jQuery(".j_expertChannel").show(); + + // Add extended channel description and hide the second user channel + jQuery(".j_extChnDescr").each(function(index){ + try { + var + parentCell = jQuery(this).parent(), + elmDescr = parentCell.text().split(" "), + deviceType = elmDescr[0], + tmp = elmDescr[1], + channelAddress = tmp.slice(0,17), + j_descrElem = jQuery(this); + + if (deviceType == "HmIP-WKP") { + // Channel 1 AND 2 = User 1, Channel 3 AND 4 = User 2 and so on - but we want to show only the first user + var chn = parseInt(channelAddress.split(":")[1]), + arUsrNr = ["","1","","2","","3","","4","","5","","6","","7","","8",""]; + + if ((chn != 0) && chn != 18) { + if (arUsrNr[chn] == "") { + // Channel 1 AND 2 = User 1, Channel 3 AND 4 = User 2 and so on - but we want to show only the first user channel + jQuery(parentCell).parent().hide(); + } else { + j_descrElem.html(translateKey("lblUser") + " " + arUsrNr[chn]); + } + } + } + } catch(e) { + conInfo(e); + } + }); + + translateJSTemplate("#MultiChannelChooserDialog"); + translatePage(".MultiChannelChooserRow"); + + DeviceList.updateDeviceStatus(); + } + +}); +/** + * channelconfig.js + **/ + +/** + * Dialog für Kanaleinstellungen (Name, Räume, Gewerke, Funktionstest) + **/ +ChannelConfigDialog = Singleton.create({ + PLUS_IMAGE_SRC: "/ise/img/plus.png", + MINUS_IMAGE_SRC: "/ise/img/minus.png", + LAYER_ID: "ChannelConfigDialogLayer", + NAME_ID: "ChannelConfigDialog_ChannelName", + USABLE_ID: "ChannelConfigDialog_isUsable", + VISIBLE_ID: "ChannelConfigDialog_isVisible", + LOGGED_ID: "ChannelConfigDialog_isLogged", + MODE_ID: "ChannelConfigDialog_Mode", + ROOMLIST_ID: "ChannelConfigDialogRooms", + SUBSECTIONLIST_ID: "ChannelConfigDialogFuncs", + TEST_RESULT_ID: "ChannelConfigDialogTestResult", + RESULT_ABORT: 0, + RESULT_OK: 1, + POLL_INTERVAL: 3, + + /** + * Konstruktor + **/ + initialize: function() + { + this.template = TrimPath.parseTemplate(CHANNEL_CONFIG_DIALOG_JST); + }, + + /** + * Zeigt den Konfigurationsdialog an + **/ + show: function(channel, callback) + { + this.m_testId = null; + this.m_isTestRunning = false; + + this.isRoomListVisible = false; + this.isSubsectionListVisible = false; + this.channel = channel; + this.callback = callback; + this.layer = document.createElement("div"); + this.layer.id = this.LAYER_ID; + Layer.add(this.layer); + this.layer.innerHTML = this.template.process({ + channel: this.channel, + isRoomListVisible: this.isRoomListVisible, + isSubsectionListVisible: this.isSubsectionListVisible, + rooms: RoomList.list().ex_sortBy("name"), + funcs: SubsectionList.list().ex_sortBy("name") + }); + + if (this.channel.typeName.indexOf("Team") != -1) { + this.__hideFunctionTest(); + } + + if (isNonCCUDevice(this.channel)) { + this.__hideLogging(); + } + if (this.channel.deviceType.id == "HmIPW-DRAP") { + this.__hideRoomFunctionSelection(); + } + translateJSTemplate("#ChannelConfigDialog"); + translatePage("#ChannelConfigDialogRooms, #ChannelConfigDialogFuncs"); + jQuery("#generalChannelConfigLblSender").val(translateKey("generalChannelConfigLblSender")); + jQuery("#generalChannelConfigLblReceiver").val(translateKey("generalChannelConfigLblReceiver")); + jQuery("#generalChannelConfigLblNone").val(translateKey("generalChannelConfigLblNone")); + }, + + __hideFunctionTest: function() { + jQuery("#channelFunctionTestPanel").hide(); + }, + + __hideLogging: function() { + jQuery("#btnEnableChannelLogging").hide(); + }, + + __hideRoomFunctionSelection: function() { + jQuery("#ChannelConfigDialogSectionRoom, #ChannelConfigDialogSectionFunc").hide(); + }, + + /** + * Schließt den Konfigurationsdialog. + **/ + close: function(result) + { + this.m_isTestRunning = false; + Layer.remove(this.layer); + if (this.callback) { this.callback(result); } + }, + + /** + * Übernimmt die Änderungen und schließt den Dialog. + **/ + ok: function() + { + if (isTextAllowed($(this.NAME_ID).value)) + { + var channel = this.channel, + arRooms = [], arSubSection = []; + + channel.setName($(this.NAME_ID).value); + channel.setVisibility($(this.VISIBLE_ID).checked); + if ($(this.VISIBLE_ID).checked) { + iseDevices.setVisible(channel.id, "id", true); + } + channel.setUsability($(this.USABLE_ID).checked); + channel.setLogging($(this.LOGGED_ID).checked); + channel.setMode($(this.MODE_ID).options[$(this.MODE_ID).options.selectedIndex].value); + + arRooms = $A($(this.ROOMLIST_ID)); + + // SPHM-1153 + jQuery(arRooms).each(function(index,_room) { + var room = RoomList.get(_room.value); + if (jQuery(_room).prop("checked")) { + room.addChannel(channel.id, true); + } else { + room.removeChannel(channel.id, true); + } + }); + + arSubSection = $A($(this.SUBSECTIONLIST_ID)); + + // SPHM-1153 + jQuery(arSubSection).each(function(index,_subSection) { + var subsection = SubsectionList.get(_subSection.value); + if (jQuery(_subSection).prop("checked")) { + subsection.addChannel(channel.id, true); + } else { + subsection.removeChannel(channel.id, true); + } + }); + this.close(this.RESULT_OK); + } + }, + + /** + * Schließt den Dialog ohne die Änderungen zu übernehmen. + **/ + abort: function() + { + this.close(this.RESULT_ABORT); + }, + + /** + * Startet den Funktionstest. + **/ + startTest: function() + { + var _this_ = this; + + this.m_isTestRunning = true; + $(this.TEST_RESULT_ID).setStyle({backgroundColor: WebUI.getColor("testActive")}); + homematic("Channel.startComTest", {id: this.channel.id}, function(testId) { + _this_.m_testId = testId; + _this_.pollTest(); + }); + }, + + showConfigCentralLinkHelp: function() { + var title = translateKey("dialogHelpCentralLinkTitle"), + content = translateKey("dialogHelpCentralLinkContent"); + MessageBox.show(title, content,'', 475, 450); + }, + + createCentralLink: function(channeltype) + { + var addr=this.channel.address; + new YesNoDialog(translateKey('dialogSafetyCheck'), translateKey('dialogQuestionAddLink').replace('%s', addr+' <> CCU'), function(result) { + if (result == YesNoDialog.RESULT_YES) { + if (channeltype === "KEY_TRANSCEIVER" || channeltype === "MULTI_MODE_INPUT_TRANSMITTER") { + homematic("Interface.reportValueUsage", {"interface": "HmIP-RF", "address": addr, "valueId": "PRESS_SHORT", "refCounter":"1"}); + } else if (channeltype === "KEY") { + homematic("Interface.reportValueUsage", {"interface": "BidCos-RF", "address": addr, "valueId": "PRESS_SHORT", "refCounter":"1"}); + } + } + }, "html"); + }, + + removeCentralLink: function(channeltype) + { + var addr=this.channel.address; + new YesNoDialog(translateKey('dialogSafetyCheck'), translateKey('dialogQuestionRemoveLink').replace('%s', addr+' <> CCU'), function(result) { + if (result == YesNoDialog.RESULT_YES) { + if (channeltype === "KEY_TRANSCEIVER" || channeltype === "MULTI_MODE_INPUT_TRANSMITTER") { + homematic("Interface.reportValueUsage", {"interface": "HmIP-RF", "address": addr, "valueId": "PRESS_SHORT", "refCounter":"0"}); + homematic("Interface.reportValueUsage", {"interface": "HmIP-RF", "address": addr, "valueId": "PRESS_LONG", "refCounter":"0"}); + } else if (channeltype === "KEY") { + homematic("Interface.reportValueUsage", {"interface": "BidCos-RF", "address": addr, "valueId": "PRESS_SHORT", "refCounter":"0"}); + homematic("Interface.reportValueUsage", {"interface": "BidCos-RF", "address": addr, "valueId": "PRESS_LONG", "refCounter":"0"}); + } + } + }, "html"); + }, + + /** + * Callback. Fragt zyklisch das Ergebnis des Funktionstests ab. + **/ + pollTest: function(timestamp) + { + var _this_ = ChannelConfigDialog; + + if (typeof(timestamp) == "string") + { + var time = timestamp.split(" ")[1]; + $(_this_.TEST_RESULT_ID).setStyle({backgroundColor: WebUI.getColor("testOk")}); + $(_this_.TEST_RESULT_ID).innerHTML = ""; + $(_this_.TEST_RESULT_ID).appendChild(document.createTextNode(time)); + _this_.m_isTestRunning = false; + } + + if (_this_.m_isTestRunning) + { + homematic.delay(_this_.POLL_INTERVAL, "Channel.pollComTest", { + id : _this_.channel.id, + testId: _this_.m_testId + }, _this_.pollTest); + } + }, + + /** + * Blendet die Raumliste ein bzw. aus. + **/ + toggleRooms: function(image) + { + if (this.isRoomListVisible === true) + { + $(this.ROOMLIST_ID).hide(); + image.src = this.PLUS_IMAGE_SRC; + this.isRoomListVisible = false; + } + else + { + $(this.ROOMLIST_ID).show(); + image.src = this.MINUS_IMAGE_SRC; + this.isRoomListVisible = true; + } + }, + + /** + * Blendet die Gewerkeliste ein bzw. aus. + **/ + toggleFuncs: function(image) + { + if (this.isSubsectionListVisible === true) + { + $(this.SUBSECTIONLIST_ID).hide(); + image.src = this.PLUS_IMAGE_SRC; + this.isSubsectionListVisible = false; + } + else + { + $(this.SUBSECTIONLIST_ID).show(); + image.src = this.MINUS_IMAGE_SRC; + this.isSubsectionListVisible = true; + } + } +}); +/** + * deviceconfigdialog.js + **/ + +/** + * Dialog für Kanaleinstellungen (Name, Räume, Gewerke, Funktionstest) + **/ +DeviceConfigDialog = Singleton.create({ + LAYER_ID: "DeviceConfigDialogLayer", + NAME_ID: "DeviceConfigDialog_DeviceName", + SEPARATOR_ID: "DeviceConfigDialog_DeviceChannelsRenameSeparator", + USABLE_ID: "DeviceConfigDialog_isUsable", + VISIBLE_ID: "DeviceConfigDialog_isVisible", + LOGGED_ID: "DeviceConfigDialog_isLogged", + SERVICEMSG_ID: "DeviceConfigDialog_enabledServiceMsg", + TEST_RESULT_ID: "DeviceConfigDialogTestResult", + RENAME_OWN_ID: "DeviceConfigDialog_renameChannelIncludingOwn", + RESULT_OK: 1, + RESULT_ABORT: 0, + POLL_INTERVAL: 3, + + /** + * Konstruktor + **/ + initialize: function() + { + this.template = TrimPath.parseTemplate(DEVICE_CONFIG_DIALOG_JST); + }, + + /** + * Zeigt den Konfigurationsdialog an + **/ + show: function(device, callback) + { + this.m_testId = null; + this.m_isTestRunning = false; + + this.device = device; + this.isVisibilityChanged = false; + this.isUsabilityChanged = false; + this.isLoggingChanged = false; + this.enabledServiceMsgChanged = false; + this.callback = callback; + this.layer = document.createElement("div"); + this.layer.id = this.LAYER_ID; + Layer.add(this.layer); + this.layer.innerHTML = this.template.process({ + device: this.device + }); + + this.device.channels.each(function(channel) { + if (! channel.isVisible) { + jQuery("#trAllChnVisible").show(); + return false; //leave each loop + } + }); + + if ((this.device.typeName.indexOf("Team") != -1) || (isNonCCUDevice(this.device))) { + this.__hideFunctionTest(); + } + if (isNonCCUDevice(this.device)) { + this.__hideLogging(); + } + translateJSTemplate("#DeviceConfigDialog"); + jQuery("#DeviceConfigDialogTestHintImg").attr('title', translateKey("generalDeviceConfigHintTooltip")); + jQuery("#DeviceConfigDialogRenameChannelButtonHintImg").attr('title', translateKey("generalDeviceRenameChannelHintTooltip")); + jQuery("#DeviceConfigDialogRenameIncludingOwnHintImg").attr('title', translateKey("generalDeviceRenameChannelIncludingOwnHint")); + }, + + __hideFunctionTest: function() { + jQuery("#deviceFunctionTestPanel").hide(); + }, + + __hideLogging: function() { + jQuery("#btnEnableDeviceLogging").hide(); + }, + + /** + * Schließt den Konfigurationsdialog. + **/ + close: function(result) + { + this.m_isTestRunning = false; + Layer.remove(this.layer); + if (this.callback) { this.callback(result); } + }, + + /** + * Übernimmt die Änderungen und schließt den Dialog. + **/ + ok: function() + { + if (isTextAllowed($(this.NAME_ID).value)) + { + this.device.setName($(this.NAME_ID).value); + + var isVisible = $(this.VISIBLE_ID).checked; + var isUsable = $(this.USABLE_ID).checked; + var isLogged = $(this.LOGGED_ID).checked; + var devIsVisible = "unknown"; + this.device.channels.each(function(channel) { + if ((this.isVisibilityChanged) && (isVisible)) { + channel.setVisibility(isVisible); + if (devIsVisible == "unknown") { + homematic("Device.setVisibility", {"id": this.device.id, "isVisible": true}); + devIsVisible = true; + } + } + if (this.isUsabilityChanged) { channel.setUsability(isUsable); } + if (this.isLoggingChanged) { channel.setLogging(isLogged); } + }, this); + var enabledServiceMsg = $(this.SERVICEMSG_ID).checked; + if (this.enabledServiceMsgChanged) { this.device.setEnabledServiceMsg(enabledServiceMsg); } + + this.close(this.RESULT_OK); + } + }, + + /** + * Schließt den Dialog ohne die Änderungen zu übernehmen. + **/ + abort: function() + { + this.close(this.RESULT_ABORT); + }, + + /** + * Benennt alle Channel des Device um + **/ + + ready: function() + { + this.ok(); + }, + + renameChannels: function() { + if (confirm("Alle Kanäle umbenennen?")) { + var renameOwnChannelNames = $(this.RENAME_OWN_ID).checked; + + this.device.channels.each(function(channel) { + var chNumber = channel.address.split(':')[1]; + var origChName = this.device.name+":"+chNumber; + + // Channel bereits umbenannt und Option "eigene Namen umbenennen" wurde deaktiviert + if (channel.name !== origChName && renameOwnChannelNames === false) return true; + + var chName = $(this.NAME_ID).value+ $(this.SEPARATOR_ID).value + chNumber; + homematic("Channel.setName", {id: channel.id, name: chName}); + channel.setName(chName); + }, this); + this.ok(); + } + }, + + /** + * Startet den Funktionstest. + **/ + startTest: function() { + var _this_ = this; + this.m_isTestRunning = true; + $(this.TEST_RESULT_ID).setStyle({backgroundColor: WebUI.getColor("testActive")}); + homematic("Device.startComTest", {id: this.device.id}, function (testId) { + _this_.m_testId = testId; + _this_.pollTest(); + }); + }, + + /** + * Callback. Fragt zyklisch das Ergebnis des Funktionstests ab. + **/ + pollTest: function(timestamp) + { + var _this_ = DeviceConfigDialog; + + if (typeof(timestamp) == "string") + { + var time = timestamp.split(" ")[1]; + $(_this_.TEST_RESULT_ID).setStyle({backgroundColor: WebUI.getColor("testOk")}); + $(_this_.TEST_RESULT_ID).innerHTML = ""; + $(_this_.TEST_RESULT_ID).appendChild(document.createTextNode(time)); + _this_.m_isTestRunning = false; + } + + if (_this_.m_isTestRunning) + { + homematic.delay(_this_.POLL_INTERVAL, "Device.pollComTest", { + id : _this_.device.id, + testId: _this_.m_testId + }, _this_.pollTest); + } + } + +}); +/** + * deletedevicedialog.js + **/ + +hasDeviceInternalProgramOrSysvar = function(device) { + var result = {"id": 0, "address" : "", "type": "" }; + try { + jQuery.each(device.channels, function(index, channel) { + if ( + (channel.channelType == "POWERMETER") + || (channel.channelType == "POWERMETER_IEC1") + || (channel.channelType == "ENERGIE_METER_TRANSMITTER") + || (channel.channelType == "WEATHER_TRANSMIT" /*HmIP-SWO*/) + || (channel.channelType == "KEY_TRANSCEIVER") /*HnmIP-MOD-RC8*/ + ) { + result.id = channel.id; + result.address = channel.address; + result.type = channel.channelType; + return; // leave each loop + } + }); + } catch(e) {} + + return result; +}; + +deleteProgSysvarPOWERMETER = function(chId, chAddress, devLabel) { + try { + homematic("SysVar.deleteSysVarByName", {"name": "svEnergyCounter_" + chId + "_" + chAddress}, function () { + homematic("SysVar.deleteSysVarByName", {"name": "svEnergyCounterOldVal_" + chId}, function () { + homematic("SysVar.deleteSysVarByName", {"name": "svEnergyCounter_" + chId + "_" + chAddress + "_RESET"}, function () { + homematic("SysVar.deleteSysVarByName", {"name": "svEnergyCounter_" + chId + "_" + chAddress + "_DEVICE_RESET"}, function () { + homematic("SysVar.deleteSysVarByName", {"name": "svEnergyCounter_" + chId + "_" + chAddress + "_TMP_OLDVAL"}, function () { + homematic("Program.deleteProgramByName", {"name": "prgEnergyCounter_" + chId + "_" + chAddress}, function () { + homematic("Program.deleteProgramByName", {"name": "prgSetEnergyValuesAtMidnight" + chId}, function () { + if ((typeof devLabel == "undefined") || (devLabel != "hmip-psmco")) { + conInfo(chAddress + " ProgSysvarPOWERMETER deleted - next: save ObjectModel"); + window.setTimeout(function () { + saveObjectModel(); + }, 5000); + } else { + deleteProgSysvarPOWERMETER_FeedIn(chId, chAddress); + } + }); + }); + }); + }); + }); + }); + }); + } catch(e) {console.log(e);} +}; + +deleteProgSysvarPOWERMETER_FeedIn = function(chId, chAddress) { + try { + homematic("SysVar.deleteSysVarByName", {"name": "svEnergyCounterFeedIn_" + chId + "_" + chAddress}, function () { + homematic("SysVar.deleteSysVarByName", {"name": "svEnergyCounterOldValFeedIn_" + chId}, function () { + //homematic("SysVar.deleteSysVarByName", {"name": "svEnergyCounter_" + chId + "_" + chAddress + "_RESET"}, function () { + //homematic("SysVar.deleteSysVarByName", {"name": "svEnergyCounter_" + chId + "_" + chAddress + "_DEVICE_RESET"}, function () { + //homematic("SysVar.deleteSysVarByName", {"name": "svEnergyCounter_" + chId + "_" + chAddress + "_TMP_OLDVAL"}, function () { + homematic("Program.deleteProgramByName", {"name": "prgEnergyCounterFeedIn_" + chId + "_" + chAddress}, function () { + homematic("Program.deleteProgramByName", {"name": "prgSetEnergyValuesAtMidnightFeedIn" + chId}, function () { + conInfo(chAddress + " ProgSysvarPOWERMETER + FeedIn deleted - next: save ObjectModel"); + window.setTimeout(function(){saveObjectModel();},5000); + }); + }); + //}); + //}); + //}); + }); + }); + } catch(e) {console.log(e);} +}; + +deleteProgSysvarPOWERMETER_ESI = function(device) { + try { + jQuery.each(device.channels, function (index, chn) { + if (chn.index >= 1) { + homematic("Program.deleteProgramByName", {"name": "prgEnergyCounter_" + chn.id + "_" + chn.address}); + homematic("Program.deleteProgramByName", {"name": "prgGasCounter_" + chn.id + "_" + chn.address}); + homematic("Program.deleteProgramByName", {"name": "prgSetEnergyValuesAtMidnight" + chn.id}); + homematic("SysVar.deleteSysVarByName", {"name": "svEnergyCounter_" + chn.id + "_" + chn.address}); + homematic("SysVar.deleteSysVarByName", {"name": "svEnergyCounterOldVal_" + chn.id}); + } + }); + } catch(e) {console.log(e);} + + conInfo(device.typeName + ": All relevant programs and sysvars deleted - next: save ObjectModel"); + window.setTimeout(function(){saveObjectModel();},5000); +}; + + +deleteProgSysvarPOWERMETER_IGL = function(chId, chAddress) { + try { + homematic("SysVar.deleteSysVarByName", {"name": "svEnergyCounterGas_" + chId + "_" + chAddress}, function () { + homematic("SysVar.deleteSysVarByName", {"name": "svEnergyCounterGasOldVal_" + chId}, function () { + homematic("SysVar.deleteSysVarByName", {"name": "svEnergyCounterGas_" + chId + "_" + chAddress + "_RESET"}, function () { + homematic("SysVar.deleteSysVarByName", {"name": "svEnergyCounterGas_" + chId + "_" + chAddress + "_DEVICE_RESET"}, function () { + homematic("SysVar.deleteSysVarByName", {"name": "svEnergyCounterGas_" + chId + "_" + chAddress + "_TMP_OLDVAL"}, function () { + homematic("Program.deleteProgramByName", {"name": "prgEnergyCounterGAS_" + chId + "_" + chAddress}, function () { + conInfo(chAddress + " ProgSysvarPOWERMETER_IGL deleted - next: ProgSysvarPOWERMETER"); + deleteProgSysvarPOWERMETER(chId, chAddress); + }); + }); + }); + }); + }); + }); + } catch(e) {console.log(e);} +}; + +deleteProgSysvarPOWERMETER_IEC = function(chId, chAddress) { + try { + homematic("SysVar.deleteSysVarByName", {"name": "svEnergyCounterIEC_" + chId + "_" + chAddress}, function () { + homematic("SysVar.deleteSysVarByName", {"name": "svEnergyCounterIECOldVal_" + chId}, function () { + homematic("Program.deleteProgramByName", {"name": "prgEnergyCounterIEC_" + chId + "_" + chAddress}, function () { + conInfo(chAddress + " ProgSysvarPOWERMETER_IEC deleted - next: ProgSysvarPOWERMETER_IGL"); + deleteProgSysvarPOWERMETER_IGL(chId, chAddress); + }); + }); + }); + } catch(e) {console.log(e);} +}; + +deleteProgSysvarHmIPWeatherTransmitRainSunshine = function(chId, chAddress) { + try { + homematic("SysVar.deleteSysVarByName", {"name": "svHmIPRainCounter_" + chId + "_" + chAddress}, function () { + homematic("SysVar.deleteSysVarByName", {"name": "svHmIPRainCounterOldVal_" + chId}, function () { + homematic("SysVar.deleteSysVarByName", {"name": "svHmIPRainCounterYesterday_" + chId}, function () { + homematic("SysVar.deleteSysVarByName", {"name": "svHmIPRainCounterToday_" + chId}, function () { + homematic("Program.deleteProgramByName", {"name": "prgRainCounter_" + chId + "_" + chAddress}, function () { + homematic("Program.deleteProgramByName", {"name": "prgDailySunshineRainCounter_" + chId}, function () { + conInfo(chAddress + "prgDailySunshineRainCounter and prgHmIPRainCounter deleted - next: delete prgHmIPSunshineCounter"); + deleteProgSysvarHmIPWeatherTransmitSunshine(chId,chAddress); + }); + }); + }); + }); + }); + }); + } catch(e) {console.log(e);} +}; + +deleteProgSysvarHmIPWeatherTransmitSunshine = function(chId, chAddress) { + try { + homematic("SysVar.deleteSysVarByName", {"name": "svHmIPSunshineCounter_" + chId + "_" + chAddress}, function () { + homematic("SysVar.deleteSysVarByName", {"name": "svHmIPSunshineCounterOldVal_" + chId}, function () { + homematic("SysVar.deleteSysVarByName", {"name": "svHmIPSunshineCounterYesterday_" + chId}, function () { + homematic("SysVar.deleteSysVarByName", {"name": "svHmIPSunshineCounterToday_" + chId}, function () { + homematic("Program.deleteProgramByName", {"name": "prgSunshineCounter_" + chId + "_" + chAddress}, function () { + conInfo(chAddress + " prgHmIPSunshineCounter deleted - next: save ObjectModel"); + window.setTimeout(function () { + saveObjectModel(); + }, 5000); + }); + }); + }); + }); + }); + } catch(e) {console.log(e);} +}; + + +/** + * Ablauf: + * 1) Prüfe, ob direkte Verknüpfungen oder Programme bestehen + * 2) Anwender muss bestätigen, ob er das Gerät wirklich löschen möchte + * --> dabei wird angezeigt, on direkte Verknüpfungen oder Programme bestehen + * --> der Anwender wählt eine Löschoption: + * - nur ablernen + * - in Werkzustand zurücksetzen + * 3) Falls das Gerät gelöscht werden soll, wird nun der Löschvorgang durchgeführt + * 4) Falls der Löschvorgang fehlgeschlagen ist, kann der Anwender wählen: + * - erneute löschen + * - später automatisch löschen + * - löschen, auch wenn nicht erreichbar + * - abbrechen (nicht löschen) + */ + +/** + * "Bitte warten...", "Prüfe Programme und direkte Verknüpfungen..." + **/ +CheckLinksAndProgramsWindow = Class.create({ + + initialize: function(device, callback) + { + var onResultHandler = this.m_onResult.bind(this); + var screenWidth = WebUI.getWidth(); + var screenHeight = WebUI.getHeight(); + var frameWidth = CheckLinksAndProgramsWindow.CONTENT_WIDTH; + var frameHeight = CheckLinksAndProgramsWindow.CONTENT_HEIGHT; + var frameX = parseInt((screenWidth - frameWidth ) / 2); + var frameY = parseInt((screenHeight - frameHeight) / 2); + + CheckLinksAndProgramsWindow.TITLE = translateKey("CheckLinksAndProgramsWindowTitle"); + CheckLinksAndProgramsWindow.CONTENT = "" + translateKey("CheckLinksAndProgramsWindowContent"); + + this.m_device = device; + this.m_callback = callback; + + this.m_layer = document.createElement("div"); + this.m_layer.className = "DialogLayer"; + + this.m_frame = new UI.Frame() + .setTitle(CheckLinksAndProgramsWindow.TITLE) + .setContentSize(frameWidth, frameHeight) + .setPosition(frameX, frameY) + .add(new UI.Text() + .setPosition(10, 10) + .setWidth(frameWidth - 10) + .setHtml(CheckLinksAndProgramsWindow.CONTENT) + ); + + this.m_layer.appendChild(this.m_frame.getElement()); + Layer.add(this.m_layer); + + this.m_device.hasLinksOrPrograms(onResultHandler); + }, + + m_onResult: function(result) + { + this.m_frame.dispose(); + Layer.remove(this.m_layer); + + if (this.m_callback) { this.m_callback(result); } + } + +}); + +CheckLinksAndProgramsWindow.CONTENT_WIDTH = 320; +CheckLinksAndProgramsWindow.CONTENT_HEIGHT = 60; +//CheckLinksAndProgramsWindow.TITLE = translateKey("CheckLinksAndProgramsWindowTitle"); +//CheckLinksAndProgramsWindow.CONTENT = "" + translateKey("CheckLinksAndProgramsWindowContent"); + +/** + * "Möchten Sie das Gerät wirklich löschen?" + **/ +ConfirmDeleteDeviceWindow = Class.create({ + + initialize: function(device, hasLinksOrPrograms, callback) + { + var onDeleteHandler = this.m_onDelete.bind(this); + var onAbortHandler = this.m_onAbort.bind(this); + var onChangeHandler = this.m_onChange.bind(this); + var screenWidth = WebUI.getWidth(); + var screenHeight = WebUI.getHeight(); + var frameWidth = ConfirmDeleteDeviceWindow.CONTENT_WIDTH; + var frameHeight = ConfirmDeleteDeviceWindow.CONTENT_HEIGHT; + var frameX = parseInt((screenWidth - frameWidth ) / 2); + var frameY = parseInt((screenHeight - frameHeight) / 2); + + this.m_device = device; + + ConfirmDeleteDeviceWindow.TITLE = translateKey("ConfirmDeleteDeviceWindowTitle"); + ConfirmDeleteDeviceWindow.QUESTION = translateKey("ConfirmDeleteDeviceWindowQuestion"); + ConfirmDeleteDeviceWindow.DELETE_OPTIONS = translateKey("ConfirmDeleteDeviceWindowDeleteOptions"); + ConfirmDeleteDeviceWindow.REMOVE = translateKey("ConfirmDeleteDeviceWindowRemove"); + ConfirmDeleteDeviceWindow.REMOVE_DESCRIPTION = (! isNonCCUDevice(this.m_device)) ? translateKey("ConfirmDeleteDeviceWindowRemoveDescription") : translateKey("ConfirmDeleteDeviceWindowRemoveDescriptionNoneCCUDevice"); + ConfirmDeleteDeviceWindow.RESET = translateKey("ConfirmDeleteDeviceWindowReset"); + ConfirmDeleteDeviceWindow.RESET_DESCRIPTION = translateKey("ConfirmDeleteDeviceWindowResetDescription"); + ConfirmDeleteDeviceWindow.DELETE_BUTTON = translateKey("ConfirmDeleteDeviceWindowDeleteButton"); + ConfirmDeleteDeviceWindow.ABORT_BUTTON = translateKey("ConfirmDeleteDeviceWindowAbortButton"); + ConfirmDeleteDeviceWindow.WARNING = translateKey("ConfirmDeleteDeviceWindowWarning"); + + this.hmIPIdentifier = "HmIP-RF"; + this.isNonCCUDevice = isNonCCUDevice(this.m_device); + + this.m_showRemoveOption = (this.m_device.interfaceName != this.hmIPIdentifier) ? true : false; + this.m_hasLinksOrPrograms = hasLinksOrPrograms; + this.m_callback = callback; + + this.m_layer = document.createElement("div"); + this.m_layer.className = "DialogLayer"; + + this.m_lblDeleteOptions = new UI.Label() + .setPosition(10, 70) + .setText(ConfirmDeleteDeviceWindow.DELETE_OPTIONS); + + this.m_listbox = new UI.ListBox() + .setPosition(30,90) + .setWidth(frameWidth - 60) + //.add({name: ConfirmDeleteDeviceWindow.REMOVE, description: ConfirmDeleteDeviceWindow.REMOVE_DESCRIPTION, flags: 0}) + //.add({name: ConfirmDeleteDeviceWindow.RESET, description: ConfirmDeleteDeviceWindow.RESET_DESCRIPTION, flags: 1}) + .setOnChangeCallback(onChangeHandler) + .selectIndex(0); + + if (this.m_showRemoveOption) { + this.m_listbox.add({name: ConfirmDeleteDeviceWindow.REMOVE, description: ConfirmDeleteDeviceWindow.REMOVE_DESCRIPTION, flags: 0}); + } + + // The deviceType doesn´t exist when in device inbox. + // That means as long as a device is in the device inbox a factory reset isn´t possible when deleting the device. + if(this.m_device.deviceType != null) { + // The new group device has no factory reset + if (this.m_device.deviceType.id != "HM-CC-VG-1") { + this.m_listbox.add({name: ConfirmDeleteDeviceWindow.RESET, description: ConfirmDeleteDeviceWindow.RESET_DESCRIPTION, flags: 1}); + } + } else { + // HmIP devices will always be deleted with a factory reset + if (this.m_device.interfaceName == this.hmIPIdentifier) { + this.m_listbox.add({name: ConfirmDeleteDeviceWindow.RESET, description: ConfirmDeleteDeviceWindow.RESET_DESCRIPTION, flags: 1}); + } + } + + this.m_description = new UI.Text() + .setPosition(30, 120) + .setWidth(frameWidth - 60) + .setText(ConfirmDeleteDeviceWindow.REMOVE_DESCRIPTION); + + if (! this.m_showRemoveOption) { + this.m_description.setText(ConfirmDeleteDeviceWindow.RESET_DESCRIPTION); + } + + this.m_frame = new UI.Frame() + .setTitle(ConfirmDeleteDeviceWindow.TITLE) + .setContentSize(frameWidth, frameHeight) + .setPosition(frameX, frameY) + .add(new UI.Text() + .setPosition(10, 10) + .setWidth(60) + .setHeight(60) + .setHtml(this.m_device.thumbnailHTML) + ) + .add(new UI.Text() + .setPosition(75, 10) + .setWidth(frameWidth - 85) + .setHtml(ConfirmDeleteDeviceWindow.QUESTION.process({device: this.m_device})) + ) + + .add(this.m_lblDeleteOptions) + + .add(this.m_listbox) + + .add(this.m_description) + .add(new UI.Button() + .setPosition(frameWidth - 160, 200) + .setText(ConfirmDeleteDeviceWindow.DELETE_BUTTON) + .setAction(onDeleteHandler) + ) + + .add(new UI.Button() + .setPosition(10,200) + .setText(ConfirmDeleteDeviceWindow.ABORT_BUTTON) + .setAction(onAbortHandler) + ); + + if (this.isNonCCUDevice) { + this.m_frame.remove(this.m_lblDeleteOptions); + this.m_frame.remove(this.m_listbox); + } + + if (this.m_hasLinksOrPrograms !== false) + { + this.m_frame.add(new UI.Text() + .setPosition(10,160) + .setWidth(frameWidth - 10) + .setHtml(ConfirmDeleteDeviceWindow.WARNING) + ); + } + + this.m_layer.appendChild(this.m_frame.getElement()); + Layer.add(this.m_layer); + }, + + m_close: function(result) + { + this.m_frame.dispose(); + Layer.remove(this.m_layer); + if (this.m_callback) { this.m_callback(result); } + }, + + m_onDelete: function() + { + this.m_close(this.m_listbox.getSelectedItem().flags); + }, + + m_onAbort: function() + { + this.m_close(null); + }, + + m_onChange: function(item) + { + this.m_description.setText(item.description); + } +}); + + +ConfirmDeleteDeviceWindow.CONTENT_WIDTH = 400; +ConfirmDeleteDeviceWindow.CONTENT_HEIGHT = 230; +/* +ConfirmDeleteDeviceWindow.TITLE = translateKey("ConfirmDeleteDeviceWindowTitle"); +ConfirmDeleteDeviceWindow.QUESTION = translateKey("ConfirmDeleteDeviceWindowQuestion"); +ConfirmDeleteDeviceWindow.DELETE_OPTIONS = translateKey("ConfirmDeleteDeviceWindowDeleteOptions"); +ConfirmDeleteDeviceWindow.REMOVE = translateKey("ConfirmDeleteDeviceWindowRemove"); +ConfirmDeleteDeviceWindow.REMOVE_DESCRIPTION = translateKey("ConfirmDeleteDeviceWindowRemoveDescription"); +ConfirmDeleteDeviceWindow.RESET = translateKey("ConfirmDeleteDeviceWindowReset"); +ConfirmDeleteDeviceWindow.RESET_DESCRIPTION = translateKey("ConfirmDeleteDeviceWindowResetDescription"); +ConfirmDeleteDeviceWindow.DELETE_BUTTON = translateKey("ConfirmDeleteDeviceWindowDeleteButton"); +ConfirmDeleteDeviceWindow.ABORT_BUTTON = translateKey("ConfirmDeleteDeviceWindowAbortButton"); +ConfirmDeleteDeviceWindow.WARNING = translateKey("ConfirmDeleteDeviceWindowWarning"); +*/ + +/** + * "Bitte warten", "Gerät wird gelöscht..." + **/ +DeleteDeviceWindow = Class.create({ + + initialize: function(device, flags, callback) + { + var onResultHandler = this.m_onResult.bind(this); + var screenWidth = WebUI.getWidth(); + var screenHeight = WebUI.getHeight(); + var frameWidth = DeleteDeviceWindow.CONTENT_WIDTH; + var frameHeight = DeleteDeviceWindow.CONTENT_HEIGHT; + var frameX = parseInt((screenWidth - frameWidth ) / 2); + var frameY = parseInt((screenHeight - frameHeight) / 2); + + DeleteDeviceWindow.TITLE = translateKey("DeleteDeviceWindowTitle"); + DeleteDeviceWindow.CONTENT = ""+translateKey("DeleteDeviceWindowContent"); + + this.m_device = device; + this.m_flags = flags; + this.m_callback = callback; + + this.m_layer = document.createElement("div"); + this.m_layer.className = "DialogLayer"; + + this.m_frame = new UI.Frame() + .setTitle(DeleteDeviceWindow.TITLE) + .setContentSize(frameWidth, frameHeight) + .setPosition(frameX, frameY) + .add(new UI.Text() + .setPosition(10, 10) + .setWidth(frameWidth - 10) + .setHtml(DeleteDeviceWindow.CONTENT) + ); + + this.m_layer.appendChild(this.m_frame.getElement()); + Layer.add(this.m_layer); + + device.remove(this.m_flags, onResultHandler); + + if (flags == 5) { + // Prüfen, ob ein Kanal des Gerätes ein HmIP-Wettersensor ist, als Energy-Counter oder ob das Gerät ein HmIP-MOD-RC8 ist dient. + // Wenn ja, müssen beim Löschen die dazugehörigen Systemvariablen + // sowie das enstprechende Systemprogramm zum aktualisieren der Systemvariablen entfernt werden. + var oChnIdAndAddress = hasDeviceInternalProgramOrSysvar(this.m_device), + chId = oChnIdAndAddress.id, + chAddress= oChnIdAndAddress.address; + if (chId != 0) { + if (oChnIdAndAddress.type == "POWERMETER" || oChnIdAndAddress.type == "ENERGIE_METER_TRANSMITTER") { + if (this.m_device.typeName.toLowerCase() != "hmip-esi") { + deleteProgSysvarPOWERMETER(chId, chAddress, this.m_device.typeName.toLowerCase()); + } else { + deleteProgSysvarPOWERMETER_ESI(this.m_device); + } + } else if (oChnIdAndAddress.type == "POWERMETER_IGL") { + deleteProgSysvarPOWERMETER_IGL(chId, chAddress); + } else if (oChnIdAndAddress.type == "POWERMETER_IEC1") { + deleteProgSysvarPOWERMETER_IEC(chId, chAddress); + } else if ((this.m_device.typeName.toLowerCase() == "hmip-swo-b") && (oChnIdAndAddress.type == "WEATHER_TRANSMIT")) { + deleteProgSysvarHmIPWeatherTransmitSunshine(chId, chAddress); + } else if (((this.m_device.typeName.toLowerCase() == "hmip-swo-pl") || (this.m_device.typeName.toLowerCase() == "hmip-swo-pr")) && (oChnIdAndAddress.type == "WEATHER_TRANSMIT")) { + deleteProgSysvarHmIPWeatherTransmitRainSunshine(chId, chAddress); + } /*currently not in use else if (this.m_device.typeName.toLowerCase() == "hmip-mod-rc8") { + this.m_deleteSysvarHmIPModRC8(); + }*/ + } else if ((typeof this.m_device.typeName != "undefined") && (this.m_device.typeName.toLowerCase() == "hmipw-drbl4")) { + this.m_deleteMetaDataHmIPWBlind(); + } + } + + }, + + m_onResult: function(result, error) + { + var errorCode = DeleteDeviceDialog.ERROR_NO_ERROR; + if (error !== null) + { + errorCode = error.code; + } + var self = this; + + if (isNonCCUDevice(this.m_device)) { + window.setTimeout(function () { + self.m_frame.dispose(); + Layer.remove(self.m_layer); + + ConfigData.reload( function() { + ConfigData.handleReloadDone(); + WebUI.enter(DeviceListPage); + } ); + + }, 7000); + } else { + this.m_frame.dispose(); + Layer.remove(this.m_layer); + if (this.m_callback) { this.m_callback(errorCode); } + } + } + +}); + +DeleteDeviceWindow.CONTENT_WIDTH = 320; +DeleteDeviceWindow.CONTENT_HEIGHT = 60; +/* +DeleteDeviceWindow.TITLE = translateKey("DeleteDeviceWindowTitle"); +DeleteDeviceWindow.CONTENT = ""+translateKey("DeleteDeviceWindowContent"); +*/ + +/** + * "Fehler", "Gerät konnte nicht gelöscht werden" + **/ +ErrorOnDeleteWindow = Class.create({ + + initialize: function(device, flags, errorCode, callback) + { + var onDeleteHandler = this.m_onDelete.bind(this); + var onAbortHandler = this.m_onAbort.bind(this); + var onChangeHandler = this.m_onChange.bind(this); + var screenWidth = WebUI.getWidth(); + var screenHeight = WebUI.getHeight(); + var frameWidth = ErrorOnDeleteWindow.CONTENT_WIDTH; + var frameHeight = ErrorOnDeleteWindow.CONTENT_HEIGHT; + var frameX = parseInt((screenWidth - frameWidth ) / 2); + var frameY = parseInt((screenHeight - frameHeight) / 2); + + ErrorOnDeleteWindow.TITLE = translateKey("ErrorOnDeleteWindowTitle"); + ErrorOnDeleteWindow.DELETE_OPTIONS = translateKey("ErrorOnDeleteWindowDeleteOptions"); + ErrorOnDeleteWindow.RETRY = translateKey("ErrorOnDeleteWindowRetry"); + ErrorOnDeleteWindow.RETRY_DESCRIPTION = translateKey("ErrorOnDeleteWindowRetryDescription"); + ErrorOnDeleteWindow.DEFER = translateKey("ErrorOnDeleteWindowDefer"); + ErrorOnDeleteWindow.DEFER_DESCRIPTION = translateKey("ErrorOnDeleteWindowDeferDescription"); + ErrorOnDeleteWindow.FORCE = translateKey("ErrorOnDeleteWindowForce"); + ErrorOnDeleteWindow.FORCE_DESCRIPTION = translateKey("ErrorOnDeleteWindowForceDescription"); + ErrorOnDeleteWindow.DEVICE_NOT_REACHABLE = translateKey("ErrorOnDeleteWindowDeviceNotReachable"); + ErrorOnDeleteWindow.UNKNOWN_DEVICE = translateKey("ErrorOnDeleteWindowUnknownDevice"); + ErrorOnDeleteWindow.UKNOWN_ERROR = translateKey("ErrorOnDeleteWindowUnknownError"); + ErrorOnDeleteWindow.ABORT_BUTTON = translateKey("ErrorOnDeleteWindowAbortButton"); + ErrorOnDeleteWindow.DELETE_BUTTON = translateKey("ErrorOnDeleteWindowDeleteButton"); + + this.m_device = device; + this.m_flags = (flags & DeleteDeviceDialog.FLAG_RESET); + this.m_errorCode = errorCode; + this.m_callback = callback; + + this.hmIPIdentifier = "HmIP-RF"; + + + var errorMessage; + switch(errorCode) + { + case DeleteDeviceDialog.ERROR_GENERAL: + errorMessage = ErrorOnDeleteWindow.DEVICE_NOT_REACHABLE.process({device: this.m_device}); + break; + case DeleteDeviceDialog.ERROR_UNKNOWN_DEVICE: + errorMessage = ErrorOnDeleteWindow.UNKNOWN_DEVICE.process({device: this.m_device}); + break; + default: + errorMessage = ErrorOnDeleteWindow.UKNOWN_ERROR.process({device: this.m_device}); + break; + } + + this.m_layer = document.createElement("div"); + this.m_layer.className = "DialogLayer"; + + this.m_listbox = new UI.ListBox() + .setPosition(30, 160) + .setWidth(frameWidth - 60) + .add({name: ErrorOnDeleteWindow.RETRY, description: ErrorOnDeleteWindow.RETRY_DESCRIPTION, flags: 0}) + .add({name: ErrorOnDeleteWindow.DEFER, description: ErrorOnDeleteWindow.DEFER_DESCRIPTION, flags: 4}) + .add({name: ErrorOnDeleteWindow.FORCE, description: ErrorOnDeleteWindow.FORCE_DESCRIPTION, flags: 2}) + .setOnChangeCallback(onChangeHandler) + .selectIndex(0); + + this.m_description = new UI.Text() + .setPosition(30,190) + .setWidth(frameWidth - 60) + .setText(ErrorOnDeleteWindow.RETRY_DESCRIPTION); + + this.m_frame = new UI.Frame() + .setTitle(ErrorOnDeleteWindow.TITLE) + .setContentSize(frameWidth, frameHeight) + .setPosition(frameX, frameY) + .add(new UI.Text() + .setPosition(10, 10) + .setWidth(60) + .setHeight(60) + .setHtml(this.m_device.thumbnailHTML) + ) + .add(new UI.Text() + .setPosition(75, 10) + .setWidth(frameWidth - 85) + .setHtml(errorMessage) + ) + .add(new UI.Label() + .setPosition(10, 140) + .setText(ErrorOnDeleteWindow.DELETE_OPTIONS) + ) + .add(this.m_listbox) + .add(this.m_description) + .add(new UI.Button() + .setPosition(10, 230) + .setText(ErrorOnDeleteWindow.ABORT_BUTTON) + .setAction(onAbortHandler) + ) + .add(new UI.Button() + .setPosition(frameWidth - 170, 230) + .setWidth(150) + .setText(ErrorOnDeleteWindow.DELETE_BUTTON) + .setAction(onDeleteHandler) + ); + + this.m_layer.appendChild(this.m_frame.getElement()); + Layer.add(this.m_layer); + }, + + m_close: function(result) + { + if (this.m_frame != undefined) { + this.m_frame.dispose(); + } + + Layer.remove(this.m_layer); + + if (result == null && this.m_flags == 1 && this.m_errorCode == 507) { + // Prüfen, ob ein Kanal des Gerätes ein HmIP-Wettersensor ist, als Energy-Counter oder ob das Gerät ein HmIP-MOD-RC8 ist dient. + // Wenn ja, müssen beim Löschen die dazugehörigen Systemvariablen + // sowie das enstprechende Systemprogramm zum aktualisieren der Systemvariablen entfernt werden. + var oChnIdAndAddress = hasDeviceInternalProgramOrSysvar(this.m_device), + chId = oChnIdAndAddress.id, + chAddress= oChnIdAndAddress.address; + if (chId != 0) { + if (oChnIdAndAddress.type == "POWERMETER" || oChnIdAndAddress.type == "ENERGIE_METER_TRANSMITTER") { + if (this.m_device.typeName.toLowerCase() != "hmip-esi") { + deleteProgSysvarPOWERMETER(chId, chAddress, this.m_device.typeName.toLowerCase()); + } else { + deleteProgSysvarPOWERMETER_ESI(this.m_device); + } + } else if (oChnIdAndAddress.type == "POWERMETER_IGL") { + deleteProgSysvarPOWERMETER_IGL(chId, chAddress); + } else if (oChnIdAndAddress.type == "POWERMETER_IEC1") { + deleteProgSysvarPOWERMETER_IEC(chId, chAddress); + } else if ((this.m_device.typeName.toLowerCase() == "hmip-swo-b") && (oChnIdAndAddress.type == "WEATHER_TRANSMIT")) { + deleteProgSysvarHmIPWeatherTransmitSunshine(chId, chAddress); + } else if (((this.m_device.typeName.toLowerCase() == "hmip-swo-pl") || (this.m_device.typeName.toLowerCase() == "hmip-swo-pr")) && (oChnIdAndAddress.type == "WEATHER_TRANSMIT")) { + deleteProgSysvarHmIPWeatherTransmitRainSunshine(chId, chAddress); + } /*currently not in use else if (this.m_device.typeName.toLowerCase() == "hmip-mod-rc8") { + this.m_deleteSysvarHmIPModRC8(); + }*/ + } else if ((typeof this.m_device.typeName != "undefined") && (this.m_device.typeName.toLowerCase() == "hmipw-drbl4")) { + this.m_deleteMetaDataHmIPWBlind(); + } + } + + if (this.m_callback) { this.m_callback(result); } + }, + + m_onDelete: function() + { + this.m_close(this.m_flags + this.m_listbox.getSelectedItem().flags); + }, + + m_onAbort: function() + { + this.m_close(null); + }, + + m_onChange: function(item) + { + this.m_description.setText(item.description); + } + +}); + +ErrorOnDeleteWindow.CONTENT_WIDTH = 400; +ErrorOnDeleteWindow.CONTENT_HEIGHT = 260; + +/** + * Dialogbox zum Löschen eines Geräts + **/ +DeleteDeviceDialog = Class.create({ + + /** + * Erstellt einen neuen DeleteDeviceDialog. + **/ + initialize: function(device, callback) + { + this.m_device = device; + this.m_callback = callback; + this.m_onLinksAndProgramsCheckedHandler = this.m_onLinksAndProgramsChecked.bind(this); + this.m_onDeleteDeviceConfirmedHandler = this.m_onDeleteDeviceConfirmed.bind(this); + this.m_onDeviceDeletedHandler = this.m_onDeviceDeleted.bind(this); + + this.hmIPIdentifier = "HmIP-RF"; + + + new CheckLinksAndProgramsWindow(device, this.m_onLinksAndProgramsCheckedHandler); + + }, + + m_onLinksAndProgramsChecked: function(result) + { + this.m_hasLinksOrPrograms = result; + new ConfirmDeleteDeviceWindow(this.m_device, this.m_hasLinksOrPrograms, this.m_onDeleteDeviceConfirmedHandler); + }, + + m_onDeleteDeviceConfirmed: function(flags) + { + if (flags !== null) + { + this.m_flags = flags; + new DeleteDeviceWindow(this.m_device, this.m_flags, this.m_onDeviceDeletedHandler); + } + else + { + // Abbruch + if (this.m_callback) { this.m_callback(false); } + } + }, + + m_deleteSysvarHmIPModRC8: function() { + var numberOfKeyTransceiver = 8; + + // delete the appropriate sysvar + jQuery.each(this.m_device.channels, function(index, chn) { + if (chn.channelType == "KEY_TRANSCEIVER") { + homematic("SysVar.deleteSysVarByName", {"name": "svHmIPModRC8ChnMode_" + chn.id + "_" + chn.address}, function () { + conInfo("SysVar svHmIPModRC8ChnMode_" + chn.id + "_" + chn.address + " deleted"); + if (index === numberOfKeyTransceiver) { + window.setTimeout(function(){saveObjectModel();},5000); + } + }); + } + }); + }, + + m_deleteMetaDataHmIPWBlind: function() { + jQuery.each(this.m_device.channels, function(index, chn) { + if (chn.channelType == "BLIND_VIRTUAL_RECEIVER") { + homematic("Interface.removeMetadata", {"objectId": chn.address, "dataId" : "channelMode"}, function (result) { + // console.log("m_deleteMetaDataHmIPWBlind", result); + }); + + } + }); + }, + + m_onDeviceDeleted: function(errorCode) + { + //if ((errorCode === DeleteDeviceDialog.ERROR_NO_ERROR) || (errorCode === DeleteDeviceDialog.HmIP_CONFIG_PENDING) || (errorCode === DeleteDeviceDialog.ERROR_UNKNOWN_DEVICE)) + if ((errorCode === DeleteDeviceDialog.ERROR_NO_ERROR) || (errorCode === DeleteDeviceDialog.ERROR_UNKNOWN_DEVICE)) + { + // Prüfen, ob ein Kanal des Gerätes ein HmIP-Wettersensor ist, als Energy-Counter oder ob das Gerät ein HmIP-MOD-RC8 ist dient. + // Wenn ja, müssen beim Löschen die dazugehörigen Systemvariablen + // sowie das enstprechende Systemprogramm zum aktualisieren der Systemvariablen entfernt werden. + var oChnIdAndAddress = hasDeviceInternalProgramOrSysvar(this.m_device), + chId = oChnIdAndAddress.id, + chAddress= oChnIdAndAddress.address; + if (chId != 0) { + if (oChnIdAndAddress.type == "POWERMETER" || oChnIdAndAddress.type == "ENERGIE_METER_TRANSMITTER") { + if (this.m_device.typeName.toLowerCase() != "hmip-esi") { + deleteProgSysvarPOWERMETER(chId, chAddress, this.m_device.typeName.toLowerCase()); + } else { + deleteProgSysvarPOWERMETER_ESI(this.m_device); + } + } else if (oChnIdAndAddress.type == "POWERMETER_IGL") { + deleteProgSysvarPOWERMETER_IGL(chId, chAddress); + } else if (oChnIdAndAddress.type == "POWERMETER_IEC1") { + deleteProgSysvarPOWERMETER_IEC(chId, chAddress); + } else if ((this.m_device.typeName.toLowerCase() == "hmip-swo-b") && (oChnIdAndAddress.type == "WEATHER_TRANSMIT")) { + deleteProgSysvarHmIPWeatherTransmitSunshine(chId, chAddress); + } else if (((this.m_device.typeName.toLowerCase() == "hmip-swo-pl") || (this.m_device.typeName.toLowerCase() == "hmip-swo-pr")) && (oChnIdAndAddress.type == "WEATHER_TRANSMIT")) { + deleteProgSysvarHmIPWeatherTransmitRainSunshine(chId, chAddress); + } /*currently not in use else if (this.m_device.typeName.toLowerCase() == "hmip-mod-rc8") { + this.m_deleteSysvarHmIPModRC8(); + }*/ + } else if ((typeof this.m_device.typeName != "undefined") && (this.m_device.typeName.toLowerCase() == "hmipw-drbl4")) { + this.m_deleteMetaDataHmIPWBlind(); + } + if (this.m_callback) { this.m_callback(true); } + } + else + { + this.m_errorCode = errorCode; + if (this.m_flags <= 1) { + //if (! (this.m_errorCode == DeleteDeviceDialog.ERROR_UNKNOWN_DEVICE && this.hmIPIdentifier == this.m_device.interfaceName)) { + if (! (this.m_errorCode == DeleteDeviceDialog.ERROR_UNKNOWN_DEVICE) ) { + new ErrorOnDeleteWindow(this.m_device, this.m_flags, this.m_errorCode, this.m_onDeleteDeviceConfirmedHandler); + } + } + } + } +}); + +DeleteDeviceDialog.FLAG_RESET = 0x01; +DeleteDeviceDialog.FLAG_FORCE = 0x02; +DeleteDeviceDialog.FLAG_DEFER = 0x04; +DeleteDeviceDialog.ERROR_NO_ERROR = 0; +DeleteDeviceDialog.ERROR_GENERAL = 501; +DeleteDeviceDialog.ERROR_UNKNOWN_DEVICE = 502; +DeleteDeviceDialog.HmIP_CONFIG_PENDING = 507; + +/** + * crashdialog.js + **/ + +CrashDialog = Class.create({ + + initialize: function(name) + { + var screenWidth = WebUI.getWidth(); + var screenHeight = WebUI.getHeight(); + var frameWidth = CrashDialog.CONTENT_WIDTH; + var frameHeight = CrashDialog.CONTENT_HEIGHT; + var frameX = parseInt((screenWidth - frameWidth) / 2); + var frameY = parseInt((screenHeight - frameHeight) / 2); + + this.m_layer = document.createElement("div"); + this.m_layer.className = "DialogLayer"; + + this.m_frame = new UI.Frame() + .setTitle(name) + .setContentSize(frameWidth, frameHeight) + .setPosition(frameX, frameY) + .add(new UI.Text() + .setPosition(5, 5) + .setWidth(frameWidth - 10) + .setHtml(translateKey("crashDialogContent")) + ) + .add(new UI.Button() + .setPosition(125, 230) + .setText(translateKey("crashDialogBtnClose")) + .setAction(this.close.bind(this)) + ); + + this.m_layer.appendChild(this.m_frame.getElement()); + Layer.add(this.m_layer); + }, + + close: function() + { + Layer.remove(this.m_layer); + } + +}); + +CrashDialog.CONTENT_WIDTH = 400; +CrashDialog.CONTENT_HEIGHT = 260; +/* +CrashDialog.TEXT = "
Eine Komponente der HomeMatic Zentrale reagiert nicht mehr.
" + + "

Hierfür kann es eine Reihe von Ursachen geben:

" + + "
    " + + "
  • es besteht keine Netzwerk-Verbindung
  • " + + "
  • die Stromversorung der HomeMatic Zentrale wurde unterbrochen
  • " + + "
  • mindestens eine Komponente der HomeMatic Zentrale ist abgestürzt
  • " + + "
" + + "

Überprüfen Sie die Netzwerk-Verbindung und die Stromversorgung der HomeMatic Zentrale. Starten Sie ggf. die HomeMatic Zentrale neu.

"; +*/ + +/** + * hmscriptexecutor.js + **/ + +/** + * @fileOverview HM Script Executor + * @author F. Werner (eQ-3) + **/ + +/** + * @class HMScriptExecturor + * Dialog zum Testen von HomeMatic Script. + **/ +HMScriptExecutor = Class.create({ + + initialize: function() + { + var screenWidth = WebUI.getWidth(); + var screenHeight = WebUI.getHeight(); + var frameWidth = parseInt(screenWidth * 0.8); + var frameHeight = parseInt(screenHeight * 0.8); + var frameX = parseInt((screenWidth - frameWidth) / 2); + var frameY = parseInt((screenHeight - frameHeight) / 2); + + HMScriptExecutor.TITLE = translateKey("dialogScriptExecuterTitle"); + HMScriptExecutor.TEXT_RUN = translateKey("dialogScriptExecuterBtnExecute"); + HMScriptExecutor.TEXT_CLOSE = translateKey("dialogScriptExecuterBtnClose"); + + this.m_layer = document.createElement("div"); + this.m_layer.className = "DialogLayer"; + + this.m_frame = new UI.Frame(true) + .setTitle(HMScriptExecutor.TITLE) + .setContentSize(frameWidth, frameHeight) + .setPosition(frameX, frameY) + .add(new UI.Text() + .setStyle('margin-left: 5px') + .setHtml('' + translateKey("dialogScriptExecuterLblInput") + '') + .setClass("") + ) + .add(new UI.Textarea() + .setID("code") + .setName("code") + .setText('WriteLine("'+ translateKey("dialogScriptExecuterHelloWorld") +'");') + ) + .add(new UI.Text() + .setStyle('margin-left: 5px') + .setHtml('' + translateKey("dialogScriptExecuterLblOutput") + '') + .setClass("") + ) + .add(new UI.Textarea() + .setID("output") + .setName("output") + ) + .add(new UI.Button() + .setPosition(5, frameHeight-30) + .setText(HMScriptExecutor.TEXT_RUN) + .setAction(this.run, this) + ) + .add(new UI.Button() + .setPosition(frameWidth-155, frameHeight-30) + .setText(HMScriptExecutor.TEXT_CLOSE) + .setAction(this.close, this) + ); + + this.m_layer.appendChild(this.m_frame.getElement()); + Layer.add(this.m_layer); + + this.m_input = CodeMirror.fromTextArea(document.getElementById('code'), { + mode: "text/x-rega", + autofocus: true, + matchBrackets: true, + autoCloseBrackets: true, + lineWrapping: true, + lineNumbers: true, + foldGutter: true, + indentUnit: 2, + tabSize: 2, + indentWithTabs: false, + gutters: ["CodeMirror-linenumbers", "CodeMirror-foldgutter"], + extraKeys: {"Ctrl-Space": "autocomplete", + "Ctrl-Q": function(cm){ cm.foldCode(cm.getCursor()); }, + "F11": function(cm) { cm.setOption("fullScreen", !cm.getOption("fullScreen")); }, + "Esc": function(cm) { if (cm.getOption("fullScreen")) cm.setOption("fullScreen", false); }, + "Alt-F": "findPersistent", + "Tab": function(cm) { + if (cm.somethingSelected()) { + var sel = cm.getSelection("\n"); + // Indent only if there are multiple lines selected, or if the selection spans a full line + if (sel.length > 0 && (sel.indexOf("\n") > -1 || sel.length === cm.getLine(cm.getCursor().line).length)) { + cm.execCommand("indentMore"); + return; + } + } + if (cm.options.indentWithTabs) + cm.execCommand("insertTab"); + else + cm.execCommand("insertSoftTab"); + }, + "Shift-Tab": function(cm) { + if (cm.somethingSelected()) { + var sel = cm.getSelection("\n"); + // Outdent only if there are multiple lines selected, or if the selection spans a full line + if (sel.length > 0 && (sel.indexOf("\n") > -1 || sel.length === cm.getLine(cm.getCursor().line).length)) { + cm.execCommand("indentLess"); + return; + } + } + var charSize = cm.options.tabSize; + if (cm.options.indentWithTabs) + charSize = 1; + var c = cm.getCursor(); + var lineText = cm.getRange({line: c.line, ch: c.ch - charSize}, {line: c.line, ch: c.ch}); + var m = /^(\s+)/.exec(lineText.reverse()); + if(m && m.length == 2) + cm.replaceRange('', {line: c.line, ch: c.ch - m[1].length}, {line: c.line, ch: c.ch}); + }} + }); + this.m_input.setSize("100%", parseInt((this.m_frame.getContentHeight()-70) * 0.6)); + + this.m_output = CodeMirror.fromTextArea(document.getElementById('output'), { + mode: "default", + readOnly: true, + lineWrapping: true, + lineNumbers: false + }); + this.m_output.setSize("100%", parseInt((this.m_frame.getContentHeight()-70) * 0.4)); + }, + + run: function() + { + this.m_output.setValue(""); + var _this_ = this; + var code = this.m_input.getValue(); + var val = ""; + var ths = "2459"; + var src = ""; + var url = '/esp/system.htm?sid='+SessionId; + var pb = ""; + pb += 'string action = "SyntaxCheck";'; + pb += 'string code = ^'+code.replace(/\^/g, '^#\'^\'#^')+'^;'; + pb += 'string val = "'+val+'";'; + pb += 'string ths = "'+ths+'";'; + pb += 'string src = "'+src+'";'; + var opt = + { + postBody: ReGa.encode(pb), + onComplete: function(t) + { + if( iseStripAll(t.responseText).length == 0 ) + { + homematic("ReGa.runScript", {script: code}, function(response, error) + { + if (error === null) + { + _this_.m_output.setValue(response); + } + }); + } + else + { + _this_.m_output.setValue(t.responseText); + } + } + } + new Ajax.Request(url,opt); + }, + + close: function() + { + Layer.remove(this.m_layer); + } + +}); + +HMScriptExecutor.CONTENT_WIDTH = 800; +HMScriptExecutor.CONTENT_HEIGHT = 500; + +/** + * firewallconfigdialog.js + **/ + +FirewallConfigDialog = Class.create({ + + /** + * @constructor + * Erzeugt einen neuen FirewallConfigDialog + **/ + initialize: function (dlgWoPasswd) { + var yOffset = 320; + + var screenWidth = WebUI.getWidth(); + var screenHeight = WebUI.getHeight(); + var frameWidth = FirewallConfigDialog.CONTENT_WIDTH; + var frameHeight = FirewallConfigDialog.CONTENT_HEIGHT + yOffset; + var frameX = parseInt((screenWidth - frameWidth) / 2); + // var frameY = parseInt((screenHeight - frameHeight) / 2); + var frameY = 10; + + this.dlgWoPasswd = dlgWoPasswd; + + this.m_layer = document.createElement("div"); + this.m_layer.className = "DialogLayer"; + this.m_layer.style = "overflow:scroll;"; + + this.m_portListBox = new UI.ListBox() + .setPosition(FirewallConfigDialog.CONTENT_WIDTH - 180, 10) + .setWidth(150) + .add({id: "RESTRICTIVE", name: translateKey("dialogSettingsFirewallLblPortsRestricted")}) + .add({id: "MOST_OPEN", name: translateKey("dialogSettingsFirewallLblPortsOpen")}); + + this.m_xmlrpcListBox = new UI.ListBox() + .setPosition(FirewallConfigDialog.CONTENT_WIDTH - 180, 80) + .setWidth(150) + .add({id: "full", name: translateKey("dialogSettingsFirewallLblFullAccess")}) + .add({id: "restricted", name: translateKey("dialogSettingsFirewallLblRestrictedAccess")}) + .add({id: "none", name: translateKey("dialogSettingsFirewallLblNoAccess")}); + + + this.m_hmscriptListBox = new UI.ListBox() + .setPosition(FirewallConfigDialog.CONTENT_WIDTH - 180, 150) + .setWidth(150) + .add({id: "full", name: translateKey("dialogSettingsFirewallLblFullAccess")}) + .add({id: "restricted", name: translateKey("dialogSettingsFirewallLblRestrictedAccess")}) + .add({id: "none", name: translateKey("dialogSettingsFirewallLblNoAccess")}); + + this.m_mediolaListBox = new UI.ListBox() + .setPosition(FirewallConfigDialog.CONTENT_WIDTH - 180, 220) + .setWidth(150) + .add({id: "full", name: translateKey("dialogSettingsFirewallLblFullAccess")}) + .add({id: "restricted", name: translateKey("dialogSettingsFirewallLblRestrictedAccess")}) + .add({id: "none", name: translateKey("dialogSettingsFirewallLblNoAccess")}); + + this.m_portTextArea = new UI.Textarea() + .setPosition(10, 320) + .setWidth(FirewallConfigDialog.CONTENT_WIDTH - 20) + .setHeight(100) + .setWrap(true) + .disableResize(); + + this.m_ipTextArea = new UI.Textarea() + .setPosition(10, 200 + yOffset) + .setWidth(FirewallConfigDialog.CONTENT_WIDTH - 20) + .setHeight(100) + .setWrap(true) + .disableResize(); + + this.m_frame = new UI.Frame() + //.setTitle("Firewall Konfiguration") + .setTitle(translateKey("dialogSettingsFirewallTitle")) + .setContentSize(frameWidth, frameHeight) + .setPosition(frameX, frameY) + .add(new UI.Text() + .setPosition(10, 10) + .setHtml(translateKey("dialogSettingsFirewallLblFWPolicy")) + ) + .add(this.m_portListBox) + .add(new UI.Text() + .setPosition(10, 40) + .setHtml(translateKey("dialogSettingsFirewallLblHintPortAccess")) + ) + .add(new UI.Text() + .setPosition(10, 80) + //.setHtml("HomeMatic XML-RPC API:") + .setHtml(translateKey("dialogSettingsFirewallLblXMLRPCAPI")) + ) + .add(new UI.Text() + .setPosition(10, 110) + .setWidth(FirewallConfigDialog.CONTENT_WIDTH - 20) + //.setText("Ermöglicht den direkten Zugriff auf angelernte HomeMatic Geräte") + .setText(translateKey("dialogSettingsFirewallLblHintXMLRPCAPI")) + ) + .add(this.m_xmlrpcListBox) + + .add(new UI.Image() + .setPath("/ise/img/help.png") + .setWidth(25) + .setHeight(25) + .setPosition(475, 75) + .setName("helpToolTip") + ) + + .add(new UI.Text() + .setPosition(10, 150) + //.setHtml("Remote HomeMatic-Script API:") + .setHtml(translateKey("dialogSettingsFirewallLblScriptAPI")) + ) + .add(new UI.Text() + .setPosition(10, 180) + .setWidth(FirewallConfigDialog.CONTENT_WIDTH - 20) + //.setText("Ermöglicht den Zugriff auf die Logikschicht der HomeMatic Zentrale") + .setText(translateKey("dialogSettingsFirewallLblHintScriptAPI")) + ) + .add(this.m_hmscriptListBox) + .add(new UI.Image() + .setPath("/ise/img/help.png") + .setWidth(25) + .setHeight(25) + .setPosition(475, 145) + .setName("helpToolTip") + ) + + .add(new UI.Text() + .setPosition(10, 220) + .setHtml(translateKey("dialogSettingsFirewallLblMediola")) + ) + .add(new UI.Text() + .setPosition(10, 250) + .setWidth(FirewallConfigDialog.CONTENT_WIDTH - 20) + .setText(translateKey("dialogSettingsFirewallLblHintMediola")) + ) + .add(this.m_mediolaListBox) + .add(new UI.Image() + .setPath("/ise/img/help.png") + .setWidth(25) + .setHeight(25) + .setPosition(475, 215) + .setName("helpToolTip") + ) + + .add(new UI.Text() + .setPosition(10, 290) + .setHtml(translateKey("portEnablingTitle")) + ) + + .add(this.m_portTextArea) + + .add(new UI.Text() + .setPosition(10, 430) + .setWidth(FirewallConfigDialog.CONTENT_WIDTH - 20) + .setText(translateKey("portEnablingCaption")) + ) + + .add(new UI.Text() + .setPosition(10, 170 + yOffset) + //.setHtml("IP-Adressen für den eingeschränkten Zugriff:") + .setHtml(translateKey("dialogSettingsFirewallLblIPAddresses")) + ) + .add(this.m_ipTextArea) + .add(new UI.Text() + .setPosition(10, 310 + yOffset) + .setWidth(FirewallConfigDialog.CONTENT_WIDTH - 20) + //.setText("Sie können den Zugriff wahlweise für einzelne IP-Adressen (z.B. 192.168.0.1) oder ganze Adressbereiche (z.B. 192.168.0.0/16) freigeben.") + .setText(translateKey("dialogSettingsFirewallLblHintIPAddresses")) + ) + .add(new UI.Button() + .setPosition(10, FirewallConfigDialog.CONTENT_HEIGHT - 30 + yOffset) + //.setText("Abbrechen") + .setText(translateKey("btnCancel")) + .setId("btnCancel") + .setAction(this.close, this) + ) + .add(new UI.Button() + .setPosition(FirewallConfigDialog.CONTENT_WIDTH - 160, FirewallConfigDialog.CONTENT_HEIGHT - 30 + yOffset) + //.setText("OK") + .setText(translateKey("btnOk")) + .setAction(this.ok, this) + ); + + this.loadConfiguration(); + + this.m_layer.appendChild(this.m_frame.getElement()); + Layer.add(this.m_layer); + this.setTooltips(); + }, + + setTooltips: function() { + var toolTipsElems = jQuery("[name='helpToolTip']"); + toolTipsElems.data('powertip', translateKey("toolTipFirewallAccessModes")); + toolTipsElems.powerTip({placement: 'se', followMouse: true}); + }, + + loadConfiguration: function () { + + var response = homematic("Firewall.getConfiguration"); + if (null != response) { + var services = response.services, + ips = response.ips.join(";\n"), + userPorts = response.userports.join(";\n"), + firewallPolicy = response.mode, + xmlrpcAccess = "full", + hmscriptAccess = "full", + mediolaAccess = "restricted"; + + for (var i = 0, len = services.length; i < len; i++) { + var service = services[i]; + if (service.id == "XMLRPC") { + xmlrpcAccess = service.access; + } + if (service.id == "REGA") { + hmscriptAccess = service.access; + } + if (service.id == "NEOSERVER") { + mediolaAccess = service.access; + } + + } + this.m_portListBox.selectItemById(firewallPolicy); + this.m_xmlrpcListBox.selectItemById(xmlrpcAccess); + this.m_hmscriptListBox.selectItemById(hmscriptAccess); + this.m_mediolaListBox.selectItemById(mediolaAccess); + this.m_ipTextArea.setText(ips); + this.m_portTextArea.setText(userPorts); + } + }, + + /** + * Schließt den FirewallConfigDialog ohne Änderungen zu übernehmen. + **/ + close: function () { + Layer.remove(this.m_layer); + }, + + /** + * Übernimmt die Änderungen und schließt den FirewallConfigDialog anschließend. + **/ + ok: function () { + var xmlrpcAccess = this.m_xmlrpcListBox.getSelectedItem().id, + firewallPolicy = this.m_portListBox.getSelectedItem().id, + hmscriptAccess = this.m_hmscriptListBox.getSelectedItem().id, + mediolaAccess = this.m_mediolaListBox.getSelectedItem().id, + ips = this.m_ipTextArea.getText().trim(), + userPorts = this.m_portTextArea.getText().replace(/\s+/g, '').split(";"); + + // Remove a trailing ; at the end of ips + ips = (ips.charAt(ips.length -1) == ";") ? ips.slice(0,-1) : ips; + ips = ips.replace(/\s+/g, '').split(";"); + + if ((typeof firstStartInstallWizard !== "undefined") && (firstStartInstallWizard)) { + WebUI.enter(StartPage); + delete firstStartInstallWizard; + homematic("CCU.setSecurityHint"); + homematic("CCU.setFirewallConfigured"); + homematic("CCU.setUserAckInstallWizard", {'userName' : userName}); + } + + if (this.dlgWoPasswd ) { + homematic("CCU.setFirewallConfigured"); + } + + var isOk = true; + if (ips[0] != "" ) { + for (var i = 0, len = ips.length; i < len; i++) { + var ip = ips[i]; + if (! isIPAddressValid(ip)) { + isOk = false; + } + } + } + + if (isOk) { + this.close(); + homematic("Firewall.setConfiguration", { + services: [ + {name: "XMLRPC", access: xmlrpcAccess}, + {name: "REGA", access: hmscriptAccess}, + {name: "NEOSERVER", access: mediolaAccess} + ], + ips: ips, + userports: userPorts, + mode: firewallPolicy + }); + } + else { + //MessageBox.show("Eingabefehler", "Verwenden Sie bitte nur IP-Adressen im Format \"1.2.3.4\" und Adressgruppen im Format \"1.2.3.0/8\". Separieren Sie die einzelnen Adressen durch Semikola."); + MessageBox.show(translateKey("dialogSettingsFirewallErrorMsgTitle"), translateKey("dialogSettingsFirewallErrorMsgContent")); + + } + } + +}); + +FirewallConfigDialog_CCU2 = Class.create({ + + /** + * @constructor + * Erzeugt einen neuen FirewallConfigDialog + **/ + initialize: function () { + var screenWidth = WebUI.getWidth(); + var screenHeight = WebUI.getHeight(); + var frameWidth = FirewallConfigDialog.CONTENT_WIDTH; + var frameHeight = FirewallConfigDialog.CONTENT_HEIGHT; + var frameX = parseInt((screenWidth - frameWidth) / 2); + var frameY = parseInt((screenHeight - frameHeight) / 2); + + this.m_layer = document.createElement("div"); + this.m_layer.className = "DialogLayer"; + + this.m_xmlrpcListBox = new UI.ListBox() + .setPosition(FirewallConfigDialog.CONTENT_WIDTH - 160, 10) + .setWidth(150) + //.add({id: "full" , name: "Vollzugriff"}) + //.add({id: "restricted", name: "eingeschränkt"}) + //.add({id: "none" , name: "kein Zugriff"}); + .add({id: "full", name: translateKey("dialogSettingsFirewallLblFullAccess")}) + .add({id: "restricted", name: translateKey("dialogSettingsFirewallLblRestrictedAccess")}) + .add({id: "none", name: translateKey("dialogSettingsFirewallLblNoAccess")}); + + + this.m_hmscriptListBox = new UI.ListBox() + .setPosition(FirewallConfigDialog.CONTENT_WIDTH - 160, 80) + .setWidth(150) + //.add({id: "full" , name: "Vollzugriff"}) + //.add({id: "restricted", name: "eingeschränkt"}) + //.add({id: "none" , name: "kein Zugriff"}); + .add({id: "full", name: translateKey("dialogSettingsFirewallLblFullAccess")}) + .add({id: "restricted", name: translateKey("dialogSettingsFirewallLblRestrictedAccess")}) + .add({id: "none", name: translateKey("dialogSettingsFirewallLblNoAccess")}); + + this.m_ipTextArea = new UI.Textarea() + .setPosition(10, 180) + .setWidth(FirewallConfigDialog.CONTENT_WIDTH - 20) + .setHeight(100) + .setWrap(true); + + this.m_frame = new UI.Frame() + //.setTitle("Firewall Konfiguration") + .setTitle(translateKey("dialogSettingsFirewallTitle")) + .setContentSize(frameWidth, frameHeight) + .setPosition(frameX, frameY) + .add(new UI.Text() + .setPosition(10, 10) + //.setHtml("HomeMatic XML-RPC API:") + .setHtml(translateKey("dialogSettingsFirewallLblXMLRPCAPI")) + ) + .add(new UI.Text() + .setPosition(10, 40) + .setWidth(FirewallConfigDialog.CONTENT_WIDTH - 20) + //.setText("Ermöglicht den direkten Zugriff auf angelernte HomeMatic Geräte") + .setText(translateKey("dialogSettingsFirewallLblHintXMLRPCAPI")) + ) + .add(this.m_xmlrpcListBox) + .add(new UI.Text() + .setPosition(10, 80) + //.setHtml("Remote HomeMatic-Script API:") + .setHtml(translateKey("dialogSettingsFirewallLblScriptAPI")) + ) + .add(new UI.Text() + .setPosition(10, 110) + .setWidth(FirewallConfigDialog.CONTENT_WIDTH - 20) + //.setText("Ermöglicht den Zugriff auf die Logikschicht der HomeMatic Zentrale") + .setText(translateKey("dialogSettingsFirewallLblHintScriptAPI")) + ) + .add(this.m_hmscriptListBox) + .add(new UI.Text() + .setPosition(10, 150) + //.setHtml("IP-Adressen für den eingeschränkten Zugriff:") + .setHtml(translateKey("dialogSettingsFirewallLblIPAddresses")) + ) + .add(this.m_ipTextArea) + .add(new UI.Text() + .setPosition(10, 290) + .setWidth(FirewallConfigDialog.CONTENT_WIDTH - 20) + //.setText("Sie können den Zugriff wahlweise für einzelne IP-Adressen (z.B. 192.168.0.1) oder ganze Adressbereiche (z.B. 192.168.0.0/16) freigeben.") + .setText(translateKey("dialogSettingsFirewallLblHintIPAddressesWithoutIPv6")) + ) + .add(new UI.Button() + .setPosition(10, FirewallConfigDialog.CONTENT_HEIGHT - 30) + //.setText("Abbrechen") + .setText(translateKey("btnCancel")) + + .setAction(this.close, this) + ) + .add(new UI.Button() + .setPosition(FirewallConfigDialog.CONTENT_WIDTH - 160, FirewallConfigDialog.CONTENT_HEIGHT - 30) + //.setText("OK") + .setText(translateKey("btnOk")) + .setAction(this.ok, this) + ); + + this.loadConfiguration(); + + this.m_layer.appendChild(this.m_frame.getElement()); + Layer.add(this.m_layer); + }, + + loadConfiguration: function () { + + var response = homematic("Firewall.getConfiguration"); + if (null != response) { + var services = response.services, + ips = response.ips.join(";\n"), + xmlrpcAccess = "full", + hmscriptAccess = "full"; + + + for (var i = 0, len = services.length; i < len; i++) { + var service = services[i]; + if (service.id == "XMLRPC") { + xmlrpcAccess = service.access; + } + if (service.id == "REGA") { + hmscriptAccess = service.access; + } + } + + this.m_xmlrpcListBox.selectItemById(xmlrpcAccess); + this.m_hmscriptListBox.selectItemById(hmscriptAccess); + this.m_ipTextArea.setText(ips); + } + }, + + /** + * Schließt den FirewallConfigDialog ohne Änderungen zu übernehmen. + **/ + close: function () { + Layer.remove(this.m_layer); + }, + + /** + * Übernimmt die Änderungen und schließt den FirewallConfigDialog anschließend. + **/ + ok: function () { + var xmlrpcAccess = this.m_xmlrpcListBox.getSelectedItem().id, + hmscriptAccess = this.m_hmscriptListBox.getSelectedItem().id, + ips = this.m_ipTextArea.getText().replace(/\s+/g, '').split(";"), + firewallPolicy = "MOST_OPEN", + userPorts = ""; + + var isOk = true; + if (ips[0] != "" ) { + for (var i = 0, len = ips.length; i < len; i++) { + var ip = ips[i]; + if (! isIPAddressValid(ip)) { + isOk = false; + } + } + } + + if (isOk) { + this.close(); + homematic("Firewall.setConfiguration", { + services: [ + {name: "XMLRPC", access: xmlrpcAccess}, + {name: "REGA", access: hmscriptAccess} + ], + ips: ips, + userports: userPorts, + mode: firewallPolicy + }); + } + else { + //MessageBox.show("Eingabefehler", "Verwenden Sie bitte nur IP-Adressen im Format \"1.2.3.4\" und Adressgruppen im Format \"1.2.3.0/8\". Separieren Sie die einzelnen Adressen durch Semikola."); + MessageBox.show(translateKey("dialogSettingsFirewallErrorMsgTitle"), translateKey("dialogSettingsFirewallErrorMsgContent")); + } + } +}); + +FirewallConfigDialog.CONTENT_WIDTH = 500; +FirewallConfigDialog.CONTENT_HEIGHT = 400; + + +/** + * partymodedialog.js + **/ + +StartDateEqualsStopDate = function() { + var startDate = jQuery("#partyStartDate").datepicker('getDate'), + stopDate = jQuery("#partyEndDate").datepicker('getDate'); + if (startDate && stopDate) { + return (startDate.getDate() == stopDate.getDate()) ? true : false; + } else { + return false; + } +}; + +refreshPartyDatePicker = function() { + conInfo("refresh DatePickerEnd"); + var jDatePickerStart = jQuery("#partyStartDate"), + jDatePickerEnd = jQuery("#partyEndDate"), + newDate = jDatePickerStart.datepicker("getDate"); + + jDatePickerEnd.datepicker("option", "minDate", new Date(newDate)); + jDatePickerEnd.datepicker("refresh"); + refreshPartyTimePicker(); +}; + +refreshPartyTimePicker= function() { + allDataSet(); + conInfo("refresh TimePicker"); + if(StartDateEqualsStopDate() && (showEmptyTimeFields != true)) { + var jTimePickerStart = jQuery("#partyStartTime"), + jTimePickerEnd = jQuery("#partyEndTime"), + startHour = jTimePickerStart.timepicker("getHour"), + startMinute = jTimePickerStart.timepicker("getMinute"), + endHour = jTimePickerEnd.timepicker("getHour"), + newEndTime = startHour + 1 + ":" + startMinute; + + if(endHour < startHour) { + jTimePickerEnd.timepicker("setTime", newEndTime); + return; + } + if(endHour == startHour) { + if (parseInt(startMinute) > 0) { + jTimePickerEnd.timepicker("setTime", newEndTime); + } else { + jTimePickerEnd.timepicker("setTime", startHour + ":30"); + } + } + } +}; + +allDataSet = function() { + var startDate = jQuery("#partyStartDate").val(), + endDate = jQuery("#partyEndDate").val(), + startTime = jQuery("#partyStartTime").val(), + endTime = jQuery("#partyEndTime").val(); + if ((startDate != "") && (endDate != "") && (startTime != "") && (endTime != "")) { + showEmptyTimeFields = false; + jQuery("#yesButton").show(); + return true; + } + return false; +}; + +/** + * Dialogbox mit den Schaltflächen "Ja" und "Nein" + * Normalerweise wird als content Text übergeben, + * wenn contentType 'html' gesetzt ist, kann auch HTML übergeben werden. + * Die Höhe des Dialoges sollte sich dynamisch der Contentgröße anpassen. + **/ +PartyModeDialog = Class.create({ + + initialize: function(title, content, deviceData ,callback, contentType) + { + showEmptyTimeFields = deviceData.showEmptyFields; + + var _this_ = this; + + this.m_contentType = contentType; + this.m_callback = callback; + this.m_layer = document.createElement("div"); + this.m_layer.className = "YesNoDialogLayer"; + + this.partyModeObject ={}; + this.SetPartyMode = false; + this.deviceData = deviceData; + this.defaultPartyTemp = 5; + + var dialog = document.createElement("div"); + dialog.className = "YesNoDialog"; + + var titleElement = document.createElement("div"); + titleElement.className = "YesNoDialogTitle"; + + var orientation = document.createAttribute("align"); + orientation.nodeValue = "center"; + titleElement.setAttributeNode(orientation); + + titleElement.appendChild(document.createTextNode(title)); + titleElement.onmousedown = function(event) { new Drag(this.parentNode, event); }; + dialog.appendChild(titleElement); + + var contentWrapper = document.createElement("div"); + contentWrapper.className = "YesNoDialogContentWrapper"; + + var contentElement = document.createElement("div"); + contentElement.className = "YesNoDialogContent"; + + if (this.m_contentType == "html") { + contentElement.innerHTML = content; + } else { + contentElement.appendChild(document.createTextNode(content)); + } + + contentWrapper.appendChild(contentElement); + + dialog.appendChild(contentWrapper); + + var footer = document.createElement("div"); + footer.className= "YesNoDialogFooter"; + + + var noButton = document.createElement("div"); + noButton.className = "YesNoDialog_noButton borderRadius5px colorGradient50px"; + noButton.appendChild(document.createTextNode(translateKey('footerBtnCancel'))); + noButton.onclick = function() { _this_.no(); }; + footer.appendChild(noButton); + + var yesButton = document.createElement("div"); + yesButton.className = "YesNoDialog_yesButton borderRadius5px colorGradient50px"; + yesButton.id = "yesButton"; + yesButton.appendChild(document.createTextNode(translateKey('footerBtnOk'))); + yesButton.onclick = function() { _this_.yes(); }; + footer.appendChild(yesButton); + + dialog.appendChild(footer); + + this.m_layer.appendChild(dialog); + + Layer.add(this.m_layer); + + this.j_YesButton = jQuery("#yesButton"); + if (showEmptyTimeFields) {this.j_YesButton.hide();} + + //Sorgt dafür, daß die Dialoghöhe sich dynamisch dem Content anpasst. + jQuery(".YesNoDialog").css("height", jQuery(".YesNoDialogContentWrapper").height() + 78); + jQuery(".YesNoDialogFooter").css("top", jQuery(".YesNoDialogContentWrapper").height() + 26); + + translatePage(".YesNoDialog"); + this.initInputFields(); + refreshPartyDatePicker(); + }, + + _isUserInputOk: function(sDate, sTime, eDate, eTime) { + if (sDate && sTime && eDate && eTime) { + return true; + } + return false; + }, + + _createPartyModeObject: function() { + var startDate = jQuery("#partyStartDate").datepicker('getDate'), + startTime = jQuery("#partyStartTime").timepicker('getTime'), + stopDate = jQuery("#partyEndDate").datepicker('getDate'), + stopTime = jQuery("#partyEndTime").timepicker('getTime'); + + if(this._isUserInputOk(startDate, startTime, stopDate, stopTime)) { + startDate.setHours(startTime.split(":")[0]); + startDate.setMinutes(startTime.split(":")[1]); + stopDate.setHours(stopTime.split(":")[0]); + stopDate.setMinutes(stopTime.split(":")[1]); + + this.partyModeObject.startDay = startDate.getDate(); + this.partyModeObject.startMonth = startDate.getMonth() + 1; + + var startFullYear = startDate.getFullYear().toString(); + this.partyModeObject.startYear = parseInt(startFullYear[2] + startFullYear[3]); + this.partyModeObject.startHour = startDate.getHours(); + this.partyModeObject.startMin = startDate.getMinutes(); + this.partyModeObject.startMinutesSinceMidnight = parseInt((startDate.getHours() * 60) + startDate.getMinutes()); + + this.partyModeObject.stopDay = stopDate.getDate(); + this.partyModeObject.stopMonth = stopDate.getMonth() + 1; + + var stopFullYear = stopDate.getFullYear().toString(); + this.partyModeObject.stopYear = parseInt(stopFullYear[2] + stopFullYear[3]); + this.partyModeObject.stopHour = stopDate.getHours(); + this.partyModeObject.stopMin = stopDate.getMinutes(); + this.partyModeObject.stopMinutesSinceMidnight = parseInt((stopDate.getHours() * 60) + stopDate.getMinutes()); + + this.partyModeObject.temp = jQuery("#partyTempOption option:selected").val(); + } else { + conInfo("Error PartyModeDialog._createPartyModeObject()"); + } + }, + + close: function(result) + { + var partyModeObject = false; + if (this.SetPartyMode) { + this._createPartyModeObject(); + } + if (Object.keys(this.partyModeObject).length > 0 || ! this.SetPartyMode) { + Layer.remove(this.m_layer); + if (this.m_callback) { this.m_callback(result); } + } + }, + + yes: function() + { + this.SetPartyMode = true; + this.close(PartyModeDialog.RESULT_YES); + }, + + no: function() + { + this.SetPartyMode = false; + this.close(PartyModeDialog.RESULT_NO); + }, + + // Activates the date- and timepicker and initializes the option fields of the tempererature selectbox + initInputFields: function() { + var jDatePickerStart = jQuery("#partyStartDate"), + jDatePickerEnd = jQuery("#partyEndDate"), + jTimePickerStart = jQuery("#partyStartTime"), + jTimePickerEnd = jQuery("#partyEndTime"), + startDate = new Date(), + stopDate = new Date(); + + if (showEmptyTimeFields != true) { + if (this.deviceData.stPartyStartYear == 0 || this.deviceData.stPartyStartYear == undefined) { + // Device Fw. < 1.3 + startDate.setHours(parseInt(startDate.getHours() + 1)); + stopDate.setHours(parseInt(startDate.getHours() + 3)); + jTimePickerStart.val(startDate.getHours() + ":00"); + jTimePickerEnd.val(stopDate.getHours() + ":00"); + } else { + // Device Fw. >= 1.3 + startDate.setDate(this.deviceData.stPartyStartDay); + startDate.setMonth(parseInt(this.deviceData.stPartyStartMonth) - 1); + startDate.setYear((this.deviceData.stPartyStartYear.length == 4) ? this.deviceData.stPartyStartYear : 2000 + parseInt(this.deviceData.stPartyStartYear)); + startDate.setHours(this.deviceData.stPartyStartTime / 60); + startDate.setMinutes(this.deviceData.stPartyStartTime % 60); + startDate.setSeconds(0); + + stopDate.setDate(this.deviceData.stPartyStopDay); + stopDate.setMonth(parseInt(this.deviceData.stPartyStopMonth) - 1); + stopDate.setYear((this.deviceData.stPartyStopYear.length == 4) ? this.deviceData.stPartyStopYear : 2000 + parseInt(this.deviceData.stPartyStopYear)); + stopDate.setHours(this.deviceData.stPartyStopTime / 60); + stopDate.setMinutes(this.deviceData.stPartyStopTime % 60); + stopDate.setSeconds(0); + + var startMinutes = (parseInt(startDate.getMinutes()) < 10) ? "0" + startDate.getMinutes() : startDate.getMinutes(); + var stopMinutes = (parseInt(stopDate.getMinutes()) < 10) ? "0" + stopDate.getMinutes() : stopDate.getMinutes(); + + jTimePickerStart.val(startDate.getHours() + ":" + startMinutes); + jTimePickerEnd.val(stopDate.getHours() + ":" + stopMinutes); + } + } else { + // Show empty inputfields + jTimePickerStart.val(); + jTimePickerEnd.val(); + jTimePickerEnd.prop("disabled", true); + } + + jDatePickerStart.datepicker({ + showOn: "focus", + dateFormat: "dd.mm.yy", + autoSize: true, + firstDay: 1, + minDate: 0, + showButtonPanel:true, + currentText: translateKey("btnToday"), + closeText: translateKey("btnOk"), + onClose: this.OnStartDateClose + }); + + jDatePickerEnd.datepicker({ + showOn: "focus", + dateFormat: "dd.mm.yy", + autoSize: true, + firstDay: 1, + minDate: 0, + showButtonPanel: true, + currentText: translateKey("btnToday"), + closeText: translateKey("btnOk"), + onClose: refreshPartyTimePicker + }); + + if (showEmptyTimeFields != true) { + if (this.deviceData.stPartyStartYear == 0) { + jDatePickerStart.datepicker("setDate", "+0d"); + jDatePickerEnd.datepicker("setDate", "+0d"); + this.deviceData.stPartyTemp = this.defaultPartyTemp; + } else { + jDatePickerStart.datepicker("setDate", startDate); + jDatePickerEnd.datepicker("setDate", stopDate); + } + } else { + jDatePickerStart.val(); + jDatePickerEnd.val(); + jDatePickerEnd.prop("disabled", true); + } + + jTimePickerStart.timepicker({ + //showNowButton: true, + showOn: "focus", + minutes: { + starts: 0, + ends: 30, + interval: 30 + }, + showCloseButton: true, + closeButtonText: translateKey("btnOk"), + beforeShow: this.OnStartTimeBeforeShow, + onSelect: this.OnStartTimeSelect, + onClose: this.OnStartTimeClose + }); + + jTimePickerEnd.timepicker({ + //showNowButton: true, + showOn: "focus", + minutes: { + starts: 0, + ends: 30, + interval: 30 + }, + showCloseButton: true, + closeButtonText: translateKey("btnOk"), + onHourShow : this.OnEndHourShowCallBack, + onMinuteShow: this.OnEndMinuteShowCallBack, + onClose: allDataSet + }); + + // Adds a selectbox for the temperature to the party mode dialog + var selBox = ""; + + jQuery("#partyTempOption").html(selBox); + jQuery("#partyTempOption option[value='"+this.deviceData.stPartyTemp+"']").prop("selected", true); + }, + + OnStartHourShowCallBack: function(hour) { + return true; + }, + + OnStartTimeBeforeShow: function(elem) { + if (showEmptyTimeFields == true) { + var jTimePickerStart = jQuery(elem), + date = new Date(), + hour = date.getHours(), + min = "00"; + + if (jTimePickerStart.val() == "") { + jTimePickerStart.timepicker("setTime", hour + ":" + min); + } + } + }, + + OnStartTimeSelect: function(time) { + var jTimePickerEnd = jQuery("#partyEndTime"), + endHour = jTimePickerEnd.timepicker("getHour"), + endMinute = jTimePickerEnd.timepicker("getMinute"), + arTime = time.split(":"), + startHour = arTime[0], + startMinute = arTime[1], + newEndTime = parseInt(startHour) + 1 + ":" + startMinute; //startHour + 1 + ":" + startMinute; + if (StartDateEqualsStopDate && (showEmptyTimeFields != true)) { + if ((startHour >= endHour) && (startMinute >= endMinute)) { + jTimePickerEnd.timepicker("setTime", newEndTime); + } + } + return true; + }, + + OnStartDateClose: function() { + var jDatePickerStart = jQuery("#partyStartDate"), + jDatePickerEnd = jQuery("#partyEndDate"); + + if (jDatePickerStart.val() != "") { + jDatePickerEnd.prop("disabled", false); + } + + refreshPartyDatePicker(); + }, + + OnStartTimeClose: function() { + var jTimePickerStart = jQuery("#partyStartTime"), + jTimePickerEnd = jQuery("#partyEndTime"); + + if (jTimePickerStart.val() != "") { + jTimePickerEnd.prop("disabled", false); + } + allDataSet(); + }, + + // Makes only valid time selectors selectable - e. g. its´s not possible to set an end time earlier than the start time + OnEndHourShowCallBack: function(hour) { + var startHour = jQuery("#partyStartTime").timepicker('getHour'), + startMin = jQuery("#partyStartTime").timepicker('getMinute'); + + if (StartDateEqualsStopDate()) { + if (hour < startHour || ((hour == startHour) && (parseInt(startMin) >= 30))) { + return false; + } + } + return true; + }, + + // Makes only valid time selectors selectable + OnEndMinuteShowCallBack: function(endHour, endMin) { + var startHour = jQuery("#partyStartTime").timepicker('getHour'), + startMin = jQuery("#partyStartTime").timepicker('getMinute'); + + if (StartDateEqualsStopDate()) { + if ((startHour == endHour) && (endMin <= startMin)) { + return false; + } + } + return true; + }, + + getPartyModeObject: function() { + return this.partyModeObject; + } + +}); + +PartyModeDialog.RESULT_NO = 0; +PartyModeDialog.RESULT_YES = 1; +/** + * statusdisplaydialog.js + **/ + +/** + * When no text is active the header of the table has to be stripped (remove color and icon) + */ +function setStatusDisplayTableHeader() { + var optionHeaderElems = jQuery("[name='optionHeader']"), + hideOptionHeader = true, + row; + + for(var loop = 0; loop <= 5; loop++) { + + row = jQuery("#textSelect_"+loop).val(); + + if ((row != undefined) && (row != "-1")) { + hideOptionHeader = false; + } + } + if (hideOptionHeader) { + optionHeaderElems.hide(); + } else { + optionHeaderElems.show(); + } +} + +function setIconPreview(oValue) { + var displayType = statusDisplayDialog.displayType, + picPath = (displayType == "DIS") ? "/ise/img/icons_hm_dis_wm55/24/" : "/ise/img/icons_hm_dis_ep_wm55/24/"; + + oValue.index = oValue.index.toString(); + var previewElm = jQuery("#iconPreview_"+oValue.index); + previewElm.html(""); +} + +function displayStatusDisplayOptionContainer(lineIndex, mode) { + var optionContainer = jQuery("[name='optionContainer_"+lineIndex+"']"); + if(mode) { + optionContainer.show(); + } else { + optionContainer.hide(); + } +} +/** + * When a text for a line is chosen the selectboxes color and icon are visible, otherwise they are hidden. + * @param elm - Text selectbox for the chosen line + */ +function textOnChange(elm) { + var selBoxIndex = elm.id.split("_")[1], + selIndex = jQuery(elm).val(); + if (selIndex != -1) { + var iconSelElm = jQuery("#iconSelect_" + selBoxIndex); + displayStatusDisplayOptionContainer(selBoxIndex, true); + setIconPreview({index: selBoxIndex, value: iconSelElm.val()}); + } else { + displayStatusDisplayOptionContainer(selBoxIndex, false); + } + setStatusDisplayTableHeader(); + setFreeTextContainer(); +} + +function iconOnChange(elm) { + var selBoxIndex = elm.id.split("_")[1], + preViewIndex = jQuery(elm).val(); + setIconPreview({index: selBoxIndex, value: preViewIndex}); +} + +function setFreeTextContainer() { + var jHeadFreeText = jQuery("#headFreeText"), + freeTextActive = false; + + // Check each line if the free text mode is active. + // If yes switch on the appropriate text input field + // and set the variable freeTextActive to true + for (var line = 0; line < 6; line++) { + var jLine = jQuery("#textSelect_" + line), + jCellFreeText = jQuery("#cellFreeText_"+line); + + if (jLine.val() == "99") { + jCellFreeText.show(); + jHeadFreeText.show(); + freeTextActive = true; + } else { + jCellFreeText.hide(); + } + } + + // If at least one line has an active free text mode + // we have to activate the placeholder for the other lines and the header (color and icon are moving up) + if (freeTextActive) { + for (var line = 0; line < 6; line++) { + var jLine = jQuery("#textSelect_" + line), + jPlaceHolder = jQuery("#placeHolder_"+line); + + if (jLine.val() != "99") { + jPlaceHolder.show(); + } else { + jPlaceHolder.hide().css("display","none"); + } + } + } else { + jHeadFreeText.hide().css("display", "none"); + for (var line = 0; line < 6; line++) { + jQuery("#placeHolder_"+line).hide().css("display", "none"); + } + } +} + +StatusDisplayDialog = Class.create({ + + initialize: function(title, content, value, callback, contentType) { + var _this_ = this; + + this.m_contentType = contentType; + this.m_callback = callback; + this.m_layer = document.createElement("div"); + this.m_layer.className = "YesNoDialogLayer"; + + this.arDisplayData = []; + this.channelValue = value; + + this.startKey = "0x02"; + this.endKey = "0x03"; + this.lf = "0x0A"; + this.textKey = "0x12"; + this.colorKey = "0x11"; + this.iconKey = "0x13"; + this.soundKey ="0x14"; + this.soundQuantityKey = "0x1C"; + this.soundTimeLagKey = "0x1D"; + this.flashKey = "0x16"; + this.configString = "not initialized"; + this.displayType = "DIS"; + + var dialog = document.createElement("div"); + dialog.className = "YesNoDialog"; + + var titleElement = document.createElement("div"); + titleElement.className = "YesNoDialogTitle"; + titleElement.appendChild(document.createTextNode(title)); + titleElement.onmousedown = function(event) { new Drag(this.parentNode, event); }; + dialog.appendChild(titleElement); + + var contentWrapper = document.createElement("div"); + contentWrapper.className = "YesNoDialogContentWrapper"; + + var contentElement = document.createElement("div"); + contentElement.className = "YesNoDialogContent"; + + if (this.m_contentType == "html") { + contentElement.innerHTML = content; + } else { + contentElement.appendChild(document.createTextNode(content)); + } + + contentWrapper.appendChild(contentElement); + + dialog.appendChild(contentWrapper); + + var footer = document.createElement("div"); + footer.className= "YesNoDialogFooter"; + + var yesButton = document.createElement("div"); + yesButton.className = "YesNoDialog_yesButton borderRadius5px colorGradient50px"; + yesButton.appendChild(document.createTextNode(translateKey('btnOk'))); + yesButton.onclick = function() { _this_.yes(); }; + footer.appendChild(yesButton); + + var noButton = document.createElement("div"); + noButton.className = "YesNoDialog_noButton borderRadius5px colorGradient50px"; + noButton.appendChild(document.createTextNode(translateKey('btnCancel'))); + noButton.onclick = function() { _this_.no(); }; + footer.appendChild(noButton); + + dialog.appendChild(footer); + + this.m_layer.appendChild(dialog); + + Layer.add(this.m_layer); + + this.initEPaper(); + this._addElements(); + this._initAllValues(); + + setStatusDisplayTableHeader(); + + + // Remark 1: This doesn´t work satisfying -- see Remark 2 + // This should display an icon within the options of the icon selector + //jQuery("[name='statusDialogIconOptions']").msDropDown({childWidth:"200px"}); + + // This adapts the height of the dialog to the content + jQuery(".YesNoDialog").css("height", jQuery(".YesNoDialogContentWrapper").height() + 78); + jQuery(".YesNoDialogFooter").css("top", jQuery(".YesNoDialogContentWrapper").height() + 26); + }, + + initEPaper: function () {}, + + // This is for testing only + _getAllTextPresets: function() { + var tmp = homematic("Interface.getMasterValue", {"interface": "BidCos-RF", "address": "MYS0000666:1", "valueKey": "TEXTLINE_1"}); + conInfo(tmp); + }, + + // This creates the content of the dialog. + _addElements: function() { + var dialogContentElem = jQuery("#statusDisplayDialog"); + var textOptions = this._getTextOptions(); + var colorOptions = this._getColorOptions(); + var iconOptions = this._getIconOptions(); + var freeTextValue = translateKey("statusDisplayOptionFreeText"); + + dialogContentElem.append(function(index,html){ + var content = "
 Text ColorIcon
"+translateKey("statusDisplayLine")+ " "+(loop + 1)+":
 Text ColorIcon
 Text Icon
"+translateKey("statusDisplayLine")+ " "+(loop + 1)+":

"+translateKey('lblAcusticalSignal')+":
"+translateKey('lblOpticalSignal')+":
"+translateKey('lblAcusticalSignal')+""+translateKey('lblQuantity')+""+translateKey('lblTimeLag')+"
"+translateKey('lblOpticalSignal')+"
"; + content += ""; + content += ""; + content += ""; + content += ""; + content += ""; + content += ""; + + for (var loop = 1; loop <= 5; loop++) { + content += + "" + + "" + + "" + + "" + + "" + + "" + + "" + + ""+ + ""; + } + content += "
 "+translateKey('lblText')+"  "+translateKey('lblAlign')+""+translateKey('lblBGColorBR')+""+translateKey('lblTextColorBR')+""+translateKey('lblIcon')+"
"+translateKey('statusDisplayLine')+": "+loop+""+self._getTextElm(loop)+""+self._getAlignElm(loop)+""+self._getBgColorElm(loop)+""+self._getTextColorElm(loop)+""+self._getIconElm(loop)+"
"; + + content += + "
"; + + content += + "" + + ""; + + content += + "" + + "" + + "" + + "" + + "" + + + "
"+translateKey('lblAcusticalSignal')+"
"; + + content += + "
"; + content += + ""; + content += + "" + + "" + + "" + + "" + + "
"+translateKey("resetDevice")+"
"; + + return content; + }); + }, + + _getTextElm: function(no) { + return ""; + }, + + _getAlignElm: function(no) { + var html = ""; + return html; + }, + + _getBgColorElm: function(no) { + var html = ""; + return html; + }, + + _getTextColorElm: function(no) { + var html = ""; + return html; + }, + + _getIconElm: function(no) { + var html = ""; + return html; + }, + + _getSoundOptions:function() { + var options = "", + arSound = [ + translateKey("lblLowBattery"), + translateKey("lblDisarmed"), + translateKey("lblExternallyArmed"), + translateKey("lblInternallyArmed"), + translateKey("lblDelayExternalArming"), + translateKey("lblDelayInternalArming"), + translateKey("lblEvent"), + translateKey("lblError") + ]; + + options += ""; + + for (var loop = 0; loop < arSound.length; loop++) { + options += ""; + } + return options; + }, + + _getSoundQuantityOptions: function() { + var options = ""; + options += ""; + for (var loop = 1; loop <= 14; loop++) { + options += ""; + } + options += ""; + return options; + }, + + _getSoundTimeLagOptions: function() { + var options = ""; + for (var loop = 5; loop <= 80; loop+=5) { + options += ""; + } + return options; + }, + + _getTextConfigString: function() { + var result = ""; + + var rowCounter = 0, + text = [], + align = [], + bgColor = [], + textColor = [], + icon = []; + + var rowNo, + rowText, + rowIcon; + + for (var loop = 0; loop < 5; loop++) { + rowNo = loop + 1; + rowText = jQuery("#text_" + rowNo).val(); + rowIcon = jQuery("#icon_" + rowNo).val(); + if (rowText != "" || rowIcon != 0) { + if (rowText != "") { + text[rowCounter] = this._encodeSpecialChars(rowText); + } else { + text[rowCounter] = ""; + } + + icon[rowCounter] = rowIcon; + align[rowCounter] = jQuery("#align_" + rowNo).val(); + bgColor[rowCounter] = jQuery("#bgColor_" + rowNo).val(); + textColor[rowCounter] = jQuery("#textColor_" + rowNo).val(); + + result = result.replace(/,DDC=true/g, ''); + + result += "{" + + "DDBC=" + bgColor[rowCounter] + // DISPLAY_DATA_BACKGROUND_COLOR + ",DDTC=" + textColor[rowCounter] + // DISPLAY_DATA_TEXT_COLOR + ",DDI=" + icon[rowCounter] + // DISPLAY_DATA_ICON + ",DDA=" + align[rowCounter] + // DISPLAY_DATA_ALIGNMENT + ",DDS=" + text[rowCounter] + // DISPLAY_DATA_STRING + ",DDID=" + rowNo + // DISPLAY_DATA_ID + ",DDC=true"+ // DISPLAY_DATA_COMMIT + "},"; + rowCounter++; + } + } + return result; + }, + + _encodeSpecialChars: function(txt) { + return txt + .replace(/Ä/g,"[") + .replace(/Ö/g,"#") + .replace(/Ü/g,"$") + .replace(/ä/g,"²") + .replace(/ö/g,"|") + .replace(/ü/g,"³") + .replace(/ß/g,"_") + .replace(/&/g,"]") + .replace(/'/g,"µ"); + }, + + _decodeSpecialChars: function(txt) { + return txt + .replace(/\[/g,"Ä") + .replace(/#/g,"Ö") + .replace(/\$/g,"Ü") + .replace(/²/g,"ä") + .replace(/\|/g,"ö") + .replace(/³/g,"ü") + .replace(/\_/g,"ß") + .replace(/\]/g,"&") + .replace(/µ/g,"'"); + }, + + _getAcousticConfigString: function() { + var result = "", + selectedSound = jQuery("#soundSelectBox").val(); + + if (selectedSound != -1) { + result += "{" + + "R=" + jQuery("#soundQuantitySelectBox").val() + // REPETITIONS + ",IN=" + jQuery("#soundTimeLagSelectBox").val() + // INTERVAL + ",ANS=" + selectedSound + // ACOUSTIC_NOTIFICATION_SELECTION + "}"; + } + + return result; + }, + + _createConfigString: function() { + var textConfigString = "", acousticConfigString = ""; + if (! resetEPaperDisplay) { + textConfigString = this._getTextConfigString(); + acousticConfigString = this._getAcousticConfigString(); + this.configString = (acousticConfigString == "") ? textConfigString.slice(0, textConfigString.length - 1) : textConfigString + acousticConfigString; + } else { + //acousticConfigString = this._getAcousticConfigString(); + //this.configString = (acousticConfigString == "") ? "{DDS=XXX,DDID=1,DDC=true}" : "{DDS=XXX,DDID=1,DDC=true}," + this._getAcousticConfigString() ; + this.configString = "{DDS=XXX,DDID=1,DDC=true}"; + } + }, + + // PUBLIC + getConfigString: function() { + return this.configString; + }, + + close: function(result) + { + Layer.remove(this.m_layer); + if (this.m_callback) { this.m_callback(result); } + }, + + yes: function() + { + this._createConfigString(); + this.close(this.RESULT_YES); + }, + + no: function() + { + this.close(this.RESULT_NO); + }, + + btnTextYes: function(btnTxt) { + jQuery(".YesNoDialog_yesButton").text(btnTxt); + }, + + btnYesHide: function() { + jQuery("#btnYes").addClass("hidden"); + }, + + btnYesShow: function() { + jQuery("#btnYes").removeClass("hidden"); + }, + + btnTextNo: function(btnTxt) { + jQuery(".YesNoDialog_noButton").text(btnTxt); + }, + + btnNoHide: function() { + jQuery("#btnNo").addClass("hidden"); + }, + + btnNoShow: function() { + jQuery("#btnNo").removeClass("hidden"); + }, + + setHeight: function() { + var heightContentWrapper = jQuery(".YesNoDialogContentWrapper").height(), + yesNoElm = jQuery(".YesNoDialog"), + footerElm = jQuery(".YesNoDialogFooter"); + + yesNoElm.css("height", heightContentWrapper + 78); + footerElm.css("top", heightContentWrapper + 26); + yesNoElm.css("top", (window.innerHeight / 2) - (yesNoElm.height() / 2)); + }, + + resetHeight: function() { + this.setHeight(); + }, + + setWidth: function(dlgWidth) { + var defaultWith = 600, + offsetWidth = 4, + offsetPosYesButton = 109, + offsetDialogHeight = 78, + offsetDialogFooterHeight = 26; + + var width = dlgWidth - offsetWidth, + yesButtonPos = dlgWidth - offsetPosYesButton, + position = jQuery(".YesNoDialog").position(); + + // dlgWidth = (defaultWith < dlgWidth) ? defaultWith : dlgWidth; + + jQuery(".YesNoDialog").width(dlgWidth).css({left: position.left + ((defaultWith - dlgWidth) / 2)}); + jQuery(".YesNoDialogTitle").width(width); + jQuery(".YesNoDialogContentWrapper").width(width); + jQuery(".YesNoDialogFooter").width(width); + jQuery(".YesNoDialog_yesButton").css("left", yesButtonPos); + + //Dialoghöhe an Content anpassen. + jQuery(".YesNoDialog").css("height", jQuery(".YesNoDialogContentWrapper").height() + offsetDialogHeight); + jQuery(".YesNoDialogFooter").css("top", jQuery(".YesNoDialogContentWrapper").height() + offsetDialogFooterHeight); + } + +}); +/** + * rgbwcontrollerdialog.js + **/ + +/** + * Dialogbox mit den Schaltflächen "Ja" und "Neine" + * Normalerweise wird als content Text übergeben, + * wenn contentType 'html' gesetzt ist, kann auch HTML übergeben werden. + * Die Höhe des Dialoges sollte sich dynamisch der Contentgröße anpassen. + **/ +RGBWControllerDialog = Class.create({ + + initialize: function (title, content, param, curValue, callback, contentType) { + var _this_ = this; + this.configString = "not initialized"; + + var sCurValue = (curValue != this.configString) ? curValue.replace(/'/g, "\"") : curValue; + + this.DEFAULTBRIGHTNESS = 200; + this.m_contentType = contentType; + this.m_callback = callback; + this.m_layer = document.createElement("div"); + this.m_layer.className = "YesNoDialogLayer"; + this.param = param; + this.curValues = (sCurValue != this.configString) ? JSON.parse(sCurValue) : sCurValue ; + var dialog = document.createElement("div"); + dialog.className = "YesNoDialog"; + + var titleElement = document.createElement("div"); + titleElement.className = "YesNoDialogTitle"; + titleElement.appendChild(document.createTextNode(title)); + titleElement.onmousedown = function (event) { + new Drag(this.parentNode, event); + }; + dialog.appendChild(titleElement); + + var contentWrapper = document.createElement("div"); + contentWrapper.className = "YesNoDialogContentWrapper"; + + var contentElement = document.createElement("div"); + contentElement.className = "YesNoDialogContent"; + + if (this.m_contentType == "html") { + contentElement.innerHTML = content; + } else { + contentElement.appendChild(document.createTextNode(content)); + } + + contentWrapper.appendChild(contentElement); + + dialog.appendChild(contentWrapper); + + var footer = document.createElement("div"); + footer.className = "YesNoDialogFooter"; + + var yesButton = document.createElement("div"); + yesButton.className = "YesNoDialog_yesButton borderRadius5px colorGradient50px"; + yesButton.appendChild(document.createTextNode(translateKey('btnOk'))); + yesButton.onclick = function () { + _this_.yes(); + }; + footer.appendChild(yesButton); + + var noButton = document.createElement("div"); + noButton.className = "YesNoDialog_noButton borderRadius5px colorGradient50px"; + noButton.appendChild(document.createTextNode(translateKey('dialogBack'))); + noButton.onclick = function () { + _this_.no(); + }; + footer.appendChild(noButton); + + dialog.appendChild(footer); + + this.m_layer.appendChild(dialog); + + Layer.add(this.m_layer); + + this.__activateSubDialog(); + + //AG sorgt dafür, daß die Dialoghöhe sich dynamisch dem Content anpasst. + jQuery(".YesNoDialog").css("height", jQuery(".YesNoDialogContentWrapper").height() + 78); + jQuery(".YesNoDialogFooter").css("top", jQuery(".YesNoDialogContentWrapper").height() + 26); + + translatePage('#RGBWControllerColor, #RGBWControllerProgram'); + }, + + // This creates the content of the dialog. + __activateSubDialog: function () { + switch (this.param) { + /* + case "BRIGHTNESS" : + jQuery("#RGBWControllerBrightness").show(); + break; + */ + //case "RGBW_COLOR" : + case "USER_COLOR" : + /* + Array curValues + 0 Color val + 1 Brightness + 2 Ramptime + 3 OnTime + */ + var elmBrightness = jQuery("#colorRGBControllerBrightness"), + elmRampTime = jQuery("#colorRGBControllerRampTime"), + elmOnTime = jQuery("#colorRGBControllerOnTime"), + elmFreeRampTimeContainer = jQuery("#colorRGBEnterFreeRampTimeContainer"), + elmFreeOnTimeContainer = jQuery("#colorRGBEnterFreeOnTimeContainer"); + + elmBrightness.val(this.curValues["ACT_BRIGHTNESS_STORE"] || this.DEFAULTBRIGHTNESS); + + // RampTime + if (this.curValues["RAMP_TIME_STORE"]) { + elmRampTime.val(this.__setTimeValue("colorRGBControllerRampTime", this.curValues["RAMP_TIME_STORE"])); + } else { + elmRampTime.val(0.5); + } + + // OnTime + if (this.curValues["ON_TIME_STORE"]) { + elmOnTime.val(this.__setTimeValue("colorRGBControllerOnTime", this.curValues["ON_TIME_STORE"])); + } else { + elmOnTime.val(118000); + } + elmRampTime.change(function (e) { + if (jQuery(this).val() == "99999999") { + elmFreeRampTimeContainer.show(); + } else { + elmFreeRampTimeContainer.hide(); + } + }); + + elmOnTime.change(function (e) { + if (jQuery(this).val() == "99999999") { + elmFreeOnTimeContainer.show(); + } else { + elmFreeOnTimeContainer.hide(); + } + }); + + jQuery("#RGBWControllerColor").show(); + this.__activateColorPicker(); + break; + //case "RGBW_AUTOMATIC": + case "USER_PROGRAM": + /* + Array curValues + 0 Program + 1 Brightness + 2 Ramptime + 3 OnTime + 4 Color Min + 5 Color Max + */ + var + self = this, + elmProgram = jQuery("#prgRGBControllerProgram"), + elmBrightness = jQuery("#prgRGBControllerBrightness"), + elmRampTime = jQuery("#prgRGBControllerRampTime"), + elmOnTime = jQuery("#prgRGBControllerOnTime"), + elmFreeRampTimeContainer = jQuery("#prgRGBEnterFreeRampTimeContainer"), + elmFreeOnTimeContainer = jQuery("#prgRGBEnterFreeOnTimeContainer"), + elmMinColorActive = jQuery("#prgRGBControllerMinColorActive"), + elmMaxColorActive = jQuery("#prgRGBControllerMaxColorActive"); + + elmProgram.val(this.curValues["ACT_COLOR_PROGRAM_STORE"] || 0); + elmBrightness.val(this.curValues["ACT_BRIGHTNESS_STORE"] || this.DEFAULTBRIGHTNESS); + + // RampTime + if (this.curValues["RAMP_TIME_STORE"]) { + elmRampTime.val(this.__setTimeValue("prgRGBControllerRampTime", this.curValues["RAMP_TIME_STORE"])); + } else { + elmRampTime.val(0.5); + } + + // OnTime + if (this.curValues["ON_TIME_STORE"]) { + elmOnTime.val(this.__setTimeValue("prgRGBControllerOnTime", this.curValues["ON_TIME_STORE"])); + } else { + elmOnTime.val(118000); + } + + elmRampTime.change(function (e) { + if (jQuery(this).val() == "99999999") { + elmFreeRampTimeContainer.show(); + } else { + elmFreeRampTimeContainer.hide(); + } + }); + + elmOnTime.change(function (e) { + if (jQuery(this).val() == "99999999") { + elmFreeOnTimeContainer.show(); + } else { + elmFreeOnTimeContainer.hide(); + } + }); + + elmMinColorActive.change(function (e) { + if (jQuery(this).prop("checked")) { + if (self.curValues[4] == 255) { + jQuery("#prgRGBControllerMinColor").spectrum("set", "hsv(0,100%,100%)"); + } + jQuery("#prgRGBControllerMinColor").spectrum("enable"); + } else { + jQuery("#prgRGBControllerMinColor").spectrum("disable"); + } + }); + + elmMaxColorActive.change(function (e) { + if (jQuery(this).prop("checked")) { + if (self.curValues[5] == 255) { + jQuery("#prgRGBControllerMaxColor").spectrum("set", "hsv(359,100%,100%)"); + } + jQuery("#prgRGBControllerMaxColor").spectrum("enable"); + } else { + jQuery("#prgRGBControllerMaxColor").spectrum("disable"); + } + }); + + jQuery("#RGBWControllerProgram").show(); + this.__activateColorPickerMinMax("min"); + this.__activateColorPickerMinMax("max"); + break; + } + }, + + // PUBLIC + getConfigString: function () { + return this.configString; + }, + + + __setTimeValue: function (strTimeElem, value) { + var maxValue = 85825945; + var optionAvailable = false; + var fullSeconds = (value <= maxValue) ? value : maxValue; + + jQuery("#" + strTimeElem + " > option").each(function () { + if (this.value == fullSeconds) { + optionAvailable = true; + } + }); + + if (!optionAvailable) { + var days = Math.floor(fullSeconds / 86400); + var hours = Math.floor(fullSeconds / 3600) % 24; + var minutes = Math.floor((fullSeconds - (hours * 3600)) / 60) % 60; + var seconds = fullSeconds - ((days * 86400) + (hours * 3600) + (minutes * 60)); + var sHour = (hours < 10) ? "0" + hours : hours, + sMinutes = (minutes < 10) ? "0" + minutes : minutes, + sSeconds = (seconds < 10) ? "0" + seconds : seconds; + + if (days > 0) { + jQuery("#" + strTimeElem).append(""; + for (var loop= 10; loop <= 100; loop+=10) { + options+= ""; + } + return ""; + }, + + setDialogElements: function() { + + this.trDurationElms = jQuery("[name='trDuration']"); + this.trRampTimeElms = jQuery("[name='trRampTime']"); + + this.volumeElm = jQuery("#combinedParam_Volume"); + this.chkBoxTimeLimitElm = jQuery("#chkBoxTimeLimit"); + this.durationUnitElm = jQuery("#combinedParam_DurationUnit"); + this.durationValueElm = jQuery("#combinedParam_DurationValue"); + this.rampTimeUnitElm = jQuery("#combinedParam_RampTimeUnit"); + this.rampTimeValueElm = jQuery("#combinedParam_RampTimeValue"); + this.repetitionsElm = jQuery("#combinedParam_Repetitions"); + this.choosenFilesElm = jQuery("#combinedParam_ChoosenFiles"); + this.btnChooseSoundFiles = jQuery("#btnChooseSoundFiles"); + }, + + initDialog: function() { + var self = this, + arElmValues = this.initValue.split(","), + permanentHR = 31, + minDuration = 0, + maxDuration = 16343; + + this.volumeElm.val(arElmValues[0].split("=")[1]); + this.durationUnitElm.val(arElmValues[1].split("=")[1]); + this.durationValueElm.val(arElmValues[2].split("=")[1]); + + // Permanent not active. The duration of the sound is limited + if (this.durationValueElm.val() == permanentHR && this.durationUnitElm.val() == 2) { + this.chkBoxTimeLimitElm.prop("checked", false); + this.trDurationElms.css("visibility", "visible"); + this.trDurationElms.css("opacity", "0.2"); + } else { + this.chkBoxTimeLimitElm.prop("checked", true); + this.trDurationElms.css("visibility", "visible"); + } + + this.rampTimeUnitElm.val(arElmValues[3].split("=")[1]); + this.rampTimeValueElm.val(arElmValues[4].split("=")[1]); + this.repetitionsElm.val(arElmValues[5].split("=")[1]); + this.choosenFilesElm.val(arElmValues[6].split("=")[1].replace(/;/g, ",")); + + this.btnChooseSoundFiles.bind("click", function() { + chooseSoundFiles(self.choosenFilesElm.val()); + }); + this.chkBoxTimeLimitElm.bind("change", function(){ + if (this.checked) { + self.durationValueElm.prop('disabled', false); + self.durationUnitElm.prop('disabled', false); + self.trDurationElms.fadeTo(1000, 1); + } else { + self.durationValueElm.prop('disabled', true); + self.durationUnitElm.prop('disabled', true); + self.trDurationElms.fadeTo(1000, 0.2); + self.durationValueElm.val(permanentHR); + self.trRampTimeElms.fadeTo(1000, 1); + self.rampTimeValueElm.prop('disabled', false); + self.rampTimeUnitElm.prop('disabled', false); + } + }); + + this.durationValueElm.bind("keyup", function() { + var min = 0, + max = (parseInt(self.durationUnitElm.val()) == 2) ? permanentHR: maxDuration; + this.value = self.checkValidity(this.value,min,max); + if (this.value == 0) { + self.trRampTimeElms.fadeTo(1000,0.1); + self.rampTimeValueElm.prop('disabled', true).val(0); + self.rampTimeUnitElm.prop('disabled', true); + } else { + self.trRampTimeElms.fadeTo(1000,1); + self.rampTimeValueElm.prop('disabled', false); + self.rampTimeUnitElm.prop('disabled', false); + } + }); + + this.durationValueElm.bind("blur", function() { + var val = parseInt(this.value); + + if (isNaN(val)) { + this.value = (parseInt(self.durationUnitElm.val()) == 2) ? permanentHR : maxDuration; + } else { + this.value = val; + } + self.durationValueElm.keyup(); + }); + + this.durationUnitElm.bind("change", function(){ + self.durationValueElm.keyup(); + }); + + this.rampTimeValueElm.bind("keyup", function() { + var min = 0, + max = (parseInt(self.rampTimeUnitElm.val()) == 2) ? permanentHR: maxDuration; + this.value = self.checkValidity(this.value,min,max); + }); + + this.rampTimeValueElm.bind("blur", function() { + var val = parseInt(this.value); + + if (isNaN(val)) { + this.value = (parseInt(self.rampTimeUnitElm.val()) == 2) ? permanentHR : maxDuration; + } else { + this.value = val; + } + }); + + this.rampTimeUnitElm.bind("change", function(){ + self.rampTimeValueElm.keyup(); + }); + + }, + + checkValidity: function(val, min, max) { + var result = val; + if (val == "") {result = "";} + + if (parseInt(val) < 0) {result = min;} + if (parseInt(val) > max) {result = max;} + return result; + }, + + + getConfigString: function() { + var volume = this.volumeElm.val(), + durationUnit = (this.chkBoxTimeLimitElm.prop("checked") == false) ? 2 : this.durationUnitElm.val(), // 2 = unit hour + durationValue = (this.chkBoxTimeLimitElm.prop("checked") == false) ? 31 : this.durationValueElm.val(), + ramptimeUnit = this.rampTimeUnitElm.val(), + ramptimeValue = this.rampTimeValueElm.val(), + repetitions = this.repetitionsElm.val(), + soundfileList = this.choosenFilesElm.val().replace(/,/g, ";"), + + result = "L="+volume+",DU="+durationUnit+",DV="+durationValue+",RTU="+ramptimeUnit+",RTV="+ramptimeValue+",R="+repetitions+",SL="+ soundfileList; + + Layer.remove(this.m_layer); + + return result; + }, + + close: function(result) + { + if (this.m_callback) { this.m_callback(result); } + }, + + yes: function() + { + this.close(this.RESULT_YES); + }, + + no: function() + { + Layer.remove(this.m_layer); + this.close(this.RESULT_NO); + }, + + btnTextYes: function(btnTxt) { + jQuery(".YesNoDialog_yesButton").text(btnTxt); + }, + + btnYesHide: function() { + jQuery("#btnYes").addClass("hidden"); + }, + + btnYesShow: function() { + jQuery("#btnYes").removeClass("hidden"); + }, + + btnTextNo: function(btnTxt) { + jQuery(".YesNoDialog_noButton").text(btnTxt); + }, + + btnNoHide: function() { + jQuery("#btnNo").addClass("hidden"); + }, + + btnNoShow: function() { + jQuery("#btnNo").removeClass("hidden"); + }, + + setHeight: function() { + var heightContentWrapper = jQuery(".YesNoDialogContentWrapper").height(), + yesNoElm = jQuery(".YesNoDialog"), + footerElm = jQuery(".YesNoDialogFooter"); + + yesNoElm.css("height", heightContentWrapper + 78); + footerElm.css("top", heightContentWrapper + 26); + yesNoElm.css("top", (window.innerHeight / 2) - (yesNoElm.height() / 2)); + }, + + resetHeight: function() { + this.setHeight(); + }, + + setWidth: function(dlgWidth) { + var defaultWith = 600, + offsetWidth = 4, + offsetPosYesButton = 109, + offsetDialogHeight = 78, + offsetDialogFooterHeight = 26; + + var width = dlgWidth - offsetWidth, + yesButtonPos = dlgWidth - offsetPosYesButton, + position = jQuery(".YesNoDialog").position(); + + // dlgWidth = (defaultWith < dlgWidth) ? defaultWith : dlgWidth; + + jQuery(".YesNoDialog").width(dlgWidth).css({left: position.left + ((defaultWith - dlgWidth) / 2)}); + jQuery(".YesNoDialogTitle").width(width); + jQuery(".YesNoDialogContentWrapper").width(width); + jQuery(".YesNoDialogFooter").width(width); + jQuery(".YesNoDialog_yesButton").css("left", yesButtonPos); + + //Dialoghöhe an Content anpassen. + jQuery(".YesNoDialog").css("height", jQuery(".YesNoDialogContentWrapper").height() + offsetDialogHeight); + jQuery(".YesNoDialogFooter").css("top", jQuery(".YesNoDialogContentWrapper").height() + offsetDialogFooterHeight); + } + +}); + +RenameDeviceDialog = Class.create({ + + initialize: function(title, content, devId, allChannels, callback, contentType) + { + var _this_ = this; + this.m_contentType = contentType; + this.m_callback = callback; + this.m_layer = document.createElement("div"); + this.m_layer.className = "YesNoDialogLayer"; + + var dialog = document.createElement("div"); + dialog.className = "YesNoDialog"; + + var titleElement = document.createElement("div"); + titleElement.className = "YesNoDialogTitle"; + titleElement.appendChild(document.createTextNode(title)); + titleElement.onmousedown = function(event) { new Drag(this.parentNode, event); }; + dialog.appendChild(titleElement); + + var contentWrapper = document.createElement("div"); + contentWrapper.className = "YesNoDialogContentWrapper"; + + var contentElement = document.createElement("div"); + contentElement.className = "YesNoDialogContent"; + + if (this.m_contentType == "html") { + contentElement.innerHTML = content; + } else { + contentElement.appendChild(document.createTextNode(content)); + } + + contentWrapper.appendChild(contentElement); + + dialog.appendChild(contentWrapper); + + var footer = document.createElement("div"); + footer.className= "YesNoDialogFooter"; + + var yesButton = document.createElement("div"); + yesButton.className = "YesNoDialog_yesButton borderRadius5px colorGradient50px"; + yesButton.appendChild(document.createTextNode(translateKey('dialogYes'))); + yesButton.onclick = function() { _this_.yes(); }; + yesButton.id="btnYes"; + footer.appendChild(yesButton); + + var noButton = document.createElement("div"); + noButton.className = "YesNoDialog_noButton borderRadius5px colorGradient50px"; + noButton.appendChild(document.createTextNode(translateKey('dialogNo'))); + noButton.onclick = function() { _this_.no(); }; + noButton.id = "btnNo"; + footer.appendChild(noButton); + + dialog.appendChild(footer); + + this.m_layer.appendChild(dialog); + Layer.add(this.m_layer); + + translatePage(".YesNoDialog"); + + this.setHeight(); + + this.renameAllChannels = (allChannels == "true" || allChannels == true) ? true : false; + this.device = homematic("Device.get", {id: devId}); // selected device + this.newDeviceName = this.device.name; + + this.arChnObject = []; + + this.elmBasic = jQuery("#deviceBasisName"); + this.elmSN = jQuery("#partSN"); + //this.elmChannel = jQuery("#partChannel"); + this.tblChannelList = jQuery("#tblChannelList"); + this.elmChannelNames = jQuery("#channelNames"); + + this.basicName = ""; + this.tailSN = ""; + this.virtChnGroup = 0; + this.virtChnGroupLock = false; + + this.generateDeviceName(); + if (this.renameAllChannels) { + this.showChannelList(); + } + }, + + generateDeviceName: function() { + this.basicName = (this.device.name.indexOf(":") == -1 ) ? this.device.name.split(" ")[0] : this.device.name.split(":")[0]; + this.tailSN = this.device.address.slice(-4); + + this.elmBasic.val(this.basicName); + this.elmSN.val(this.tailSN); + + + }, + + showChannelList: function() { + var self = this, chnList = ""; + this.generateChannelNames(); + jQuery.each(this.arChnObject, function(index, chnObj) { + if (chnObj.chnType != "ALARM_COND_SWITCH_TRANSMITTER") { + chnList += "
Kanal: " + (index + 1) + " = " + self.convertToValidBasicName(chnObj.name) + "
"; + } + }); + + this.elmChannelNames.html(chnList); + this.tblChannelList.show(); + }, + + generateChannelNames: function() { + var self= this, + virtChnCounter = 0; + this.arChnObject = []; + this.virtChnGroup = 0; + + jQuery.each(this.device.channels, function(index, channel) { + + if (channel.channelType != "MAINTENANCE") { + + if (channel.channelType.indexOf("_VIRTUAL_") != -1) { + virtChnCounter++; + } else { + virtChnCounter = 0; + } + self.arChnObject.push({id: channel.id, name: self.getNewChannelName(channel.index, channel.channelType, virtChnCounter), chnType: channel.channelType}); + } + }); + }, + + getNewChannelName: function(chnIndex, chnType, virtChnCounter) { + + chnType = (chnType == "ACCESSPOINT_GENERIC_RECEIVER") ? chnType + "_" + chnIndex : chnType; + + var result = "", + arExt = [translateKey("chType_" + chnType), "A","B","C","D","E"]; // currently there are only devices with 3 virtuals channels in use (A, B, C) + + // No virtual channel + if (virtChnCounter == 0) { + result = this.convertToValidBasicName(this.elmBasic.val()) + ":" + this.elmSN.val() + ":" + chnIndex + ":" + arExt[virtChnCounter]; + this.virtChnGroupLock = false; + } else { + if (! this.virtChnGroupLock) { + this.virtChnGroupLock = true; + this.virtChnGroup++; + } + result = this.convertToValidBasicName(this.elmBasic.val()) + ":" + this.elmSN.val() + ":"+ chnIndex + "-CH" + this.virtChnGroup + "-" + arExt[virtChnCounter]; + } + return result; + }, + + convertToValidBasicName: function(value) { + value = value.substring(0,99); + value = value.replace(/[!\"§$%&\/=?\´\´#\'^°;,~]/g,""); + value = value.replace(/<[^>]*>/g, " "); // replace html code with a space + //value = value.replace(/(<\/?(?:br)[^>]*>)|<[^>]+>/ig, '$1'); // Remove html code except
+ value = value.trim(); // Remove whitespace from the start and the end of the value + + return value; + }, + + close: function(result) + { + Layer.remove(this.m_layer); + if (this.m_callback) { this.m_callback(result); } + }, + + yes: function() + { + this.newDeviceName = this.elmBasic.val() + ":" + this.elmSN.val(); + + if (this.renameAllChannels) { + this.generateChannelNames(); + } + + this.close(RenameDeviceDialog.RESULT_YES); + }, + + no: function() + { + this.close(RenameDeviceDialog.RESULT_NO); + }, + + btnTextYes: function(btnTxt) { + jQuery(".YesNoDialog_yesButton").text(btnTxt); + }, + + btnYesHide: function() { + jQuery("#btnYes").addClass("hidden"); + }, + + btnYesShow: function() { + jQuery("#btnYes").removeClass("hidden"); + }, + + btnTextNo: function(btnTxt) { + jQuery(".YesNoDialog_noButton").text(btnTxt); + }, + + btnNoHide: function() { + jQuery("#btnNo").addClass("hidden"); + }, + + btnNoShow: function() { + jQuery("#btnNo").removeClass("hidden"); + }, + + setHeight: function() { + var heightContentWrapper = jQuery(".YesNoDialogContentWrapper").height(), + yesNoElm = jQuery(".YesNoDialog"), + footerElm = jQuery(".YesNoDialogFooter"); + + yesNoElm.css("height", heightContentWrapper + 78); + footerElm.css("top", heightContentWrapper + 26); + yesNoElm.css("top", (window.innerHeight / 2) - (yesNoElm.height() / 2)); + }, + + resetHeight: function() { + this.setHeight(); + }, + + setWidth: function(dlgWidth) { + var defaultWith = 600, + offsetWidth = 4, + offsetPosYesButton = 109, + offsetDialogHeight = 78, + offsetDialogFooterHeight = 26; + + var width = dlgWidth - offsetWidth, + yesButtonPos = dlgWidth - offsetPosYesButton, + position = jQuery(".YesNoDialog").position(); + + // dlgWidth = (defaultWith < dlgWidth) ? defaultWith : dlgWidth; + + jQuery(".YesNoDialog").width(dlgWidth).css({left: position.left + ((defaultWith - dlgWidth) / 2)}); + jQuery(".YesNoDialogTitle").width(width); + jQuery(".YesNoDialogContentWrapper").width(width); + jQuery(".YesNoDialogFooter").width(width); + jQuery(".YesNoDialog_yesButton").css("left", yesButtonPos); + + //Dialoghöhe an Content anpassen. + jQuery(".YesNoDialog").css("height", jQuery(".YesNoDialogContentWrapper").height() + offsetDialogHeight); + jQuery(".YesNoDialogFooter").css("top", jQuery(".YesNoDialogContentWrapper").height() + offsetDialogFooterHeight); + }, + + getNewDeviceName: function() { + return this.convertToValidBasicName(this.newDeviceName); + }, + + getNewChannelNames: function () { + return this.arChnObject; + } + +}); + +RenameDeviceDialog.RESULT_NO = 0; +RenameDeviceDialog.RESULT_YES = 1; +/** + * LegacyAPIMigrationDialog.js + **/ + +LegacyAPIMigrationDialog = Class.create({ + + initialize: function(title, content, callback, contentType) + { + var _this_ = this; + + this.m_contentType = contentType; + this.m_callback = callback; + this.m_layer = document.createElement("div"); + this.m_layer.className = "YesNoDialogLayer"; + + this.RESULT_NO = 0; + this.RESULT_YES = 1; + + var dialog = document.createElement("div"); + dialog.className = "YesNoDialog"; + + var titleElement = document.createElement("div"); + titleElement.className = "YesNoDialogTitle"; + titleElement.appendChild(document.createTextNode(title)); + titleElement.onmousedown = function(event) { new Drag(this.parentNode, event); }; + dialog.appendChild(titleElement); + + var contentWrapper = document.createElement("div"); + contentWrapper.className = "YesNoDialogContentWrapper"; + + var contentElement = document.createElement("div"); + contentElement.className = "YesNoDialogContent"; + + if (this.m_contentType == "html") { + contentElement.innerHTML = content; + } else { + contentElement.appendChild(document.createTextNode(content)); + } + + contentWrapper.appendChild(contentElement); + + dialog.appendChild(contentWrapper); + + var footer = document.createElement("div"); + footer.className= "YesNoDialogFooter"; + + var yesButton = document.createElement("div"); + yesButton.className = "YesNoDialog_yesButton borderRadius5px colorGradient50px"; + yesButton.appendChild(document.createTextNode(translateKey('dialogYes'))); + yesButton.onclick = function() { _this_.yes(); }; + yesButton.id="btnYes"; + footer.appendChild(yesButton); + + var noButton = document.createElement("div"); + noButton.className = "YesNoDialog_noButton borderRadius5px colorGradient50px"; + noButton.appendChild(document.createTextNode(translateKey('dialogNo'))); + noButton.onclick = function() { _this_.no(); }; + noButton.id = "btnNo"; + footer.appendChild(noButton); + + dialog.appendChild(footer); + + this.m_layer.appendChild(dialog); + Layer.add(this.m_layer); + + translatePage(".YesNoDialog"); + + this.setHeight(); + + }, + + close: function(result) + { + Layer.remove(this.m_layer); + if (this.m_callback) { this.m_callback(result); } + }, + + yes: function() + { + this.close(this.RESULT_YES); + }, + + no: function() + { + this.close(this.RESULT_NO); + }, + + btnTextYes: function(btnTxt) { + jQuery(".YesNoDialog_yesButton").text(btnTxt); + }, + + btnYesHide: function() { + jQuery("#btnYes").addClass("hidden"); + }, + + btnYesShow: function() { + jQuery("#btnYes").removeClass("hidden"); + }, + + btnTextNo: function(btnTxt) { + jQuery(".YesNoDialog_noButton").text(btnTxt); + }, + + btnNoHide: function() { + jQuery("#btnNo").addClass("hidden"); + }, + + btnNoShow: function() { + jQuery("#btnNo").removeClass("hidden"); + }, + + setHeight: function() { + var heightContentWrapper = jQuery(".YesNoDialogContentWrapper").height(), + yesNoElm = jQuery(".YesNoDialog"), + footerElm = jQuery(".YesNoDialogFooter"); + + yesNoElm.css("height", heightContentWrapper + 78); + footerElm.css("top", heightContentWrapper + 26); + yesNoElm.css("top", (window.innerHeight / 2) - (yesNoElm.height() / 2)); + }, + + resetHeight: function() { + this.setHeight(); + }, + + setWidth: function(dlgWidth) { + var defaultWith = 600, + offsetWidth = 4, + offsetPosYesButton = 109, + offsetDialogHeight = 78, + offsetDialogFooterHeight = 26; + + var width = dlgWidth - offsetWidth, + yesButtonPos = dlgWidth - offsetPosYesButton, + position = jQuery(".YesNoDialog").position(); + + // dlgWidth = (defaultWith < dlgWidth) ? defaultWith : dlgWidth; + + jQuery(".YesNoDialog").width(dlgWidth).css({left: position.left + ((defaultWith - dlgWidth) / 2)}); + jQuery(".YesNoDialogTitle").width(width); + jQuery(".YesNoDialogContentWrapper").width(width); + jQuery(".YesNoDialogFooter").width(width); + jQuery(".YesNoDialog_yesButton").css("left", yesButtonPos); + + //Dialoghöhe an Content anpassen. + jQuery(".YesNoDialog").css("height", jQuery(".YesNoDialogContentWrapper").height() + offsetDialogHeight); + jQuery(".YesNoDialogFooter").css("top", jQuery(".YesNoDialogContentWrapper").height() + offsetDialogFooterHeight); + } + +}); +LegacyAPIMigrationDialog.CONFIRM_FILE = '/etc/config/legacyAPIMigrationAccepted'; + +SoundfileChooserDialog = Class.create({ + + initialize: function(activeSounds, callback) + { + var _this_ = this; + + this.m_title = translateKey("btnChooseSongs"); + + this.m_callback = callback; + this.m_layer = document.createElement("div"); + this.m_layer.className = "YesNoDialogLayer"; + + this.RESULT_NO = "Cancel"; + this.RESULT_YES = "OK"; + + this.activeSounds = activeSounds; + + var dialog = document.createElement("div"); + dialog.className = "YesNoDialogA"; + + + var titleElement = document.createElement("div"); + titleElement.className = "YesNoDialogTitleA"; + titleElement.appendChild(document.createTextNode(this.m_title)); + titleElement.onmousedown = function(event) { new Drag(this.parentNode, event); }; + dialog.appendChild(titleElement); + + var contentWrapper = document.createElement("div"); + contentWrapper.className = "YesNoDialogContentWrapperA"; + + var contentElement = document.createElement("div"); + contentElement.className = "YesNoDialogContentA"; + + contentElement.innerHTML = this.getHTML(); + + contentWrapper.appendChild(contentElement); + + dialog.appendChild(contentWrapper); + + var footer = document.createElement("div"); + footer.className= "YesNoDialogFooterA"; + + var yesButton = document.createElement("div"); + yesButton.className = "YesNoDialogA_yesButton borderRadius5px colorGradient50px"; + yesButton.appendChild(document.createTextNode(translateKey('footerBtnOk'))); + yesButton.onclick = function() { _this_.yes(); }; + yesButton.id="btnYesA"; + footer.appendChild(yesButton); + + var noButton = document.createElement("div"); + noButton.className = "YesNoDialogA_noButton borderRadius5px colorGradient50px"; + noButton.appendChild(document.createTextNode(translateKey('footerBtnCancel'))); + noButton.onclick = function() { _this_.no(); }; + noButton.id = "btnNoA"; + footer.appendChild(noButton); + + dialog.appendChild(footer); + + this.m_layer.appendChild(dialog); + Layer.add(this.m_layer); + + translatePage(".YesNoDialogA"); + + this.setHeight(); + + this.initDialog(); + + }, + + getHTML: function() { + var result = "", + x= 0, + count = 0, + songNr; + + result += "
"; + result += ""; + + for (var row = 0; row < 3; row++) { + result += ""; + for (x = row; x < (row + 4); x++) { + result += ""; + count++; + } + result += ""; + } + result += "
"; + result += ""; + result += "
"; + result += "
"; + return result; + }, + + initDialog: function() { + var arSound = this.activeSounds.split(","); + jQuery.each(arSound, function(index, songNr) { + jQuery("#songNr_" + index).val(songNr); + }); + }, + + getChoosenSongs: function() { + var result = "", + songNr; + + for(var loop = 0; loop < 12; loop++) { + songNr = jQuery("#songNr_" + loop).val(); + if (songNr != -1) { + result += songNr+ ";"; + } + } + + return result.slice(0,-1); + }, + + close: function(result) + { + Layer.remove(this.m_layer); + if (this.m_callback) { this.m_callback(result); } + }, + + yes: function() + { + //this.close(this.RESULT_YES); + this.close(this.getChoosenSongs()); + }, + + no: function() + { + this.close(this.RESULT_NO); + }, + + btnTextYes: function(btnTxt) { + jQuery(".YesNoDialogA_yesButton").text(btnTxt); + }, + + btnYesHide: function() { + jQuery("#btnYesA").addClass("hidden"); + }, + + btnYesShow: function() { + jQuery("#btnYesA").removeClass("hidden"); + }, + + btnTextNo: function(btnTxt) { + jQuery(".YesNoDialogA_noButton").text(btnTxt); + }, + + btnNoHide: function() { + jQuery("#btnNoA").addClass("hidden"); + }, + + btnNoShow: function() { + jQuery("#btnNoA").removeClass("hidden"); + }, + + setHeight: function() { + var heightContentWrapper = jQuery(".YesNoDialogContentWrapperA").height(), + yesNoElm = jQuery(".YesNoDialogA"), + footerElm = jQuery(".YesNoDialogFooterA"); + + yesNoElm.css("height", heightContentWrapper + 78); + footerElm.css("top", heightContentWrapper + 26); + yesNoElm.css("top", (window.innerHeight / 2) - (yesNoElm.height() / 2)); + }, + + resetHeight: function() { + this.setHeight(); + }, + + setWidth: function(dlgWidth) { + var defaultWith = 600, + offsetWidth = 4, + offsetPosYesButton = 109, + offsetDialogHeight = 78, + offsetDialogFooterHeight = 26; + + var width = dlgWidth - offsetWidth, + yesButtonPos = dlgWidth - offsetPosYesButton, + position = jQuery(".YesNoDialogA").position(); + + // dlgWidth = (defaultWith < dlgWidth) ? defaultWith : dlgWidth; + + jQuery(".YesNoDialogA").width(dlgWidth).css({left: position.left + ((defaultWith - dlgWidth) / 2)}); + jQuery(".YesNoDialogTitleA").width(width); + jQuery(".YesNoDialogContentWrapperA").width(width); + jQuery(".YesNoDialogFooterA").width(width); + jQuery(".YesNoDialogA_yesButton").css("left", yesButtonPos); + + //Dialoghöhe an Content anpassen. + jQuery(".YesNoDialogA").css("height", jQuery(".YesNoDialogContentWrapperA").height() + offsetDialogHeight); + jQuery(".YesNoDialogFooterA").css("top", jQuery(".YesNoDialogContentWrapperA").height() + offsetDialogFooterHeight); + } + +}); +setShutterVirtualReceiverInitValue = function(elmID, chnAddress) { + var paramElm = jQuery("#"+elmID); + var val = paramElm.val(); + var ch = DeviceList.getChannelByAddress(chnAddress), + virtChannelType = (typeof ch.virtChannelType != "undefined") ? ch.virtChannelType : ""; + + if (virtChannelType == "SHUTTER_VIRTUAL_RECEIVER") { + paramElm.val(val.split(",")[0]); + } +}; + +BlindCombinedParamDialog = Class.create({ + + initialize: function(title, content, value, virtChannelType, callback, contentType) + { + var _this_ = this; + + this.RESULT_NO = 0; + this.RESULT_YES = 1; + this.initValue = value; + this.virtChannelType = virtChannelType; + + this.m_contentType = contentType; + this.m_callback = callback; + this.m_layer = document.createElement("div"); + this.m_layer.className = "YesNoDialogLayer"; + + this.idSHUTTER = "SHUTTER_VIRTUAL_RECEIVER"; + + var dialog = document.createElement("div"); + dialog.className = "YesNoDialog"; + + var titleElement = document.createElement("div"); + titleElement.className = "YesNoDialogTitle"; + titleElement.appendChild(document.createTextNode(title)); + titleElement.onmousedown = function(event) { new Drag(this.parentNode, event); }; + dialog.appendChild(titleElement); + + var contentWrapper = document.createElement("div"); + contentWrapper.className = "YesNoDialogContentWrapper"; + + var contentElement = document.createElement("div"); + contentElement.className = "YesNoDialogContent"; + + if (this.m_contentType == "html") { + contentElement.innerHTML = content; + } else { + contentElement.appendChild(document.createTextNode(content)); + } + + contentWrapper.appendChild(contentElement); + + dialog.appendChild(contentWrapper); + + var footer = document.createElement("div"); + footer.className= "YesNoDialogFooter"; + + var yesButton = document.createElement("div"); + yesButton.className = "YesNoDialog_yesButton borderRadius5px colorGradient50px"; + yesButton.appendChild(document.createTextNode(translateKey('dialogYes'))); + yesButton.onclick = function() { _this_.yes(); }; + yesButton.id="btnYes"; + footer.appendChild(yesButton); + + var noButton = document.createElement("div"); + noButton.className = "YesNoDialog_noButton borderRadius5px colorGradient50px"; + noButton.appendChild(document.createTextNode(translateKey('dialogNo'))); + noButton.onclick = function() { _this_.no(); }; + noButton.id = "btnNo"; + footer.appendChild(noButton); + + dialog.appendChild(footer); + + this.m_layer.appendChild(dialog); + Layer.add(this.m_layer); + + translatePage(".YesNoDialog"); + + this.setHeight(); + + this.elmLevel = jQuery("#tdCombinedParam_Level"); + this.elmLevel2 = jQuery("#tdCombinedParam_Level2"); // not available when mode SHUTTER_VIRTUAL_RECEIVER activated + + this.initDialog(); + + }, + + initDialog: function() { + var arElmValues = this.initValue.split(","), + valueL = arElmValues[0].split("=")[1], + valueL2 = (this.virtChannelType != this.idSHUTTER) ? arElmValues[1].split("=")[1] : ""; + + this.elmLevel.val(valueL); + + if (this.virtChannelType != this.idSHUTTER) { + this.elmLevel2.val(valueL2); + } + }, + + getConfigString: function() { + var valL = this.elmLevel.val(), + result; + + if (this.virtChannelType != this.idSHUTTER) { + var valL2 = this.elmLevel2.val(); + result = "L="+valL+",L2="+valL2; + } else { + // See SPHM-1302 result = "L="+valL; + + // New with SPHM-1302 + result = "L="+valL+",L2="+valL; + } + + Layer.remove(this.m_layer); + + return result; + }, + + close: function(result) + { + if (this.m_callback) { this.m_callback(result); } + Layer.remove(this.m_layer); + }, + + yes: function() + { + this.close(YesNoDialog.RESULT_YES); + }, + + no: function() + { + this.close(YesNoDialog.RESULT_NO); + }, + + btnTextYes: function(btnTxt) { + jQuery(".YesNoDialog_yesButton").text(btnTxt); + }, + + btnYesHide: function() { + jQuery("#btnYes").addClass("hidden"); + }, + + btnYesShow: function() { + jQuery("#btnYes").removeClass("hidden"); + }, + + btnTextNo: function(btnTxt) { + jQuery(".YesNoDialog_noButton").text(btnTxt); + }, + + btnNoHide: function() { + jQuery("#btnNo").addClass("hidden"); + }, + + btnNoShow: function() { + jQuery("#btnNo").removeClass("hidden"); + }, + + setHeight: function() { + var heightContentWrapper = jQuery(".YesNoDialogContentWrapper").height(), + yesNoElm = jQuery(".YesNoDialog"), + footerElm = jQuery(".YesNoDialogFooter"); + + yesNoElm.css("height", heightContentWrapper + 78); + footerElm.css("top", heightContentWrapper + 26); + yesNoElm.css("top", (window.innerHeight / 2) - (yesNoElm.height() / 2)); + }, + + resetHeight: function() { + this.setHeight(); + }, + + setWidth: function(dlgWidth) { + var yesNoDlgElm = jQuery(".YesNoDialog"), + yesNoDlgFooterElm = jQuery(".YesNoDialogFooter"), + yesNoDlgTitleElm = jQuery(".YesNoDialogTitle"), + yesNoDlgContentWrapperElm = jQuery(".YesNoDialogContentWrapper"), + yesNoDlgYesBtnElm = jQuery(".YesNoDialog_yesButton"); + + var defaultWith = 600, + offsetWidth = 4, + offsetPosYesButton = 109, + offsetDialogHeight = 78, + offsetDialogFooterHeight = 26; + + var width = dlgWidth - offsetWidth, + yesButtonPos = dlgWidth - offsetPosYesButton, + position = yesNoDlgElm.position(); + + // dlgWidth = (defaultWith < dlgWidth) ? defaultWith : dlgWidth; + + yesNoDlgElm.width(dlgWidth).css({left: position.left + ((defaultWith - dlgWidth) / 2)}); + yesNoDlgTitleElm.width(width); + yesNoDlgContentWrapperElm.width(width); + yesNoDlgFooterElm.width(width); + yesNoDlgYesBtnElm.css("left", yesButtonPos); + + //Dialoghöhe an Content anpassen. + yesNoDlgElm.css("height", yesNoDlgContentWrapperElm.height() + offsetDialogHeight); + yesNoDlgFooterElm.css("top", yesNoDlgContentWrapperElm.height() + offsetDialogFooterHeight); + } + +}); +DimmerCombinedParamDialog = Class.create({ + initialize: function(title, content, deviceType, chnAddress, value, callback, contentType) + { + showRamptimeOff = false; // This we need among other things for certain COMBINED_PARAMETER help dialogs. + var _this_ = this; + + this.iFace = "HmIP-RF"; + + this.m_contentType = contentType; + this.m_callback = callback; + this.m_layer = document.createElement("div"); + this.m_layer.className = "YesNoDialogLayer"; + + this.RESULT_NO = 0; + this.RESULT_YES = 1; + + this.deviceType = deviceType; + this.chnAddress = chnAddress; + this.initValue = value; + + this.maxOnTime = 111600; + + this.devDescr = homematic("Interface.getDeviceDescription", { + "interface" : this.iFace, + "address" : this.chnAddress.split(":")[0] + }); + + this.devFirmware = this.devDescr.firmware.split("."); + this.fwMajor = parseInt(this.devFirmware[0]); + // this.fwMinor = parseInt(this.devFirmware[1]); // currently not in use + // this.fwPatch = parseInt(this.devFirmware[2]); // currently not in use + + this.isUniversalActor = ((this.deviceType == "HmIP-WUA") || (this.deviceType == "ELV-SH-WUA")) ? true : false; + this.isServoController = ((this.deviceType == "HmIP-WSC") || (this.deviceType == "ELV-SH-WSC")) ? true : false; + this.arNoOntimeAvailable = ["HmIP-MP3P", "HmIP-BSL", "HmIPW-WRC6", "HmIPW-WRC6-A"]; + this.showRampTimeOffElm = ["HmIPW-WRC6", "HmIPW-WRC6-A"]; + this.showColorElms = ["HmIP-MP3P", "HmIP-BSL", "HmIPW-WRC6", "HmIPW-WRC6-A"]; + this.showBehaviourElms = ["HmIPW-WRC6", "HmIPW-WRC6-A"]; + + // SPHM-1268 + if ((this.deviceType == "HmIP-BSL") && (this.fwMajor >= 2)) { + this.showBehaviourElms.push(this.deviceType); + } + + var dialog = document.createElement("div"); + dialog.className = "YesNoDialog"; + + var titleElement = document.createElement("div"); + titleElement.className = "YesNoDialogTitle"; + //titleElement.appendChild(document.createTextNode(title + " " + deviceType + " - " + chnAddress)); + titleElement.appendChild(document.createTextNode(deviceType + " - " + chnAddress)); + titleElement.onmousedown = function(event) { new Drag(this.parentNode, event); }; + dialog.appendChild(titleElement); + + var contentWrapper = document.createElement("div"); + contentWrapper.className = "YesNoDialogContentWrapper"; + + var contentElement = document.createElement("div"); + contentElement.className = "YesNoDialogContent"; + + if (this.m_contentType == "html") { + contentElement.innerHTML = content; + } else { + contentElement.appendChild(document.createTextNode(content)); + } + + contentWrapper.appendChild(contentElement); + + dialog.appendChild(contentWrapper); + + var footer = document.createElement("div"); + footer.className= "YesNoDialogFooter"; + + var yesButton = document.createElement("div"); + yesButton.className = "YesNoDialog_yesButton borderRadius5px colorGradient50px"; + yesButton.appendChild(document.createTextNode(translateKey('dialogYes'))); + yesButton.onclick = function() { _this_.yes(); }; + yesButton.id="btnYes"; + footer.appendChild(yesButton); + + var noButton = document.createElement("div"); + noButton.className = "YesNoDialog_noButton borderRadius5px colorGradient50px"; + noButton.appendChild(document.createTextNode(translateKey('dialogNo'))); + noButton.onclick = function() { _this_.no(); }; + noButton.id = "btnNo"; + footer.appendChild(noButton); + + dialog.appendChild(footer); + + this.m_layer.appendChild(dialog); + Layer.add(this.m_layer); + + translatePage(".YesNoDialog"); + + this.setHeight(); + + this.colorElmVisible = false; + this.behaviourElmVisible = false; + this.setDialogElements(); + this.initDialog(); + + }, + + isOntimeAvailable: function() { + return (this.arNoOntimeAvailable.indexOf(this.deviceType) == -1) ? true : false; + }, + + setDialogElements: function() { + + this.trSelectColorElm = jQuery("#trSelectColor"); + this.trSelectBehaviourElm = jQuery("#trSelectBehaviour"); + this.trDurationElms = jQuery("[name='trDuration']"); + this.trRampTimeElms = jQuery("[name='trRampTime']"); + this.trRampTimeOff = jQuery("#trRampTimeOff"); + this.selectColorElm = jQuery("#combinedParam_Color"); + this.selectBehaviourElm = jQuery("#combinedParam_Behaviour"); + this.levelElm = jQuery("#combinedParam_Level"); + + this.levelFreeValElm = jQuery("#prgDimmerEnterFreeLevel"); + this.divLevelFreeValElm = jQuery("#divLevelEnterFreeValue"); + this.levelFreeValActive = false; + + this.lblBrightnessLevelElm = jQuery("#lblBrightnessLevel"); + this.lblRampTimeElm = jQuery("#lblRampTime"); + this.chkBoxTimeLimitElm = jQuery("#chkBoxTimeLimit"); + this.durationValueElm = jQuery("#combinedParam_DurationValue"); + this.durationUnitElm = jQuery("#combinedParam_DurationUnit"); + + this.rampTimeUnitElm = jQuery("#combinedParam_RampTimeUnit"); + this.rampTimeValueElm = jQuery("#combinedParam_RampTimeValue"); + this.rampTimeOffUnitElm = jQuery("#combinedParam_RampTimeOffUnit"); + this.rampTimeOffValueElm = jQuery("#combinedParam_RampTimeOffValue"); + + }, + + // For those devices who are able to change the color show the color selector. + _showColorElm: function() { + var self = this; + jQuery.each(this.showColorElms, function(index, val) { + if (self.deviceType == val) { + self.trSelectColorElm.css("visibility", "visible"); + self.colorElmVisible = true; + return false; // leave each loop + } + }); + }, + + // For those devices who are able to change the behaviour (slow blinking, fast blinking and so on) show the color selector. + _showBehaviourElm: function() { + var self = this; + jQuery.each(this.showBehaviourElms, function(index, val) { + if (self.deviceType == val) { + self.trSelectBehaviourElm.css("visibility", "visible"); + self.behaviourElmVisible = true; + return false; // leave each loop + } + }); + }, + + _getOnTimeVal: function(val, unit) { + var result; + + if (parseInt(val) >= 31 && parseInt(unit) == 2) { + return 0; + } + + if (unit == 0) { + result = val; + } else if (unit == 1) { + result = val * 60; + } else if (unit == 2) { + result = val * 3600; + } + return parseInt(result); + }, + + _getRampTimeVal: function(val, unit) { + var result; + if (unit == 0) { + result = val; + } else if (unit == 1) { + result = parseInt(val * 60); + } else if (unit == 3) { + result = parseFloat(val / 100); + } + return result; + }, + + _getUnitInDU4OnTime: function(time) { + var result = 0, + hr = time / 3600, + min= time / 60; + + if (hr == parseInt(hr)) { + result = 2; + } else if (min == parseInt(min)) { + result = 1; + } + return result; + }, + + _getUnitInDU4RampTime: function(time) { + var t = parseFloat(time), + result = 0, + min = t / 60; + + if (parseInt(time) == 0) { + return 0; + } + + if (min == parseInt(min)) { + result = 1; + } else if ((Number(t) === t) && (t % 1 !== 0)) { + // time in float + result = 3; + } + return result; + }, + + hideOnTimeElems: function() { + jQuery("[name='trRampTime']").first().nextAll().hide(); + this.setHeight(); + }, + + showHideLevelFreeValue: function() { + if (this.levelElm.val() == "99999998") { + this.divLevelFreeValElm.show(); + this.levelFreeValActive = true; + this.setHeight(); + } else { + this.divLevelFreeValElm.hide(); + this.levelFreeValActive = false; + this.setHeight(); + } + + }, + + isLevelValid: function(elm) { + var val = parseInt(elm.value); + if ((isNaN(val) || val < 0)) {val = 0;} else if (val > 100) {val = 100;} + elm.value = val; + }, + + initDialog: function() { + var self = this; + + this.levelElm.change(function() {self.showHideLevelFreeValue();}); + this.levelFreeValElm.blur(function() {self.isLevelValid(this);}); + + var arElmValues, valueL, iValueL, valueDV, valueDVtmp, valueDU, valueRTV, valueRTVtmp, valueRTU, valueC, valueCB, valueRTTOU, valueRTTOV, permanentHR, permanentHR_0, minDuration, maxDuration; + + arElmValues = this.initValue.split(","); + valueL = arElmValues[0].split("=")[1]; + iValueL = parseInt(valueL) / 10; + + if (this.isUniversalActor) { // WUA + this.lblBrightnessLevelElm.text(translateKey("lblOperatingVoltage")); + } else if (this.isServoController) { + this.hideOnTimeElems(); + this.lblBrightnessLevelElm.text(translateKey("stringTableServoLevel")); + this.levelElm.find("option[value='0']").text("0 %"); + this.lblRampTimeElm .text(translateKey("stringTableServoRamp")); + } + + // iValueL !== (iValueL | 0) = check if the value is not 0% - 100% + if ( (iValueL !== (iValueL | 0)) && (valueL != "100.5") && (valueL != "101")) { + this.levelFreeValActive = true; + this.levelFreeValElm.val(valueL); + this.divLevelFreeValElm.show(); + } + + this._showColorElm(); + this._showBehaviourElm(); + if (this.isOntimeAvailable()) { + valueDVtmp = arElmValues[1].split("=")[1]; + valueDU = this._getUnitInDU4OnTime(valueDVtmp); + + if (valueDU == 2) { + valueDV = parseInt(valueDVtmp / 3600); + } else if (valueDU == 1) { + valueDV = parseInt(valueDVtmp / 60); + } else { + valueDV = valueDVtmp; + } + + valueRTVtmp = (! this.isServoController) ? arElmValues[2].split("=")[1] : arElmValues[1].split("=")[1] ; + + valueRTU = this._getUnitInDU4RampTime(valueRTVtmp); + + if (valueRTU == 3) { + valueRTV = valueRTVtmp * 100; + } else if (valueRTU == 1) { + valueRTV = parseInt(valueRTVtmp / 60); + } else { + valueRTV = valueRTVtmp; + } + + valueC = 7; + permanentHR = 31; + permanentHR_0 = 0; + minDuration = 0; + maxDuration = 16343; + } else { + valueDV = arElmValues[1].split("=")[1]; + valueDU = arElmValues[2].split("=")[1]; + valueRTV = arElmValues[3].split("=")[1]; + valueRTU = arElmValues[4].split("=")[1]; + valueC = 7; + permanentHR = 31; + minDuration = 0; + maxDuration = 16343; + } + + // Color + if (this.colorElmVisible && (arElmValues.length >= 6)) { + valueC = arElmValues[5].split("=")[1]; + this.selectColorElm.val(valueC); + } + + // Behaviour (blink slow, blink fast, ....) + if (this.behaviourElmVisible && (arElmValues.length >= 7)) { + valueCB = arElmValues[6].split("=")[1]; + this.selectBehaviourElm.val(valueCB); + } + + // RAMPTIME_OFF + if (arElmValues.length >= 9) { + valueRTTOV = arElmValues[7].split("=")[1]; + valueRTTOU = arElmValues[8].split("=")[1]; + this.rampTimeOffUnitElm.val(valueRTTOU); + this.rampTimeOffValueElm.val(valueRTTOV); + } + + if (this.levelFreeValActive) { + this.levelElm.val("99999998"); + } else { + this.levelElm.val(valueL); + } + + this.durationValueElm.val(valueDV); + this.durationUnitElm.val(valueDU); + + this.rampTimeUnitElm.val(valueRTU); + this.rampTimeValueElm.val(valueRTV); + + if ((this.durationValueElm.val() == permanentHR && this.durationUnitElm.val() == 2) || (this.isOntimeAvailable() && valueDV == 0)) { + this.chkBoxTimeLimitElm.prop("checked", false); + this.durationValueElm.prop('disabled', true); + this.durationUnitElm.prop('disabled', true); + this.trDurationElms.css("visibility", "visible"); + this.trRampTimeElms.css("visibility", "visible"); + this.trDurationElms.css("opacity", "0.2"); + if (this.showRampTimeOffElm.indexOf(this.deviceType) != -1) { + this.trRampTimeOff.css("visibility", "visible").css("opacity", "0.2"); + showRamptimeOff = true; + } + } else { + this.chkBoxTimeLimitElm.prop("checked", true); + this.durationValueElm.prop('disabled', false); + this.durationUnitElm.prop('disabled', false); + this.trDurationElms.css("visibility", "visible"); + this.trRampTimeElms.css("visibility", "visible"); + if (this.showRampTimeOffElm.indexOf(this.deviceType) != -1) { + this.trRampTimeOff.css("visibility", "visible"); + showRamptimeOff = true; + } + } + + this.chkBoxTimeLimitElm.bind("change", function(){ + if (this.checked) { + self.durationValueElm.prop('disabled', false); + self.durationUnitElm.prop('disabled', false); + self.trDurationElms.fadeTo(1000, 1); + self.trRampTimeElms.fadeTo(1000, 1); + if (self.showRampTimeOffElm.indexOf(self.deviceType) != -1) { + self.trRampTimeOff.fadeTo(1000,1); + } + } else { + self.durationValueElm.prop('disabled', true); + self.durationUnitElm.prop('disabled', true); + self.rampTimeValueElm.prop('disabled', false); //.val(0); + self.rampTimeUnitElm.prop('disabled', false); //.val(0); + self.trDurationElms.fadeTo(1000, 0.2); + self.trRampTimeElms.fadeTo(1000, 1); + + if (self.showRampTimeOffElm.indexOf(self.deviceType) != -1) { + self.trRampTimeOff.fadeTo(1000,0.2); + } + + if (self.isOntimeAvailable()) { + self.durationValueElm.val(permanentHR_0); + } else { + self.durationValueElm.val(permanentHR); + self.rampTimeOffUnitElm.val(3); + self.rampTimeOffValueElm.val(0); + } + + self.durationUnitElm.val(2); + + } + }); + + this.durationValueElm.bind("keyup", function() { + var min = minDuration, + max = (parseInt(self.durationUnitElm.val()) == 2) ? permanentHR: maxDuration; + this.value = self.checkValidity(this.value,min,max); + if (parseInt(this.value) == 31) { + self.rampTimeOffValueElm.val(min); + self.rampTimeOffUnitElm.val(3); // = 10ms + } + }); + + this.durationValueElm.bind("blur", function() { + var val = parseInt(this.value); + + if (isNaN(val)) { + this.value = (parseInt(self.durationUnitElm.val()) == 2) ? permanentHR : maxDuration; + } else { + this.value = val; + } + self.durationValueElm.keyup(); + }); + + this.durationUnitElm.bind("change", function(){ + self.durationValueElm.keyup(); + }); + + this.rampTimeValueElm.bind("keyup", function() { + var min = minDuration, + max = maxDuration; + this.value = self.checkValidity(this.value,min,max); + }); + + this.rampTimeValueElm.bind("blur", function() { + var val = parseInt(this.value); + + if (isNaN(val)) { + this.value = maxDuration; + } else { + this.value = val; + } + }); + + this.rampTimeUnitElm.bind("change", function(){ + self.rampTimeValueElm.keyup(); + }); + + /**********************/ + this.rampTimeOffValueElm.bind("keyup", function() { + var min = minDuration, + max = maxDuration; + this.value = self.checkValidity(this.value,min,max); + }); + + this.rampTimeOffValueElm.bind("blur", function() { + var val = parseInt(this.value); + + if (isNaN(val)) { + this.value = maxDuration; + } else { + this.value = (parseInt(self.durationValueElm.val()) <= 30) ? val : minDuration; + if (parseInt(self.durationValueElm.val()) >= 31) { + self.rampTimeOffUnitElm.val(3); // 10ms + } + } + }); + + this.rampTimeUnitElm.bind("change", function(){ + self.rampTimeOffValueElm.keyup(); + }); + /**********************/ + }, + + checkValidity: function(val, min, max) { + var result = val; + if (val == "") {result = "";} + + if (parseInt(val) < 0) {result = min;} + if (parseInt(val) > max) {result = max;} + return result; + }, + + getConfigString: function() { + var self = this, + result, + level, + durationUnit = (this.chkBoxTimeLimitElm.prop("checked") == false) ? 2 : this.durationUnitElm.val(), // 2 = unit hour + durationValue = (this.chkBoxTimeLimitElm.prop("checked") == false) ? 31 : this.durationValueElm.val(), + ramptimeUnit = this.rampTimeUnitElm.val(), + ramptimeValue = this.rampTimeValueElm.val(), + valColor = "", + valBehaviour = ""; + + level = (this.levelFreeValActive) ? this.levelFreeValElm.val() : this.levelElm.val(); + + if (this.colorElmVisible || this.behaviourElmVisible) { + if (this.colorElmVisible && ! this.behaviourElmVisible) { + valColor = this.selectColorElm.val(); + result = "L=" + level + ",DV=" + durationValue + ",DU=" + durationUnit + ",RTV=" + ramptimeValue + ",RTU=" + ramptimeUnit + ",C=" + valColor; + } + + if (! this.colorElmVisible && this.behaviourElmVisible) { + valBehaviour = this.selectBehaviourElm.val(); + result = "L=" + level + ",DV=" + durationValue + ",DU=" + durationUnit + ",RTV=" + ramptimeValue + ",RTU=" + ramptimeUnit + ",CB=" +valBehaviour; + } + + if (this.colorElmVisible && this.behaviourElmVisible) { + valColor = this.selectColorElm.val(); + valBehaviour = this.selectBehaviourElm.val(); + result = "L=" + level + ",DV=" + durationValue + ",DU=" + durationUnit + ",RTV=" + ramptimeValue + ",RTU=" + ramptimeUnit + ",C=" + valColor + ",CB=" +valBehaviour; + } + + } else { + if (this.isOntimeAvailable()) { + if (this.chkBoxTimeLimitElm.prop("checked") == false) { + var _rampTimeValue = parseInt(this._getRampTimeVal(ramptimeValue, ramptimeUnit)); + + if (this.isServoController) { + result = "L=" + level + ",RT=" + _rampTimeValue; // ON_TIME is for the Hmip-WSC not allowed (see SPHM-942) + } else { + if (_rampTimeValue > 0) { + result = "L=" + level + ",OT=" + this.maxOnTime + ",RT=" + _rampTimeValue; // ON_TIME = permanently ON + } else { + result = "L=" + level + ",OT=0,RT=0"; + } + } + } else { + if (this.isServoController) { + var _rampTimeValue = parseInt(this._getRampTimeVal(ramptimeValue, ramptimeUnit)); + result = "L=" + level + ",RT=" + _rampTimeValue; // ON_TIME is for the Hmip-WSC not allowed (see SPHM-942) + } else { + if (durationValue == 0) { + result = "L=" + level + ",OT=" + this._getOnTimeVal(durationValue, durationUnit) + ",RT=0"; + } else { + result = "L=" + level + ",OT=" + this._getOnTimeVal(durationValue, durationUnit) + ",RT=" + this._getRampTimeVal(ramptimeValue, ramptimeUnit); + } + } + } + } else { + result = "L=" + level + ",DV=" + durationValue + ",DU=" + durationUnit + ",RTV=" + ramptimeValue + ",RTU=" + ramptimeUnit; + } + } + + jQuery.each(this.showRampTimeOffElm, function(index, val) { + if (self.deviceType == val) { + return false; // leave each loop + } + }); + + if (showRamptimeOff) { + result += ",RTTOV=" + this.rampTimeOffValueElm.val() + ",RTTOU=" + this.rampTimeOffUnitElm.val(); + } + return result; + }, + + close: function(result) + { + Layer.remove(this.m_layer); + if (this.m_callback) { this.m_callback(result); } + if (showRamptimeOff) {window.setTimeout(function() {delete showRamptimeOff;},100);} + }, + + yes: function() + { + this.close(YesNoDialog.RESULT_YES); + }, + + no: function() + { + this.close(YesNoDialog.RESULT_NO); + }, + + btnTextYes: function(btnTxt) { + jQuery(".YesNoDialog_yesButton").text(btnTxt); + }, + + btnYesHide: function() { + jQuery("#btnYes").addClass("hidden"); + }, + + btnYesShow: function() { + jQuery("#btnYes").removeClass("hidden"); + }, + + btnTextNo: function(btnTxt) { + jQuery(".YesNoDialog_noButton").text(btnTxt); + }, + + btnNoHide: function() { + jQuery("#btnNo").addClass("hidden"); + }, + + btnNoShow: function() { + jQuery("#btnNo").removeClass("hidden"); + }, + + setHeight: function() { + var heightContentWrapper = jQuery(".YesNoDialogContentWrapper").height(), + yesNoElm = jQuery(".YesNoDialog"), + footerElm = jQuery(".YesNoDialogFooter"); + + yesNoElm.css("height", heightContentWrapper + 78); + footerElm.css("top", heightContentWrapper + 26); + yesNoElm.css("top", (window.innerHeight / 2) - (yesNoElm.height() / 2)); + }, + + resetHeight: function() { + this.setHeight(); + }, + + setWidth: function(dlgWidth) { + var yesNoDialogElm = jQuery(".YesNoDialog"), + yesNoDialogContentWrapperElm = jQuery(".YesNoDialogContentWrapper"), + yesNoDialogFooterElm = jQuery(".YesNoDialogFooter"), + yesNoDialogTitleElm = jQuery(".YesNoDialogTitle"), + yesNoDialogYesButton = jQuery(".YesNoDialog_yesButton"); + + var defaultWith = 600, + offsetWidth = 4, + offsetPosYesButton = 109, + offsetDialogHeight = 78, + offsetDialogFooterHeight = 26; + + var width = dlgWidth - offsetWidth, + yesButtonPos = dlgWidth - offsetPosYesButton, + position = yesNoDialogElm.position(); + + // dlgWidth = (defaultWith < dlgWidth) ? defaultWith : dlgWidth; + + yesNoDialogElm.width(dlgWidth).css({left: position.left + ((defaultWith - dlgWidth) / 2)}); + yesNoDialogTitleElm.width(width); + yesNoDialogContentWrapperElm.width(width); + yesNoDialogFooterElm.width(width); + yesNoDialogYesButton.css("left", yesButtonPos); + + //Dialoghöhe an Content anpassen. + yesNoDialogElm.css("height", yesNoDialogContentWrapperElm.height() + offsetDialogHeight); + yesNoDialogFooterElm.css("top", yesNoDialogContentWrapperElm.height() + offsetDialogFooterHeight); + } + +}); +SwitchCombinedParamDialog = Class.create({ + + initialize: function(title, content, deviceType, chnAddress, value, callback, contentType) + { + var _this_ = this; + + this.m_contentType = contentType; + this.m_callback = callback; + this.m_layer = document.createElement("div"); + this.m_layer.className = "YesNoDialogLayer"; + + this.RESULT_NO = 0; + this.RESULT_YES = 1; + + this.deviceType = deviceType; + this.chnAddress = chnAddress; + this.initValue = value; + + this.windowDrive = "HmIP-MOD-WD-VK"; + this.dali = "HmIP-DRG-DALI"; + + this.arNoOntimeAvailable = []; // here we can add devices with Value and Unit instead of Ontime in seconds + + var dialog = document.createElement("div"); + dialog.className = "YesNoDialog"; + + var titleElement = document.createElement("div"); + titleElement.className = "YesNoDialogTitle"; + //titleElement.appendChild(document.createTextNode(title)); + titleElement.appendChild(document.createTextNode(deviceType + " - " + chnAddress)); + titleElement.onmousedown = function(event) { new Drag(this.parentNode, event); }; + dialog.appendChild(titleElement); + + var contentWrapper = document.createElement("div"); + contentWrapper.className = "YesNoDialogContentWrapper"; + + var contentElement = document.createElement("div"); + contentElement.className = "YesNoDialogContent"; + + if (this.m_contentType == "html") { + contentElement.innerHTML = content; + } else { + contentElement.appendChild(document.createTextNode(content)); + } + + contentWrapper.appendChild(contentElement); + + dialog.appendChild(contentWrapper); + + var footer = document.createElement("div"); + footer.className= "YesNoDialogFooter"; + + var yesButton = document.createElement("div"); + yesButton.className = "YesNoDialog_yesButton borderRadius5px colorGradient50px"; + yesButton.appendChild(document.createTextNode(translateKey('dialogYes'))); + yesButton.onclick = function() { _this_.yes(); }; + yesButton.id="btnYes"; + footer.appendChild(yesButton); + + var noButton = document.createElement("div"); + noButton.className = "YesNoDialog_noButton borderRadius5px colorGradient50px"; + noButton.appendChild(document.createTextNode(translateKey('dialogNo'))); + noButton.onclick = function() { _this_.no(); }; + noButton.id = "btnNo"; + footer.appendChild(noButton); + + dialog.appendChild(footer); + + this.m_layer.appendChild(dialog); + Layer.add(this.m_layer); + + translatePage(".YesNoDialog"); + + this.setHeight(); + this.setDialogElements(); + this.initDialog(); + }, + + _deviceIsWindowDrive: function() { + return (this.deviceType == this.windowDrive) ? true : false; + }, + + _deviceIsDali: function() { + return (this.deviceType == this.dali) ? true : false; + }, + + _getOnTimeVal: function(val, unit) { + var result; + + if (parseInt(val) >= 31 && parseInt(unit) == 2) { + return 0; + } + + if (unit == 0) { + result = val; + } else if (unit == 1) { + result = val * 60; + } else if (unit == 2) { + result = val * 3600; + } + return parseInt(result); + }, + + _getUnitInDU4OnTime: function(time) { + var result = 0, + hr = time / 3600, + min= time / 60; + + if (hr == parseInt(hr)) { + result = 2; + } else if (min == parseInt(min)) { + result = 1; + } + return result; + }, + + isOntimeAvailable: function() { + return (this.arNoOntimeAvailable.indexOf(this.deviceType) == -1) ? true : false; + }, + + setDialogElements: function() { + this.trDurationElms = jQuery("[name='trDuration']"); + this.stateElm = jQuery("#combinedParam_State"); + this.chkBoxTimeLimitElm = jQuery("#chkBoxTimeLimit"); + this.durationValueElm = jQuery("#combinedParam_DurationValue"); + this.durationUnitElm = jQuery("#combinedParam_DurationUnit"); + }, + + getConfigString: function() { + var result, + state = this.stateElm.val(), + durationUnit = (this.chkBoxTimeLimitElm.prop("checked") == false) ? 2 : this.durationUnitElm.val(), // 2 = unit hour + durationValue = (this.chkBoxTimeLimitElm.prop("checked") == false) ? 31 : this.durationValueElm.val(); + + if (this.isOntimeAvailable()) { + if ((this.chkBoxTimeLimitElm.prop("checked") == false) || (durationValue == 0) || (durationValue == 31 && durationUnit == 2)) { + if (! this._deviceIsWindowDrive()) { + if (! this._deviceIsDali()) { + result = "S=" + state; + } else { + // The DALI STATE is LEVEL + state = (state == "true") ? 100 : 0; + result = "L=" + state; + } + } else { + result = "VL=" + state; + } + + } else { + if (! this._deviceIsWindowDrive()) { + if (! this._deviceIsDali()) { + result = "S=" + state + ",OT=" + this._getOnTimeVal(durationValue, durationUnit); + } else { + // The DALI STATE is LEVEL + state = (state == "true") ? 100 : 0; + result = "L=" + state + ",OT=" + this._getOnTimeVal(durationValue, durationUnit); + } + + } else { + result = "VL=" + state + ",OT=" + this._getOnTimeVal(durationValue, durationUnit); + } + } + } else { + result = "S=" + state + ",DV=" + durationValue + ",DU=" + durationUnit; + } + return result; + }, + + checkValidity: function(val, min, max) { + var result = val; + if (val == "") {result = "";} + + if (parseInt(val) < 0) {result = min;} + if (parseInt(val) > max) {result = max;} + return result; + }, + + initDialog: function() { + + var self = this; + + var arElmValues, valueS, valueDV, valueDVtmp, valueDU, permanentHR, permanentHR_0, minDuration, maxDuration; + + if (this.isOntimeAvailable()) { + arElmValues = this.initValue.split(","); + + if (arElmValues.length > 1) { + valueS = arElmValues[0].split("=")[1]; + valueDVtmp = arElmValues[1].split("=")[1]; + valueDU = this._getUnitInDU4OnTime(valueDVtmp); + + if (valueDU == 2) { + valueDV = parseInt(valueDVtmp / 3600); + } else if (valueDU == 1) { + valueDV = parseInt(valueDVtmp / 60); + } else { + valueDV = valueDVtmp; + } + } else { + valueS = arElmValues[0].split("=")[1]; + valueDV = 0; + valueDU = 2; + } + permanentHR = 31; + permanentHR_0 = 0; + minDuration = 0; + maxDuration = 16343; + } else { + arElmValues = this.initValue.split(","); + valueS = arElmValues[0].split("=")[1]; + valueDV = arElmValues[1].split("=")[1]; + valueDU = arElmValues[2].split("=")[1]; + permanentHR = 31; + minDuration = 0; + maxDuration = 16343; + } + + if (this._deviceIsDali()) { + valueS = (valueS == "100") ? "true" : "false"; + } + + this.stateElm.val(valueS); + this.durationValueElm.val(valueDV); + this.durationUnitElm.val(valueDU); + + if ((this.durationValueElm.val() == permanentHR && this.durationUnitElm.val() == 2) || (this.isOntimeAvailable() && valueDV == 0)) { + this.chkBoxTimeLimitElm.prop("checked", false); + this.trDurationElms.css("visibility", "visible"); + this.trDurationElms.css("opacity", "0.2"); + } else { + this.chkBoxTimeLimitElm.prop("checked", true); + this.trDurationElms.css("visibility", "visible"); + } + + this.chkBoxTimeLimitElm.bind("change", function(){ + if (this.checked) { + self.durationValueElm.prop('disabled', false); + self.durationUnitElm.prop('disabled', false); + self.trDurationElms.fadeTo(1000, 1); + } else { + self.durationValueElm.prop('disabled', true); + self.durationUnitElm.prop('disabled', true); + self.trDurationElms.fadeTo(1000, 0.2); + + if (self.isOntimeAvailable()) { + self.durationValueElm.val(permanentHR_0); + } else { + self.durationValueElm.val(permanentHR); + } + + self.durationUnitElm.val(2); + } + }); + + this.durationValueElm.bind("keyup", function() { + var min = 0, + max = (parseInt(self.durationUnitElm.val()) == 2) ? permanentHR: maxDuration; + this.value = self.checkValidity(this.value,min,max); + }); + + this.durationValueElm.bind("blur", function() { + var val = parseInt(this.value); + + if (isNaN(val)) { + this.value = (parseInt(self.durationUnitElm.val()) == 2) ? permanentHR : maxDuration; + } else { + this.value = val; + } + self.durationValueElm.keyup(); + }); + + this.durationUnitElm.bind("change", function(){ + self.durationValueElm.keyup(); + }); + + }, + + close: function(result) + { + Layer.remove(this.m_layer); + if (this.m_callback) { this.m_callback(result); } + }, + + yes: function() + { + this.close(YesNoDialog.RESULT_YES); + }, + + no: function() + { + this.close(YesNoDialog.RESULT_NO); + }, + + btnTextYes: function(btnTxt) { + jQuery(".YesNoDialog_yesButton").text(btnTxt); + }, + + btnYesHide: function() { + jQuery("#btnYes").addClass("hidden"); + }, + + btnYesShow: function() { + jQuery("#btnYes").removeClass("hidden"); + }, + + btnTextNo: function(btnTxt) { + jQuery(".YesNoDialog_noButton").text(btnTxt); + }, + + btnNoHide: function() { + jQuery("#btnNo").addClass("hidden"); + }, + + btnNoShow: function() { + jQuery("#btnNo").removeClass("hidden"); + }, + + setHeight: function() { + var heightContentWrapper = jQuery(".YesNoDialogContentWrapper").height(), + yesNoElm = jQuery(".YesNoDialog"), + footerElm = jQuery(".YesNoDialogFooter"); + + yesNoElm.css("height", heightContentWrapper + 78); + footerElm.css("top", heightContentWrapper + 26); + yesNoElm.css("top", (window.innerHeight / 2) - (yesNoElm.height() / 2)); + }, + + resetHeight: function() { + this.setHeight(); + }, + + setWidth: function(dlgWidth) { + var defaultWith = 600, + offsetWidth = 4, + offsetPosYesButton = 109, + offsetDialogHeight = 78, + offsetDialogFooterHeight = 26; + + var width = dlgWidth - offsetWidth, + yesButtonPos = dlgWidth - offsetPosYesButton, + position = jQuery(".YesNoDialog").position(); + + // dlgWidth = (defaultWith < dlgWidth) ? defaultWith : dlgWidth; + + jQuery(".YesNoDialog").width(dlgWidth).css({left: position.left + ((defaultWith - dlgWidth) / 2)}); + jQuery(".YesNoDialogTitle").width(width); + jQuery(".YesNoDialogContentWrapper").width(width); + jQuery(".YesNoDialogFooter").width(width); + jQuery(".YesNoDialog_yesButton").css("left", yesButtonPos); + + //Dialoghöhe an Content anpassen. + jQuery(".YesNoDialog").css("height", jQuery(".YesNoDialogContentWrapper").height() + offsetDialogHeight); + jQuery(".YesNoDialogFooter").css("top", jQuery(".YesNoDialogContentWrapper").height() + offsetDialogFooterHeight); + } + +}); +WiredDisplaySystemKey = Class.create({ + + initialize: function(title, content, deviceType, chnAddress, value, callback, contentType) + { + + var _this_ = this; + + this.iface = "HmIP-RF"; + + this.m_contentType = contentType; + this.m_callback = callback; + this.m_layer = document.createElement("div"); + this.m_layer.className = "YesNoDialogLayer"; + + this.RESULT_NO = 0; + this.RESULT_YES = 1; + + this.deviceType = deviceType; + this.chnAddress = chnAddress; + this.initValue = value; + + this.hasDisplay = false; + this.checkIfDisplay(); + + var dialog = document.createElement("div"); + dialog.className = "YesNoDialog"; + + var titleElement = document.createElement("div"); + titleElement.className = "YesNoDialogTitle"; + //titleElement.appendChild(document.createTextNode(title)); + titleElement.appendChild(document.createTextNode(deviceType + " - " + chnAddress)); + titleElement.onmousedown = function(event) { new Drag(this.parentNode, event); }; + dialog.appendChild(titleElement); + + var contentWrapper = document.createElement("div"); + contentWrapper.className = "YesNoDialogContentWrapper"; + + var contentElement = document.createElement("div"); + contentElement.className = "YesNoDialogContent"; + + if (this.m_contentType == "html") { + contentElement.innerHTML = content; + } else { + contentElement.appendChild(document.createTextNode(content)); + } + + contentWrapper.appendChild(contentElement); + + dialog.appendChild(contentWrapper); + + var footer = document.createElement("div"); + footer.className= "YesNoDialogFooter"; + + var yesButton = document.createElement("div"); + yesButton.className = "YesNoDialog_yesButton borderRadius5px colorGradient50px"; + yesButton.appendChild(document.createTextNode(translateKey('dialogYes'))); + yesButton.onclick = function() { _this_.yes(); }; + yesButton.id="btnYes"; + footer.appendChild(yesButton); + + var noButton = document.createElement("div"); + noButton.className = "YesNoDialog_noButton borderRadius5px colorGradient50px"; + noButton.appendChild(document.createTextNode(translateKey('dialogNo'))); + noButton.onclick = function() { _this_.no(); }; + noButton.id = "btnNo"; + footer.appendChild(noButton); + + dialog.appendChild(footer); + + this.m_layer.appendChild(dialog); + Layer.add(this.m_layer); + + translatePage(".YesNoDialog"); + + this.setHeight(); + this.fetchDialogElements(); + this.initDialog(); + }, + + fetchDialogElements: function() { + this.displayElems = jQuery("[name='display']"); + this.displayChkBox = jQuery("#display"); + this.sysKeyChkBox = jQuery("#sysKey"); + this.durationSelect = jQuery("#duration"); + }, + + getConfigString: function(type) { + /* + See SPHM-769 + IDENTIFICATION_MODE_LCD_BACKLIGHT -> IMLB + IDENTIFICATION_MODE_KEY_VISUAL -> IMKV + IDENTIFY_TARGET_LEVEL -> IMTL --> can only be 0 (Off) or > 0 (On) + IDENTIFY_DURATION -> IMDU + */ + + var result, + onDisplay = this.displayChkBox.prop("checked"), + onSysKey = this.sysKeyChkBox.prop("checked"), + brightness = (onDisplay || onSysKey) ? 1 : 0, + durationSelect = this.durationSelect.val(); + if (this.hasDisplay) { + result = "IMLB=" + onDisplay + ",IMKV=" + onSysKey + ",IMTL=" + brightness + ",IMDU=" + durationSelect; + } else { + result = "IMKV=" + onSysKey + ",IMTL=" + brightness + ",IMDU=" + durationSelect; + } + return result; + }, + + checkIfDisplay: function() { + var self = this; + var devDescr = homematic("Interface.getParamsetDescription", {"interface": this.iface, "address": this.chnAddress, "paramsetKey": "VALUES"}); + jQuery.each(devDescr, function(index, val) { + if (val.NAME == "IDENTIFICATION_MODE_LCD_BACKLIGHT") { + self.hasDisplay = true; + return; // leave each loop + } + }); + }, + + initDialog: function() { + var self = this, + arElmValues = this.initValue.split(","), + valBacklight, valKeyVisual, valTargetLevel, valDuration; + + if (this.hasDisplay) { + this.displayElems.show(); + + valBacklight = (arElmValues[0].split("=")[1] == "true") ? true : false; + valKeyVisual = (arElmValues[1].split("=")[1] == "true") ? true : false; + valDuration = arElmValues[3].split("=")[1]; + + this.displayChkBox.prop("checked", valBacklight); + this.sysKeyChkBox.prop("checked", valKeyVisual); + this.durationSelect.val(valDuration); + } else { + valKeyVisual = (arElmValues[0].split("=")[1] == "true") ? true : false; + valDuration = arElmValues[arElmValues.length - 1].split("=")[1]; // the last entry of the string should be IMDU = IDENTIFY_DURATION + + this.sysKeyChkBox.prop("checked", valKeyVisual); + this.durationSelect.val(valDuration); + } + }, + + close: function(result) + { + Layer.remove(this.m_layer); + if (this.m_callback) { this.m_callback(result); } + }, + + yes: function() + { + this.close(YesNoDialog.RESULT_YES); + }, + + no: function() + { + this.close(YesNoDialog.RESULT_NO); + }, + + btnTextYes: function(btnTxt) { + jQuery(".YesNoDialog_yesButton").text(btnTxt); + }, + + btnYesHide: function() { + jQuery("#btnYes").addClass("hidden"); + }, + + btnYesShow: function() { + jQuery("#btnYes").removeClass("hidden"); + }, + + btnTextNo: function(btnTxt) { + jQuery(".YesNoDialog_noButton").text(btnTxt); + }, + + btnNoHide: function() { + jQuery("#btnNo").addClass("hidden"); + }, + + btnNoShow: function() { + jQuery("#btnNo").removeClass("hidden"); + }, + + setHeight: function() { + var heightContentWrapper = jQuery(".YesNoDialogContentWrapper").height(), + yesNoElm = jQuery(".YesNoDialog"), + footerElm = jQuery(".YesNoDialogFooter"); + + yesNoElm.css("height", heightContentWrapper + 78); + footerElm.css("top", heightContentWrapper + 26); + yesNoElm.css("top", (window.innerHeight / 2) - (yesNoElm.height() / 2)); + }, + + resetHeight: function() { + this.setHeight(); + }, + + setWidth: function(dlgWidth) { + var defaultWith = 600, + offsetWidth = 4, + offsetPosYesButton = 109, + offsetDialogHeight = 78, + offsetDialogFooterHeight = 26; + + var width = dlgWidth - offsetWidth, + yesButtonPos = dlgWidth - offsetPosYesButton, + position = jQuery(".YesNoDialog").position(); + + // dlgWidth = (defaultWith < dlgWidth) ? defaultWith : dlgWidth; + + jQuery(".YesNoDialog").width(dlgWidth).css({left: position.left + ((defaultWith - dlgWidth) / 2)}); + jQuery(".YesNoDialogTitle").width(width); + jQuery(".YesNoDialogContentWrapper").width(width); + jQuery(".YesNoDialogFooter").width(width); + jQuery(".YesNoDialog_yesButton").css("left", yesButtonPos); + + //Dialoghöhe an Content anpassen. + jQuery(".YesNoDialog").css("height", jQuery(".YesNoDialogContentWrapper").height() + offsetDialogHeight); + jQuery(".YesNoDialogFooter").css("top", jQuery(".YesNoDialogContentWrapper").height() + offsetDialogFooterHeight); + } + +}); +var + getWGDImagePath = function() { + return "/ise/img/icons_hmipw_wgd/"; + }, + getWGDDefaultImage = function() { + return "_0000_fallback.png"; + }, + getWGDImageCollection = function() { + var image = { + 0 : ["_0000_fallback.png",0], + 1 : ["_000_000_lightbulb0.png",1], + 2 : ["_001_000_tablelamp0.png",12], + 3 : ["_002_000_spotoff.png",23], + 4 : ["_010_000_socket_off.png",25], + 5 : ["_020_000_shutter0.png",27] + /* Not desired according to discussion with PM and Developer. + 5 : ["_050_20_windows_closed.png",43], + 6 : ["_050_64_window_closed.png",52] + */ + }; + return image; +}; + + +WGDSelectIconDialog = Class.create(YesNoDialog,{ + + run: function () { + var self = this; + this.selectedIconNo = 0; + this.selectedIcon = ""; + this.activeIcon = 0; + this.imagePath = getWGDImagePath(); + + jQuery(".YesNoDialogContentWrapper").css("background-color", "grey"); + + window.setTimeout(function() { + self._initIconPreview(); + }, 50); + }, + + _initIconPreview: function() { + var previewElm = jQuery("#anchor_"+ this.chn); + + previewElm.html(this._getHTML()); + + this.resetHeight(); + }, + + _getHTML: function() { + var self = this, + result ="", + radioBoxSelected = "", + rows = 8, rowCounter=0; + + setSelectedIconNo = function(iconNo) { + self.selectedIconNo = iconNo; + + }; + + setSelectedIcon = function(icon) { + self.selectedIcon = icon; + }; + + //console.log(image[1][0]); // prints the name of the first image + result += ""; + result += ""; + jQuery.each(getWGDImageCollection(), function(index, val) { + if ((radioBoxSelected == "") && (self.activeIcon == val[1])) { + radioBoxSelected = "checked"; + setSelectedIcon(self.imagePath + val[0]); + setSelectedIconNo(val[1]); + } else { + radioBoxSelected = ""; + } + if (index / rows == Math.floor(index / rows)) { + result += ""; + } + rowCounter++; + result += ""; + + if (rowCounter == rows * 2) { + result += ""; + rowCounter = 0; + } + }); + result += ""; + result += "
"; + result += ""; + result += ""; + result += "
"; + result += ""; + result += ""; + result += ""; + result += "
"; + return result; + }, + + getSelectedIconNo: function() { + return this.selectedIconNo; + }, + + getSelectedIcon: function() { + return this.selectedIcon; + } + +}); + +// TODO Check if this class is still necessary! +UniveralLightReceiverDialog = Class.create(YesNoDialog,{ + + run: function () { + this.durationValElm = jQuery("#durationVal"); + this.durationUnitElm = jQuery("#durationUnit"); + this.rampTimeValElm = jQuery("#rampTimeVal"); + this.rampTimeUnitElm = jQuery("#rampTimeUnit"); + this.rampTimeOffValElm = jQuery("#rampTimeOffVal"); + this.rampTimeOffUnitElm = jQuery("#rampTimeOffUnit"); + }, + + initColorPicker: function(chnId, oInitColor, dlg) { + //this.initEventHandler(dlg); + var hsvColorString = "hsv(" + oInitColor.hue + "," + oInitColor.saturation + "%," + oInitColor.level + "%)", + colorPickerElm = jQuery("#colorPicker"); + colorPickerElm.val(hsvColorString); + + jQuery(colorPickerElm).spectrum({ + preferredFormat: "hsv", + showInput: false, + color: hsvColorString, + //showPalette: true, + //disabled: pickerState, + //palette: palette, + cancelText: translateKey("btnCancel"), + chooseText: translateKey("btnOk"), + show: function() {dlg.btnYesHide();}, + hide: function(color) { + selectedRGBColor = tinycolor(color).toRgbString(); + selectedColor = tinycolor(color).toHsv(); + dlg.btnYesShow(); + } + }); + } +});hmipRGBWControllerDialog = Class.create({ + initialize: function(title, content, deviceType, chnAddress, value, callback, contentType) + { + showRamptimeOff = false; // This we need among other things for certain COMBINED_PARAMETER help dialogs. + var _this_ = this; + + this.m_contentType = contentType; + this.m_callback = callback; + this.m_layer = document.createElement("div"); + this.m_layer.className = "YesNoDialogLayer"; + + this.RESULT_NO = 0; + this.RESULT_YES = 1; + + this.iface = "HmIP-RF"; + + this.rgbw = "HmIP-RGBW"; + this.drgDali = "HmIP-DRG-DALI"; + this.lss = "HmIP-LSC"; + + this.deviceType = deviceType; + this.chnAddress = chnAddress; + this.initValue = value; + + this.oChannel = DeviceList.getChannelByAddress(this.chnAddress); + + this.maxOnTime = 111600; + + this.valHCL = 10200; + this.valDim2Warm = 10150; + this.ColorTempDefaultMin = 2000; + this.ColorTempDefaultMax = 6500; + + + this.arNoOntimeAvailable = []; + this.showRampTimeOffElm = [this.rgbw, this.drgDali, this.lss]; + + this.chnDescription = homematic("Interface.getParamset", {'interface': this.iface, 'address': this.chnAddress, 'paramsetKey': 'MASTER'}); + this.maxCap = (this.deviceType != this.lss) ? parseInt(this.chnDescription.UNIVERSAL_LIGHT_MAX_CAPABILITIES) : 3; + + + + this.effectModePrg = "unknown"; + + var dialog = document.createElement("div"); + dialog.className = "YesNoDialog"; + + var titleElement = document.createElement("div"); + titleElement.className = "YesNoDialogTitle"; + //titleElement.appendChild(document.createTextNode(title + " " + deviceType + " - " + chnAddress)); + titleElement.appendChild(document.createTextNode(deviceType + " - " + chnAddress)); + titleElement.onmousedown = function(event) { new Drag(this.parentNode, event); }; + dialog.appendChild(titleElement); + + var contentWrapper = document.createElement("div"); + contentWrapper.className = "YesNoDialogContentWrapper"; + + var contentElement = document.createElement("div"); + contentElement.className = "YesNoDialogContent"; + + if (this.m_contentType == "html") { + contentElement.innerHTML = content; + } else { + contentElement.appendChild(document.createTextNode(content)); + } + + contentWrapper.appendChild(contentElement); + + dialog.appendChild(contentWrapper); + + var footer = document.createElement("div"); + footer.className= "YesNoDialogFooter"; + + var yesButton = document.createElement("div"); + yesButton.className = "YesNoDialog_yesButton borderRadius5px colorGradient50px"; + yesButton.appendChild(document.createTextNode(translateKey('dialogYes'))); + yesButton.onclick = function() { _this_.yes(); }; + yesButton.id="btnYes"; + footer.appendChild(yesButton); + + var noButton = document.createElement("div"); + noButton.className = "YesNoDialog_noButton borderRadius5px colorGradient50px"; + noButton.appendChild(document.createTextNode(translateKey('dialogNo'))); + noButton.onclick = function() { _this_.no(); }; + noButton.id = "btnNo"; + footer.appendChild(noButton); + + dialog.appendChild(footer); + + this.m_layer.appendChild(dialog); + Layer.add(this.m_layer); + + translatePage(".YesNoDialog"); + + this.setHeight(); + + this.setDialogElements(); + this.initDialog(); + + }, + + isOntimeAvailable: function() { + return (this.arNoOntimeAvailable.indexOf(this.deviceType) == -1) ? true : false; + }, + + setDialogElements: function() { + var self = this; + this.activeDialog = "color"; // default = color - valid values: color, colorTemp, effect + this.btnColorDialog = jQuery("#dialogColor"); + this.btnColorTempDialog = jQuery("#dialogColorTemp"); + this.btnEffectDialog = jQuery("#dialogEffect"); + + this.anchorColorPicker = jQuery("#anchorColorPicker"); + this.trColor = jQuery(".j_trColor"); + this.trDurationElms = jQuery("[name='trDuration']"); + this.trRampTimeElms = jQuery("[name='trRampTime']"); + this.trRampTimeOff = jQuery("#trRampTimeOff"); + this.levelElm = jQuery("#combinedParam_Level"); + + this.levelFreeValElm = jQuery("#prgDimmerEnterFreeLevel"); + this.divLevelFreeValElm = jQuery("#divLevelEnterFreeValue"); + this.levelFreeValActive = false; + + this.lblBrightnessLevelElm = jQuery("#lblBrightnessLevel"); + this.lblRampTimeElm = jQuery("#lblRampTime"); + this.chkBoxTimeLimitElm = jQuery("#chkBoxTimeLimit"); + this.durationValueElm = jQuery("#combinedParam_DurationValue"); + this.durationUnitElm = jQuery("#combinedParam_DurationUnit"); + this.rampTimeUnitElm = jQuery("#combinedParam_RampTimeUnit"); + this.rampTimeValueElm = jQuery("#combinedParam_RampTimeValue"); + this.rampTimeOffUnitElm = jQuery("#combinedParam_RampTimeOffUnit"); + this.rampTimeOffValueElm = jQuery("#combinedParam_RampTimeOffValue"); + + this.onTimePanel = jQuery(".j_trOnTimePanel"); + + + this.colorPreviewElm = jQuery("#bckGndElm"); + + this.colorPicker; + this.colorPickerInit = {}; // level, hue, saturation + + this.hueElm = jQuery("#hueElm"); + this.satElm = jQuery("#satElm"); + + this.HUE; + this.SATURATION; + + this.lastValHueElm = jQuery("#lastValHue"); + this.lastValSatElm = jQuery("#lastValSat"); + + // TW + this.trTWSlider = jQuery("[name='trTWSlider']"); + this.sliderElm = jQuery("#twSlider"); + this.sliderInfoElm = jQuery("#tcInfoField"); + this.btnHCLElm = jQuery("#btnHCL"); + this.btnDim2WarmElm = jQuery("#btnDim2Warm"); + this.colorTemperature = 0; + + // Effects + this.trEffects = jQuery("[name='trEffects']"); + this.effectSelBox = jQuery("#effectSelBox"); + this.effectModeChkBox = jQuery("#effectModePrg"); + }, + + _getOnTimeVal: function(val, unit) { + var result; + + if (parseInt(val) >= 31 && parseInt(unit) == 2) { + return 0; + } + + if (unit == 0) { + result = val; + } else if (unit == 1) { + result = val * 60; + } else if (unit == 2) { + result = val * 3600; + } + return parseInt(result); + }, + + _getRampTimeVal: function(val, unit) { + var result; + if (unit == 0) { + result = val; + } else if (unit == 1) { + result = parseInt(val * 60); + } else if (unit == 3) { + result = parseFloat(val / 100); + } + return result; + }, + + _getUnitInDU4OnTime: function(time) { + var result = 0, + hr = time / 3600, + min= time / 60; + + if (hr == parseInt(hr)) { + result = 2; + } else if (min == parseInt(min)) { + result = 1; + } + return result; + }, + + _getUnitInDU4RampTime: function(time) { + var t = parseFloat(time), + result = 0, + min = t / 60; + + if (parseInt(time) == 0) { + return 0; + } + + if (min == parseInt(min)) { + result = 1; + } else if ((Number(t) === t) && (t % 1 !== 0)) { + // time in float + result = 3; + } + return result; + }, + + hideOnTimeElems: function() { + jQuery("[name='trRampTime']").first().nextAll().hide(); + this.setHeight(); + }, + + getActiveDialog: function() {return this.activeDialog;}, + + initSubDialogs: function() { + var self = this; + + this.btnColorDialog.click(function() { + JControlBtn.on(jQuery(this)); + JControlBtn.off(jQuery(self.btnColorTempDialog)); + JControlBtn.off(jQuery(self.btnEffectDialog)); + self.trTWSlider.hide(); + self.trEffects.hide(); + self.trRampTimeElms.show(); + self.trColor.show(); + self.onTimePanel.show(); + self.resetHeight(); + self.activeDialog = "color"; + }); + + if ((this.deviceType == this.drgDali) || (this.deviceType == this.rgbw) || (this.deviceType == this.lss)) { + this.btnColorTempDialog.click(function () { + JControlBtn.on(jQuery(this)); + JControlBtn.off(jQuery(self.btnColorDialog)); + JControlBtn.off(jQuery(self.btnEffectDialog)); + self.trColor.hide(); + self.trEffects.hide(); + self.trRampTimeElms.show(); + self.trTWSlider.show(); + self.onTimePanel.show(); + self.resetHeight(); + self.activeDialog = "colorTemp"; + }); + } + + if (this.deviceType == this.drgDali) { + switch (this.maxCap) { + case 2: + this.btnColorDialog.hide(); + this.btnColorTempDialog.click(); + } + } + + if ((this.deviceType == this.rgbw)) { + switch (this.maxCap) { + case 2: + this.btnColorDialog.hide(); + this.btnColorTempDialog.click(); + break; + case 3: + this.btnColorTempDialog.hide(); + this.btnColorDialog.click(); + } + } + + this.btnEffectDialog.click(function() { + JControlBtn.on(jQuery(this)); + JControlBtn.off(jQuery(self.btnColorDialog)); + JControlBtn.off(jQuery(self.btnColorTempDialog)); + self.trRampTimeElms.hide(); + self.trColor.hide(); + self.trTWSlider.hide(); + self.onTimePanel.hide(); + self.trEffects.show(); + self.resetHeight(); + self.activeDialog = "effect"; + }); + }, + + setEffectNames: function() { + var oDevice = DeviceList.getDeviceByAddress(this.chnAddress.split(":")[0]), + effectName, effectNo, + arEffectValue = [0,1,3,5,7,9,11,13,15,17,19]; + + this.effectSelBox.empty().append(""); + for (effectNo = 1; effectNo <= 10; effectNo++) { + effectName = homematic("Interface.getMetadata", {"objectId": oDevice.id, "dataId": "effectName_" + effectNo}); + if ((effectName == "") || (effectName == "null")) {effectName = translateKey("lblEffect") + " " + effectNo;} + this.effectSelBox.append(""); + } + }, + + + setULReffectModePrg: function() { + this.effectModePrg = (jQuery(this.effectModeChkBox).is(":checked")) ? true : false; + homematic("Interface.setMetadata", {"objectId": this.oChannel.id, "dataId": "effectModePrg", "value": this.effectModePrg}); + }, + + + showHideLevelFreeValue: function() { + if (this.levelElm.val() == "99999998") { + this.divLevelFreeValElm.show(); + this.levelFreeValActive = true; + this.setHeight(); + } else { + this.divLevelFreeValElm.hide(); + this.levelFreeValActive = false; + this.setHeight(); + } + + }, + + isLevelValid: function(elm) { + var val = parseInt(elm.value); + if ((isNaN(val) || val < 0)) {val = 0;} else if (val > 100) {val = 100;} + elm.value = val; + }, + + initDialog: function() { + var self = this; + + this.levelElm.change(function() {self.showHideLevelFreeValue();}); + this.levelFreeValElm.blur(function() {self.isLevelValid(this);}); + + var arElmValues, valueL, iValueL, valueDV, valueDVtmp, valueDU, valueRTV, valueRTVtmp, valueRTU, valueC, valueCB, valueRTTOU, valueRTTOV, permanentHR, permanentHR_0, minDuration, maxDuration; + + arElmValues = this.initValue.split(","); + valueL = arElmValues[0].split("=")[1]; + iValueL = parseInt(valueL) / 10; + + + var arElmValues, valueL, valueDV, valueDVtmp, valueDU, valueRTV, valueRTVtmp, valueRTU, valueSlider, valueRTTOU, valueRTTOV, permanentHR, permanentHR_0, minDuration, maxDuration, effect; + + // iValueL !== (iValueL | 0) = check if the value is not 0% - 100% + if ( (iValueL !== (iValueL | 0)) && (valueL != "100.5") && (valueL != "101")) { + this.levelFreeValActive = true; + this.levelFreeValElm.val(valueL); + this.divLevelFreeValElm.show(); + } + + this.initSubDialogs(); + + if (this.isOntimeAvailable()) { + arElmValues = this.initValue.split(","); + + valueL = this.getConfigStringValue("L"); + valueDVtmp = this.getConfigStringValue("OT"); + valueDU = this._getUnitInDU4OnTime(valueDVtmp); + + + this.colorPickerInit.level = parseInt(valueL); + this.colorPickerInit.hue = parseInt(this.getConfigStringValue("H")); + this.colorPickerInit.saturation = parseInt(this.getConfigStringValue("SAT")); + this.colorTemperature = parseInt(this.getConfigStringValue("TC")); + + this.HUE = this.colorPickerInit.hue; + this.SATURATION = this.colorPickerInit.saturation; + + if ((this.colorTemperature == -1) || (this.colorTemperature == 0)) { + if (this.HUE > 360) {this.hueElm.hide();this.hueElm.parent().next().hide();this.lastValHueElm.prop("checked", true);} + if (this.SATURATION > 100) {this.satElm.hide(); this.satElm.parent().next().hide();this.lastValSatElm.prop("checked", true);} + } else { + this.HUE = 0; + this.SATURATION = 0; + this.colorPickerInit.hue = this.HUE; + this.colorPickerInit.saturation = this.SATURATION; + } + + if (valueDU == 2) { + valueDV = parseInt(valueDVtmp / 3600); + } else if (valueDU == 1) { + valueDV = parseInt(valueDVtmp / 60); + } else { + valueDV = valueDVtmp; + } + + //valueRTVtmp = arElmValues[2].split("=")[1]; + valueRTVtmp = this.getConfigStringValue("RT"); + + valueRTU = this._getUnitInDU4RampTime(valueRTVtmp); + + if (valueRTU == 3) { + valueRTV = valueRTVtmp * 100; + } else if (valueRTU == 1) { + valueRTV = parseInt(valueRTVtmp / 60); + } else { + valueRTV = valueRTVtmp; + } + + permanentHR = 31; + permanentHR_0 = 0; + minDuration = 0; + maxDuration = 16343; + } + // RAMPTIME_OFF + + if (arElmValues.length >= 7) { + valueRTTOV = this.getConfigStringValue("RTTOV"); + valueRTTOV = (valueRTTOV == -1 ) ? this.getConfigStringValue("RTTDV") : valueRTTOV; + + valueRTTOU = this.getConfigStringValue("RTTOU"); + valueRTTOU = (valueRTTOU == -1 ) ? this.getConfigStringValue("RTTDU") : valueRTTOU; + + this.rampTimeOffUnitElm.val(valueRTTOU); + this.rampTimeOffValueElm.val(valueRTTOV); + } + + if (this.levelFreeValActive) { + this.levelElm.val("99999998"); + } else { + this.levelElm.val(valueL); + } + + this.durationValueElm.val(valueDV); + this.durationUnitElm.val(valueDU); + + this.rampTimeUnitElm.val(valueRTU); + this.rampTimeValueElm.val(valueRTV); + + this.hueElm.val(this.HUE); + this.satElm.val(this.SATURATION); + + if ((this.durationValueElm.val() == permanentHR && this.durationUnitElm.val() == 2) || (this.isOntimeAvailable() && valueDV == 0)) { + this.chkBoxTimeLimitElm.prop("checked", false); + this.durationValueElm.prop('disabled', true); + this.durationUnitElm.prop('disabled', true); + this.trDurationElms.css("visibility", "visible"); + this.trRampTimeElms.css("visibility", "visible"); + this.trDurationElms.css("opacity", "0.2"); + if (this.showRampTimeOffElm.indexOf(this.deviceType) != -1) { + this.trRampTimeOff.css("visibility", "visible").css("opacity", "0.2"); + showRamptimeOff = true; + } + } else { + this.chkBoxTimeLimitElm.prop("checked", true); + this.durationValueElm.prop('disabled', false); + this.durationUnitElm.prop('disabled', false); + this.trDurationElms.css("visibility", "visible"); + this.trRampTimeElms.css("visibility", "visible"); + if (this.showRampTimeOffElm.indexOf(this.deviceType) != -1) { + this.trRampTimeOff.css("visibility", "visible"); + showRamptimeOff = true; + } + } + + this.chkBoxTimeLimitElm.bind("change", function() { + if (this.checked) { + self.durationValueElm.prop('disabled', false); + self.durationUnitElm.prop('disabled', false); + self.trDurationElms.fadeTo(1000, 1); + self.trRampTimeElms.fadeTo(1000, 1); + if (self.showRampTimeOffElm.indexOf(self.deviceType) != -1) { + self.trRampTimeOff.fadeTo(1000,1); + } + } else { + self.durationValueElm.prop('disabled', true); + self.durationUnitElm.prop('disabled', true); + self.rampTimeValueElm.prop('disabled', false); //.val(0); + self.rampTimeUnitElm.prop('disabled', false); //.val(0); + self.trDurationElms.fadeTo(1000, 0.2); + self.trRampTimeElms.fadeTo(1000, 1); + + if (self.showRampTimeOffElm.indexOf(self.deviceType) != -1) { + self.trRampTimeOff.fadeTo(1000,0.2); + } + + if (self.isOntimeAvailable()) { + self.durationValueElm.val(permanentHR_0); + } else { + self.durationValueElm.val(permanentHR); + self.rampTimeOffUnitElm.val(3); + self.rampTimeOffValueElm.val(0); + } + self.durationUnitElm.val(2); + } + }); + + this.durationValueElm.bind("keyup", function() { + var min = minDuration, + max = (parseInt(self.durationUnitElm.val()) == 2) ? permanentHR: maxDuration; + this.value = self.checkValidity(this.value,min,max); + if (parseInt(this.value) == 31) { + self.rampTimeOffValueElm.val(min); + self.rampTimeOffUnitElm.val(3); // = 10ms + } + }); + + this.durationValueElm.bind("blur", function() { + var val = parseInt(this.value); + + if (isNaN(val)) { + this.value = (parseInt(self.durationUnitElm.val()) == 2) ? permanentHR : maxDuration; + } else { + this.value = val; + } + self.durationValueElm.keyup(); + }); + + this.durationUnitElm.bind("change", function(){ + self.durationValueElm.keyup(); + }); + + this.rampTimeValueElm.bind("keyup", function() { + var min = minDuration, + max = maxDuration; + this.value = self.checkValidity(this.value,min,max); + }); + + this.rampTimeValueElm.bind("blur", function() { + var val = parseInt(this.value); + + if (isNaN(val)) { + this.value = maxDuration; + } else { + this.value = val; + } + }); + + this.rampTimeUnitElm.bind("change", function(){ + self.rampTimeValueElm.keyup(); + }); + + /**********************/ + this.rampTimeOffValueElm.bind("keyup", function() { + var min = minDuration, + max = maxDuration; + this.value = self.checkValidity(this.value,min,max); + }); + + this.rampTimeOffValueElm.bind("blur", function() { + var val = parseInt(this.value); + + if (isNaN(val)) { + this.value = maxDuration; + } else { + this.value = (parseInt(self.durationValueElm.val()) <= 30) ? val : minDuration; + if (parseInt(self.durationValueElm.val()) >= 31) { + self.rampTimeOffUnitElm.val(3); // 10ms + } + } + }); + + this.rampTimeUnitElm.bind("change", function(){ + self.rampTimeOffValueElm.keyup(); + }); + + this.hueElm.keyup(function(event) { + var val; + if (event.keyCode == 13) { + val = parseInt(jQuery(this).val()); + if (val < 0 || isNaN(val)) {self.HUE = 0;} else if (val > 360) {self.HUE = 360;} else {self.HUE = val;}; + jQuery(this).val(self.HUE); + self.colorPicker.color.hsv = {h: self.HUE, s: self.SATURATION, v: 0}; + self.setColorPreviewElm(self.HUE, self.SATURATION); + + // Set the TW slider to -- + self.resetColorTemp(); + } + }); + + this.hueElm.blur(function(event) { + var val; + val = parseInt(jQuery(this).val()); + if (val < 0 || isNaN(val)) {self.HUE = 0;} else if (val > 360) {self.HUE = 360;} else {self.HUE = val;}; + jQuery(this).val(self.HUE); + self.colorPicker.color.hsv = {h: self.HUE, s: self.SATURATION, v: 0}; + self.setColorPreviewElm(self.HUE, self.SATURATION); + + // Set the TW slider to -- + self.resetColorTemp(); + }); + + + this.satElm.keyup(function(event) { + var val; + if (event.keyCode == 13) { + val = parseInt(jQuery(this).val()); + if (val < 0 || isNaN(val)) {self.SATURATION = 0;} else if (val > 100) {self.SATURATION = 100;} else {self.SATURATION = val;}; + jQuery(this).val(parseInt(self.SATURATION)); + self.colorPicker.color.hsv = {h: self.HUE, s: self.SATURATION, v: 0}; + self.setColorPreviewElm(self.HUE, self.SATURATION); + + // Set the TW slider to -- + self.resetColorTemp(); + } + }); + + this.satElm.blur(function(event) { + var val; + val = parseInt(jQuery(this).val()); + if (val < 0 || isNaN(val)) {self.SATURATION = 0;} else if (val > 100) {self.SATURATION = 100;} else {self.SATURATION = val;}; + jQuery(this).val(parseInt(self.SATURATION)); + self.colorPicker.color.hsv = {h: self.HUE, s: self.SATURATION, v: 0}; + self.setColorPreviewElm(self.HUE, self.SATURATION); + + // Set the TW slider to -- + self.resetColorTemp(); + }); + /**********************/ + + this.showHideColorPicker(); + + this.lastValHueElm.click(function() { + var selected = jQuery(this).prop("checked"); + + self.showHideColorPicker(); + + if (selected) { + self.HUE = 361; + self.hueElm.val(self.HUE); + self.hueElm.hide();self.hueElm.parent().next().hide(); + self.resetColorTemp(); + } else { + self.HUE = 0; + self.hueElm.val(self.HUE); + self.hueElm.show();self.hueElm.parent().next().show(); + self.colorPicker.color.hsv = {h: self.HUE, s: 100, v: 100}; + } + self.freezeColorTemp(); + self.setColorPreviewElm(self.HUE, 100); + self.resetHeight(); + }); + + this.lastValSatElm.click(function() { + var selected = jQuery(this).prop("checked"); + + self.showHideColorPicker(); + + if (selected) { + self.SATURATION = 101; + self.satElm.val(self.SATURATION); + self.satElm.hide();self.satElm.parent().next().hide(); + self.colorPicker.color.hsv = {h: self.HUE, s: 100, v: 100}; + self.resetColorTemp(); + } else { + self.SATURATION = 100; + self.satElm.val(self.SATURATION); + self.satElm.show();self.satElm.parent().next().show(); + self.colorPicker.color.hsv = {h: self.HUE, s: 100, v: 100}; + } + self.freezeColorTemp(); + self.setColorPreviewElm(self.HUE, 100); + self.resetHeight(); + }); + + // TW Slider + + this.btnHCLElm.bind("click", function() { + JControlBtn.on(jQuery(this)); + JControlBtn.off(jQuery(self.btnDim2WarmElm)); + window.setTimeout(function() {jQuery(".ui-slider-handle").removeClass("ui-state-active");},100); + self.colorTemperature = self.valHCL; + self.sliderInfoElm.val("--"); + self.sliderElm.slider('value', 0); + self.resetColorPicker(); + }); + + this.btnDim2WarmElm.bind("click", function() { + JControlBtn.on(jQuery(this)); + JControlBtn.off(jQuery(self.btnHCLElm)); + window.setTimeout(function() {jQuery(".ui-slider-handle").removeClass("ui-state-active");},100); + self.colorTemperature = self.valDim2Warm; + self.sliderInfoElm.val("--"); + self.sliderElm.slider('value', 0); + self.resetColorPicker(); + }); + + // TW Slider + //var tcValueElm = this.getConfigStringValue("TC"); + this.sliderElm.slider(this.getSliderOpts()); + + valueSlider = parseInt(this.getConfigStringValue("TC")); + valueSlider = (valueSlider != -1) ? valueSlider : 0; + + this.sliderInfoElm.val((valueSlider == 0) ? "--" : valueSlider); + this.sliderElm.val(valueSlider); + this.sliderElm.slider('value', (valueSlider > 10100) ? 0 : valueSlider); + this.colorTemperature = valueSlider; + + this.sliderElm.on("slide", function (event, ui) { + self.sliderInfoElm.val(ui.value); + }); + + this.sliderElm.on("slidestop", function(event, ui){ + JControlBtn.off(jQuery(self.btnDim2WarmElm)); + JControlBtn.off(jQuery(self.btnHCLElm)); + window.setTimeout(function() {jQuery(".ui-slider-handle").addClass("ui-state-active");},100); + self.colorTemperature = ui.value; + + // Set Hue and Saturation to 0 + self.resetColorPicker(); + + }); + + if ((valueSlider > 0) && (valueSlider < 10000)) {jQuery(".ui-slider-handle").addClass("ui-state-active");} else {jQuery(".ui-slider-handle").removeClass("ui-state-active");} + if (valueSlider == this.valHCL) {jQuery(".ui-slider-handle").removeClass("ui-state-active"); JControlBtn.on(this.btnHCLElm);this.sliderInfoElm.val("--");} + if (valueSlider == this.valDim2Warm) {jQuery(".ui-slider-handle").removeClass("ui-state-active"); JControlBtn.on(this.btnDim2WarmElm);this.sliderInfoElm.val("--");} + this.TWEvents = jQuery("[name='trTWSlider']").css("pointer-events"); + + // Effects + effect = parseInt(this.getConfigStringValue("E")); + + if (effect % 2 == 0) { + this.effectModePrg = true; + homematic("Interface.setMetadata", {"objectId": this.oChannel.id, "dataId": "effectModePrg", "value": this.effectModePrg}); + this.effectModeChkBox.prop("checked", true); + effect = (effect - 1); + } else { + this.effectModePrg = false; + this.effectModeChkBox.prop("checked", false); + } + + effect = (effect != -1) ? effect : 0; // 0 = default (No Effect) + this.setEffectNames(); + + this.effectSelBox.val(effect); + + // Show the appropriate dialog (Color, Color Temp, Effect) + if ((effect != 0) || ((valueL == 0) && (arElmValues.length == 1))) { + this.btnEffectDialog.click(); + } else if (parseInt(this.getConfigStringValue("TC")) > 0) { + this.btnColorTempDialog.click(); + } else { + if ((this.deviceType == this.lss) && (this.initValue.includes("TC="))) { // + this.btnColorTempDialog.click(); + } else { + this.btnColorDialog.click(); + } + } + + }, + + initColorPickerEvents: function() { + var self = this; + this.colorPicker.on("mount", function(color) { + self.setColorPreviewElm(self.colorPickerInit.hue, self.colorPickerInit.saturation); + }); + + this.colorPicker.on("input:end", function(color) { + var hsv_H = parseInt(color.hsv.h), + hsv_S, + hsv_S_Percent = parseInt(color.hsv.s); + + self.hueElm.val(hsv_H); + self.HUE = hsv_H; + + self.satElm.val(hsv_S_Percent); + self.SATURATION = hsv_S_Percent; + + self.setColorPreviewElm(color.hsv.h, color.hsv.s); + + // Set the TW slider to -- + self.resetColorTemp(); + + }); + }, + + resetColorPicker: function() { + // Set Hue and Saturation to 0 + this.hueElm.val(0); this.HUE = 0; + this.satElm.val(0); this.SATURATION = 0; + this.colorPicker.color.hsv = {h: this.HUE, s: this.SATURATION, v: 0}; + this.setColorPreviewElm(this.HUE, this.SATURATION); + }, + + resetColorTemp: function() { + JControlBtn.off(jQuery(this.btnHCLElm)); + JControlBtn.off(jQuery(this.btnDim2WarmElm)); + window.setTimeout(function() {jQuery(".ui-slider-handle").removeClass("ui-state-active");},100); + this.colorTemperature = 0; + this.sliderInfoElm.val("--"); + this.sliderElm.val(this.colorTemperature); + this.sliderElm.slider('value', this.colorTemperature); + }, + + freezeColorTemp: function() { + if ((this.HUE == 361) || (this.SATURATION == 101)) { + this.trTWSlider.css("pointer-events","none"); // freeze the tw slider + } else { + this.trTWSlider.css("pointer-events",this.TWEvents); // unfreeze the tw slider + } + }, + + getHSVColorPicker: function() { + var self = this; + jQuery("#anchorColorPicker").html(""); + + this.colorPicker = new iro.ColorPicker("#anchorColorPicker", { + // Set the size of the color picker + width: 90, + color: {h: self.colorPickerInit.hue, s: self.colorPickerInit.saturation, v: self.colorPickerInit.level}, + wheelLightness: false, // If set to false, the color wheel will not fade to black when the lightness decreases. + layout: [{component: iro.ui.Wheel}], // don't show the V slider below the wheel - this value comes from the dimmer slider + handleRadius: 4 + } + ); + this.initColorPickerEvents(); + }, + + getHSVColorSlider: function() { + var self = this; + jQuery("#anchorColorPicker").html(""); + + this.colorPicker = new iro.ColorPicker("#anchorColorPicker", { + width: 90, + sliderSize: 20, // height + color: {h: self.colorPickerInit.hue, s: 100, v: 100}, + handleSvg: '#handle', + layout: [ + { + component: iro.ui.Slider, + options: { + sliderType: 'hue', + edgeRadius: 0 + } + } + ] + }); + this.initColorPickerEvents(); + }, + + getSliderOpts: function() { + var opts = {}; + opts.animate = "fast"; + opts.min = parseInt(this.chnDescription.HARDWARE_COLOR_TEMPERATURE_WARM_WHITE); + opts.min = (!isNaN(opts.min)) ? opts.min : this.ColorTempDefaultMin; + opts.max = parseInt(this.chnDescription.HARDWARE_COLOR_TEMPERATURE_COLD_WHITE); + opts.max = (!isNaN(opts.max)) ? opts.max : this.ColorTempDefaultMax; + opts.value = ((opts.max - opts.min) / 2); + opts.step = 50; + opts.orientation = "horizontal"; + return opts; + }, + + showHideColorPicker: function () { + var hueLastValue = this.lastValHueElm.prop("checked"), + satLastValue = this.lastValSatElm.prop("checked"); + + if (hueLastValue && satLastValue) { + this.anchorColorPicker.hide(); + this.colorPreviewElm.hide(); + } else if (hueLastValue && ! satLastValue) { + this.anchorColorPicker.hide(); + this.colorPreviewElm.hide(); + } else if (! hueLastValue && satLastValue) { + this.getHSVColorSlider(); + this.anchorColorPicker.show(); + this.colorPreviewElm.show(); + } else { + this.getHSVColorPicker(); + this.anchorColorPicker.show(); + this.colorPreviewElm.show(); + } + this.resetHeight(); + }, + + setColorPreviewElm: function(hue, sat) { + var rgbVal; + rgbVal = hsvToRgb(hue, sat, 100); + this.colorPreviewElm.css("background-color", "rgb("+rgbVal.r+","+rgbVal.g+","+rgbVal.b+")"); + }, + + checkValidity: function(val, min, max) { + var result = val; + if (val == "") {result = "";} + + if (parseInt(val) < 0) {result = min;} + if (parseInt(val) > max) {result = max;} + return result; + }, + + getConfigString: function() { + var self = this, + result, + level, + durationUnit = (this.chkBoxTimeLimitElm.prop("checked") == false) ? 2 : this.durationUnitElm.val(), // 2 = unit hour + durationValue = (this.chkBoxTimeLimitElm.prop("checked") == false) ? 31 : this.durationValueElm.val(), + ramptimeUnit = this.rampTimeUnitElm.val(), + ramptimeValue = this.rampTimeValueElm.val(), + lastValueHueSelected = this.lastValHueElm.prop("checked"), + lastValueSatSelected = this.lastValSatElm.prop("checked"), + hueValue = (lastValueHueSelected || (this.colorTemperature > 0)) ? 361 : this.HUE, + satValue = (lastValueSatSelected || (this.colorTemperature > 0)) ? 101 : this.SATURATION, + colorTemperature = this.colorTemperature, + tempColorID = "", + effectID = "", + effect = parseInt(this.effectSelBox.val()), + activeDialog = "color"; + + level = (this.levelFreeValActive) ? this.levelFreeValElm.val() : this.levelElm.val(); + + this.setULReffectModePrg(); + + effect = (this.effectModePrg == true) ? (effect + 1) : effect; + + if ((this.deviceType == this.drgDali) || (this.deviceType == this.lss) || ((this.deviceType == this.rgbw) && ((this.maxCap == 2) || (this.maxCap == 4)))) { + tempColorID = ",TC=" + colorTemperature; + effectID = ",E=" + effect; + } + + if (this.btnColorTempDialog.hasClass("ControlBtnOn")) { + activeDialog = "colorTemp"; + } else if (this.btnEffectDialog.hasClass("ControlBtnOn")) { + activeDialog = "effect"; + if (effect == 0) { + result = "L=0"; + } else { + result = "L=" + level + ",E=" + effect; + } + return result; + } + + if (this.isOntimeAvailable()) { + + if (this.chkBoxTimeLimitElm.prop("checked") == false) { + var _rampTimeValue = parseInt(this._getRampTimeVal(ramptimeValue, ramptimeUnit)); + + if (_rampTimeValue > 0) { + if (this.deviceType == this.lss) { + if (this.getActiveDialog() == "color") { + result = "L=" + level + ",OT=" + this.maxOnTime + ",RT=" + _rampTimeValue + ",H=" + hueValue + ",SAT=" + satValue; + } else { + // This is for the HmIP-LSS colorTemp + result = "L=" + level + ",OT=" + this.maxOnTime + ",RT=" + _rampTimeValue; + } + } else { + result = "L=" + level + ",OT=" + this.maxOnTime + ",RT=" + _rampTimeValue + ",H=" + hueValue + ",SAT=" + satValue; + } + } else { + if (this.deviceType == this.lss) { + if (this.getActiveDialog() == "color") { + result = "L=" + level + ",OT=0,RT=0,H=" + hueValue + ",SAT=" + satValue; + } else { + // this ist for the HmIP-LSS color temp + result = "L=" + level + ",OT=0,RT=0"; + } + } else { + result = "L=" + level + ",OT=0,RT=0,H=" + hueValue + ",SAT=" + satValue; + } + } + + } else { + if (durationValue == 0) { + + if (this.deviceType == this.lss) { + if (this.getActiveDialog() == "color") { + result = "L=" + level + ",OT=" + this._getOnTimeVal(durationValue, durationUnit) + ",RT=0,H=" + hueValue + ",SAT=" + satValue; + } else { + // this ist for the HmIP-LSS color temp + result = "L=" + level + ",OT=" + this._getOnTimeVal(durationValue, durationUnit) + ",RT=0"; + } + } else { + result = "L=" + level + ",OT=" + this._getOnTimeVal(durationValue, durationUnit) + ",RT=0,H=" + hueValue + ",SAT=" + satValue; + } + } else { + if (this.deviceType == this.lss) { + if (this.getActiveDialog() == "color") { + result = "L=" + level + ",OT=" + this._getOnTimeVal(durationValue, durationUnit) + ",RT=" + this._getRampTimeVal(ramptimeValue, ramptimeUnit) + ",H=" + hueValue + ",SAT=" + satValue; + } else { + // this ist for the HmIP-LSS color temp + result = "L=" + level + ",OT=" + this._getOnTimeVal(durationValue, durationUnit) + ",RT=" + this._getRampTimeVal(ramptimeValue, ramptimeUnit); + } + } else { + result = "L=" + level + ",OT=" + this._getOnTimeVal(durationValue, durationUnit) + ",RT=" + this._getRampTimeVal(ramptimeValue, ramptimeUnit) + ",H=" + hueValue + ",SAT=" + satValue; + } + } + } + } else { + result = "L=" + level + ",DV=" + durationValue + ",DU=" + durationUnit + ",RTV=" + ramptimeValue + ",RTU=" + ramptimeUnit + ",H=" + hueValue + ",SAT=" + satValue; + } + + jQuery.each(this.showRampTimeOffElm, function(index, val) { + if (self.deviceType == val) { + return false; // leave each loop + } + }); + + if (showRamptimeOff) { + result += ",RTTOV=" + this.rampTimeOffValueElm.val() + ",RTTOU=" + this.rampTimeOffUnitElm.val(); + } + + if ((this.deviceType == this.drgDali) || ((this.deviceType == this.lss) && (this.getActiveDialog() == "colorTemp")) || ((this.deviceType == this.rgbw) && ((this.maxCap == 2) || (this.maxCap == 4)))) { + result += tempColorID; + } + + return result; + }, + + // Get the value of a given shortcut of the config string + // Example config string > "L=100,OT=0,RT=0,H=0,SAT=0,RTTOV=0,RTTOU=0,TC=10150" + getConfigStringValue: function(sShortCut) { + var arElmValues = this.initValue.split(","), + result = "-1", arKey; + + jQuery.each(arElmValues, function(index,val) { + arKey = val.split("="); + if (arKey[0] == sShortCut) { + result = arKey[1]; + } + }); + return (result == -1) ? 0 : result; + }, + + close: function(result) + { + Layer.remove(this.m_layer); + if (this.m_callback) { this.m_callback(result); } + if (showRamptimeOff) {window.setTimeout(function() {delete showRamptimeOff;},100);} + }, + + yes: function() + { + this.close(YesNoDialog.RESULT_YES); + }, + + no: function() + { + this.close(YesNoDialog.RESULT_NO); + }, + + btnTextYes: function(btnTxt) { + jQuery(".YesNoDialog_yesButton").text(btnTxt); + }, + + btnYesHide: function() { + jQuery("#btnYes").addClass("hidden"); + }, + + btnYesShow: function() { + jQuery("#btnYes").removeClass("hidden"); + }, + + btnTextNo: function(btnTxt) { + jQuery(".YesNoDialog_noButton").text(btnTxt); + }, + + btnNoHide: function() { + jQuery("#btnNo").addClass("hidden"); + }, + + btnNoShow: function() { + jQuery("#btnNo").removeClass("hidden"); + }, + + setHeight: function() { + var heightContentWrapper = jQuery(".YesNoDialogContentWrapper").height(), + yesNoElm = jQuery(".YesNoDialog"), + footerElm = jQuery(".YesNoDialogFooter"); + + yesNoElm.css("height", heightContentWrapper + 78); + footerElm.css("top", heightContentWrapper + 26); + yesNoElm.css("top", (window.innerHeight / 2) - (yesNoElm.height() / 2)); + }, + + resetHeight: function() { + this.setHeight(); + }, + + setWidth: function(dlgWidth) { + var yesNoDialogElm = jQuery(".YesNoDialog"), + yesNoDialogContentWrapperElm = jQuery(".YesNoDialogContentWrapper"), + yesNoDialogFooterElm = jQuery(".YesNoDialogFooter"), + yesNoDialogTitleElm = jQuery(".YesNoDialogTitle"), + yesNoDialogYesButton = jQuery(".YesNoDialog_yesButton"); + + var defaultWith = 600, + offsetWidth = 4, + offsetPosYesButton = 109, + offsetDialogHeight = 78, + offsetDialogFooterHeight = 26; + + var width = dlgWidth - offsetWidth, + yesButtonPos = dlgWidth - offsetPosYesButton, + position = yesNoDialogElm.position(); + + // dlgWidth = (defaultWith < dlgWidth) ? defaultWith : dlgWidth; + + yesNoDialogElm.width(dlgWidth).css({left: position.left + ((defaultWith - dlgWidth) / 2)}); + yesNoDialogTitleElm.width(width); + yesNoDialogContentWrapperElm.width(width); + yesNoDialogFooterElm.width(width); + yesNoDialogYesButton.css("left", yesButtonPos); + + //Dialoghöhe an Content anpassen. + yesNoDialogElm.css("height", yesNoDialogContentWrapperElm.height() + offsetDialogHeight); + yesNoDialogFooterElm.css("top", yesNoDialogContentWrapperElm.height() + offsetDialogFooterHeight); + } + +});RGBWTunableWhiteControllerDialog = Class.create({ + initialize: function(title, content, deviceType, chnAddress, value, callback, contentType) + { + showRamptimeOff = false; // This we need among other things for certain COMBINED_PARAMETER help dialogs. + var _this_ = this; + + this.m_contentType = contentType; + this.m_callback = callback; + this.m_layer = document.createElement("div"); + this.m_layer.className = "YesNoDialogLayer"; + + this.RESULT_NO = 0; + this.RESULT_YES = 1; + + this.iFace = "HmIP-RF"; + + this.deviceType = deviceType; + this.chnAddress = chnAddress; + this.initValue = value; + + this.maxOnTime = 111600; + + this.valHCL = 10200; + this.valDim2Warm = 10150; + + this.arNoOntimeAvailable = []; + this.showRampTimeOffElm = ["HmIP-RGBW", "HmIP-DRG-DALI"]; + + var dialog = document.createElement("div"); + dialog.className = "YesNoDialog"; + + var titleElement = document.createElement("div"); + titleElement.className = "YesNoDialogTitle"; + //titleElement.appendChild(document.createTextNode(title + " " + deviceType + " - " + chnAddress)); + titleElement.appendChild(document.createTextNode(deviceType + " - " + chnAddress)); + titleElement.onmousedown = function(event) { new Drag(this.parentNode, event); }; + dialog.appendChild(titleElement); + + var contentWrapper = document.createElement("div"); + contentWrapper.className = "YesNoDialogContentWrapper"; + + var contentElement = document.createElement("div"); + contentElement.className = "YesNoDialogContent"; + + if (this.m_contentType == "html") { + contentElement.innerHTML = content; + } else { + contentElement.appendChild(document.createTextNode(content)); + } + + contentWrapper.appendChild(contentElement); + + dialog.appendChild(contentWrapper); + + var footer = document.createElement("div"); + footer.className= "YesNoDialogFooter"; + + var yesButton = document.createElement("div"); + yesButton.className = "YesNoDialog_yesButton borderRadius5px colorGradient50px"; + yesButton.appendChild(document.createTextNode(translateKey('dialogYes'))); + yesButton.onclick = function() { _this_.yes(); }; + yesButton.id="btnYes"; + footer.appendChild(yesButton); + + var noButton = document.createElement("div"); + noButton.className = "YesNoDialog_noButton borderRadius5px colorGradient50px"; + noButton.appendChild(document.createTextNode(translateKey('dialogNo'))); + noButton.onclick = function() { _this_.no(); }; + noButton.id = "btnNo"; + footer.appendChild(noButton); + + dialog.appendChild(footer); + + this.m_layer.appendChild(dialog); + Layer.add(this.m_layer); + + translatePage(".YesNoDialog"); + + this.setHeight(); + + this.setDialogElements(); + this.initDialog(); + + }, + + isOntimeAvailable: function() { + return (this.arNoOntimeAvailable.indexOf(this.deviceType) == -1) ? true : false; + }, + + setDialogElements: function() { + var self = this; + this.trDurationElms = jQuery("[name='trDuration']"); + this.trRampTimeElms = jQuery("[name='trRampTime']"); + this.trRampTimeOff = jQuery("#trRampTimeOff"); + this.levelElm = jQuery("#combinedParam_Level"); + this.lblBrightnessLevelElm = jQuery("#lblBrightnessLevel"); + this.lblRampTimeElm = jQuery("#lblRampTime"); + this.chkBoxTimeLimitElm = jQuery("#chkBoxTimeLimit"); + this.durationValueElm = jQuery("#combinedParam_DurationValue"); + this.durationUnitElm = jQuery("#combinedParam_DurationUnit"); + this.rampTimeUnitElm = jQuery("#combinedParam_RampTimeUnit"); + this.rampTimeValueElm = jQuery("#combinedParam_RampTimeValue"); + this.rampTimeOffUnitElm = jQuery("#combinedParam_RampTimeOffUnit"); + this.rampTimeOffValueElm = jQuery("#combinedParam_RampTimeOffValue"); + + this.sliderElm = jQuery("#twSlider"); + this.sliderInfoElm = jQuery("#tcInfoField"); + this.btnHCLElm = jQuery("#btnHCL"); + this.btnDim2WarmElm = jQuery("#btnDim2Warm"); + this.colorTemperature = 0; + + }, + + _getOnTimeVal: function(val, unit) { + var result; + + if (parseInt(val) >= 31 && parseInt(unit) == 2) { + return 0; + } + + if (unit == 0) { + result = val; + } else if (unit == 1) { + result = val * 60; + } else if (unit == 2) { + result = val * 3600; + } + return parseInt(result); + }, + + _getRampTimeVal: function(val, unit) { + var result; + if (unit == 0) { + result = val; + } else if (unit == 1) { + result = parseInt(val * 60); + } else if (unit == 3) { + result = parseFloat(val / 100); + } + return result; + }, + + _getUnitInDU4OnTime: function(time) { + var result = 0, + hr = time / 3600, + min= time / 60; + + if (hr == parseInt(hr)) { + result = 2; + } else if (min == parseInt(min)) { + result = 1; + } + return result; + }, + + _getUnitInDU4RampTime: function(time) { + var t = parseFloat(time), + result = 0, + min = t / 60; + + if (parseInt(time) == 0) { + return 0; + } + + if (min == parseInt(min)) { + result = 1; + } else if ((Number(t) === t) && (t % 1 !== 0)) { + // time in float + result = 3; + } + return result; + }, + + hideOnTimeElems: function() { + jQuery("[name='trRampTime']").first().nextAll().hide(); + this.setHeight(); + }, + + + initDialog: function() { + var self = this; + + var arElmValues, valueL, valueDV, valueDVtmp, valueDU, valueRTV, valueRTVtmp, valueRTU, valueC, valueSlider, valueRTTOU, valueRTTOV, permanentHR, permanentHR_0, minDuration, maxDuration; + + if (this.isOntimeAvailable()) { + arElmValues = this.initValue.split(","); + + valueL = arElmValues[0].split("=")[1]; + valueDVtmp = arElmValues[1].split("=")[1]; + valueDU = this._getUnitInDU4OnTime(valueDVtmp); + + valueSlider = parseInt(arElmValues[3].split("=")[1]); + + if (valueDU == 2) { + valueDV = parseInt(valueDVtmp / 3600); + } else if (valueDU == 1) { + valueDV = parseInt(valueDVtmp / 60); + } else { + valueDV = valueDVtmp; + } + + valueRTVtmp = arElmValues[2].split("=")[1]; + + valueRTU = this._getUnitInDU4RampTime(valueRTVtmp); + + if (valueRTU == 3) { + valueRTV = valueRTVtmp * 100; + } else if (valueRTU == 1) { + valueRTV = parseInt(valueRTVtmp / 60); + } else { + valueRTV = valueRTVtmp; + } + + valueC = 7; + permanentHR = 31; + permanentHR_0 = 0; + minDuration = 0; + maxDuration = 16343; + } + // RAMPTIME_OFF + if (arElmValues.length >= 6) { + valueRTTOV = arElmValues[4].split("=")[1]; + valueRTTOU = arElmValues[5].split("=")[1]; + this.rampTimeOffUnitElm.val(valueRTTOU); + this.rampTimeOffValueElm.val(valueRTTOV); + } + + this.levelElm.val(valueL); + this.durationValueElm.val(valueDV); + this.durationUnitElm.val(valueDU); + + this.rampTimeUnitElm.val(valueRTU); + this.rampTimeValueElm.val(valueRTV); + + if ((this.durationValueElm.val() == permanentHR && this.durationUnitElm.val() == 2) || (this.isOntimeAvailable() && valueDV == 0)) { + this.chkBoxTimeLimitElm.prop("checked", false); + this.durationValueElm.prop('disabled', true); + this.durationUnitElm.prop('disabled', true); + this.trDurationElms.css("visibility", "visible"); + this.trRampTimeElms.css("visibility", "visible"); + this.trDurationElms.css("opacity", "0.2"); + if (this.showRampTimeOffElm.indexOf(this.deviceType) != -1) { + this.trRampTimeOff.css("visibility", "visible").css("opacity", "0.2"); + showRamptimeOff = true; + } + } else { + this.chkBoxTimeLimitElm.prop("checked", true); + this.durationValueElm.prop('disabled', false); + this.durationUnitElm.prop('disabled', false); + this.trDurationElms.css("visibility", "visible"); + this.trRampTimeElms.css("visibility", "visible"); + if (this.showRampTimeOffElm.indexOf(this.deviceType) != -1) { + this.trRampTimeOff.css("visibility", "visible"); + showRamptimeOff = true; + } + } + + this.chkBoxTimeLimitElm.bind("change", function() { + if (this.checked) { + self.durationValueElm.prop('disabled', false); + self.durationUnitElm.prop('disabled', false); + self.trDurationElms.fadeTo(1000, 1); + self.trRampTimeElms.fadeTo(1000, 1); + if (self.showRampTimeOffElm.indexOf(self.deviceType) != -1) { + self.trRampTimeOff.fadeTo(1000,1); + } + } else { + self.durationValueElm.prop('disabled', true); + self.durationUnitElm.prop('disabled', true); + self.rampTimeValueElm.prop('disabled', false); //.val(0); + self.rampTimeUnitElm.prop('disabled', false); //.val(0); + self.trDurationElms.fadeTo(1000, 0.2); + self.trRampTimeElms.fadeTo(1000, 1); + + if (self.showRampTimeOffElm.indexOf(self.deviceType) != -1) { + self.trRampTimeOff.fadeTo(1000,0.2); + } + + if (self.isOntimeAvailable()) { + self.durationValueElm.val(permanentHR_0); + } else { + self.durationValueElm.val(permanentHR); + self.rampTimeOffUnitElm.val(3); + self.rampTimeOffValueElm.val(0); + } + self.durationUnitElm.val(2); + } + }); + + this.durationValueElm.bind("keyup", function() { + var min = minDuration, + max = (parseInt(self.durationUnitElm.val()) == 2) ? permanentHR: maxDuration; + this.value = self.checkValidity(this.value,min,max); + if (parseInt(this.value) == 31) { + self.rampTimeOffValueElm.val(min); + self.rampTimeOffUnitElm.val(3); // = 10ms + } + }); + + this.durationValueElm.bind("blur", function() { + var val = parseInt(this.value); + + if (isNaN(val)) { + this.value = (parseInt(self.durationUnitElm.val()) == 2) ? permanentHR : maxDuration; + } else { + this.value = val; + } + self.durationValueElm.keyup(); + }); + + this.durationUnitElm.bind("change", function(){ + self.durationValueElm.keyup(); + }); + + this.rampTimeValueElm.bind("keyup", function() { + var min = minDuration, + max = maxDuration; + this.value = self.checkValidity(this.value,min,max); + }); + + this.rampTimeValueElm.bind("blur", function() { + var val = parseInt(this.value); + + if (isNaN(val)) { + this.value = maxDuration; + } else { + this.value = val; + } + }); + + this.rampTimeUnitElm.bind("change", function(){ + self.rampTimeValueElm.keyup(); + }); + + /**********************/ + this.rampTimeOffValueElm.bind("keyup", function() { + var min = minDuration, + max = maxDuration; + this.value = self.checkValidity(this.value,min,max); + }); + + this.rampTimeOffValueElm.bind("blur", function() { + var val = parseInt(this.value); + + if (isNaN(val)) { + this.value = maxDuration; + } else { + this.value = (parseInt(self.durationValueElm.val()) <= 30) ? val : minDuration; + if (parseInt(self.durationValueElm.val()) >= 31) { + self.rampTimeOffUnitElm.val(3); // 10ms + } + } + }); + + this.rampTimeUnitElm.bind("change", function(){ + self.rampTimeOffValueElm.keyup(); + }); + /**********************/ + + this.btnHCLElm.bind("click", function() { + JControlBtn.on(jQuery(this)); + JControlBtn.off(jQuery(self.btnDim2WarmElm)); + window.setTimeout(function() {jQuery(".ui-slider-handle").removeClass("ui-state-active");},100); + self.colorTemperature = self.valHCL; + self.sliderInfoElm.val("--"); + }); + + this.btnDim2WarmElm.bind("click", function() { + JControlBtn.on(jQuery(this)); + JControlBtn.off(jQuery(self.btnHCLElm)); + window.setTimeout(function() {jQuery(".ui-slider-handle").removeClass("ui-state-active");},100); + self.colorTemperature = self.valDim2Warm; + self.sliderInfoElm.val("--"); + }); + + this.sliderElm.slider(this.getSliderOpts()); + + + this.sliderInfoElm.val(valueSlider); + this.sliderElm.val(valueSlider); + this.sliderElm.slider('value', valueSlider); + this.colorTemperature = valueSlider; + + this.sliderElm.on("slide", function (event, ui) { + self.sliderInfoElm.val(ui.value); + }); + + this.sliderElm.on("slidestop", function(event, ui){ + JControlBtn.off(jQuery(self.btnDim2WarmElm)); + JControlBtn.off(jQuery(self.btnHCLElm)); + window.setTimeout(function() {jQuery(".ui-slider-handle").addClass("ui-state-active");},100); + self.colorTemperature = ui.value; + }); + + if (valueSlider < 10000) {jQuery(".ui-slider-handle").addClass("ui-state-active");} else {jQuery(".ui-slider-handle").removeClass("ui-state-active");} + if (valueSlider == this.valHCL) {jQuery(".ui-slider-handle").removeClass("ui-state-active"); JControlBtn.on(this.btnHCLElm);this.sliderInfoElm.val("--");} + if (valueSlider == this.valDim2Warm) {jQuery(".ui-slider-handle").removeClass("ui-state-active"); JControlBtn.on(this.btnDim2WarmElm);this.sliderInfoElm.val("--");} + + + }, + + getSliderOpts: function() { + + var chnDescription = homematic("Interface.getParamset", {'interface': this.iFace, 'address': this.chnAddress, 'paramsetKey': 'MASTER'}); + + var opts = {}; + opts.animate = "fast"; + opts.min = parseInt(chnDescription.HARDWARE_COLOR_TEMPERATURE_WARM_WHITE); + opts.max = parseInt(chnDescription.HARDWARE_COLOR_TEMPERATURE_COLD_WHITE); + opts.value = ((opts.max - opts.min) / 2); + opts.step = 50; + opts.orientation = "horizontal"; + return opts; + }, + + checkValidity: function(val, min, max) { + var result = val; + if (val == "") {result = "";} + + if (parseInt(val) < 0) {result = min;} + if (parseInt(val) > max) {result = max;} + return result; + }, + + getConfigString: function() { + var self = this, + result, + level = this.levelElm.val(), + durationUnit = (this.chkBoxTimeLimitElm.prop("checked") == false) ? 2 : this.durationUnitElm.val(), // 2 = unit hour + durationValue = (this.chkBoxTimeLimitElm.prop("checked") == false) ? 31 : this.durationValueElm.val(), + ramptimeUnit = this.rampTimeUnitElm.val(), + ramptimeValue = this.rampTimeValueElm.val(), + colorTemperature = this.colorTemperature; + + if (this.isOntimeAvailable()) { + if (this.chkBoxTimeLimitElm.prop("checked") == false) { + var _rampTimeValue = parseInt(this._getRampTimeVal(ramptimeValue, ramptimeUnit)); + + if (_rampTimeValue > 0) { + result = "L=" + level + ",OT=" + this.maxOnTime + ",RT=" + _rampTimeValue + ",TC=" + colorTemperature; // ON_TIME = permanently ON + } else { + result = "L=" + level + ",OT=0,RT=0,TC=" + colorTemperature; + } + + } else { + if (durationValue == 0) { + result = "L=" + level + ",OT=" + this._getOnTimeVal(durationValue, durationUnit) + ",RT=0,TC=" + colorTemperature; + } else { + result = "L=" + level + ",OT=" + this._getOnTimeVal(durationValue, durationUnit) + ",RT=" + this._getRampTimeVal(ramptimeValue, ramptimeUnit) + ",TC=" + colorTemperature; + } + } + } else { + result = "L=" + level + ",DV=" + durationValue + ",DU=" + durationUnit + ",RTV=" + ramptimeValue + ",RTU=" + ramptimeUnit + ",TC=" + colorTemperature; + } + + jQuery.each(this.showRampTimeOffElm, function(index, val) { + if (self.deviceType == val) { + return false; // leave each loop + } + }); + + if (showRamptimeOff) { + result += ",RTTOV=" + this.rampTimeOffValueElm.val() + ",RTTOU=" + this.rampTimeOffUnitElm.val(); + } + return result; + }, + + close: function(result) + { + Layer.remove(this.m_layer); + if (this.m_callback) { this.m_callback(result); } + if (showRamptimeOff) {window.setTimeout(function() {delete showRamptimeOff;},100);} + }, + + yes: function() + { + this.close(YesNoDialog.RESULT_YES); + }, + + no: function() + { + this.close(YesNoDialog.RESULT_NO); + }, + + btnTextYes: function(btnTxt) { + jQuery(".YesNoDialog_yesButton").text(btnTxt); + }, + + btnYesHide: function() { + jQuery("#btnYes").addClass("hidden"); + }, + + btnYesShow: function() { + jQuery("#btnYes").removeClass("hidden"); + }, + + btnTextNo: function(btnTxt) { + jQuery(".YesNoDialog_noButton").text(btnTxt); + }, + + btnNoHide: function() { + jQuery("#btnNo").addClass("hidden"); + }, + + btnNoShow: function() { + jQuery("#btnNo").removeClass("hidden"); + }, + + setHeight: function() { + var heightContentWrapper = jQuery(".YesNoDialogContentWrapper").height(), + yesNoElm = jQuery(".YesNoDialog"), + footerElm = jQuery(".YesNoDialogFooter"); + + yesNoElm.css("height", heightContentWrapper + 78); + footerElm.css("top", heightContentWrapper + 26); + yesNoElm.css("top", (window.innerHeight / 2) - (yesNoElm.height() / 2)); + }, + + resetHeight: function() { + this.setHeight(); + }, + + setWidth: function(dlgWidth) { + var yesNoDialogElm = jQuery(".YesNoDialog"), + yesNoDialogContentWrapperElm = jQuery(".YesNoDialogContentWrapper"), + yesNoDialogFooterElm = jQuery(".YesNoDialogFooter"), + yesNoDialogTitleElm = jQuery(".YesNoDialogTitle"), + yesNoDialogYesButton = jQuery(".YesNoDialog_yesButton"); + + var defaultWith = 600, + offsetWidth = 4, + offsetPosYesButton = 109, + offsetDialogHeight = 78, + offsetDialogFooterHeight = 26; + + var width = dlgWidth - offsetWidth, + yesButtonPos = dlgWidth - offsetPosYesButton, + position = yesNoDialogElm.position(); + + // dlgWidth = (defaultWith < dlgWidth) ? defaultWith : dlgWidth; + + yesNoDialogElm.width(dlgWidth).css({left: position.left + ((defaultWith - dlgWidth) / 2)}); + yesNoDialogTitleElm.width(width); + yesNoDialogContentWrapperElm.width(width); + yesNoDialogFooterElm.width(width); + yesNoDialogYesButton.css("left", yesButtonPos); + + //Dialoghöhe an Content anpassen. + yesNoDialogElm.css("height", yesNoDialogContentWrapperElm.height() + offsetDialogHeight); + yesNoDialogFooterElm.css("top", yesNoDialogContentWrapperElm.height() + offsetDialogFooterHeight); + } + +}); +/** + * Kopfleiste + **/ +HeaderBar = new function() +{ + + // This causes problems with Mac & Safari + this.load_ = function() + { + new Ajax.Updater("header", "/ise/htm/header.htm", { + evalScripts: true, + asynchronous: false + }); + }; + + this.load = function() { + jQuery.ajax({ + url: "/ise/htm/header.htm", + dataType: "html", + async: false, + context: document.body + }).done(function(response) { + jQuery("#header").html(response); + }); + }; + +}();/** + * mainmenu.js + **/ + +/** + * Hauptmenü + **/ +MainMenu = Singleton.create({ + MAINMENU_ADMIN_FILE: "/webui/js/mainmenu/admin.js", + MAINMENU_USER_FILE: "/webui/js/mainmenu/user.js", + ID: "menubar", + MAINMENU_ITEM_LEFT: "MainMenuItem_Left", + MAINMENU_ITEM_RIGHT: "MainMenuItem_Right", + MAINMENU_ITEM_CAPTION: "MainMenuItem_Caption", + SUBMENU: "MainMenuSubMenu", + CAPTION_SUFFIX: "_TITLE", + SUBMENU_SUFFIX: "_SUBMENU", + ITEM_SELECTED: "MainMenuItem_Selected", + ITEM_HIGHLIGH: "MainMenuItem_Highlight", + SUBITEM_HIGHLIGHT: "MainMenuSubItem_Highlight", + + /** + * Initialisiert das Hauptmenü + **/ + initialize: function() + { + this.m_selectedId = null; + this.m_id = null; + + switch (getUPL()) + { + case UPL_ADMIN: this.m_menu = eval("(" + HttpLoader.getText(this.MAINMENU_ADMIN_FILE) + ")"); break; + case UPL_USER: this.m_menu = eval("(" + HttpLoader.getText(this.MAINMENU_USER_FILE) + ")"); break; + default: this.m_menu = null; break; + } + }, + + /** + * Erzeugt ein Untermenü-Element. + **/ + m_createSubmenuItem: function(menuItem, submenuItem) + { + var _submenuItem_ = submenuItem; + var _menuItem_ = menuItem; + + var cell = document.createElement("div"); + var img = document.createElement("img"); + img.src="../ise/img/menuicons/"+submenuItem.id+".png"; + cell.appendChild(img); + cell.className = "MainMenuSubItem"; + cell.id = submenuItem.id; + //cell.appendChild(document.createTextNode("${"+submenuItem.id+"}")); + cell.appendChild(document.createTextNode(" "+translateKey(submenuItem.id))); + Event.observe(cell, "mouseover", function() { MainMenu.highlightOn(this); }); + Event.observe(cell, "mouseout", function() { MainMenu.highlightOff(this); }); + Event.observe(cell, "click", function() { MainMenu.beginHideSubmenu(_menuItem_); _submenuItem_.action.defer(); }); + + return cell; + }, + + /** + * Erzeugt ein Menüelement + **/ + m_createMenuItem: function(menuItem) + { + var _menuItem_ = menuItem; + + var menuElement = document.createElement("div"); + menuElement.id = menuItem.id; + if (menuItem.align == "left") { menuElement.className = "MainMenuItem_Left"; } + else { menuElement.className = "MainMenuItem_Right"; } + + if (menuItem.id == "menuHelpPage") {menuElement.className = "MainMenuItem_Right MainMenuItem_Help";} + + Event.observe(menuElement, "mouseover", function() { MainMenu.showSubmenu(_menuItem_); }); + Event.observe(menuElement, "mouseout", function() { MainMenu.beginHideSubmenu(_menuItem_); }); + + var caption = document.createElement("div"); + caption.id = menuItem.id + "_TITLE"; + caption.className = "MainMenuItemCaption"; + //caption.appendChild(document.createTextNode("${"+menuItem.id+"}")); + caption.appendChild(document.createTextNode(translateKey(menuItem.id))); + Event.observe(caption, "click", function() { MainMenu.beginHideSubmenu(_menuItem_); _menuItem_.action.defer(); }); + menuElement.appendChild(caption); + + var submenu = menuItem.submenu; + if (submenu.length > 0) + { + var submenuElement = document.createElement("div"); + submenuElement.id = menuItem.id + "_SUBMENU"; + submenuElement.className = "MainMenuSubMenu"; + Element.setStyle(submenuElement, {display: "none"}); + + + var tbody = document.createElement("div"); + Element.setStyle(tbody, {"display": "flex"}); + Element.setStyle(tbody, {"flex-direction": "column"}); + submenuElement.appendChild(tbody); + + for (var i = 0, len = submenu.length; i < len; i++) + { + tbody.appendChild(this.m_createSubmenuItem(menuItem, submenu[i])); + } + menuElement.appendChild(submenuElement); + } + + return menuElement; + }, + + /** + * Erzeugt ein neues Hauptmenü + **/ + create: function(menubar) + { + if (this.m_menu !== null) + { + for (var i = 0, len = this.m_menu.length; i < len; i++) + { + menubar.appendChild(this.m_createMenuItem(this.m_menu[i])); + } + } + else + { + menubar.hide(); + } + }, + + /** + * Zeigt ein Untermenü an + **/ + showSubmenu: function(menuItem) + { + this.hideSubmenu(); + + var id = menuItem.id; + + if (this.m_id == id) { this.m_id = null; } + + Element.addClassName(id, this.ITEM_HIGHLIGH); + var submenu = $(id + this.SUBMENU_SUFFIX); + if (submenu) { submenu.show(); } + }, + + /** + * Beginnt damit, ein Untermenü verzögert zu schließen + **/ + beginHideSubmenu: function(menuItem) + { + this.m_id = menuItem.id; + window.setTimeout("MainMenu.hideSubmenu();", 1); + }, + + /** + * Schließt ein Untermenü + **/ + hideSubmenu: function() + { + if ($(this.m_id)) + { + var menu = $(this.m_id); + var submenu = $(this.m_id + this.SUBMENU_SUFFIX); + + if (menu) { menu.removeClassName(this.ITEM_HIGHLIGH); } + if (submenu) { submenu.hide(); } + this.m_id = null; + } + }, + + /** + * Hebt ein Untermenüelement farblich hervor. + **/ + highlightOn: function(element, event) + { + Element.addClassName(element, this.SUBITEM_HIGHLIGHT); + }, + + /** + * Deaktiviert die Hervorhebung eines Untermenüelements + **/ + highlightOff: function(element, event) + { + Element.removeClassName(element, this.SUBITEM_HIGHLIGHT); + }, + + /** + * Wählt ein Menüelement aus. + * Dieses wird dann entsprechend farblich hinterlegt. + **/ + select: function(id) + { + if (this.m_selectedId !== null) { Element.removeClassName(this.m_selectedId, this.ITEM_SELECTED); } + this.m_selectedId = id; + if (this.m_selectedId !== null) { Element.addClassName(this.m_selectedId, this.ITEM_SELECTED); } + } + +}); +/** + * ipage.js + **/ + +/** + * Schnittstelle für Seiten + **/ +IPage = Interface.create({ + + /** + * Callback für das Betreten der Seite + **/ + enter: function(options) {}, + + /** + * Callback für das Verlassen der Seite + **/ + leave: function() {}, + +}); +/** + * page.js + **/ + +/** + * Basisklasse für alle Seiten + **/ +Page = Class.create({ + __interfaces__: [IPage], + MAINMENU_ID: null, + + /** + * Callback. Wird beim Betreten der Seite aufgerufen. + **/ + enter: function(options) + { + MainMenu.select(MAINMENU_ID); + }, + + /** + * Callback. Wird beim Verlassen der Seite aufgerufen. + **/ + leave: function() + { + }, + +}); +/** + * StartPage.js + **/ + +var preURL = (WEBUI_VERSION.split(".")[0] < 3) ? "" : "ccu3-"; + +StartPage = Singleton.create(Page, { + MAINMENU_ID: "MAINMENU_STARTPAGE", + downloadURLServer: "https://"+preURL+"update.homematic.com/firmware/download?cmd=download", + fieldTestURLServer: "https://fieldtest-ccu3-update.homematic.com/firmware/download?cmd=download", + fieldTestActive: "/etc/config/fieldTestActive", + downloadURL : "", + prevDownloadURL : "", + devList: [], + devIndex: 0, + newFwCounter: 0, + messageBoxHTML: "", + fetchDeviceList: false, + knownTypes: [], + numberOfKnownTypes: 0, + + /** + * Konstrutor + **/ + initialize: function () + { + this.deviceList = []; + }, + + /** + * Callback. Wird beim betreten der Seite aufgerufen. + **/ + enter: function(options) + { + iseInitUpdateArrays(); + setPath(""); + setFooter(""); + + switch (getUPL()) + { + case UPL_ADMIN: + case UPL_USER: + MainMenu.select(this.MAINMENU_ID); + loadStartPage(options); + break; + case UPL_GUEST: + loadStartPageGuest(options); + break; + default: + break; + } + + this.serial = homematic("CCU.getSerial"); + + if (homematic('CCU.existsFile', {'file': this.fieldTestActive})) { + this.downloadURL = this.fieldTestURLServer; + } else { + this.downloadURL = this.downloadURLServer; + } + + if (this.prevDownloadURL != this.downloadURL) { + this.devList = []; + this.devIndex = 0; + this.newFwCounter = 0; + this.fetchDeviceList = false; + this.knownTypes = []; + this.numberOfKnownTypes = 0; + } + this.prevDownloadURL = this.downloadURL; + conInfo("Device Fw. downloadURL: " + this.downloadURL); + }, + + getPageMeasurement: function() { + var pageElements = ["body","#header", "#menubar", "#favSelector", "#favView", "#footer"], + elementDim = []; + jQuery.each(pageElements, function(index, val) { + var elm = jQuery(val); + elementDim[val.replace(/^#/,"")] = { + "height" : elm.height(), + "width" : elm.width() + }; + }); + return elementDim; + }, + + // WebUI-Version + showCurrentFirmware: function() { + jQuery("#currentFirmware").text(WEBUI_VERSION); + + //homematic("Interface.getDeviceDescription", {"interface": "BidCos-RF", "address": "BidCoS-RF"}, function(result) { + // if (result != null) { + // WEBUI_VERSION = result.firmware; + // } else { + // WEBUI_VERSION = "0.0.0"; + // } + // jQuery("#currentFirmware").text(WEBUI_VERSION); + //}); + }, + + /*evalVersionAGreaterThanB: function(a, b) { + var aSplit = a.split(".", 3); + var bSplit = b.split(".", 3); + if( Array.isArray(aSplit) && aSplit.length == 3) { + if(Array.isArray(bSplit) && bSplit.length == 3) { + //major + var aI = parseInt(aSplit[0]); + var bI = parseInt(bSplit[0]); + if( aI > bI ) { return true; } + if( aI < bI ) { return false; } + //major equal, cmp minor + aI = parseInt(aSplit[1]); + bI = parseInt(bSplit[1]); + if( aI > bI ) { return true; } + if( aI < bI ) { return false; } + //minor equal, check patch + aI = parseInt(aSplit[2]); + bI = parseInt(bSplit[2]); + if( aI > bI) { return true; } + if( aI <= bI ) { return false; } + } else { return true; } + } else { return false; } + return false; + },*/ + + cmpVersion: function (aa, bb) { + // 0 Version equal + // >0 Version aa newer + // <0 Version bb newer + const aArr = aa.split("."); + const bArr = bb.split("."); + const min = Math.min(aArr.length, bArr.length); + for (let index = 0; index < min; index++) { + if (aArr[index] != bArr[index]) + return (aArr[index] - bArr[index]); + } + return 0; + }, + + showAllDeviceFirmware: function() { + var self = this; + if (!this.fetchDeviceList) { + this.fetchDeviceList = true; // prevents this to be called multiple times (when clicking the start page) + this.messageBoxHTML = ""; + this.DeviceUpdateList = {}; + this.newFwCounter = 0; + this.devIndex = 0; + if (this.devList.length == 0) { + homematic("Interface.listDevices", {"interface": "BidCos-RF"}, function (deviceList) { + conInfo("Fetch RF device list"); + if (deviceList) { + for (var i = 0; i < deviceList.length; i++) { + var device = deviceList[i]; + if (device.children && device.type != "HM-RCV-50") { + self.devList.push({"type": device.type, "firmware": device.firmware, "availableFirmware": device.availableFirmware, "updatable": (device.updatable == "1") ? true : false, "address": device.address}); + } + } + } + homematic("Interface.listDevices", {"interface": "BidCos-Wired"}, function (deviceList) { + conInfo("Fetch Wired device list"); + if (deviceList) { + for (var i = 0; i < deviceList.length; i++) { + var device = deviceList[i]; + if (device.children && device.type != "HMW-RCV-50") { + self.devList.push({"type": device.type, "firmware": device.firmware, "availableFirmware": device.availableFirmware, "updatable": (device.updatable == "1") ? true : false, "address": device.address}); + } + } + } + homematic("Interface.listDevices", {"interface": "HmIP-RF"}, function (deviceList) { + conInfo("Fetch HmIP device list"); + if (deviceList) { + for (var i = 0; i < deviceList.length; i++) { + var device = deviceList[i]; + if (device.children.length > 0 && (device.type != "HmIP-RCV-50")) { + self.devList.push({"type": device.type, "firmware": device.firmware, "availableFirmware": device.availableFirmware, "updatable": (device.updatable == "1") ? true : false, "address": device.address}); + conInfo("hmipdev: "+device.type+" fw:"+device.firmware+" availFw: "+device.availableFirmware); + } + } + } + conInfo("Check firmware version of all devices - number of devices: " + self.devList.length); + if (self.devList.length > 0) { + function sortorder_devList(a , b) { + if (a.type == b.type) { + return (a.address < b.address) ? -1 : 1; + } else { + return (a.type < b.type) ? -1 : 1; + } + } + + self.devList.sort(sortorder_devList); + self.fetchAndSetDeviceVersion(); + } + }); + }); + }); + } else { + self.fetchAndSetDeviceVersion(); + } + } + }, + + fetchAndSetDeviceVersion: function() { + var self = this; + if (this.numberOfKnownTypes == 0) { + conInfo("Fetch device firmware list from server"); + homematic.com.getListOfAvailableFirmware(function (result) { + conInfo("List fetched"); + jQuery.each(result, function (index, value) { + var type = value.type.toLowerCase(); + type = type.replace(/_(?!.*_)/, ' '); //SPHM-1039 + if(value.type=="HmIP-HAP-JS1") {//SPHM-1034 HAP JS1 has different pattern than other devices. + type = "HmIP-HAP JS1".toLowerCase(); + } + self.knownTypes[type] = value.version; + self.numberOfKnownTypes = index + 1; + if(value.type == "HmIP-HAP") { //SPHM-1022 + self.knownTypes["HmIP-HAP-B1".toLowerCase()] = value.version; + self.numberOfKnownTypes += 1; + } + }); + self.setDeviceVersion(self.devList[self.devIndex].type, self.knownTypes[self.devList[self.devIndex].type.toLowerCase()]); + }); + } else { + conInfo("Don't fetch the device firmware list from the server. Use the known list."); + self.setDeviceVersion(self.devList[self.devIndex].type, self.knownTypes[self.devList[self.devIndex].type.toLowerCase()]); + } + }, + + setDeviceVersion: function (deviceType, fwVersion) { + var self = this; + var deviceTypeForUrl = deviceType.replace(/\ (?!.*\ )/, '_'); //SPHM-1039; + if(deviceType == "HmIP-HAP JS1") {//SPHM-1034 HAP JS1 has different pattern than other devices. + deviceTypeForUrl = "HmIP-HAP-JS1"; + } + if(deviceType == "HmIP-HAP-B1") { //SPHM-1022 Use HAP Fw for HAP-B1 + deviceTypeForUrl = "HmIP-HAP"; + } + if (fwVersion) { + var devAddress = self.devList[self.devIndex].address, + curFw = self.devList[self.devIndex].firmware, + arCurFw = curFw.split("."), + availableFW = self.devList[self.devIndex].availableFirmware,// auf der CCU gespeicherte Geräte-Fw. + devIsUpdatable = self.devList[self.devIndex].updatable, + arResultMajorMinorPatch, + resultMajorMinor, + newFW = fwVersion; + + // The current fw for BidCos devices has no patch version + if (arCurFw.length == 2) { + arResultMajorMinorPatch = fwVersion.split("."); + resultMajorMinor = arResultMajorMinorPatch[0] + "." + arResultMajorMinorPatch[1]; + newFW = resultMajorMinor; + } + + // generate RefUpdateList with detailed Information per DeviceType for grouped list + if (devIsUpdatable && fwVersion && (fwVersion != "n/a") && (newFW != curFw)) { + if (!this.DeviceUpdateList[deviceType]) { + this.DeviceUpdateList[deviceType] = {}; + } + var RefUpdateList = this.DeviceUpdateList[deviceType][curFw]; + if (!RefUpdateList) { + this.DeviceUpdateList[deviceType][curFw] = { DevCnt: 0, FWAvailable: 0, FWUpload: 0, Address: [], downloadURL: this.downloadURL, deviceTypeForUrl: deviceTypeForUrl, fwVersion: fwVersion, curVersion: curFw, availableFirmware: availableFW }; + RefUpdateList = this.DeviceUpdateList[deviceType][curFw]; + } + RefUpdateList.DevCnt++; + RefUpdateList.Address.push(self.devList[self.devIndex].address); + // FW not yet available on the CCU + if (availableFW != newFW) { + RefUpdateList.FWUpload++; + } else { + RefUpdateList.FWAvailable++; + } + self.newFwCounter++; + } + } + self.devIndex++; + if (self.devIndex < self.devList.length) { + self.fetchAndSetDeviceVersion(); + } else { + for (const Typ of Object.keys(this.DeviceUpdateList).sort()) { + for (const curFw of Object.keys(this.DeviceUpdateList[Typ]).sort()) { + let Obj = this.DeviceUpdateList[Typ][curFw]; + let curVersion = Obj.curVersion; + let color = "black"; + if (this.cmpVersion(Obj.curVersion, Obj.fwVersion) > 0) { + curVersion = "" + Obj.curVersion + ""; + color = "orange"; + } + this.messageBoxHTML += "
" + + Typ + + "" + + Obj.Address.join('
') + + "
" + + curVersion + + "
"+ + "" + + "" + + "" + + "" + + "" + + "" + + "" + + ""+ + ""+ + ""+ + ""+ + ""+ + this.messageBoxHTML + + "" + + "
"+translateKey('dialogShowDeviceFirmwareTHDevice')+""+translateKey('lblQuantity')+""+translateKey('dialogShowDeviceFirmwareTHSerials')+""+translateKey('dialogShowDeviceFirmwareTHCurFw')+""+translateKey('dialogShowDeviceFirmwareTHNewFw')+"

"+translateKey('dialogShowDeviceFirmwareDescription')+":
" + + translateKey('dialogShowDeviceFirmwareDownloadInfo1') + "
" + + translateKey('dialogShowDeviceFirmwareDownloadInfo2') + " " + + "'" + + " => " + translateKey('footerBtnNew') + "' " + + translateKey('dialogShowDeviceFirmwareDownloadInfo3') + + //"
"+translateKey('dialogShowDeviceFirmwareLinkDownload')+"
", + "", + 450, + msgBoxHeight + ); + }, + + showAddonUpdate: function() { + addonUpdateList = ""; + var addonversions = homematic('CCU.getAddonVersions'); + if (addonversions && addonversions !== "false") { + var localaddonversions = addonversions.local; + var onlineaddonversions = addonversions.online; + for(var l_obj in localaddonversions) { + if (typeof localaddonversions[l_obj] === "object") { + + for(var o_obj in onlineaddonversions) { + if (typeof onlineaddonversions[o_obj] === "object") { + + if (onlineaddonversions[o_obj].name == localaddonversions[l_obj].name) { + //console.log(onlineaddonversions[o_obj].name +" local: "+localaddonversions[l_obj].localversion+", online: "+onlineaddonversions[o_obj].webversion); + if (localaddonversions[l_obj].localversion != onlineaddonversions[o_obj].webversion && onlineaddonversions[o_obj].webversion != '' && onlineaddonversions[o_obj].webversion != 'n/a') { + addonUpdateList += "
· "+onlineaddonversions[o_obj].name+" ("+onlineaddonversions[o_obj].webversion+")"; + } + } + + } + } + } + } + } + + if (addonUpdateList !== "") { + var self = this, + rowShowAddonUpdates = jQuery("#addonUpdatesAvailable"), + btnShowAddonUpdates = jQuery("#addonUpdatesAvailable .firmwareAvailable"); + btnShowAddonUpdates.click(function () { + showSoftwareCP(); + }); + jQuery("#addonUpdatesAvailableList").html(addonUpdateList); + rowShowAddonUpdates.show(); + } + }, + + + showUpdate: function() { + var fn = function() { + var result = homematic.com.isUpdateAvailable(); + if ((result) && ($("updateCol"))) { + var updateText = " (" + homematic.com.getLatestVersion() + " " + translateKey('isAvailable') + ")"; + if (getUPL() == UPL_ADMIN) { + jQuery("#updateCol").text(updateText) + .addClass("firmwareAvailable") + .unbind("click").bind("click", function() { + showNewFirmwareDownload(); + }); + } else { + jQuery("#updateCol").text(updateText); + } + jQuery("#updateCol").show(); + } + return result; + }; + + if (!fn()) { + window.setTimeout(fn, 5000); + } + }, + + showDutyCycle: function() { + showDutyCycle(); + } + +}); +ControlPage = new function() +{ + var MAINMENU_ID = "MAINMENU_CONTROL"; + + this.enter = function(options) + { + MainMenu.select(MAINMENU_ID); + loadStatus(options); + }; + + this.leave = function() + { + // open the systemLanguage config dialog if no systemLanguage was selected yet + if (homematic('CCU.getSystemLanguage') === 'none') { + CreatePopup(ID_SYSTEM_LANGUAGE_CONFIG); + } + }; + +}(); +ControlRoomsPage = new function() +{ + var MAINMENU_ID = "MAINMENU_CONTROL"; + + this.enter = function(options) + { + MainMenu.select(MAINMENU_ID); + loadHandlingRooms(options); + }; + + this.leave = function() + { + }; + +}(); +ControlFunctionsPage = new function() +{ + var MAINMENU_ID = "MAINMENU_CONTROL"; + + this.enter = function(options) + { + MainMenu.select(MAINMENU_ID); + loadHandlingFunctions(options); + }; + + this.leave = function() + { + }; + +}(); +ControlFavoritesPage = new function() +{ + + var MAINMENU_ID = "MAINMENU_FAVORITES"; + + this.enter = function(options) + { + MainMenu.select(MAINMENU_ID); + loadFavorites(options); + }; + + this.leave = function() + { + }; + +}(); +ControlFavoritePage = new function() +{ + var MAINMENU_ID = "MAINMENU_FAVORITES"; + + this.enter = function(options) + { + MainMenu.select(MAINMENU_ID); + loadFavViewer(options); + }; + + this.leave = function() + { + }; + +}(); +ControlDevicesPage = new function() +{ + var MAINMENU_ID = "MAINMENU_CONTROL"; + + this.enter = function(options) + { + MainMenu.select(MAINMENU_ID); + loadHandlingDevices(options); + }; + + this.leave = function() + { + }; + +}(); +ControlProgramsPage = new function() +{ + var MAINMENU_ID = "MAINMENU_CONTROL"; + + this.enter = function(options) + { + MainMenu.select(MAINMENU_ID); + loadHandlingPrograms(); + }; + + this.leave = function() + { + }; + +}(); +ControlVariablesPage = new function() +{ + var MAINMENU_ID = "MAINMENU_STATUS"; + + this.enter = function(options) + { + MainMenu.select(MAINMENU_ID); + loadStatusviewSysVars(options); + }; + + this.leave = function() + { + }; + +}(); +ControlProtocolPage = new function() +{ + var MAINMENU_ID = "MAINMENU_STATUS"; + + this.enter = function(options) + { + MainMenu.select(MAINMENU_ID); + loadStatusviewSysProtocol(options); + }; + + this.leave = function() + { + }; + +}(); +LinksAndProgramsPage = new function() +{ + var m_menuId = "MAINMENU_LINKSANDPROGRAMS"; + + this.enter = function(options) + { + MainMenu.select(m_menuId); + loadLinkProg(options); + }; + + this.leave = function() + { + }; + +}(); +LinkListPage = new function() +{ + var m_menuId = "MAINMENU_LINKSANDPROGRAMS"; + + this.enter = function(options) + { + var args = ""; + + MainMenu.select(m_menuId); + if (typeof(options) != "undefined") + { + for(key in options) + { + args += "&" + key + "=" + options[key]; + } + } + updateContent("/config/ic_linkpeerlist.cgi", args); + }; + + this.leave = function() + { + }; + +}(); +ProgramListPage = new function() +{ + var m_menuId = "MAINMENU_LINKSANDPROGRAMS"; + + this.enter = function(options) + { + MainMenu.select(m_menuId); + loadProgramList(options); + }; + + this.leave = function() + { + }; + +}(); +LinkEditProfilePage = new function() +{ + var m_menuId = "MAINMENU_LINKSANDPROGRAMS"; + + this.enter = function(options) + { + var iface = options.iface; + var sender = options.sender; + var receiver = options.receiver; + + MainMenu.select(m_menuId); + OpenSetProfiles(iface, sender, receiver); + + }; + + this.leave = function() + { + }; + +};AlarmMessagesPage = new function() +{ + + this.enter = function(options) + { + MainMenu.select(null); + if ($("msgAlarms")) { $("msgAlarms").addClassName("Messages_Selected"); } + loadAlarmMessages(options); + }; + + this.leave = function() + { + if ($("msgAlarms")) { $("msgAlarms").removeClassName("Messages_Selected"); } + }; + +}(); +ServiceMessagesPage = new function() +{ + + this.enter = function(options) + { + MainMenu.select(null); + if ($("msgServices")) { $("msgServices").addClassName("Messages_Selected"); } + loadServiceMessages(options); + }; + + this.leave = function() + { + if ($("msgServices")) { $("msgServices").removeClassName("Messages_Selected"); } + }; + +}(); +HelpPage = new function() +{ + + var m_menuId = "MAINMENU_HELP"; + + this.enter = function(options) + { + MainMenu.select(m_menuId); + loadHelp(options); + }; + + this.leave = function() + { + }; + +}(); +adminFirstStartup = new function() +{ + + this.enter = function(options) + { + ccuAdminFirstStartup(options); + }; + + this.leave = function() + { + }; + +}(); +userFirstStartup = new function() +{ + + this.enter = function(options) + { + ccuUserFirstStartup(options); + }; + + this.leave = function() + { + }; + +}(); +/** + * devielistpage.js + **/ + +/** + * Geräteliste. + **/ + +if (PLATFORM == "Central") { + + DeviceListPage = Singleton.create(Page, { + MAINMENU_ID: "MAINMENU_OPTIONS", + TREE_COLLAPSED_FOOTER_HTML: "" + + "" + + "" + + "" + + "" + + "" + + "" + + "
${footerBtnPageBack}
${footerBtnResetFilter}
${footerBtnOpenTree}
", + TREE_EXPANDED_FOOTER_HTML: "" + + "" + + "" + + "" + + "" + + "" + + "" + + "
${footerBtnPageBack}
${footerBtnResetFilter}
${footerBtnCloseTree}
", + FLAT_FOOTER_HTML: "" + + "" + + "" + + "" + + "" + + "" + + "" + + "
${footerBtnPageBack}
${footerBtnResetFilter}
${footerBtnRestoreTree}
", + MODE: + { + TREE: 1, // Anzeige als Baumstruktur + FLAT: 2 // Anzeige als (flache) Kanalliste + }, + UPDATE_DATA: true, + SORT_FN: + { + NAME : function(channels, reverse) { return channels.ex_sortBy("name", reverse); }, + TYPE_NAME : function(channels, reverse) { return channels.ex_sortBy("typeName", reverse); }, + DESCRIPTION: function(channels, reverse) { return channels.ex_sortBy("typeDescription", reverse); }, + ADDRESS : function(channels, reverse) { return channels.ex_sortBy("address", reverse); }, + CATEGORY : function(channels, reverse) { return channels.ex_sortBy("category", reverse); }, + MODE : function(channels, reverse) { return channels.ex_sortBy("mode", reverse); }, + ROOM_NAMES : function(channels, reverse) { + channels.sort(function(a, b) { return Object.ex_compare(a.rooms.ex_joinItem("name"), b.rooms.ex_joinItem("name")); }); + return (reverse) ? channels.reverse() : channels; + }, + FUNC_NAMES : function(channels, reverse) { + channels.sort(function(a, b) { return Object.ex_compare(a.subsections.ex_joinItem("name"), b.subsections.ex_joinItem("name")); }); + return (reverse) ? channels.reverse() : channels; + } + }, + PREFIX: "DeviceListPage", + HIGHLIGHT_CLASS: "DeviceListCell_Highlight", + CATEGORIES: + [ + {id: "CATEGORY_SENDER", name: translateKey("generalChannelConfigLblSender")}, // Sender + {id: "CATEGORY_RECEIVER", name: translateKey("generalChannelConfigLblReceiver")}, // Empfänger + {id: "CATEGORY_NOT_LINKABLE", name: translateKey("generalChannelConfigLblNone")} // nicht verknüpfbar + ], + MODES: + [ + {id: "MODE_DEFAULT", name: translateKey("lblStandard") }, // Standard + {id: "MODE_AES", name: translateKey("lblSecured") } // Gesichert + ], + INTERFACES: + [ + {id: "INTERFACE_BIDCOS_RF", name: translateKey("BidCosRF-Filter")}, // BidCos-RF + {id: "INTERFACE_BIDCOS_WIRED", name: translateKey("BidCosWired-Filter")}, // BidCos-Wired + {id: "INTERFACE_HMIP_RF", name: translateKey("HmIPRF")}, // HmIP-RF + {id: "INTERFACE_VIRTUAL_DEVICES", name: translateKey("VirtualDevices")}, + {id: "INTERFACE_CUXD", name: "CUxD"}, // + {id: "INTERFACE_CCU_JACK", name: "CCU-Jack"}, // + {id: "INTERFACE_SYSTEM", name: "System"} // + ], + + /** + * Konstruktor + **/ + initialize: function() + { + this.m_onRemoveDevice = this.onRemoveDevice.bind(this); + + this.treeTemplate = TrimPath.parseTemplate(DEVICELIST_TREE_JST); + this.flatTemplate = TrimPath.parseTemplate(DEVICELIST_FLAT_JST); + + this.channels = new Array(); + this.devices = new Array(); + this.groups = {}; + + this.mode = this.MODE.TREE; + this.sortId = "NAME"; + this.sortDescend = false; + this.isExpanded = false; + + this.virtChnCounter = 0; + + DeviceList.removeEvent.add(this.m_onRemoveDevice); + }, + + /** + * Aktualisiert die zwischengespeicherten Daten eines Geräts + **/ + updateDeviceData: function(device) + { + device.groups.each(function(group) { + if (typeof(group._expanded) == "undefined") { group._expanded = false; } + }); + + // if (typeof(device._expanded) == "undefined") { device._expanded = false; } + device._expanded = false; + + device.channels.each(function(channel) { + channel._isVisible = true; + channel.highlightChannel = ( ! userIsNoExpert && (channel.channelType.indexOf("_VIRTUAL_RECEIVER") != -1)) ? true : false; + }); + }, + + /** + * Aktualisiert alle zwischengespreicherten Daten + **/ + updateData: function() + { + this.devices = DeviceList.listDevices().ex_sortBy("name"); + this.channels = DeviceList.listChannels(); + this.devices.each(this.updateDeviceData, this); + }, + + /** + * + **/ + sort: function(channels) + { + var sort_fn = this.SORT_FN[this.sortId]; + + if (typeof(sort_fn) != "undefined") { return sort_fn(channels, this.sortDescend); } + else { return channels; } + }, + + /** + * + **/ + matchChannel: function(channel) + { + return ((this.NameFilter.match(channel.name)) && + (this.TypeNameFilter.match(channel.typeName)) && + (this.DescriptionFilter.match(translateKey(channel.typeDescription))) && + (this.AddressFilter.match(channel.address)) && + (this.CategoryFilter.matchString(channel.category)) && + (this.ModeFilter.matchStringArray(channel.mode)) && + (this.RoomFilter.matchArray(channel.rooms)) && + (this.FuncFilter.matchArray(channel.subsections))); + }, + + /** + * + **/ + filterChannels: function(channels) + { + var result = new Array(); + + channels.each(function(channel) { + if (this.matchChannel(channel)) { result.push(channel); } + }, this); + + return result; + }, + + matchDevice: function(device) + { + return ((this.NameFilter.match(device.name)) && + (this.TypeNameFilter.match(device.typeName)) && + (this.DescriptionFilter.match(translateKey(device.typeDescription))) && + (this.AddressFilter.match(device.address)) && + (this.InterfaceFilter.matchString(device.interfaceDisplayName)) && + (this.ModeFilter.matchStringArray(device.modes)) && + (this.RoomFilter.matchArray(device.rooms)) && + (this.FuncFilter.matchArray(device.subsections))); + }, + + filterDevices: function(devices) + { + var result = new Array(); + + devices.each(function(device) { + if (this.matchDevice(device)) { result.push(device); } + }, this); + + return result; + }, + + /** + * Startet die Aktualisierung der Anzeige + **/ + beginUpdateView: function(updateData) + { + var _updateData_ = updateData; + if (typeof(_updateData_) == "undefined") { _updateData_ = false; } + $("content").setStyle({cursor: "wait"}); + window.setTimeout("DeviceListPage.updateView(" + _updateData_ + ");", 1); + }, + + /** + * Betreten der Geräteliste + **/ + enter: function(options) + { + var self = this; + this.content = $("content"); + this.content.innerHTML = "\"Loading...\""; + this.m_visible = true; + + MainMenu.select(this.MAINMENU_ID); + setPath(""+translateKey('menuSettingsPage')+" > "+translateKey('submenuDevices')); + setFooter(""); + this.userIsNoExpert = userIsNoExpert; + + this.mode = this.MODE.TREE; + this.sortId = "NAME"; + this.sortDescend = false; + + var rooms = RoomList.list().ex_sortBy("name"); + var funcs = SubsectionList.list().ex_sortBy("name"); + + this.NameFilter = new StringFilter("DeviceListPage.NameFilter", this.beginUpdateView); + this.TypeNameFilter = new StringFilter("DeviceListPage.TypeNameFilter", this.beginUpdateView); + this.DescriptionFilter = new StringFilter("DeviceListPage.DescriptionFilter", this.beginUpdateView); + this.AddressFilter = new StringFilter("DeviceListPage.AddressFilter", this.beginUpdateView); + this.InterfaceFilter = new ListFilter("DeviceListPage.InterfaceFilter", this.INTERFACES, this.beginUpdateView); + this.CategoryFilter = new ListFilter("DeviceListPage.CategoryFilter", this.CATEGORIES, this.beginUpdateView); + this.ModeFilter = new ListFilter("DeviceListPage.ModeFilter", this.MODES, this.beginUpdateView); + this.RoomFilter = new ListFilter("DeviceListPage.RoomFilter", rooms, this.beginUpdateView); + this.FuncFilter = new ListFilter("DeviceListPage.FuncFilter", funcs, this.beginUpdateView); + + window.setTimeout(function() {self.beginUpdateView(self.UPDATE_DATA);},50); + }, + + leave: function() + { + this.m_visible = false; + }, + + /** + * Prüft, ob es sich bei dem Kanal um einen der neuen virtellen Kanäle handelt (z. B. VIRTUAL_DIMMER, VIRTUAL_SWITCH, VIRTUAL_BLIND) + * Diese Kanäle sollen nur dann angezeigt werden, wenn der User den Expertenmodus aktiviert hat. + * Die virtuellen Fernbedienungen der CCU 'VIRTUAL_KEY' sind nicht betroffen + **/ + showVirtualChannel: function(channel) { + var deviceType = channel.deviceType.name.toUpperCase(), + interfaceName = channel.device.interfaceName, + hmIP_RF_Identifier = "HmIP-RF", + channelNr = parseInt(channel.index); + + if (interfaceName != hmIP_RF_Identifier) { + return ( + (!this.userIsNoExpert) + || (channel.channelType == "VIRTUAL_KEY") + || ((interfaceName != hmIP_RF_Identifier) && (channel.channelType.split("_")[0] != "VIRTUAL")) + ) ? true : false; + } else { + if (this.userIsNoExpert) { + if ((deviceType != "HMIP-MIOB") && (deviceType != "HMIP-WHS2")) { + if ( + channel.channelType == "DIMMER_VIRTUAL_RECEIVER" || + channel.channelType == "SWITCH_VIRTUAL_RECEIVER" || + channel.channelType == "BLIND_VIRTUAL_RECEIVER" || + channel.channelType == "SHUTTER_VIRTUAL_RECEIVER" || + channel.channelType == "ACOUSTIC_SIGNAL_VIRTUAL_RECEIVER" || + channel.channelType == "SERVO_VIRTUAL_RECEIVER" + ) { + this.virtChnCounter = (this.virtChnCounter >= 3) ? 0 : this.virtChnCounter; + this.virtChnCounter++; + if (this.virtChnCounter == 1) { + return true; + } else { + return false; + } + } + } else { + if (((deviceType == "HMIP-MIOB") || (deviceType == "HMIP-WHS2")) && + ((channelNr == 2) || (channelNr == 4) || (channelNr == 6) || (channelNr == 8))) { + return false; // hide the virtual channels 2,4,6,8 - 3 and 7 are necessary for certain links + } + } + return true; + } + } + return true; + }, + + isHmIPMaintenanceChannel: function(channel) + { + return (channel.channelType == "MAINTENANCE") ? true : false; + }, + + isChannelVisible: function(channel) + { + // Don't show some channels + var result = true; + switch (channel.channelType) { + case "ALARM_COND_SWITCH_TRANSMITTER": + case "WEEK_PROGRAM": + result = false; + break; + default: result = true; + } + return result; + }, + + + /** + * Zeigt den Konfigurationsdialog für einen Kanal an. + **/ + selectChannel: function(id) + { + var _this_ = this; + var channel = DeviceList.getChannel(id); + + ChannelConfigDialog.show(channel, function(result) { + if (result == ChannelConfigDialog.RESULT_OK) + { + _this_.beginUpdateView(); + } + }); + }, + + /** + * Zeigt den Konfigurationsdialog für ein Gerät an. + **/ + selectDevice: function(id) + { + var _this_ = this; + var device = DeviceList.getDevice(id); + + DeviceConfigDialog.show(device, function(result) { + if (result == DeviceConfigDialog.RESULT_OK) + { + _this_.beginUpdateView(); + } + }); + }, + + /** + * + **/ + sortBy: function(sortId) + { + if (this.mode == this.MODE.FLAT) + { + if (this.sortId == sortId) { this.sortDescend = !this.sortDescend; } + else { this.sortDescend = false; } + } + else + { + this.sortDescend = false; + this.mode = this.MODE.FLAT; + this.resetFilters(false); + } + + this.sortId = sortId; + this.beginUpdateView(); + }, + + + /** + * Filter zurücksetzen + **/ + resetFilters: function(update) + { + var _update_ = update; + if (typeof(_update_) == "undefined") { _update_ = true; } + + this.NameFilter.reset(); + this.TypeNameFilter.reset(); + this.DescriptionFilter.reset(); + this.AddressFilter.reset(); + this.InterfaceFilter.reset(); + this.CategoryFilter.reset(); + this.ModeFilter.reset(); + this.RoomFilter.reset(); + this.FuncFilter.reset(); + + if (_update_ == true) { this.beginUpdateView(); } + }, + + expandTree: function() + { + this.mode = this.MODE.TREE; + + this.devices.each(function(device) { + device._expanded = true; + + device.channels.each(function(channel) { + channel._isVisible = false; + if(this.showVirtualChannel(channel)) { + channel._isVisible = true; + } + }, this); + + device.groups.each(function(group) { + group._expanded = true; + }); + }, this); + + this.isExpanded = true; + this.beginUpdateView(); + }, + + + collapseTree: function() + { + this.mode = this.MODE.TREE; + this.devices.each(function(device) { + device._expanded = false; + device.groups.each(function(group) { + group._expanded = false; + }); + }); + + this.isExpanded = false; + this.beginUpdateView(); + }, + + expandDevice: function(event, id) + { + var evt = (event) ? event : window.event; + Event.stop(evt); + + var device = DeviceList.getDevice(id); + + device._expanded = true; + + $(this.PREFIX + id + "PLUS").hide(); + $(this.PREFIX + id + "MINUS").show(); + + device.groups.each(function(group) { + $(this.PREFIX + group.id).show(); + $(this.PREFIX + group.id + "Thumbnail").show(); + this.collapseGroup(evt, group.id); + }, this); + device.singles.each(function(channel) { + channel._isVisible = false; + if(this.showVirtualChannel(channel) && (this.isChannelVisible(channel)) ) { + channel._isVisible = true; + $(this.PREFIX + channel.id).show(); + $(this.PREFIX + channel.id + "Thumbnail").show(); + } + }, this); + }, + + + collapseDevice: function(event, id) + { + var evt = (event) ? event : window.event; + Event.stop(evt); + + var device = DeviceList.getDevice(id); + device._expanded = false; + + $(this.PREFIX + id + "MINUS").hide(); + $(this.PREFIX + id + "PLUS").show(); + + device.groups.each(function(group) { + $(this.PREFIX + group.id).hide(); + $(this.PREFIX + group.id + "Thumbnail").hide(); + this.collapseGroup(evt, group.id); + }, this); + device.singles.each(function(channel) { + try { + $(this.PREFIX + channel.id).hide(); + $(this.PREFIX + channel.id + "Thumbnail").hide(); + } catch (e) {} + }, this); + }, + + expandGroup: function(event, id) + { + var evt = (event) ? event : window.event; + Event.stop(evt); + + var group = DeviceList.getChannelGroup(id); + group._expanded = true; + + $(this.PREFIX + id + "PLUS").hide(); + $(this.PREFIX + id + "MINUS").show(); + + group.channels.each(function(channel) { + $(this.PREFIX + channel.id).show(); + $(this.PREFIX + channel.id + "Thumbnail").show(); + }, this); + }, + + collapseGroup: function(event, id) + { + var evt = (event) ? event : window.event; + Event.stop(evt); + + var group = DeviceList.getChannelGroup(id); + group._expanded = false; + + $(this.PREFIX + id + "MINUS").hide(); + $(this.PREFIX + id + "PLUS").show(); + + group.channels.each(function(channel) { + $(this.PREFIX + channel.id).hide(); + $(this.PREFIX + channel.id + "Thumbnail").hide(); + }, this); + }, + + /** + * Baumstruktur wiederherstellen + **/ + recoverTree: function() + { + this.mode = this.MODE.TREE; + this.resetFilters(); + }, + + /** + * Gerät löschen + **/ + deleteDevice: function(event, id) + { + var evt = (event) ? event : window.event; + Event.stop(evt); + + var device = DeviceList.getDevice(id); + new DeleteDeviceDialog(device, function(isDeleted) { + // if (isDeleted) { WebUI.reload(); } + }); + }, + + /** + * Gerät, Kanal oder Kanalgruppe konfigurieren + **/ + showConfiguration: function(event, typeId, id) + { + var evt = (event) ? event : window.event; + try { + Event.stop(evt); + } catch(e) {} + + switch (typeId) + { + case "DEVICE": + var device = DeviceList.getDevice(id); + var iface = device.interfaceName; + var address = device.address; + WebUI.enter(DeviceConfigPage, {'iface': iface, 'address': address, 'redirect_url': 'GO_BACK'}); + break; + case "GROUP": + var group = DeviceList.getChannelGroup(id); + var iface = group.device.interfaceName; + var address = group.channels[0].address; + WebUI.enter(DeviceConfigPage, {'iface': iface, 'address': address, 'redirect_url': 'GO_BACK', 'with_group': 1}); + break; + case "CHANNEL": + var channel = DeviceList.getChannel(id); + var iface = channel.device.interfaceName; + var address = channel.address; + WebUI.enter(DeviceConfigPage, {'iface': iface, 'address': address, 'redirect_url': 'GO_BACK'}); + break; + default: + Debug.assert(false, "DeviceListPage.showConfiguration: invalid type id"); + break; + } + + }, + + /** + * Direkte Verknüpfungen anzeigen + **/ + showDirectLinks: function(event, typeId, id) + { + var evt = (event) ? event : window.event; + Event.stop(evt); + + switch (typeId) + { + case "DEVICE": + var device = DeviceList.getDevice(id); + WebUI.enter(LinkListPage, { + iface : device.interfaceName, + channel: device.address + }); + break; + case "GROUP": + var group = DeviceList.getChannelGroup(id); + WebUI.enter(LinkListPage, { + iface : group.device.interfaceName, + channel: group.channels[0].address, + keypair: 1 + }); + break; + case "CHANNEL": + var channel = DeviceList.getChannel(id); + WebUI.enter(LinkListPage, { + iface : channel.device.interfaceName, + channel: channel.address + }); + break; + default: + Debug.assert(false, "DeviceListPage.showDirectLinks: invalid type id"); + break; + } + }, + + /** + * Programme anzeigen + **/ + showPrograms: function(event, typeId, id) + { + var evt = (event) ? event : window.event; + Event.stop(evt); + + switch (typeId) + { + case "DEVICE": + var device = DeviceList.getDevice(id); + var ids = device.listProgramIds(); + WebUI.enter(ProgramListPage, ids.join("\t")); + break; + case "GROUP": + var group = DeviceList.getChannelGroup(id); + var ids = group.listProgramIds(); + WebUI.enter(ProgramListPage, ids.join("\t")); + break; + case "CHANNEL": + var channel = DeviceList.getChannel(id); + var ids = channel.listProgramIds(); + WebUI.enter(ProgramListPage, ids.join("\t")); + break; + default: + Debug.assert(false, "DeviceListPage.showPrograms: invalid type id"); + break; + } + }, + + /** + * Aktualisert die Anzeige + **/ + updateView: function(updateData) + { + this.content.setStyle({"cursor": "default"}); + if (updateData === true) { this.updateData(); } + + if (this.mode == this.MODE.TREE) + { + this.content.innerHTML = this.treeTemplate.process({ + PREFIX : this.PREFIX, + nameFilter : this.NameFilter, + typeNameFilter : this.TypeNameFilter, + descriptionFilter: this.DescriptionFilter, + addressFilter : this.AddressFilter, + interfaceFilter : this.InterfaceFilter, + modeFilter : this.ModeFilter, + funcFilter : this.FuncFilter, + roomFilter : this.RoomFilter, + devices : this.filterDevices(this.devices) + }); + if (this.isExpanded) { setFooter(this.TREE_EXPANDED_FOOTER_HTML); } + else { setFooter(this.TREE_COLLAPSED_FOOTER_HTML); } + } + else + { + this.content.innerHTML = this.flatTemplate.process({ + PREFIX : this.PREFIX, + sortId : this.sortId, + sortDescend : this.sortDescend, + nameFilter : this.NameFilter, + typeNameFilter : this.TypeNameFilter, + descriptionFilter: this.DescriptionFilter, + addressFilter : this.AddressFilter, + categoryFilter : this.CategoryFilter, + modeFilter : this.ModeFilter, + funcFilter : this.FuncFilter, + roomFilter : this.RoomFilter, + channels : this.sort(this.filterChannels(this.channels)) + }); + setFooter(this.FLAT_FOOTER_HTML); + } + + var translatedSecure = translateKey("lblSecured"); + var translatedStandard = translateKey("lblStandard"); + jQuery(".j_chMode").each(function(i, e){ + switch (e.textContent) { + case "Gesichert": + e.textContent = translatedSecure; + break; + case "Standard": + e.textContent = translatedStandard; + break; + } + }); + + translateJSTemplate("#DeviceListTable"); + translatePage(".j_rooms, .j_functions"); // this translates the room name as well the function name within the main devicelist (Settings > Devices) + jQuery("#DeviceListPage_RoomFilter").draggable(); + jQuery("#DeviceListPage_FuncFilter").draggable(); + + DeviceList.updateDeviceStatus(); + eQ3.HomeMatic.Event.fire({type: 'DeviceListPageLoaded'}); + }, + + onRemoveDevice: function(whatEver) + { + if (this.m_visible) + { + WebUI.reload(); + } + } + +}); + +} else { + + DeviceListPage = new function() + { + //Geräteliste Konfigtool + var m_menuId = "MAINMENU_OPTIONS_DEVICES"; + this.enter = function(options) + { + //MainMenu.select(m_menuId); + updateContent('/configapp/devices.cgi'); + }; + + this.leave = function() + { + }; + + }(); + +} +FavoriteListPage = new function() +{ + var MAINMENU_ID = "MAINMENU_OPTIONS"; + + this.enter = function(options) + { + MainMenu.select(MAINMENU_ID); + loadFavOverview(options); + }; + + this.leave = function() + { + }; + +}(); +FunctionListPage = new function() +{ + var MAINMENU_ID = "MAINMENU_OPTIONS"; + + this.enter = function(options) + { + loadFunctionList(options); + }; + + this.leave = function() + { + }; + +}(); +NewDeviceListPage = new function() +{ + var MAINMENU_ID = "MAINMENU_OPTIONS"; + + this.enter = function(options) + { + MainMenu.select(MAINMENU_ID); + + // Aktualisiert alle Gewerke + // ==> neue Geräte werden beim Anlernen automatisch einem Gewerk zugeordnet + var subsections = SubsectionList.list(); + subsections.each(function(subsection) { + SubsectionList.beginUpdate(subsection.id); + }); + + loadNewDevices(options); + }; + + this.leave = function() + { + }; + +}(); +RoomListPage = new function() +{ + var MAINMENU_ID = "MAINMENU_OPTIONS"; + + this.enter = function(options) + { + MainMenu.select(MAINMENU_ID); + loadRoomList(options); + }; + + this.leave = function() + { + }; + +}(); +SystemConfigPageUser = new function() +{ + var MAINMENU_ID = "MAINMENU_OPTIONS"; + + this.enter = function(options) + { + MainMenu.select(MAINMENU_ID); + loadSystemConfigUser(options); + }; + + this.leave = function() + { + }; + +}(); +SystemConfigPage = new function() +{ + var MAINMENU_ID = "MAINMENU_OPTIONS"; + + this.enter = function(options) + { + MainMenu.select(MAINMENU_ID); + loadSystemConfig(options); + }; + + this.leave = function() + { + }; + +}(); +UserAdminPageUser = new function() +{ + var MAINMENU_ID = "MAINMENU_OPTIONS"; + + this.enter = function(options) + { + MainMenu.select(MAINMENU_ID); + updateContent('/pages/tabs/user/userAdministrationUser.htm'); + }; + + this.leave = function() + { + }; + +}(); +UserAdminPageAdmin = new function() +{ + var MAINMENU_ID = "MAINMENU_OPTIONS"; + + this.enter = function(options) + { + MainMenu.select(MAINMENU_ID); + loadSysconfigUserAdmin(options); + }; + + this.leave = function() + { + }; + +}(); +SystemControlPage = new function() +{ + var MAINMENU_ID = "MAINMENU_OPTIONS"; + + this.enter = function(options) + { + MainMenu.select(MAINMENU_ID); + loadSystemControl(options); + }; + + this.leave = function() + { + }; + +}(); +CreateDiagramPage = new function() +{ + var MAINMENU_ID = "MAINMENU_OPTIONS"; + + this.enter = function(options) + { + MainMenu.select(MAINMENU_ID); + /* + // response should be: + // ID : string + // KEYS : array of strings + // NAME : string + var response = homematic("Diagram.getDataSourceGroups"); + if (response) { + jQuery.each(response, function(index, val) { + console.dir(val); + }); + } + */ + + conInfo("create diagram page"); + + doClearTempView = true; + if( typeof filter == "string" ) + { + updateContent("jpages/diagram/settings", "", 'system.SetSessionVar("sessionPrgIsFiltered", true);system.SetSessionVar("sessionPrgFilter","'+filter+'");' ); + } + else + { + updateContent("jpages/diagram/settings"); + } + }; + + this.leave = function() + { + }; + +}(); +CreateDiagramPage = new function() +{ + var MAINMENU_ID = "MAINMENU_OPTIONS"; + + this.enter = function(options) + { + MainMenu.select(MAINMENU_ID); + /* + // response should be: + // ID : string + // KEYS : array of strings + // NAME : string + var response = homematic("Diagram.getDataSourceGroups"); + if (response) { + jQuery.each(response, function(index, val) { + console.dir(val); + }); + } + */ + + conInfo("create diagram page"); + + doClearTempView = true; + if( typeof filter == "string" ) + { + updateContent("jpages/diagram/settings", "", 'system.SetSessionVar("sessionPrgIsFiltered", true);system.SetSessionVar("sessionPrgFilter","'+filter+'");' ); + } + else + { + updateContent("jpages/diagram/settings"); + } + }; + + this.leave = function() + { + }; + +}(); +DiagramListPage = new function() +{ + var MAINMENU_ID = "MAINMENU_OPTIONS"; + + this.enter = function(options) + { + MainMenu.select(MAINMENU_ID); + conInfo("create diagram list page"); + + doClearTempView = true; + if( typeof filter == "string" ) + { + updateContent("jpages/diagram/control", "", 'system.SetSessionVar("sessionPrgIsFiltered", true);system.SetSessionVar("sessionPrgFilter","'+filter+'");' ); + } + else + { + updateContent("jpages/diagram/control"); + } + + }; + + this.leave = function() + { + }; + +}(); +CreateGroupPage = new function() +{ + var MAINMENU_ID = "MAINMENU_OPTIONS"; + + this.enter = function(options) + { + MainMenu.select(MAINMENU_ID); + //alert("create group page"); + + conInfo("create group list page"); + + doClearTempView = true; + if( typeof filter == "string" ) + { + updateContent("jpages/group/list", "", 'system.SetSessionVar("sessionPrgIsFiltered", true);system.SetSessionVar("sessionPrgFilter","'+filter+'");' ); + } + else + { + updateContent("jpages/group/list"); + } + + }; + + this.leave = function() + { + }; + +}(); +CreateTestPage = new function() +{ + var MAINMENU_ID = "MAINMENU_OPTIONS"; + + this.enter = function(options) + { + MainMenu.select(MAINMENU_ID); + + conInfo("create testpage"); + + doClearTempView = true; + if( typeof filter == "string" ) + { + updateContent("jpages/testjavapage", "", 'system.SetSessionVar("sessionPrgIsFiltered", true);system.SetSessionVar("sessionPrgFilter","'+filter+'");' ); + } + else + { + updateContent("jpages/testjavapage"); + } + }; + + this.leave = function() + { + }; + +}(); +DeviceFirmware = new function() +{ + var MAINMENU_ID = "MAINMENU_OPTIONS"; + + this.enter = function(options) + { + MainMenu.select(MAINMENU_ID); + + conInfo("Show page device firmware"); + + doClearTempView = true; + if( typeof filter == "string" ) + { + updateContent("jpages/devicefirmware", "", 'system.SetSessionVar("sessionPrgIsFiltered", true);system.SetSessionVar("sessionPrgFilter","'+filter+'");' ); + } + else + { + updateContent("jpages/devicefirmware"); + } + }; + + this.leave = function() + { + }; + +}(); +function compare(a,b) { + if (a.name < b.name) + return -1; + if (a.name > b.name) + return 1; + return 0; +} + +DeviceFirmwareInformation = new function() +{ + var MAINMENU_ID = "MAINMENU_OPTIONS"; + + /** + * @param options + * iface + * address + * redirect_url + * with_group + **/ + this.enter = function(options) + { + ResetPostString(); + + MainMenu.select(MAINMENU_ID); + var poststr = ""; + + var arDevList = []; + + jQuery.each(DeviceList.devices, function(index,dev) { + if (dev.interfaceName != "VirtualDevices") { + arDevList.push({"address": dev.address, "interfaceName": dev.interfaceName, "name": dev.name}); + } + }); + + // Sort the table by name + arDevList.sort(compare); + + poststr += "&deviceList="; + jQuery.each(arDevList, function(index,dev) { + poststr += dev.address + ' ' + dev.interfaceName + ' '; + }); + + updateContent(UI_PATH + 'ic_deviceFirmwareOverview.cgi', poststr); + }; + + this.leave = function() + { + }; + +}();VariableListPage = new function() +{ + var MAINMENU_ID = "MAINMENU_OPTIONS"; + + this.enter = function(options) + { + MainMenu.select(MAINMENU_ID); + loadSysconfigSysVars(options); + }; + + this.leave = function() + { + }; + +}(); +DeviceConfigPage = new function() +{ + var MAINMENU_ID = "MAINMENU_OPTIONS"; + + /** + * @param options + * iface + * address + * redirect_url + * with_group + **/ + this.enter = function(options) + { + ResetPostString(); + + MainMenu.select(MAINMENU_ID); + var poststr = ""; + if (typeof(options) != "undefined") + { + for(key in options) + { + poststr += "&" + key + "=" + options[key]; + } + } + + updateContent(UI_PATH + 'ic_deviceparameters.cgi', poststr); + }; + + this.leave = function() + { + }; + +}(); +getGatewayStatus = function() +{ + return [ + {address: "ABC1234567", description: "", isConnected: true, isDefault: true}, + {address: "ABC0234567", description: "", isConnected: false, isDefault: false} + ]; +}; + +var globalLGWTypeMap = {}; +var globalLGWTypes = {LANIF : "Lan Interface", HMWLGW : "HMWLGW", HMLGW2 : "HMLGW2"}; +var globalGWClasses = {RF : "RF", Wired : "Wired"}; + +BidcosRfPage = +{ + UPDATE_INTERVALL: 5, + + m_page: null, + m_optionsContainer: null, + m_optionsHeadline: null, + m_optionsForm: null, + m_gatewayContainer: null, + m_gatewayTableHead: null, + m_gatewayTableHeadRow: null, + m_gatewayTableAddressHeader: null, + m_gatewayTableKeyHeader: null, + m_gatewayTableIPHeader: null, + m_gatewayTableStateHeader: null, + m_gatewayTableDCStateHeader: null, + m_gatewayTableFWStateHeader: null, + m_gatewayTableActionHeader: null, + m_gatewayTableBody: null, + m_optionsButtonBar: null, + m_addGatewayButton: null, + m_applyButton: null, + m_optionButtonClear: null, + m_optionsFooter: null, + m_allocationContainer: null, + m_allocationHeadline: null, + m_allocationTable: null, + m_allocationTableHead: null, + m_allocationTableHeadRow: null, + m_allocationTableNameHeader: null, + m_allocationTableImageHeader: null, + m_allocationTableAddressHeader: null, + m_allocationTableGatewayHeader: null, + m_allocationTableActionHeader: null, + m_allocationTableBody: null, + m_onSourceChangedHandler: null, + m_onAddGatewayHandlerRF: null, + m_onApplyHandler: null, + m_onUpdateHandler: null, + m_periodicalUpdater: null, + m_defaultGateway: null, + + m_devices: [], + + + create: function() + { + this.m_page = document.createElement("div"); + this.m_page.className = "bidcosrf_page"; + + globalLGWTypeMap[globalLGWTypes.HMWLGW] = "HomeMatic RS485 Gateway"; + globalLGWTypeMap[globalLGWTypes.HMLGW2] = "HomeMatic RF-LAN Gateway"; + globalLGWTypeMap[globalLGWTypes.LANIF] = "HM Configuration Tool LAN"; + + /* Event-Handler */ + this.m_onUpdateHandler = function() { BidcosRfPage.onUpdate(); }; + this.m_onSourceChangedHandler = function() { BidcosRfPage.onSourceChanged(); }; + this.m_onAddGatewayHandlerRF = function() { BidcosRfPage.onAddGateway(); }; + this.m_onApplyHandler = function() { BidcosRfPage.onApply(); }; + + /* Periodisches Update */ + this.m_periodicalUpdater = new PeriodicalExecuter(this.m_onUpdateHandler, this.UPDATE_INTERVALL); + + /* Allgmeine Einstellungen */ + this.m_optionsContainer = document.createElement("div"); + this.m_page.appendChild(this.m_optionsContainer); + + /* Überschrift */ + this.m_optionsHeadline = document.createElement("h1"); + //this.m_optionsHeadline.appendChild(document.createTextNode("Allgmeine Einstellungen")); + this.m_optionsHeadline.appendChild(document.createTextNode(translateKey("dialogSettingsBidCosRFConfLblSettings"))); + this.m_optionsContainer.appendChild(this.m_optionsHeadline); + + /* Formular zur Auswahl der Quelle */ + this.m_optionsForm = document.createElement("form"); + this.m_optionsContainer.appendChild(this.m_optionsForm); + + /* Container für BidCoS-RF Gateways */ + this.m_gatewayContainer = document.createElement("div"); + $(this.m_gatewayContainer).hide(); + this.m_optionsContainer.appendChild(this.m_gatewayContainer); + + /* Tabelle für BidCoS-RF Gateways */ + this.m_gatewayTable = document.createElement("table"); + this.m_gatewayTable.className = "bidcosrf_table"; + $(this.m_gatewayTable).writeAttribute("cellspacing", "0"); + this.m_gatewayContainer.appendChild(this.m_gatewayTable); + + /* Tabellenkopf (Tabelle für BidCoS-RF Gateways) */ + this.m_gatewayTableHead = document.createElement("thead"); + this.m_gatewayTable.appendChild(this.m_gatewayTableHead); + + /* Kopfzeile (Tabelle für BidCoS-RF Gateways) */ + this.m_gatewayTableHeadRow = document.createElement("tr"); + this.m_gatewayTableHead.appendChild(this.m_gatewayTableHeadRow); + + /* Spaltenüberschrift Name (Tabelle für BidCoS-RF Gateways */ + this.m_gatewayTableAddressHeader = document.createElement("th"); + this.m_gatewayTableAddressHeader.className = "bidcosrf_tableheader"; + this.m_gatewayTableAddressHeader.appendChild(document.createTextNode(translateKey("thName"))); + this.m_gatewayTableHeadRow.appendChild(this.m_gatewayTableAddressHeader); + + /* Spaltenüberschrift Seriennummer (Tabelle für BidCoS-RF Gateways */ + this.m_gatewayTableAddressHeader = document.createElement("th"); + this.m_gatewayTableAddressHeader.className = "bidcosrf_tableheader"; + //this.m_gatewayTableAddressHeader.appendChild(document.createTextNode("Seriennummer")); + this.m_gatewayTableAddressHeader.appendChild(document.createTextNode("Gateway")); + this.m_gatewayTableHeadRow.appendChild(this.m_gatewayTableAddressHeader); + + /* Spaltenüberschrift AES-Schlüssel (Tabelle für BidCoS-RF Gateways */ + this.m_gatewayTableKeyHeader = document.createElement("th"); + this.m_gatewayTableKeyHeader.className = "bidcosrf_tableheader"; + //this.m_gatewayTableKeyHeader.appendChild(document.createTextNode("Zugriffscode")); + this.m_gatewayTableKeyHeader.appendChild(document.createTextNode(translateKey("dialogSettingsBidcosRFSecurityKey"))); + this.m_gatewayTableHeadRow.appendChild(this.m_gatewayTableKeyHeader); + + /* Spaltenüberschrift IP (Tabelle für BidCoS-RF Gateways */ + this.m_gatewayTableIPHeader = document.createElement("th"); + this.m_gatewayTableIPHeader.className = "bidcosrf_tableheader"; + //this.m_gatewayTableIPHeader.appendChild(document.createTextNode("IP-Adresse")); + this.m_gatewayTableIPHeader.appendChild(document.createTextNode(translateKey("thIPAddress"))); + this.m_gatewayTableHeadRow.appendChild(this.m_gatewayTableIPHeader); + + /* Spaltenüberschrift Status (Tabelle für BidCoS-RF Gateways */ + this.m_gatewayTableStateHeader = document.createElement("th"); + this.m_gatewayTableStateHeader.className = "bidcosrf_tableheader"; + //this.m_gatewayTableStateHeader.appendChild(document.createTextNode("Status")); + this.m_gatewayTableStateHeader.appendChild(document.createTextNode(translateKey("thState"))); + this.m_gatewayTableHeadRow.appendChild(this.m_gatewayTableStateHeader); + + /* Spaltenüberschrift DutyCycle Status (Tabelle für BidCoS-RF Gateways */ + this.m_gatewayTableDCStateHeader = document.createElement("th"); + this.m_gatewayTableDCStateHeader.className = "bidcosrf_tableheader"; + //this.m_gatewayTableStateHeader.appendChild(document.createTextNode("Status")); + this.m_gatewayTableDCStateHeader.appendChild(document.createTextNode("DutyCycle")); + this.m_gatewayTableHeadRow.appendChild(this.m_gatewayTableDCStateHeader); + + /* Spaltenüberschrift Firmware Status (Tabelle für BidCoS-RF Gateways */ + this.m_gatewayTableFWStateHeader = document.createElement("th"); + this.m_gatewayTableFWStateHeader.className = "bidcosrf_tableheader"; + //this.m_gatewayTableStateHeader.appendChild(document.createTextNode("Status")); + this.m_gatewayTableFWStateHeader.appendChild(document.createTextNode("Firmware")); + this.m_gatewayTableHeadRow.appendChild(this.m_gatewayTableFWStateHeader); + + /* Spaltenüberschrift Verbunden (Tabelle für BidCoS-RF Gateways */ + this.m_gatewayTableActionHeader = document.createElement("th"); + this.m_gatewayTableActionHeader.className = "bidcosrf_tableheader"; + //this.m_gatewayTableActionHeader.appendChild(document.createTextNode("Aktion")); + this.m_gatewayTableActionHeader.appendChild(document.createTextNode(translateKey("thAction"))); + this.m_gatewayTableHeadRow.appendChild(this.m_gatewayTableActionHeader); + + /* Tabellenkörper (Tabelle für BidCoS-RF Gateways) */ + this.m_gatewayTableBody = document.createElement("tbody"); + this.m_gatewayTable.appendChild(this.m_gatewayTableBody); + + /* Optionsmenü */ + this.m_optionsButtonBar = document.createElement("div"); + this.m_optionsContainer.appendChild(this.m_optionsButtonBar); + + /* Button zum Übernehmen der Einstellungen */ + this.m_applyButton = document.createElement("div"); + //this.m_applyButton.appendChild(document.createTextNode("Übernehmen")); + this.m_applyButton.appendChild(document.createTextNode(translateKey("dialogSettingsBidCosRFConfBtnSave"))); + Event.observe($(this.m_applyButton), "click", this.m_onApplyHandler); + this.m_applyButton.className = "StdButton bidcosrf_optionbutton"; + this.m_optionsButtonBar.appendChild(this.m_applyButton); + + /* Button zum Hinzufügen von RF Gateways */ + this.m_addGatewayButton = document.createElement("div"); + $(this.m_addGatewayButton).hide(); + //this.m_addGatewayButton.appendChild(document.createTextNode("Hinzufügen")); + this.m_addGatewayButton.appendChild(document.createTextNode(translateKey("dialogSettingsBidCosRFConfBtnAdd"))); + Event.observe($(this.m_addGatewayButton), "click", this.m_onAddGatewayHandlerRF); + this.m_addGatewayButton.className = "StdButton bidcosrf_optionbutton"; + this.m_optionsButtonBar.appendChild(this.m_addGatewayButton); + + /* float-Bereich löschen */ + this.m_optionButtonClear = document.createElement("div"); + this.m_optionButtonClear.className = "bidcosrf_clear"; + this.m_optionsButtonBar.appendChild(this.m_optionButtonClear); + + /* Footer für allgemeine Einstellungen*/ + this.m_optionsFooter = document.createElement("div"); + this.m_optionsFooter.className = "bidcosrf_footer"; + this.m_optionsContainer.appendChild(this.m_optionsFooter); + + /* Gateway-Zuordnung */ + this.m_allocationContainer = document.createElement("div"); + this.m_page.appendChild(this.m_allocationContainer); + + /* Überschrift für Gateway-Zuordnung */ + this.m_allocationHeadline = document.createElement("h1"); + //this.m_allocationHeadline.appendChild(document.createTextNode("Interface-Zuordnung")); + this.m_allocationHeadline.appendChild(document.createTextNode(translateKey("dialogSettingsBidCosRFConfIfaceAssignment"))); + this.m_allocationContainer.appendChild(this.m_allocationHeadline); + + /* Tabelle für Gateway-Zuordnung */ + this.m_allocationTable = document.createElement("table"); + this.m_allocationTable.className = "bidcosrf_table"; + $(this.m_allocationTable).writeAttribute("cellspacing", "0"); + this.m_allocationContainer.appendChild(this.m_allocationTable); + + /* Tabellenkopf (Tabelle für Gateway-Zuordnung) */ + this.m_allocationTableHead = document.createElement("thead"); + this.m_allocationTable.appendChild(this.m_allocationTableHead); + + /* Zeile im Tabellenkopf (Tabelle für Gateway-Zuordnung) */ + this.m_allocationTableHeadRow = document.createElement("tr"); + this.m_allocationTableHead.appendChild(this.m_allocationTableHeadRow); + + /* Spaltenüberschrift "Name" (Tabelle für Gateway-Zuordnung) */ + this.m_allocationTableNameHeader = document.createElement("th"); + this.m_allocationTableNameHeader.className = "bidcosrf_tableheader"; + //this.m_allocationTableNameHeader.appendChild(document.createTextNode("Name")); + this.m_allocationTableNameHeader.appendChild(document.createTextNode(translateKey("thName"))); + this.m_allocationTableHeadRow.appendChild(this.m_allocationTableNameHeader); + + /* Spaltenüberschrift "Bild" (Tabelle für Gateway-Zuordnung) */ + this.m_allocationTableImageHeader = document.createElement("th"); + this.m_allocationTableImageHeader.className = "bidcosrf_tableheader"; + //this.m_allocationTableImageHeader.appendChild(document.createTextNode("Bild")); + this.m_allocationTableImageHeader.appendChild(document.createTextNode(translateKey("thPicture"))); + this.m_allocationTableHeadRow.appendChild(this.m_allocationTableImageHeader); + + /* Spaltenüberschrift "Seriennummer" (Tabelle für Gateway-Zuordnung) */ + this.m_allocationTableAddressHeader = document.createElement("th"); + this.m_allocationTableAddressHeader.className = "bidcosrf_tableheader"; + //this.m_allocationTableAddressHeader.appendChild(document.createTextNode("Seriennummer")); + this.m_allocationTableAddressHeader.appendChild(document.createTextNode(translateKey("thSerialNumber"))); + this.m_allocationTableHeadRow.appendChild(this.m_allocationTableAddressHeader); + + /* Spaltenüberschrift "Gatway" (Tabelle für Gateway-Zuordnung) */ + this.m_allocationTableGatewayHeader = document.createElement("th"); + this.m_allocationTableGatewayHeader.className = "bidcosrf_tableheader"; + this.m_allocationTableGatewayHeader.appendChild(document.createTextNode("Gateway")); + this.m_allocationTableHeadRow.appendChild(this.m_allocationTableGatewayHeader); + + /* Spaltenüberschrift "Aktion" (Tabelle für Gateway-Zuordnung) */ + this.m_allocationTableActionHeader = document.createElement("th"); + this.m_allocationTableActionHeader.className = "bidcosrf_tableheader"; + //this.m_allocationTableActionHeader.appendChild(document.createTextNode("Aktion")); + this.m_allocationTableActionHeader.appendChild(document.createTextNode(translateKey("thAction"))); + this.m_allocationTableHeadRow.appendChild(this.m_allocationTableActionHeader); + + /* Tabellenkörper (Tabelle für Gateway-Zuordnung) */ + this.m_allocationTableBody = document.createElement("tbody"); + this.m_allocationTable.appendChild(this.m_allocationTableBody); + + this.m_gatewayContainer.show(); + this.m_addGatewayButton.show(); + + }, + + destroy: function() + { + var i, len; + + /* Periodisches Update deaktivieren */ + this.m_periodicalUpdater.stop(); + + /* Ereignis-Handler abmelden */ + //Event.stopObserving($(this.m_antennaRadioButton), "click", this.m_sourceChangedHandler); + //Event.stopObserving($(this.m_hmcfgRadioButton), "click", this.m_sourceChangedHandler); + Event.stopObserving($(this.m_applyButton), "click", this.m_onApplyHandler); + Event.stopObserving($(this.m_addGatewayButton), "click", this.m_onAddGatewayHandlerRF); + + /* Gateways entfernen */ + for (i = 0, len = this.m_gateways.length; i < len; i++) + { + var gateway = this.m_gateways[i]; + gateway.destroy(); + } + this.m_gateways = []; + + /* Geräte entfernen */ + for (i = 0, len = this.m_devices.length; i < len; i++) + { + var device = this.m_devices[i]; + device.destroy(); + } + this.m_devices = []; + }, + + enter: function() + { + + + MainMenu.select("MAINMENU_OPTIONS"); + + var PATH_HTML= "" + + ""+translateKey("menuSettingsPage")+"" + + " > " + + ""+translateKey("submenuSysControl")+"" + + " > " + + translateKey("dialogSettingsBidCosRFConfPath"), + + FOOTER_HTML= "" + + "" + + "" + + "" + + "" + + "
"+translateKey("footerBtnPageBack")+"
"; + + setPath(PATH_HTML); + setFooter(FOOTER_HTML); + InterfaceMonitor.stop(); + + this.create(); + this.loadGateways(); + this.loadDevices(); + + WebUI.setContent(this.m_page); + }, + + leave: function() + { + this.destroy(); + InterfaceMonitor.start(); + }, + + onSourceChanged: function() + { + /* if (this.m_hmcfgRadioButton.checked) + { + $(this.m_gatewayContainer).show(); + $(this.m_addGatewayButton).show(); + } + else + { + $(this.m_gatewayContainer).hide(); + $(this.m_addGatewayButton).hide(); + }*/ + }, + + onAddGateway: function() + { + + var wiredGWExists = false; + for (var i = 0, len = this.m_gateways.length; i < len; i++) + { + var gateway = this.m_gateways[i]; + if( globalGWClasses.Wired == gateway.getGatewayClass()) { + wiredGWExists = true; + break; + } + } + new BidcosRfPage.AddGatewayDialog(wiredGWExists) + .setAction(this.onGatewayAdded, this); + }, + + onGatewayAdded: function(dialog) + { + var gateway = new BidcosRfPage.Gateway() + .setGatewayClass(dialog.getGatewayClass()) + .setType(dialog.getType()) + .setUserName(dialog.getUserName()) + .setAddress(dialog.getSerial()) + .setKey(dialog.getKey()) + .setIP(dialog.getIp()) + .setState(translateKey("lanGatewayLblNotActive")); + + this.m_gatewayTableBody.appendChild(gateway.getElement()); + this.m_gateways.push(gateway); + }, + + + onApply: function() + { + var gatewaysRF = []; + var gatewaysWired = []; + +/* var useInternalAntenna = this.m_antennaRadioButton.checked; + if (this.ss.length == 0) + { + useInternalAntenna = true; + } + */ + + /* RF-Gateways */ + for (var i = 0, len = this.m_gateways.length; i < len; i++) + { + var gateway = this.m_gateways[i]; + if( globalGWClasses.RF == gateway.getGatewayClass()) { + gatewaysRF.push({ + type : gateway.getType(), + userName : gateway.getUserName(), + serialNumber : gateway.getAddress(), + encryptionKey: gateway.getKey(), + ipAddress : gateway.getIP() + }); + } + else { //gatewayClass is: Wired + gatewaysWired.push({ + type : gateway.getType(), + userName : gateway.getUserName(), + serialNumber : gateway.getAddress(), + encryptionKey: gateway.getKey(), + ipAddress : gateway.getIP() + }); + } + } + + homematic("BidCoS_RF.setConfigurationRF", { + // "useInternalAntenna": useInternalAntenna, + "interfaces": gatewaysRF + }); + + homematic("BidCoS_Wired.setConfigurationWired", { + "interfaces": gatewaysWired + }); + + + // if (/*(useInternalAntenna == false) &&*/ (homematic("BidCoS_RF.isKeySet", null))) //TODO Check if this is okay + // { + // new BidcosRfPage.OptionsDialog(); + // } + // else + // { + //MessageBox.show("Info", "Die Konfiguration wurde an die HomeMatic Zentrale übertragen.\nDie Änderungen werden mit dem nächsten Start der HomeMatic Zentrale wirksam."); + MessageBox.show(translateKey("dialogInfo"), translateKey("dialogSettingsBidcosRFSaveConfigSucceed")); + WebUI.enter(BidcosRfPage); + // } + }, + + onUpdate: function() + { + var that = this; + //Sort gateways into own arrays to avoid interferences when doing more than one homematic() calls. + var rfGateways = new Array(); + var wiredGateways = new Array(); + + for(var i = 0, len = that.m_gateways.length; i < len; i++) + { + if(that.m_gateways[i].getGatewayClass() == globalGWClasses.Wired) { + wiredGateways.push(that.m_gateways[i]); + } + else { + rfGateways.push(that.m_gateways[i]); + } + } + /* RF-Gateways */ + homematic("Interface.listBidcosInterfaces", {"interface": "BidCos-RF"}, function(gatewayStatus) { + if (gatewayStatus) + { + for (var i = 0, len = rfGateways.length; i < len; i++) + { + if(globalLGWTypes.HMLGW2 == rfGateways[i].getType()) {//NEW RF Gateway + //var hmlgw2GW = rfGateways[i]; + var lgwStatus = null; + homematic("Interface.getLGWConnectionStatus", {"interface" : "BidCos-RF", "serial" : rfGateways[i].getAddress()}, function(lgwStatus) { + var textB = ""; + var lgw = null; + if(lgwStatus) + { + for(var j = 0; j < rfGateways.length; j++) { + if(rfGateways[j].getAddress() == lgwStatus.serial) { + lgw = rfGateways[j]; + } + } + for (var loop = 0; loop < gatewayStatus.length; loop++) { + gatewaysn = gatewayStatus[loop].address; + if (lgwStatus.serial == gatewaysn) { + var textDC = gatewayStatus[loop].dutyCycle + "%"; + lgw.setDCState(textDC); + + var textFW = gatewayStatus[loop].fwVersion; + lgw.setFWState(textFW); + } + } + if(lgw) + { + if(lgwStatus.connstat == "NO_ERROR") { + textB = translateKey("lanGatewayLblConnected"); + } + else if(lgwStatus.connstat == "CONNECT_FAILED") { + textB = translateKey("lanGatewayLblNotConnected"); + } + else if(lgwStatus.connstat == "WRONG_KEY") { + textB = translateKey("errorWrongPassword"); + } + else if(lgwStatus.connstat == "") { + textB = translateKey("lanGatewayLblNotConnected"); + } + else { + textB = translateKey("lanGatewayLblNotConnected"); + } + } + else + { + textB = translateKey("lanGatewayLblNotActive"); + } + lgw.setState(textB); + }//if lgwstatus + else { + lgw.setState(translateKey("lanGatewayLblNotActive")); + } + }); + } + else //all other rf gateways + { + var text = ""; + var status = rfGateways[i].determineState(gatewayStatus); + var cfglan = rfGateways[i].getAddress(gatewayStatus); + + for (var loop = 0; loop < gatewayStatus.length; loop++) { + gatewaysn = gatewayStatus[loop].address; + + if (cfglan == gatewaysn) { + var textDC = gatewayStatus[loop].dutyCycle + "%"; + rfGateways[i].setDCState(textDC); + + var textFW = gatewayStatus[loop].fwVersion; + if (textFW < "965") { + textFW = "0." + gatewayStatus[loop].fwVersion + " (Update: 0.965)"; + } else { + textFW = "0." + gatewayStatus[loop].fwVersion; + } + rfGateways[i].setFWState(textFW); + } + } + + if (status) + { + text = (status.isConnected) ? translateKey("lanGatewayLblConnected") : translateKey("lanGatewayLblNotConnected"); + if (status.isDefault) { text += " " + translateKey("lanGatewayLblStandard"); } + } + else + { + //text = "inaktiv"; + text = translateKey("lanGatewayLblNotActive"); + } + rfGateways[i].setState(text); + } + } + + //Set address of default gateway + if (!that.m_defaultGateway) + { + for (var i = 0, len = gatewayStatus.length; i < len; i++) + { + if (gatewayStatus[i].isDefault) + { + //alert("isDEfault"+gatewayStatus[i].address); + that.m_defaultGateway = new BidcosRfPage.Gateway() + .setAddress(gatewayStatus[i].address); + } + } + } + jQuery("." + that.m_defaultGateway.getAddress()).text(translateKey("lanGatewayLblStandard")); + } + }); + /* Wired Gateways */ + for(var k = 0, length = wiredGateways.length; k < length ; k++) + { + var wiredLGW = wiredGateways[k]; + homematic("Interface.getLGWConnectionStatus", {"interface" : "BidCos-Wired", "serial" : wiredLGW.getAddress()}, function(lgwStatus) { + var textB = ""; + var lgw = null; + if(lgwStatus) + { + for(var j = 0; j < wiredGateways.length; j++) { + if(wiredGateways[j].getAddress() == lgwStatus.serial) { + lgw = wiredGateways[j]; + } + } + if(lgw) + { + if(lgwStatus.connstat == "NO_ERROR") { + textB = translateKey("lanGatewayLblConnected"); + } + else if(lgwStatus.connstat == "CONNECT_FAILED") { + textB = translateKey("lanGatewayLblNotConnected"); + } + else if(lgwStatus.connstat == "WRONG_KEY") { + textB = translateKey("errorWrongPassword"); + } + else if(lgwStatus.connstat == "") { + textB = translateKey("lanGatewayLblNotConnected"); + } + else { + textB = translateKey("lanGatewayLblNotConnected"); + } + } + else { + textB = translateKey("lanGatewayLblNotActive"); + } + lgw.setState(textB); + }//if lgwstatus + else { + lgw.setState(translateKey("lanGatewayLblNotActive")); + } + }); + } + }, + + loadGateways: function() + { + var i, len; + this.m_gateways = []; + + //HomeMatic RF Gateways + var response = homematic("BidCoS_RF.getConfigurationRF"); + if (response) + { + // this.m_antennaRadioButton.checked = response.useInternalAntenna; + // this.m_hmcfgRadioButton.checked = !response.useInternalAntenna; + this.onSourceChanged(); + + for (i = 0, len = response.interfaces.length; i < len; i++) + { + var gateway = response.interfaces[i]; + this.m_gateways.push(new BidcosRfPage.Gateway() + .setGatewayClass("RF") + .setType(gateway.type) + .setUserName(gateway.userName) + .setAddress(gateway.serialNumber) + .setKey(gateway.encryptionKey) + .setIP(gateway.ipAddress)); + } + + } + + //HomeMatic Wired Gateways + response = homematic("BidCoS_Wired.getConfigurationWired"); + if(response) + { + for (i = 0, len = response.interfaces.length; i < len; i++) + { + var gateway = response.interfaces[i]; + this.m_gateways.push(new BidcosRfPage.Gateway() + .setGatewayClass(globalGWClasses.Wired) + .setType(gateway.type) + .setUserName(gateway.userName) + .setAddress(gateway.serialNumber) + .setKey(gateway.encryptionKey) + .setIP(gateway.ipAddress)); + } + } + + //Add all gateways to table + for (i = 0, len = this.m_gateways.length; i < len; i++) + { + var gateway = this.m_gateways[i]; + this.m_gatewayTableBody.appendChild(gateway.getElement()); + } + + }, + + removeGateway: function(gateway) + { + gateway.destroy(); + this.m_gateways = this.m_gateways.without(gateway); + }, + + loadDevices: function() + { + var i, len, device; + this.m_devices = []; + + var devices = DeviceList.listDevices().ex_sortBy("name"); + + for (i = 0, len = devices.length; i < len; i++) + { + device = devices[i]; + if (device.interfaceName == "BidCos-RF") + { + this.m_devices.push(new BidcosRfPage.Device() + .setName(device.name) + .setImageHtml(device.getThumbnailHTML()) + .setAddress(device.address) + ); + } + } + + for (i = 0, len = this.m_devices.length; i < len; i++) + { + device = this.m_devices[i]; + this.m_allocationTableBody.appendChild(device.getElement()); + } + + var that = this; + homematic("Interface.listDevices", {"interface": "BidCos-RF"}, function(deviceList) { + if (deviceList) + { + for (var i = 0, len = that.m_devices.length; i < len; i++) + { + var device = that.m_devices[i]; + device.setGatewayFromDeviceList(deviceList); + } + } + }); + }, + + getGateways: function() + { + return this.m_gateways; + }, + + getDefaultGateway: function() + { + return this.m_defaultGateway; + } +}; + +BidcosRfPage.Gateway = function() +{ + this.create(); +}; + +BidcosRfPage.Gateway.prototype = +{ + m_element: null, + m_type: null, + m_address: null, + m_key: null, + m_ip: null, + m_userNameLabel: null, + m_addressLabel: null, + m_keyLabel: null, + m_ipLabel: null, + m_stateLabel: null, + m_stateDCLabel: null, + m_stateFWLabel: null, + m_actionCell: null, + m_deleteButton: null, + m_onDeleteHandler: null, + m_editButton: null, + m_onEditHandler: null, + m_changeKeyButton : null, + m_onChangeKeyHandler : null, + + create: function() + { + /* Event-Handler */ + var that = this; + this.m_onDeleteHandler = function() { that.onDelete(); }; + this.m_onEditHandler = function() { that.onEdit(); }; + this.m_onChangeKeyHandler = function() { that.onChangeKey(); }; + + /* Tabellenzeile */ + this.m_element = document.createElement("tr"); + + /** Gateway-Klasse (RF oder Wired)*/ + this.m_gatewayClass = ""; + + /** Gateway-Typ (Lan Interface / HMWLGW) */ + this.m_type = ""; + + /* userName */ + this.m_userName = ""; + this.m_userNameLabel = document.createElement("td"); + this.m_userNameLabel.className = "bidcosrf_tablecell"; + this.m_element.appendChild(this.m_userNameLabel); + + /* Seriennummer */ + this.m_address = ""; + this.m_addressLabel = document.createElement("td"); + this.m_addressLabel.className = "bidcosrf_tablecell"; + this.m_element.appendChild(this.m_addressLabel); + + /* Zugriffscode */ + this.m_keyLabel = document.createElement("td"); + this.m_keyLabel.className = "bidcosrf_tablecell"; + this.m_element.appendChild(this.m_keyLabel); + + /* IP-Addresse */ + this.m_ipLabel = document.createElement("td"); + this.m_ipLabel.className = "bidcosrf_tablecell"; + this.m_element.appendChild(this.m_ipLabel); + + /* Status */ + this.m_stateLabel = document.createElement("td"); + this.m_stateLabel.className = "bidcosrf_tablecell"; + this.m_element.appendChild(this.m_stateLabel); + + /* DutyCycle Status */ + this.m_stateDCLabel = document.createElement("td"); + this.m_stateDCLabel.className = "bidcosrf_tablecell"; + this.m_element.appendChild(this.m_stateDCLabel); + + /* Firmware Status */ + this.m_stateFWLabel = document.createElement("td"); + this.m_stateFWLabel.className = "bidcosrf_tablecell"; + this.m_element.appendChild(this.m_stateFWLabel); + + /* Aktion */ + this.m_actionCell = document.createElement("td"); + this.m_actionCell.className = "bidcosrf_actioncell"; + this.m_element.appendChild(this.m_actionCell); + + /* Löschen-Button */ + this.m_deleteButton = document.createElement("div"); + this.m_deleteButton.className = "StdButton";//"bidcosrf_button"; + //this.m_deleteButton.appendChild(document.createTextNode("Löschen")); + this.m_deleteButton.appendChild(document.createTextNode(translateKey("btnRemove"))); + Event.observe($(this.m_deleteButton), "click", this.m_onDeleteHandler); + Element.setStyle(this.m_deleteButton, { + margin : "1px" + }); + this.m_actionCell.appendChild(this.m_deleteButton); + + /* Edit-Button */ + this.m_editButton = document.createElement("div"); + this.m_editButton.className = "StdButton";//"bidcosrf_button"; + Element.setStyle(this.m_editButton, { + margin : "1px" + }); + this.m_editButton.appendChild(document.createTextNode(translateKey("dialogSettingsBidCosRFConfBtnSet"))); + Event.observe($(this.m_editButton), "click", this.m_onEditHandler); + this.m_actionCell.appendChild(this.m_editButton); + + + /* change key button */ + this.m_changeKeyButton = document.createElement("div"); + this.m_changeKeyButton.className = "StdButton"; + this.m_changeKeyButton.id = "changeKeyButtonId"; + Element.setStyle(this.m_changeKeyButton, { + margin : "1px" + }); + this.m_changeKeyButton.appendChild(document.createTextNode(translateKey("dialogSettingsBidcosRFChangeAccessCodeTitle"))); + Event.observe($(this.m_changeKeyButton), "click", this.m_onChangeKeyHandler); + this.m_actionCell.appendChild(this.m_changeKeyButton); + }, + + destroy: function() + { + Event.stopObserving($(this.m_deleteButton), "click", this.m_onDeleteHandler); + Event.stopObserving($(this.m_editButton), "click", this.m_onEditHandler); + Event.stopObserving($(this.m_changeKeyButton), "click", this.m_onChangeKeyHandler); + $(this.m_element).remove(); + }, + + getGatewayClass : function() + { + return this.m_gatewayClass; + }, + + setGatewayClass: function(gwClass) + { + this.m_gatewayClass = gwClass; + return this; + }, + + setType: function(type) + { + this.m_type = type; + if( (this.m_type !== globalLGWTypes.HMLGW2) && (this.m_type !== globalLGWTypes.HMWLGW) ) + { + this.m_changeKeyButton.hide(); + } + return this; + }, + + getType: function() + { + return this.m_type; + }, + + setUserName: function(name) + { + if(name != undefined) { + this.m_userName = name; + this.m_userNameLabel.innerHTML = ""; + this.m_userNameLabel.appendChild(document.createTextNode(name)); + } + return this; + }, + + getUserName: function() + { + return this.m_userName; + }, + + setAddress: function(address) + { + this.m_address = address; + this.m_addressLabel.innerHTML = this.m_address+"
"+globalLGWTypeMap[this.m_type]; + return this; + }, + + getAddress: function() + { + return this.m_address; + }, + + setKey: function(key) + { + this.m_key = key; + + this.m_keyLabel.innerHTML = ""; + this.m_keyLabel.appendChild(document.createTextNode(key)); + + return this; + }, + + getKey: function() + { + return this.m_key; + }, + + setIP: function(ip) + { + this.m_ip = ip; + + this.m_ipLabel.innerHTML = ""; + this.m_ipLabel.appendChild(document.createTextNode(ip)); + + return this; + }, + + getIP: function() + { + return this.m_ip; + }, + + setState: function(state) + { + + this.m_stateLabel.innerHTML = ""; + this.m_stateLabel.appendChild(document.createTextNode(state)); + + return this; + }, + + setDCState: function(state) + { + this.m_stateDCLabel.innerHTML = ""; + this.m_stateDCLabel.appendChild(document.createTextNode(state)); + }, + + setFWState: function(state) + { + this.m_stateFWLabel.innerHTML = ""; + this.m_stateFWLabel.appendChild(document.createTextNode(state)); + }, + + getElement: function() + { + return this.m_element; + }, + + determineState: function(status) + { + for (i = 0, len = status.length; i < len; i++) + { + if (this.m_address == status[i].address) + { + return status[i]; + } + } + + return null; + }, + + onDelete: function() + { + var that = this; + //new YesNoDialog("Sicherheitsabfrage", "Möchten Sie den HomeMatic Konfigurations-Adapter wirklich löschen?", function(result) { + new YesNoDialog(translateKey("dialogSafetyCheck"), translateKey("dialogQuestionRemoveCFG"), function(result) { + + if (result == YesNoDialog.RESULT_YES) + { + BidcosRfPage.removeGateway(that); + } + }); + }, + + onEdit : function() + { + var that = this; + new BidcosRfPage.EditGatewayDialog(that).setAction(this.onGatewayEdited, this); + }, + + onGatewayEdited : function(dialog) { + this.setUserName(dialog.getUserName()); + this.setAddress(dialog.getSerial()); + this.setKey(dialog.getKey()); + this.setIP(dialog.getIPAddress()); + }, + + onChangeKey : function() + { + var that = this; + new BidcosRfPage.ChangeKeyDialog(that).setAction(this.onKeyChanged, this); + }, + + keyContainsNoForbiddenCharacter : function(key) { + if(key.indexOf("<") != -1) { return false; } + else if(key.indexOf(">") != -1) { return false; } + else if(key.indexOf("\'") != -1) { return false; } + else if(key.indexOf("\"") != -1) { return false; } + else if(key.indexOf("&") != -1) { return false; } + else if(key.indexOf("$") != -1) { return false; } + else if(key.indexOf("?") != -1) { return false; } + else if(key.indexOf("[") != -1) { return false; } + else if(key.indexOf("]") != -1) { return false; } + else if(key.indexOf("{") != -1) { return false; } + else if(key.indexOf("}") != -1) { return false; } + else if(key.indexOf("#") != -1) { return false; } + else if(key.indexOf("\\") != -1) { return false; } + else { return true; } + return false; + }, + + onKeyChanged : function(dialog) + { + var key = dialog.getKey(); + var key2 = dialog.getKeyRepetition(); + if(key === "") { + MessageBox.show(translateKey("dialogSettingsBidcosRFChangeAccessCodeDialogErrorTitle"), translateKey("dialogSettingsBidcosRFChangeAccessCodeDialogErrorTooShort")); + } + else if(key === key2) { + if(this.keyContainsNoForbiddenCharacter(key)) {//check if key contains a forbidden character + if( homematic("BidCoS.changeLanGatewayKey", { + "lgwclass" : this.getGatewayClass(), //RF or Wired + "lgwserial": this.getAddress(), + "lgwip" : this.getIP(), + "newkey" : key, + "curkey" : this.getKey() + }) ) { + MessageBox.show(translateKey("dialogInfo"), translateKey("dialogSettingsBidcosRFSaveConfigSucceed")); + } + else { + MessageBox.show(translateKey("dialogSettingsBidcosRFChangeAccessCodeDialogErrorTitle"), translateKey("dialogSettingsBidcosRFChangeAccessCodeDialogErrorGeneral")); + } + } + else { //!keyContainsNoForbiddenCharacter + MessageBox.show(translateKey("dialogSettingsBidcosRFChangeAccessCodeDialogErrorTitle"), translateKey("msgForbiddenCharacter")); + } + } + else { + MessageBox.show(translateKey("dialogSettingsBidcosRFChangeAccessCodeDialogErrorTitle"), translateKey("dialogSettingsBidcosRFChangeAccessCodeDialogErrorDontMatch")); + } + } + + +}; + + +BidcosRfPage.Device = function() +{ + this.create(); +}; + +BidcosRfPage.Device.prototype = +{ + m_element: null, + m_name: null, + m_nameLabel: null, + m_image: null, + m_address: null, + m_addressLabel: null, + m_gateway: null, + m_gatewayLabel: null, + m_roaming: null, + m_action: null, + m_configButton: null, + m_onConfigHandler: null, + + gatewayList : [], + + create: function() + { + + this.gatewayList = BidcosRfPage.getGateways(); + + /* Event-Handler */ + var that = this; + this.m_onConfigHandler = function() { that.onConfig(); }; + + /* Tabellenzeile */ + this.m_element = document.createElement("tr"); + + /* Name */ + this.m_nameLabel = document.createElement("td"); + this.m_nameLabel.className = "bidcosrf_tablecell"; + this.m_element.appendChild(this.m_nameLabel); + + /* Bild */ + this.m_image = document.createElement("td"); + this.m_image.className = "bidcosrf_imagecell bidcosrf_imagesize"; + this.m_image.innerHTML = " "; + this.m_element.appendChild(this.m_image); + + /* Seriennummer */ + this.m_addressLabel = document.createElement("td"); + this.m_addressLabel.className = "bidcosrf_tablecell"; + this.m_element.appendChild(this.m_addressLabel); + + /* Gateway */ + this.m_gatewayLabel = document.createElement("td"); + this.m_gatewayLabel.className = "bidcosrf_tablecell"; + this.m_element.appendChild(this.m_gatewayLabel); + + /* Aktion */ + this.m_action = document.createElement("td"); + this.m_action.className = "bidcosrf_actioncell"; + this.m_element.appendChild(this.m_action); + + /* Button zur Konfiguration */ + this.m_configButton = document.createElement("div"); + this.m_configButton.className = "StdButton";//"bidcosrf_button"; + //this.m_configButton.appendChild(document.createTextNode("Einstellen")); + this.m_configButton.appendChild(document.createTextNode(translateKey("dialogSettingsBidCosRFConfBtnSet"))); + Event.observe($(this.m_configButton), "click", this.m_onConfigHandler); + this.m_action.appendChild(this.m_configButton); + }, + + + destroy: function() + { + Event.stopObserving($(this.m_configButton), "click", this.m_onConfigHandler); + $(this.m_element).remove(); + }, + + setName: function(name) + { + this.m_name = name; + + this.m_nameLabel.innerHtml = ""; + this.m_nameLabel.appendChild(document.createTextNode(name)); + + return this; + }, + + getName: function() + { + return this.m_name; + }, + + setImageHtml: function(imageHtml) + { + var div = document.createElement("div"); + div.innerHTML = imageHtml; + div.className = "thumbnail"; + + this.m_image.innerHTML = ""; + this.m_image.appendChild(div); + + return this; + }, + + setAddress: function(address) + { + this.m_address = address; + + this.m_addressLabel.innerHtml = ""; + this.m_addressLabel.appendChild(document.createTextNode(address)); + + return this; + }, + + getAddress: function() + { + return this.m_address; + }, + + setGateway: function(gateway) + { + var label = gateway; + var name = ""; + + BidcosRfPage.m_defaultGateway; + + // Has the gateway an user defined name? + for (var i = 0; i < this.gatewayList.length; i++) { + if (gateway == this.gatewayList[i].m_address) { + name = this.gatewayList[i].m_userName; + label = (name.length > 0) ? name : label; + break; + } + } + + this.m_gateway = label; + this.m_gatewayLabel.innerHTML = ""; + this.m_gatewayLabel.appendChild(document.createTextNode(label)); + //this.m_gatewayLabel.className += " " + label.replace(/\s+/g,""); + this.m_gatewayLabel.setAttribute("class", "bidcosrf_tablecell " + label.replace(/\s+/g,"")); + return this; + }, + + getGateway: function() + { + return this.m_gateway; + }, + + setRoaming: function(roaming) + { + this.m_roaming = roaming; + + return this; + }, + + getRoaming: function() + { + return this.m_roaming; + }, + + getElement: function() + { + return this.m_element; + }, + + setGatewayFromDeviceList: function(deviceList) + { + for (var i = 0, len = deviceList.length; i < len; i++) + { + var device = deviceList[i]; + if (device.address == this.m_address) + { + this.setGateway(device["interface"]); + this.setRoaming(device["roaming"]); + } + } + return this; + }, + + onConfig: function() + { + new BidcosRfPage.EditAssignmentDialog() + .setDevice(this) + .setAction(this.saveConfig, this); + }, + + saveConfig: function(dialog) + { + var gateway = dialog.getGateway(); + var roaming = dialog.getRoaming(); + + if (gateway) + { + homematic("Interface.setBidcosInterface", { + "interface": "BidCos-RF", + "deviceId": this.m_address, + "interfaceId": gateway.getAddress(), + "roaming": roaming + }); + //jQuery("."+gateway.getAddress()).attr("class","bidcosrf_tablecell " + gateway.getAddress().replace(/\s+/g,"")); + this.setGateway(gateway.getAddress()); + this.setRoaming(roaming); + DeviceList.updateInterfaceDisplayName(this.m_address, (gateway.getUserName()).length > 0 ? gateway.getUserName() : 'BidCos-RF'); + } + } +}; + +/*-------------------------------------------------------------------------------------------------------------------*/ + +/** +* @class BidcosRfPage.EditGatewayDialog +* @brief Dialog zum Bearbeiten von Lan Gateway Einstellungen +**/ +BidcosRfPage.EditGatewayDialog = Class.create({ + + + /** Constructor + * Fuehrt die Grundinitialisierung durch und zeigt das Dialogfenster an. + **/ + initialize: function(gateway) + { + var screenWidth = WebUI.getWidth(); + var screenHeight = WebUI.getHeight(); + var frameWidth = 500; + var frameHeight = 200; + var frameX = parseInt((screenWidth - frameWidth) / 2); + var frameY = parseInt((screenHeight - frameHeight) / 2); + var m_gateway = gateway; + + this.m_action = null;//Callback function + + this.m_layer = document.createElement("div"); + this.m_layer.className = "DialogLayer"; + + + //Create content ui-elements + //Type + this.m_typeText = new UI.Text() + .setPosition(180, 10) + .setWidth(frameWidth - 190) + .setText(globalLGWTypeMap[m_gateway.getType()]); + + //Name + this.m_nameTextEdit = new UI.TextEdit() + .setPosition(180,40) + .setWidth(frameWidth - 190) + .setText(m_gateway.getUserName()); + + //Serial + this.m_serialTextEdit = new UI.TextEdit() + .setPosition(180, 70) + .setWidth(frameWidth - 190) + .setText(m_gateway.getAddress()); + + //Key + this.m_keyTextEdit = new UI.TextEdit() + .setPosition(180, 100) + .setWidth(frameWidth - 190) + .setText(m_gateway.getKey()); + + //IP Address + this.m_ipTextEdit = new UI.TextEdit() + .setPosition(180, 130) + .setWidth(frameWidth - 190) + .setText(m_gateway.getIP()); + + this.m_keyLabel = new UI.Text(); + + //Create and assemble frame + this.m_frame = new UI.Frame() + .setTitle(translateKey("dialogSettingsBidcosRFEditGatewayTitle")) + .setContentSize(frameWidth, frameHeight) + .setPosition(frameX, frameY) + /* Add Cancel Button */ + .add(new UI.Button() + .setPosition(10, frameHeight - 30) + //.setText("Abbrechen") + .setText(translateKey("btnCancel")) + .setAction(this.cancel, this) + ) + /* Add OK Button */ + .add(new UI.Button() + .setPosition(frameWidth - 160, frameHeight - 30) + //.setText("OK") + .setText(translateKey("btnOk")) + .setAction(this.ok, this) + ) + + //Content: + //Type label + .add(new UI.Text().setPosition(10,10).setText(translateKey("dialogSettingsBidCosRFLblType"))) + .add(this.m_typeText) + + //Name + .add(new UI.Text() + .setPosition(10,40) + .setText(translateKey("dialogSettingsBidCosRFLblName")) + ) + .add(this.m_nameTextEdit) + + //Serial + .add(new UI.Text() + .setPosition(10, 70) + //.setText("Seriennummer:") + .setText(translateKey("dialogSettingsBidCosRFLblSN")) + ) + .add(this.m_serialTextEdit) + //Accesscode / passphrase + .add(this.m_keyLabel + .setPosition(10,100) + .setText( + (m_gateway.getType() == "Lan Interface" ? translateKey("dialogSettingsBidCosRFLblAccessCode") : translateKey("dialogSettingsBidCosRFLblPassphrase")) + ) + ) + .add(this.m_keyTextEdit) + //IP label + .add(this.m_ipTextEdit) + .add(new UI.Text() + .setPosition(10,130) + //.setText("IP-Adresse (optional):") + .setText(translateKey("dialogSettingsBidCosRFLblIPAddress")) + ); + + + /* Add frame to layer and layer to Layer */ + this.m_layer.appendChild(this.m_frame.getElement()); + Layer.add(this.m_layer); + }, + + /** + * @fn close + * @brief Schließt das Dialogfenster + **/ + close: function() + { + Layer.remove(this.m_layer); + }, + + /** @fn ok + * @brief Führt die Callbackfuntion aus nachdem auf "OK" geklickt wurde + * und schließt anschließend das Dialogfenster + **/ + ok: function() + { + if (this.m_action) { this.m_action(this); } + this.close(); + }, + + /** @fn cancel + * @brief Schließt das Dialogfenster, nachdem auf "Abbrechen" geklickt wurde + **/ + cancel: function() + { + this.close(); + }, + + /** + * @fn setAction + * @brief Setzt die Callbackfuntion, die aufgerufen wird, wenn OK-gedrückt wurde + * @param action Callbackfuntion "onOK" + * @param context Optional. Kontext, an die action gebunden wird + **/ + setAction: function(action, context) + { + if (context) { this.m_action = action.bind(context); } + else { this.m_action = action; } + + return this; + }, + + getUserName: function() + { + return this.m_nameTextEdit.getText(); + }, + + getSerial: function() + { + return this.m_serialTextEdit.getText(); + }, + + getKey: function() + { + return this.m_keyTextEdit.getText(); + }, + + getIPAddress : function() + { + return this.m_ipTextEdit.getText(); + } + +}); + +/*-------------------------------------------------------------------------------------------------------------------*/ + +BidcosRfPage.ChangeKeyDialog = Class.create({ + + initialize : function(gateway) { + + var screenWidth = WebUI.getWidth(); + var screenHeight = WebUI.getHeight(); + var frameWidth = 500; + var frameHeight = 175; + var frameX = parseInt((screenWidth - frameWidth) / 2); + var frameY = parseInt((screenHeight - frameHeight) / 2); + var m_gateway = gateway; + + this.m_action = null;//Callback function + + this.m_layer = document.createElement("div"); + this.m_layer.className = "DialogLayer"; + + this.m_newKeyTextEdit = new UI.TextEdit() + .setPosition(180, 40) + .setWidth(frameWidth - 190); + + this.m_newKeyTextRepetition = new UI.TextEdit() + .setPosition(180, 70) + .setWidth(frameWidth - 190); + + this.m_newKeyRepetitionLabel = new UI.Text(); + this.m_newKeyRepetitionLabel.setPosition(10, 70); + this.m_newKeyRepetitionLabel.setHtml(translateKey("dialogSettingsBidcosRFChangeAccessCodeNewKeyRepetition")); + + + //Create new frame and add stuff + this.m_frame = new UI.Frame() + .setTitle(translateKey("dialogSettingsBidcosRFChangeAccessCodeTitle")) + .setContentSize(frameWidth, frameHeight) + .setPosition(frameX, frameY) + /* Add Cancel Button */ + .add(new UI.Button() + .setPosition(10, frameHeight - 30) + //.setText("Abbrechen") + .setText(translateKey("btnCancel")) + .setAction(this.cancel, this) + ) + /* Add OK Button */ + .add(new UI.Button() + .setPosition(frameWidth - 160, frameHeight - 30) + //.setText("OK") + .setText(translateKey("btnOk")) + .setAction(this.ok, this) + + ) + //New key + .add(new UI.Text() + .setPosition(10, 40) + .setText(translateKey("dialogSettingsBidcosRFChangeAccessCodeNewKey")) + ) + .add(this.m_newKeyTextEdit) + //Repetition of new key + .add(this.m_newKeyRepetitionLabel) + .add(this.m_newKeyTextRepetition); + + /* Add frame to layer and layer to Layer */ + this.m_layer.appendChild(this.m_frame.getElement()); + Layer.add(this.m_layer); + }, + + getKey : function() + { + return this.m_newKeyTextEdit.getText(); + }, + + getKeyRepetition : function() + { + return this.m_newKeyTextRepetition.getText(); + }, + + /** + * @fn setAction + * @brief Setzt die Callbackfuntion, die aufgerufen wird, wenn OK-gedrückt wurde + * @param action Callbackfuntion "onOK" + * @param context Optional. Kontext, an die action gebunden wird + **/ + setAction : function(action, context) + { + if (context) { this.m_action = action.bind(context); } + else { this.m_action = action; } + + return this; + }, + + /** + * @fn close + * @brief Schließt das Dialogfenster + **/ + close: function() + { + Layer.remove(this.m_layer); + }, + + /** @fn ok + * @brief Führt die Callbackfuntion aus nachdem auf "OK" geklickt wurde + * und schließt anschließend das Dialogfenster + **/ + ok: function() + { + if (this.m_action) { this.m_action(this); } + this.close(); + }, + + /** @fn cancel + * @brief Schließt das Dialogfenster, nachdem auf "Abbrechen" geklickt wurde + **/ + cancel: function() + { + this.close(); + } + +}); + +/*-------------------------------------------------------------------------------------------------------------------*/ + + +/** + * @class BidcosRfPage.AddGatewayDialog + * @brief Dialog zum Hinzufuegen von HM-CFG-LAN-Einstellungen. + **/ +BidcosRfPage.AddGatewayDialog = Class.create({ + + /** + * @constructor + * Führt eine Grundinitialisierung durch und zeigt das Dialogfenster an. + **/ + initialize: function(wiredGWExists, gateway) + { + var that = this; + var imageHeight = 48; + BidcosRfPage.AddGatewayDialog.CONTENT_HEIGHT += imageHeight; + + var screenWidth = WebUI.getWidth(); + var screenHeight = WebUI.getHeight(); + var frameWidth = BidcosRfPage.AddGatewayDialog.CONTENT_WIDTH; + var frameHeight = BidcosRfPage.AddGatewayDialog.CONTENT_HEIGHT; + var frameX = parseInt((screenWidth - frameWidth) / 2); + var frameY = parseInt((screenHeight - frameHeight) / 2); + + var previewHMLGW2 = "/ise/img/icons_lan_gateways/48/HMLGW2.png", + previewLANIF = "/ise/img/icons_lan_gateways/48/CFG_LAN.png", + previewHMWLGW = "/ise/img/icons_lan_gateways/48/HMWLGW.png"; + + this.m_layer = document.createElement("div"); + this.m_layer.className = "DialogLayer"; + + this.m_action = null; + this.m_id = null; + + + this.m_gatewayImg = new UI.Image() + .setPosition(180 + (BidcosRfPage.AddGatewayDialog.CONTENT_WIDTH / 2) ,10) + .setPath(previewHMLGW2); // As default preselected + + this.m_typeListBox = new UI.ListBox() + .setPosition(180,10 + imageHeight) + .setWidth(BidcosRfPage.AddGatewayDialog.CONTENT_WIDTH - 190) + .add({id:globalLGWTypes.HMLGW2, name: "RF: "+globalLGWTypeMap[globalLGWTypes.HMLGW2]}) + .add({id:globalLGWTypes.LANIF, name: "RF: "+globalLGWTypeMap[globalLGWTypes.LANIF]}) + .setOnChangeCallback(function() { + var gateWay = this.getSelectedItem(), + gateWayID = gateWay.id, + jElem = "#bidcosAccessCode"; + var offsetPreviewPic = 180; + + switch (gateWayID) { + case globalLGWTypes.HMLGW2: + jQuery(jElem).text(translateKey("dialogSettingsBidCosRFLblPassphrase")); + that.m_gatewayImg.setPath(previewHMLGW2); + break; + case globalLGWTypes.LANIF: + jQuery(jElem).text(translateKey("dialogSettingsBidCosRFLblAccessCode")); + that.m_gatewayImg.setPath(previewLANIF); + break; + case globalLGWTypes.HMWLGW: + jQuery(jElem).text(translateKey("dialogSettingsBidCosRFLblPassphrase")); + that.m_gatewayImg.setPath(previewHMWLGW); + break; + } + that.m_gatewayImg.setPosition(offsetPreviewPic + (BidcosRfPage.AddGatewayDialog.CONTENT_WIDTH / 2),10); + }); + + /*Add Wired LGW only if there is no one*/ + if(!wiredGWExists) { + this.m_typeListBox.add({id:globalLGWTypes.HMWLGW, name: "Wired: "+globalLGWTypeMap[globalLGWTypes.HMWLGW]}); + } + + this.m_nameTextEdit = new UI.TextEdit() + .setPosition(180, 40 + imageHeight) + .setWidth(BidcosRfPage.AddGatewayDialog.CONTENT_WIDTH - 190); + + this.m_serialTextEdit = new UI.TextEdit() + .setPosition(180, 70 + imageHeight) + .setWidth(BidcosRfPage.AddGatewayDialog.CONTENT_WIDTH - 190); + + this.m_keyTextEdit = new UI.TextEdit() + .setPosition(180, 70 + imageHeight) + .setWidth(BidcosRfPage.AddGatewayDialog.CONTENT_WIDTH - 190); + + this.m_keyTextEdit = new UI.TextEdit() + .setPosition(180, 100 + imageHeight) + .setWidth(BidcosRfPage.AddGatewayDialog.CONTENT_WIDTH - 190); + + this.m_ipTextEdit = new UI.TextEdit() + .setPosition(180, 130 + imageHeight) + .setWidth(BidcosRfPage.AddGatewayDialog.CONTENT_WIDTH - 190); + + this.m_frame = new UI.Frame() + //.setTitle("HomeMatic Konfigurations-Adapter hinzufügen") + .setTitle(translateKey("dialogSettingsBidCosRFAddCFGTitle")) + .setContentSize(frameWidth, frameHeight) + .setPosition(frameX, frameY) + + .add(this.m_gatewayImg) + + .add(new UI.Text().setPosition(10,10 + imageHeight).setText(translateKey("dialogSettingsBidCosRFLblType"))) + + .add(this.m_typeListBox) + + .add(new UI.Text() + .setPosition(10,40 + imageHeight) + .setText(translateKey("dialogSettingsBidCosRFLblName")) + ) + .add(this.m_nameTextEdit) + .add(new UI.Text() + .setPosition(10, 70 + imageHeight) + //.setText("Seriennummer:") + .setText(translateKey("dialogSettingsBidCosRFLblSN")) + ) + .add(this.m_serialTextEdit) + .add(new UI.Text() + .setPosition(10, 100 + imageHeight) + //.setText("Zugriffscode:") + .setText(translateKey("dialogSettingsBidCosRFLblAccessCode")) + .setID("bidcosAccessCode") + ) + .add(this.m_keyTextEdit) + .add(new UI.Text() + .setPosition(10,130 + imageHeight) + //.setText("IP-Adresse (optional):") + .setText(translateKey("dialogSettingsBidCosRFLblIPAddress")) + ) + .add(this.m_ipTextEdit) + .add(new UI.Button() + .setPosition(10, BidcosRfPage.AddGatewayDialog.CONTENT_HEIGHT - 30) + //.setText("Abbrechen") + .setText(translateKey("btnCancel")) + .setAction(this.cancel, this) + ) + .add(new UI.Button() + .setPosition(340, BidcosRfPage.AddGatewayDialog.CONTENT_HEIGHT - 30) + //.setText("OK") + .setText(translateKey("btnOk")) + .setAction(this.ok, this) + ); + + this.m_layer.appendChild(this.m_frame.getElement()); + Layer.add(this.m_layer); + BidcosRfPage.AddGatewayDialog.CONTENT_HEIGHT -= imageHeight; + }, + + /** + * @fn setGateway + * @brief Setzt die Felder Seriennummer, Zugriffscode und IP-Adresse + **/ + setGateway: function(gateway) + { + this.m_nameTextEdit.setText(gateway.userName); + this.m_serialTextEdit.setText(gateway.serial); + this.m_keyTextEdit.setText(gateway.key); + this.m_ipTextEdit.setText(gateway.ip); + this.m_id = gateway.id; + + return this; + }, + + /** + * @fn setAction + * @brief Setzt die Callbackfuntion, die aufgerufen wird, wenn OK-gedrückt + * wurde + * + * @param action Callbackfuntion "onOK" + * @param context Optional. Kontext, an die action gebunden wird + **/ + setAction: function(action, context) + { + if (context) { this.m_action = action.bind(context); } + else { this.m_action = action; } + + return this; + }, + + getUserName: function() + { + return this.m_nameTextEdit.getText(); + }, + + /** + * @fn getSerial + * @brief Liefert den Inhalt des Feldes Seriennummer + **/ + getSerial: function() + { + return this.m_serialTextEdit.getText().toUpperCase(); + }, + + /** + * @fn getKey + * @brief Liefert den Inhalt des Feldes Zugriffcode + **/ + getKey: function() + { + if((this.getType() == globalLGWTypes.HMWLGW) || (this.getType() == globalLGWTypes.HMLGW2)) { + return this.m_keyTextEdit.getText();//Passphrases should not be upper case + } + else { + return this.m_keyTextEdit.getText().toUpperCase(); + } + }, + + /** + * @fn getType + * @brief Liefert den Inhalt des Feldes Zugriffcode + **/ + getType: function() + { + return this.m_typeListBox.getSelectedItem().id; + }, + + /** + * @fn getType + * @brief Liefert den Inhalt des Feldes Zugriffcode + **/ + getGatewayClass: function() + { + var gwClass = globalGWClasses.RF; + if (this.m_typeListBox.getSelectedItem().id == globalLGWTypes.HMWLGW) { + gwClass = globalGWClasses.Wired; + } + return gwClass; + }, + + /** + * @fn getIp + * @brief Liefert den Inhalt des Feldes IP-Addresse + **/ + getIp: function() + { + return this.m_ipTextEdit.getText(); + }, + + /** + * @fn getId + * @brief Liefert die Id des momentan bearbeiten Gateways. + **/ + getId: function() + { + return this.m_id; + }, + + /** + * @fn close + * @brief Schließt das Dialogfenster + **/ + close: function() + { + Layer.remove(this.m_layer); + }, + + /** + * @fn ok + * @brief Führt die Callbackfuntion aus nachdem auf "OK" geklickt wurde + * und schließt anschließend das Dialogfenster + **/ + ok: function() + { + if (this.m_action) { this.m_action(this); } + this.close(); + }, + + /** + * @fn cancel + * @brief Schließt das Dialogfenster, nachdem auf "Abbrechen" geklickt wurde + **/ + cancel: function() + { + this.close(); + } + +}); + +BidcosRfPage.AddGatewayDialog.CONTENT_WIDTH = 500; //< Breite des Dialogfensters +BidcosRfPage.AddGatewayDialog.CONTENT_HEIGHT = 200; //< Höhe des Dialogfensters + + +BidcosRfPage.EditAssignmentDialog = Class.create({ + + m_gateways: null, + m_device: null, + m_action: null, + m_frame: null, + m_defaultGateway : null, + + initialize: function() + { + var screenWidth = WebUI.getWidth(); + var screenHeight = WebUI.getHeight(); + var frameWidth = BidcosRfPage.EditAssignmentDialog.CONTENT_WIDTH; + var frameHeight = BidcosRfPage.EditAssignmentDialog.CONTENT_HEIGHT; + var frameX = parseInt((screenWidth - frameWidth) / 2); + var frameY = parseInt((screenHeight - frameHeight) / 2); + var gateways = BidcosRfPage.getGateways(); + + this.m_layer = document.createElement("div"); + this.m_layer.className = "DialogLayer"; + + this.m_gatewaysListbox = new UI.ListBox() + .setPosition(100,10) + .setWidth(BidcosRfPage.EditAssignmentDialog.CONTENT_WIDTH - 110); + + this.m_gateways = []; + + this.m_gatewaysListbox.add({name: translateKey("dialogSettingsBidcosRFIFaceAssignmentLblStandard"), value: BidcosRfPage.getDefaultGateway()}); + + for (var i = 0, len = gateways.length; i < len; i++) + { + var gateway = gateways[i]; + if(gateway.getGatewayClass() == "RF") { + //this.m_gateways.push({name: gateway.getAddress(), value: gateway}); + var name = (gateway.getUserName().length > 0) ? gateway.getUserName(): gateway.getAddress(); + + this.m_gateways.push({name: name, value: gateway}); + if (this.m_gateways[i]) { + this.m_gatewaysListbox.add(this.m_gateways[i]); + } + } + } + + this.m_roamingCheckbox = new UI.Checkbox() + //.setText("feste Zuordnung aufheben") + .setText(translateKey("dialogSettingsBidcosRFIFaceAssignmentLblNullify")) + .setPosition(100,40) + .setWidth(BidcosRfPage.EditAssignmentDialog.CONTENT_WIDTH - 110) + .setIsChecked(true); + + + this.m_frame = new UI.Frame() + //.setTitle("Interface-Zuordnung: ") + .setTitle(translateKey("dialogSettingsBidcosRFIFaceAssignmentTitle")) + .setContentSize(frameWidth, frameHeight) + .setPosition(frameX, frameY) + .add(new UI.Text() + .setPosition(10, 10) + //.setText("Gateway:") + .setText(translateKey("dialogSettingsBidcosRFIFaceAssignmentLblGateway")) + + ) + .add(this.m_gatewaysListbox) + .add(this.m_roamingCheckbox) + .add(new UI.Button() + .setPosition(10, BidcosRfPage.EditAssignmentDialog.CONTENT_HEIGHT - 30) + //.setText("Abbrechen") + .setText(translateKey("btnCancel")) + .setAction(this.cancel, this) + ) + .add(new UI.Button() + .setPosition(240, BidcosRfPage.EditAssignmentDialog.CONTENT_HEIGHT - 30) + //.setText("OK") + .setText(translateKey("btnOk")) + .setAction(this.ok, this) + ); + + this.m_layer.appendChild(this.m_frame.getElement()); + Layer.add(this.m_layer); + }, + + setDevice: function(device) + { + this.m_device = device; + + this.m_frame.setTitle(translateKey("dialogSettingsBidcosRFIFaceAssignmentTitle") + device.getName()); + this.m_roamingCheckbox.setIsChecked(device.getRoaming()); + for (var i = 0, len = this.m_gateways.length; i < len; i++) + { + var gateway = this.m_gateways[i]; + if (device.getGateway() == gateway.value.getAddress()) + { + this.m_gatewaysListbox.selectItem(gateway); + break; + } + } + + return this; + }, + + setAction: function(action, context) + { + if (context) { this.m_action = action.bind(context); } + else { this.m_action = action; } + + return this; + }, + + getGateway: function() + { + return this.m_gatewaysListbox.getSelectedItem().value; + }, + + getRoaming: function() + { + return this.m_roamingCheckbox.isChecked(); + }, + + /** + * @fn close + * @brief Schließt das Dialogfenster + **/ + close: function() + { + Layer.remove(this.m_layer); + }, + + /** + * @fn ok + * @brief Führt die Callbackfuntion aus nachdem auf "OK" geklickt wurde + * und schließt anschließend das Dialogfenster + **/ + ok: function() + { + if (this.m_action) { this.m_action(this); } + this.close(); + }, + + /** + * @fn cancel + * @brief Schließt das Dialogfenster, nachdem auf "Abbrechen" geklickt wurde + **/ + cancel: function() + { + this.close(); + } + +}); + +BidcosRfPage.EditAssignmentDialog.CONTENT_WIDTH = 400; +BidcosRfPage.EditAssignmentDialog.CONTENT_HEIGHT = 150; + +BidcosRfPage.OptionsDialog = Class.create({ + m_passwordEdit: null, + m_frame: null, + + initialize: function() + { + var screenWidth = WebUI.getWidth(); + var screenHeight = WebUI.getHeight(); + var frameWidth = BidcosRfPage.OptionsDialog.CONTENT_WIDTH; + var frameHeight = BidcosRfPage.OptionsDialog.CONTENT_HEIGHT; + var frameX = parseInt((screenWidth - frameWidth) / 2); + var frameY = parseInt((screenHeight - frameHeight) / 2); + + this.m_layer = document.createElement("div"); + this.m_layer.className = "DialogLayer"; + + this.m_passwordEdit = new UI.PasswordEdit() + .setPosition(90, 50) + .setWidth(BidcosRfPage.OptionsDialog.CONTENT_WIDTH - 100); + + this.m_frame = new UI.Frame() + //.setTitle("Sicherheitsschlüssel: ") + .setTitle(translateKey("dialogSettingsBidcosRFEnterSecKeyTitle")) + .setContentSize(frameWidth, frameHeight) + .setPosition(frameX, frameY) + .add(new UI.Text() + .setPosition(10, 10) + //.setText("Bitte geben Sie den System-Sicherheitsschlüssel ein:") + .setText(translateKey("dialogSettingsBidcosRFEnterSecKeyContent")) + ) + .add(this.m_passwordEdit) + .add(new UI.Button() + .setPosition(90, BidcosRfPage.OptionsDialog.CONTENT_HEIGHT - 30) + .setText("OK") + .setAction(this.ok, this) + ); + + this.m_layer.appendChild(this.m_frame.getElement()); + Layer.add(this.m_layer); + }, + + /** + * @fn close + * @brief Schließt das Dialogfenster + **/ + close: function() + { + Layer.remove(this.m_layer); + }, + + /** + * @fn ok + * @brief Führt die Callbackfuntion aus nachdem auf "OK" geklickt wurde + * und schließt anschließend das Dialogfenster + **/ + ok: function() + { + var key = this.m_passwordEdit.getText(); + + homematic("BidCoS_RF.createKeyFile", { "key": key }); + + if (homematic("BidCoS_RF.validateKey", {"key": key})) + { + //MessageBox.show("Info", "Die Konfiguration wurde an die HomeMatic Zentrale übertragen.\nDie Änderungen werden mit dem nächsten Start der HomeMatic Zentrale wirksam."); + MessageBox.show(translateKey("dialogInfo"), translateKey("dialogSettingsBidcosRFSaveConfigSucceed")); + } + else + { + //MessageBox.show("Hinweis", "Der eingegebene Schlüssel entspricht nicht dem aktuellen System-Sicherheitsschlüssel.\nDie Konfiguration wurde an die HomeMatic Zentrale übertragen.\nDie Änderungen werden mit dem nächsten Start der HomeMatic Zentrale wirksam.\nFalls Probleme auftreten, wiederholen Sie ggf. die Eingabe.", null, 320, 120); + MessageBox.show(translateKey("dialogHint"), translateKey("dialogSettingsBidcosRFSaveConfigFailure"), null, 320, 120); + } + + this.close(); + } + + +}); + +BidcosRfPage.OptionsDialog.CONTENT_WIDTH = 250; +BidcosRfPage.OptionsDialog.CONTENT_HEIGHT = 130; +/** + * homematic.js + **/ + +/** + * Stellt eine Anfrage an die HomeMatic Zentrale + * Der Parameter callback ist optional. Wird er weggelassen, so ist die Anfrage synchron. + **/ +homematic = function(method, params, callback) +{ + var _params_ = params; + if (!_params_) { _params_ = { }; } + _params_["_session_id_"] = getSessionId(); + + if (typeof(callback) != "undefined") + { + var _callback_ = callback; + return jsonrpc(homematic.URL, method, _params_, function(response) { + _callback_(homematic._checkResponse(response), response.error); + }); + } + else + { + return homematic._checkResponse(jsonrpc(homematic.URL, method, _params_)); + } +}; + +/** + * URL zur HomeMatic JSON API + **/ +homematic.URL = "/api/homematic.cgi"; + +/** + * Prüft die JSON-Antwort ud liefert deren Resultat + **/ +homematic._checkResponse = function(response) +{ + if (null === response.error) + { + return response.result; + } + else + { + // handle errors + return null; + } +}; +/** + * regamonitor.js + **/ + +/** + * Überwacht die Logikschicht "ReGa" und gibt eine Meldung, falls diese sich nicht meldet. + **/ +ReGaMonitor = Class.create({ + + initialize: function() + { + this.m_pollHandler = this.poll.bind(this); + this.m_responseHandler = this.response.bind(this); + this.m_isRunning = true; + this.m_failureCount = 0; + this.poll(); + }, + + poll: function() + { + if (this.m_isRunning) + { + homematic("ReGa.isPresent", null, this.m_responseHandler); + } + }, + + response: function(result) + { + if (this.m_isRunning) + { + if (result === true) + { + this.m_pollHandler.delay(ReGaMonitor.INTERVAL); + this.m_failureCount = 0; + } + else + { + this.m_failureCount++; + if (this.m_failureCount < ReGaMonitor.FAILURE_RETRY) + { + this.m_pollHandler.delay(ReGaMonitor.INTERVAL); + } + else + { + new CrashDialog("ReGa"); + } + } + } + }, + + stop: function() + { + this.m_isRunning = false; + } + +}); + +ReGaMonitor.INTERVAL = 30; +ReGaMonitor.FAILURE_RETRY = 3; +/** + * interfacemonitor.js + **/ + +/** + * Überwacht einen Schnittstellenprozess + **/ +InterfaceMonitor = Class.create({ + + initialize: function(interfaceName) + { + this.m_interface = interfaceName; + this.m_pollHandler = this.poll.bind(this); + this.m_responseHandler = this.response.bind(this); + this.m_isRunning = true; + this.m_failureCount = 0; + this.storageElm = jQuery("body"); + this.poll(); + }, + + poll: function() + { + if (this.m_isRunning) + { + homematic("Interface.isPresent", {"interface": this.m_interface}, this.m_responseHandler); + } + }, + + response: function(result) + { + if (this.m_isRunning) + { + if (result === true) + { + this.m_pollHandler.delay(InterfaceMonitor.INTERVAL); + this.m_failureCount = 0; + this.storageElm.data(this.m_interface, true); + } + else + { + this.m_failureCount++; + if (this.m_failureCount < InterfaceMonitor.FAILURE_RETRY) + { + this.m_pollHandler.delay(InterfaceMonitor.INTERVAL); + this.storageElm.data(this.m_interface, false); + } + else + { + new CrashDialog(this.m_interface); + } + } + } + }, + + stop: function() + { + this.m_isRunning = false; + } + +}); + +InterfaceMonitor.INTERVAL = 30; +InterfaceMonitor.FAILURE_RETRY = 3; +InterfaceMonitor.start = function() +{ + InterfaceMonitor.m_monitors = []; + + var result = homematic("Interface.listInterfaces", null); + if (result) + { + result.each(function (iface) { + InterfaceMonitor.m_monitors.push(new InterfaceMonitor(iface["name"])); + }); + } +}; + +InterfaceMonitor.stop = function() +{ + var monitors = InterfaceMonitor.m_monitors.clone(); + monitors.each(function(monitor) { monitor.stop(); }); +}; +/** + * eQ3.HomeMatic.Event.js + **/ + +/** + * @fileOverview Ereignisse von der HomeMatic Zentrale + * @author F. Werner (eQ-3) + **/ + +if (!eQ3) { eQ3 = {}; } +if (!eQ3.HomeMatic) { eQ3.HomeMatic = {}; } + +eQ3.HomeMatic.Event = Singleton.create({ + + INTERVALL: 5, + + initialize: function() + { + this.m_listeners = { }; + this.m_poll = this.poll.bind(this); + + this.m_dispatch = this.dispatch.bind(this); + + homematic("Event.subscribe", null); + + if ((typeof preventInterfaceCheck == "undefined") || (! preventInterfaceCheck)) { + this.m_pe = new PeriodicalExecuter(this.m_poll, this.INTERVALL); + } + }, + + poll: function(pe) + { + homematic("Event.poll", null, this.m_dispatch); + }, + + dispatch: function(events, error) + { + if (!error) + { + for (var i = 0, len = events.length; i < len; i++) + { + this.fire(events[i]); + } + } + }, + + stop: function() + { + this.m_pe.stop(); + homematic("Event.unsubscribe", null); + }, + + subscribe: function(eventType, listener) + { + var listeners = this.m_listeners[eventType]; + if (!listeners) + { + listeners = []; + this.m_listeners[eventType] = listeners; + } + + listeners.push(listener); + }, + + unsubscribe: function(eventType, listener) + { + var listeners = this.m_listeners[eventType]; + + if (listeners) + { + this.m_listeners[eventType] = listeners.without(listener); + } + }, + + fire: function(event) + { + var type = event.type; + var data = event.data; + var listeners = this.m_listeners[type]; + + if (listeners) + { + listeners.each(function(listener) { listener(type, data); }); + } + } + +}); +/** + * homematic.com.js + * Schnittstelle zu HomeMatic.com + **/ + +homematic.com = +{ + m_latestVersion: translateKey("lblAvailableFirmwareVersionNotKnown"), + m_isUpdateAvailable: false, + m_latestDeviceFw : "", + m_callback: null, + m_URLServer: "", + + m_product: "", + init: function() + { + this.m_ccuProduct = getProduct(); + this.preURL = (this.m_ccuProduct < 3) ? "" : "ccu3-"; + this.m_product = "HM-RASPBERRYMATIC"; + this.m_URLServer = "https://"+this.preURL+"update.homematic.com"; + this.m_fieldTestURLServer = "https://fieldtest-ccu3-update.homematic.com"; + + this.serial = homematic("CCU.getSerial"); + this.serial = ((this.serial != "") && (typeof this.serial != "undefined") && (this.serial != null)) ? this.serial : "0"; + + // The server should return a string like "homematic.com.setLatestVersion('2.4.212');" + var script = document.createElement("script"); + script.id = "homematic_com_script"; + script.type = "text/javascript"; + script.src = "https://raspberrymatic.de/LATEST-VERSION.js?v=" + WEBUI_VERSION + "&p=" + PRODUCT; + $("body").appendChild(script); + }, + + // For testing only + _init: function() + { + availableVersion = "unknown"; + peLoop = 0; + // window.setTimout is only for testing the real server delay. In production this has of course to be removed. + window.setTimeout(function(){ + // The server should return a string like "availableVersion=2.6.0.1;" + var script = document.createElement("script"); + script.id = "homematic_com_script"; + script.type = "text/javascript"; + script.src = "version.js"; // rega/pages/version.js - has to be in one of these days the correct server url + $('body').appendChild(script); + }, 5000); + + new PeriodicalExecuter(function(pe) { + conInfo.log("check available Version!"); + conInfo.log("correct version: " +availableVersion.match(/^[0-9]+.[0-9]+.[0-9]+/)); + if (availableVersion != "unknown") { + homematic.com.setLatestVersion(availableVersion); + StartPage.showUpdate(); + pe.stop(); + } + // Try 30 seconds (10 * 3) to get the available version. + // After that stop the polling. + if (peLoop > 9) { + pe.stop(); + } + peLoop++; + }, 3); + }, + + isUpdateAvailable: function() + { + return homematic.com.m_isUpdateAvailable; + }, + + getLatestVersion: function() + { + return homematic.com.m_latestVersion; + }, + + + /* Not in use anymore - instead we now use getListOfAvailableFirmware */ + getAvailableDeviceFirmware: function(product, index, callback) { + // The server should return a string like "homematic.com.setLatestVersion('1.2.2', 'product');" + var script = document.createElement("script"); + script.id = "homematic_com_script_" + index; + script.type = "text/javascript"; + script.src = this.m_URLServer + "/firmware/download?cmd=js_check_version&product=" + product + "&serial=0" + "&ts=" + Date.now(); + $("body").appendChild(script); + homematic.com.callback = callback; + }, + + getListOfAvailableFirmware: function(callback) { + var fieldTestActive = "/etc/config/fieldTestActive"; + + // The server should return a string like "homematic.com.setDeviceFirmwareVersions([{"type":"HM-MOD-Re-8","version":"1.0.0"},{"type":"HM-MOD-Re-8","version":"1.0.0"}])" + var script = document.createElement("script"); + script.id = "homematic_com_script_fw"; + script.type = "text/javascript"; + // script.src = this.m_URLServer + "/firmware/api/firmware/search/DEVICE"; + + if (homematic('CCU.existsFile', {'file': fieldTestActive})) { + script.src = this.m_fieldTestURLServer + "/firmware/api/firmware/search/DEVICE?product=HM-CCU"+getProduct()+"&version="+WEBUI_VERSION+"&serial=" + this.serial + "&ts=" + Date.now(); + } else { + script.src = this.m_URLServer + "/firmware/api/firmware/search/DEVICE?product=HM-CCU" + getProduct() + "&version=" + WEBUI_VERSION + "&ts=" + Date.now(); + } + $("body").appendChild(script); + homematic.com.callback = callback; + }, + + + showCCULicense: function(callback) { + var barGraphTimeout = 60000; + + MessageBox.show( + translateKey('dlgLoadLicense'), + '


', + '','320','75','fwUpload', 'msgBoxBarGraph'); + + timeoutBargraph = window.setTimeout(function() { + // Hide the messagebox after 'barGraphTimeout' seconds without a response from this.m_URLServer + MessageBox.close(); + HideWaitAnim(); + jQuery("#homematic_license_script").remove(); + // Show a error message + MessageBox.show(translateKey("dialogTitleHomeMaticInfo"), translateKey("dlgErrorLoadLicense"), '', '320', '75'); + },barGraphTimeout); + + var lang = getLang(); + if (lang != "de" && lang != "en") {lang = getDefaultLang();} + + var script = document.createElement("script"); + script.id = "homematic_license_script"; + script.type = "text/javascript"; + script.src = this.m_URLServer + "/firmware/download?cmd=release_note&product="+this.m_product+"&serial=3014&version="+homematic.com.m_latestVersion+"&locale=" + lang; + + $("body").appendChild(script); + homematic.com.callback = callback; + }, + + // For testing only + showCCUDummyLicense: function(callback) { + var lang = getLang(); + if (lang != "de" && lang != "en") {lang = getDefaultLang();} + var result = "TEST TEXT

Das ist die Lizenz

Sprache: "+lang+"

"; + homematic.com.callback = callback; + window.setTimeout(function() {homematic.com.getCCU2LicenceText(result);}, 2000); + }, + + /** + * wird von homematic.com zurück geliefert + **/ + setLatestVersion: function(latestVersion, product) + { + if (product == this.m_product) { + homematic.com.m_latestVersion = latestVersion; + homematic.com.m_isUpdateAvailable = (WEBUI_VERSION != latestVersion); + } else { + if (homematic.com.callback != null) { + homematic.com.callback(latestVersion, product); + } + } + }, + + // wird von homematic.com zurück geliefert + setDeviceFirmwareVersions: function(result) { + homematic.com.callback(result); + }, + + // wird von homematic.com zurück geliefert + getCCU2LicenceText: function(result) { + homematic.com.callback(result); + } +}; +/** + * rega.js + * Zugriff auf den ise ReGa Webserver. + **/ + +/** + * @fileOverview ? + * @author Falk Werner (eQ-3) + **/ + +/** + * @class + **/ +ReGa = { + + /** + * 1) ReGa arbeitet mit Latin-1 Zeichencodierung (ISO-8859-1) + * 2) Anfragen über das XMLHttpRequest-Objekt sind i.d.R. UTF-8-codiert + * + * ==> Codierung der Anfrage: + * - escape() wandelt UTF-8 nach ASCII um + * (Latin-1 Sonderzeichen werden durch Escape-Sequenzen ersetzt) + * - Anfrage wird in + * verpackt + * + * ==> Decodierung erfolgt durch den ReGa Webserver + **/ + encode: function(data) + { + return ""; + } +}; +/** + * ise/iseFunctions.js + **/ + +/** + * @fileOverview ? + * @author ise + **/ + +/** + * @namespace + **/ +ise = {}; + +// ###################### +// ### ISE: FAVORITES ### +// ###################### + +/** + * @class + **/ +ise.Favorites = Class.create(); + +ise.Favorites.prototype = +{ + initialize: function() + { + }, + AddToStatus: function(id,cid) + { + var url = "/esp/favorites.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "AddToStatus";'; + pb += 'string id = "'+id+'";'; + pb += 'string cid = "'+cid+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete: function(t) + { + if(dbg){alert(t.responseText);} + reloadPage(); + } + }; + new Ajax.Request(url, opts); + }, + RemoveFromStatus: function(id,cid) + { + var url = "/esp/favorites.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "RemoveFromStatus";'; + pb += 'string id = "'+id+'";'; + pb += 'string cid = "'+cid+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete: function(t) + { + if(dbg){alert(t.responseText);} + reloadPage(); + } + }; + new Ajax.Request(url, opts); + }, + AddToList: function(flid,id) + { + var url = "/esp/favorites.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "AddToList";'; + pb += 'string flid = "'+flid+'";'; + pb += 'string id = "'+id+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete: function(t) + { + if(dbg){alert(t.responseText);} + reloadPage(); + } + }; + new Ajax.Request(url, opts); + }, + AddSeparator: function(flid) + { + var url = "/esp/favorites.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "AddSeparator";'; + pb += 'string flid = "'+flid+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete: function(t) + { + if(dbg){alert(t.responseText);} + reloadPage(); + } + }; + new Ajax.Request(url, opts); + }, + RemoveFromList: function(flid,id) + { + var url = "/esp/favorites.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "RemoveFromList";'; + pb += 'string flid = "'+flid+'";'; + pb += 'string id = "'+id+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete: function(t) + { + if(dbg){alert(t.responseText);} + reloadPage(); + } + }; + new Ajax.Request(url, opts); + }, + AddList: function(fname) + { + var url = "/esp/favorites.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "AddList";'; + pb += 'string fname = "'+fname+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete: function(t) + { + if(dbg){alert(t.responseText);} + reloadPage(); + } + }; + new Ajax.Request(url, opts); + }, + RemoveList: function(flid) + { + var url = "/esp/favorites.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "RemoveList";'; + pb += 'string flid = "'+flid+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete: function(t) + { + if(dbg){alert(t.responseText);} + WebUI.enter(FavoriteListPage); + } + }; + new Ajax.Request(url, opts); + }, + CopyToNew: function(flid,bIsPC,bIsPDA,bIsCENTRAL,sargs) + { + var url = "/esp/favorites.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "CopyToNew";'; + pb += 'string flid = "'+flid+'";'; + pb += 'string sargs = "'+sargs+'";'; + pb += 'string bIsPC = "'+bIsPC+'";'; + pb += 'string bIsPDA = "'+bIsPDA+'";'; + pb += 'string bIsCENTRAL = "'+bIsCENTRAL+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete: function(t) + { + if(dbg){alert("CopyToNew:"+t.responseText);} + WebUI.enter(FavoriteListPage); + } + }; + new Ajax.Request(url, opts); + }, + MovePosition: function(flid,id,dir) + { + var url = "/esp/favorites.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "MovePosition";'; + pb += 'string flid = "'+flid+'";'; + pb += 'string id = "'+id+'";'; + pb += 'string dir = "'+dir+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete: function(t) + { + if(dbg){alert(t.responseText);} + reloadPage(); + } + }; + new Ajax.Request(url, opts); + }, + FavColumnCount: function(id,count) + { + var url = "/esp/favorites.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "FavColumnCount";'; + pb += 'string id = "'+id+'";'; + pb += 'string count = "'+count+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete: function(t) + { + if(dbg){alert(t.responseText);} + reloadPage(); + } + }; + new Ajax.Request(url, opts); + }, + FavColumnAlign: function(id,align) + { + var url = "/esp/favorites.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "FavColumnAlign";'; + pb += 'string id = "'+id+'";'; + pb += 'string align = "'+align+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete: function(t) + { + if(dbg){alert(t.responseText);} + reloadPage(); + } + }; + new Ajax.Request(url, opts); + }, + FavNamePosition: function(id,pos) + { + var url = "/esp/favorites.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "FavNamePosition";'; + pb += 'string id = "'+id+'";'; + pb += 'string pos = "'+pos+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete: function(t) + { + if(dbg){alert(t.responseText);} + reloadPage(); + } + }; + new Ajax.Request(url, opts); + }, + SaveFavoriteList: function(flid,bIsPC,bIsPDA,bIsCENTRAL,sArgs) + { + var url = "/esp/favorites.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "SaveFavoriteList";'; + pb += 'string flid = "'+flid+'";'; + pb += 'string sargs = "'+sArgs+'";'; + if( bIsPC ) + { + pb += 'string bIsPC = "true";'; + } + else + { + pb += 'string bIsPC = "false";'; + } + if(dbg)alert(pb); + if( bIsPDA ) { pb += 'string bIsPDA = "true";'; } else { pb += 'string bIsPDA = "false";'; } + if( bIsCENTRAL ) { pb += 'string bIsCENTRAL = "true";'; } else { pb += 'string bIsCENTRAL = "false";'; } + var opts = + { + postBody: ReGa.encode(pb), + onComplete: function(t) + { + if(dbg){alert(t.responseText);} + WebUI.enter(FavoriteListPage); + } + }; + new Ajax.Request(url, opts); + } + +}; + +iseFavorites = new ise.Favorites(); + +// ################## +// ### ISE: ROOMS ### +// ################## + +/** + * @class + **/ +ise.Rooms = Class.create(); + +ise.Rooms.prototype = { + initialize: function() { + }, + + // ### CREATE ROOM ### + // [name]: room object name + CreateRoomRetId: function(name, baseId) { + name = name.replace(/[\r\n\t]/g, ""); + // alert("iseRooms.CreateRoomRetId: " + name + "(" + name.length + ")"); + var url = '/esp/rooms.htm?sid='+SessionId; + var pb = ""; + pb += 'string action = "createRoomRetId";'; + pb += 'string name = "'+name+'";'; + var opt = + { + postBody: ReGa.encode(pb), + onComplete: function(transport) { + buildPropTable(baseId); + + var id = transport.responseText; + RoomList.beginUpdate(id); + } + }; + new Ajax.Request(url,opt); + }, + + // ### DELETE ROOM ### + // [id]: room object id + DeleteRoom: function(id) { + var url = "/esp/rooms.htm?sid="+SessionId; + var pb = ""; + pb += 'string action = "deleteRoom";'; + pb += 'integer id = '+id+';'; + var opt = { + postBody: ReGa.encode(pb), + + onSuccess: function(t) { + } + }; + new Ajax.Request(url,opt); + }, + + // ### CHANGE ROOM NAME ### + // [id]: room object id + // [newName]: new name of room object + ChangeRoomName: function(id, newName) { + var url = "/esp/rooms.htm?sid="+SessionId; + var pb = ""; + pb += 'string action = "changeRoomName";'; + pb += 'integer id = '+id+';'; + pb += 'string newname = "'+newName+'";'; + var opt = { + postBody: ReGa.encode(pb) + }; + new Ajax.Request(url,opt); + }, + + // ### CHANGE ROOM COLOR### + // [id]: room object id + // [newColor]: new color of room object + ChangeRoomColor: function(id, newColor) { + var url = "/esp/rooms.htm?sid="+SessionId; + var pb = ""; + pb += 'string action = "changeRoomColor";'; + pb += 'integer id = '+id+';'; + pb += 'string newcolor = "'+newColor+'";'; + var opt = { + postBody: ReGa.encode(pb) + }; + new Ajax.Request(url,opt); + }, + + // ### CHANGE ROOM COMMENT### + // [id]: room object id + // [newColor]: new color of room object + ChangeRoomComment: function(id, newComment) { + var url = "/esp/rooms.htm?sid="+SessionId; + var pb = ""; + pb += 'string action = "changeRoomComment";'; + pb += 'integer id = '+id+';'; + pb += 'string newcomment = "'+newComment+'";'; + var opt = { + postBody: ReGa.encode(pb) + }; + new Ajax.Request(url,opt); + }, + + // ### CHANGE ROOM SYMBOL### + // [id]: room object id + // [newSymbol]: new symbol of room object + ChangeFunctionSymbol: function(id, newSymbol) { + var url = "/esp/rooms.htm?sid="+SessionId; + var pb = ""; + pb += 'string action = "changeRoomSymbol";'; + pb += 'integer id = '+id+';'; + pb += 'string newsymbol = "'+newSymbol+'";'; + var opt = { + postBody: ReGa.encode(pb) + }; + new Ajax.Request(url,opt); + }, + + buildRoomOverlay: function() { + var url = "/esp/rooms.htm?sid="+SessionId; + var pb = "string action = 'buildRoomOverlay';"; + var opts = { + postBody: ReGa.encode(pb), + onComplete: function() { + translatePage('#roomOverlay'); + } + }; + //new Ajax.Updater("roomOverlay", url, opts); + new Ajax.Updater("roomOverlay", url, opts); + } +}; + +iseRooms = new ise.Rooms(); + +// ###################### +// ### ISE: FUNCTIONS ### +// ###################### + +/** + * @class + **/ +ise.Functions = Class.create(); + +ise.Functions.prototype = { + initialize: function() { + }, + + // ### CREATE FUNCTION ### + // [name]: function object name + CreateFunctionRetId: function(name, baseId) { + var url = '/esp/functions.htm?sid='+SessionId; + var pb = ""; + pb += 'string action = "createFunctionRetId";'; + pb += 'string name = "'+name+'";'; + var opt = { + postBody: ReGa.encode(pb), + onComplete: function(transport) { + buildPropTable(baseId); + + var id = transport.responseText; + SubsectionList.beginUpdate(id); + } + }; + new Ajax.Request(url,opt); + }, + + // ### CHANGE FUNCTION NAME ### + // [id]: function object id + // [newName]: new name of function object + ChangeFunctionName: function(id, newName) { + var url = "/esp/functions.htm?sid="+SessionId; + var pb = ""; + pb += 'string action = "changeFunctionName";'; + pb += 'integer id = '+id+';'; + pb += 'string newname = "'+newName+'";'; + var opt = { + postBody: ReGa.encode(pb) + }; + new Ajax.Request(url,opt); + }, + + // ### DELETE FUNCTION ### + // [id]: function object id + DeleteFunction: function(id) { + var url = "/esp/functions.htm?sid="+SessionId; + var pb = ""; + pb += 'string action = "deleteFunction";'; + pb += 'integer id = '+id+';'; + var opt = { + postBody: ReGa.encode(pb), + + onSuccess: function(t) { + } + }; + new Ajax.Request(url,opt); + }, + + // ### CHANGE FUNCTION COLOR### + // [id]: function object id + // [newColor]: new color of function object + ChangeFunctionColor: function(id, newColor) { + var url = "/esp/functions.htm?sid="+SessionId; + var pb = ""; + pb += 'string action = "changeFunctionColor";'; + pb += 'integer id = '+id+';'; + pb += 'string newcolor = "'+newColor+'";'; + var opt = { + postBody: ReGa.encode(pb) + }; + new Ajax.Request(url,opt); + }, + + // ### CHANGE FUNCTION COMMENT### + // [id]: function object id + // [newComment]: new comment of function object + ChangeFunctionComment: function(id, newComment) { + var url = "/esp/functions.htm?sid="+SessionId; + var pb = ""; + pb += 'string action = "changeFunctionComment";'; + pb += 'integer id = '+id+';'; + pb += 'string newcomment = "'+newComment+'";'; + var opt = { + postBody: ReGa.encode(pb) + }; + new Ajax.Request(url,opt); + }, + + // ### CHANGE FUNCTION SYMBOL### + // [id]: function object id + // [newSymbol]: new symbol of function object + ChangeFunctionSymbol: function(id, newSymbol) { + var url = "/esp/functions.htm?sid="+SessionId; + var pb = ""; + pb += 'string action = "changeFunctionSymbol";'; + pb += 'integer id = '+id+';'; + pb += 'string newsymbol = "'+newSymbol+'";'; + var opt = { + postBody: ReGa.encode(pb) + }; + new Ajax.Request(url,opt); + }, + + buildFuncOverlay: function() { + var url = "/esp/functions.htm?sid="+SessionId; + var pb = "string action = 'buildFuncOverlay';"; + var opts = { + postBody: ReGa.encode(pb), + onComplete: function() { + translatePage('#funcOverlay'); + } + }; + new Ajax.Updater("funcOverlay", url, opts); + } +}; + +iseFunctions = new ise.Functions(); + +// ##################### +// ### ISE: CHANNELS ### +// ##################### + +/** + * @class + **/ +ise.Channels = Class.create(); + +ise.Channels.prototype = { + initialize: function() { + }, + + // ### SetReadyConfig + // [ctrlId]: id of checkbox + // [id]: id of channel + setReadyConfig: function(ctrlId, id) { + var url = "/esp/channels.htm?sid="+SessionId; + var state = ($(ctrlId)._isReady) ? 0 : 1; + + var pb = "string chnId = " + id + ";"; + pb += "string action= 'setReadyConfig';"; + pb += "string state = " + state + ";"; + + if(dbg){alert($(ctrlId).checked);} + new Ajax.Updater("dummy", url, {postBody: ReGa.encode(pb),evalScripts:true,onComplete:function(t){if(dbg){alert(t.responseText);}}}); + }, + + setHandling: function(id, ctrlId) { + var url = "/esp/channels.htm?sid="+SessionId; + var pb = "integer chnId = " + id + ";"; + pb += "string action= 'setHandling';"; + pb += "integer iHandling = "+($(ctrlId).checked? 1: 0)+";"; + new Ajax.Updater("dummy", url, {postBody: ReGa.encode(pb), evalScripts:true}); + }, + + setVisible: function(id, ctrlId) + { + var url = "/esp/channels.htm?sid="+SessionId; + var pb = "integer chnId = " + id + ";"; + pb += "string action= 'setVisible';"; + pb += "integer iVis = "+($(ctrlId).checked? 1: 0)+";"; + new Ajax.Updater("dummy", url, {postBody: ReGa.encode(pb), evalScripts:true}); + }, + + setProto: function(id, ctrlId) { + var url = "/esp/channels.htm?sid="+SessionId; + var pb = "integer chnId = " + id + ";"; + pb += "string action= 'setProto';"; + pb += "integer iProto = "+($(ctrlId).checked? 1: 0)+";"; + new Ajax.Updater("dummy", url, {postBody: ReGa.encode(pb), evalScripts:true}); + }, + + setTransMode: function(id, bAES) { + var url = "/esp/channels.htm?sid="+SessionId; + var pb = "integer chnId = " + id + ";"; + pb += "string action= 'setTransMode';"; + pb += "integer iAES = "+(bAES? 1: 0)+";"; + new Ajax.Updater("dummy", url, {postBody: ReGa.encode(pb), evalScripts: true}); + }, + + chnToRoom: function(idChn, idRoom, bAdd) { + var url = "/esp/channels.htm?sid="+SessionId; + var pb = "integer chnId = "+ idChn + ";"; + pb += "integer roomId = "+ idRoom + ";"; + pb += "string action= 'chnToRoom';"; + pb += "integer iAdd = "+ (bAdd ? 1 : 0) + ";"; + new Ajax.Updater('dummy', url, {postBody: ReGa.encode(pb), evalScripts: true}); + + var room = RoomList.get(idRoom); + if (room) + { + if (bAdd) { room.addChannel(idChn); } + else { room.removeChannel(idChn); } + } + }, + + delChnFromAllRooms: function(chnId,bCTV) { + var url = "/esp/channels.htm?sid="+SessionId; + var pb = ""; + pb += "string chnId = '"+ chnId + "';"; + pb += "string action= 'delChnFromAllRooms';"; + if( bCTV ) + { + pb += 'system.SetSessionVar("sessionCTV", "true");'; + } + else + { + pb += 'system.SetSessionVar("sessionCTV", "false");'; + } + var opts = + { + postBody: ReGa.encode(pb), + evalScripts: true, + onComplete: function(t) + { + reloadSortedPage(); + } + }; + new Ajax.Request(url, opts); + }, + + delChnFromAllFunctions: function(chnId,bCTV) { + var url = "/esp/channels.htm?sid="+SessionId; + var pb = ""; + pb += "string chnId = '"+ chnId + "';"; + pb += "string action= 'delChnFromAllFunctions';"; + if( bCTV ) + { + pb += 'system.SetSessionVar("sessionCTV", "true");'; + } + else + { + pb += 'system.SetSessionVar("sessionCTV", "false");'; + } + var opts = + { + postBody: ReGa.encode(pb), + evalScripts: true, + onComplete: function(t) + { + reloadSortedPage(); + } + }; + new Ajax.Request(url, opts); + }, + + chnToFunc: function(idChn, idFunc, bAdd) { + var url = "/esp/channels.htm?sid="+SessionId; + var pb = "integer chnId = "+ idChn + ";"; + pb += "integer funcId = "+ idFunc + ";"; + pb += "string action= 'chnToFunc';"; + pb += "integer iAdd = "+ (bAdd ? 1 : 0) + ";"; + new Ajax.Updater('dummy', url, {postBody: ReGa.encode(pb), evalScripts: true}); + + var subsection = SubsectionList.get(idFunc); + if (subsection) + { + if (bAdd) { subsection.addChannel(idChn); } + else { subsection.removeChannel(idChn); } + } + }, + + showOverlay: function(idChn, baseId) { + var url = "/esp/channels.htm?sid="+SessionId; + var pb = "integer chnId = "+ idChn + ";"; + pb += "integer baseId = "+ baseId + ";"; + pb += "string action= 'showOverlay';"; + new Ajax.Updater('dummy', url, {postBody: ReGa.encode(pb), evalScripts: true}); + }, + + // sChns: tab-separiert wg. ESP foreach + addChnsToID: function(sChns, destId, clearAll, onComplete) { + var _onComplete_ = onComplete; + var url = "/esp/channels.htm?sid="+SessionId; + var pb = "integer destId = "+ destId + ";"; + pb += "string arChn = '"+ sChns + "';"; + pb += "string action= 'addChnsToID';"; + pb += 'system.SetSessionVar("sessionLS","");'; + if(clearAll) + { + pb += "boolean clearAll = "+clearAll+";"; + } + else + { + pb += "boolean clearAll = false;"; + } + var opts = + { + postBody: ReGa.encode(pb), + evalScripts: true, + onComplete: function(t) + { + reloadSortedPage(); + if (_onComplete_) { _onComplete_(); } + } + }; + new Ajax.Updater("dummy", url, opts ); + }, + + Test: function(ids) + { + var url = '/esp/channels.htm?sid='+SessionId; + var pb = ''; + pb += 'string action = "Test";'; + pb += 'string ids = "'+ids+'";'; + var opts = + { + postBody: ReGa.encode(pb), + evalScripts:true, + onComplete:function(t) + { + if(dbg)alert(t.responseText); + } + }; + new Ajax.Request( url, opts ); + }, + + delChnFromID: function(chnId, destId,bCTV) { + var url = "/esp/channels.htm?sid="+SessionId; + var pb = "integer destId = "+ destId + ";"; + pb += "string chnId = '"+ chnId + "';"; + pb += "string action= 'delChnFromID';"; + if( bCTV ) + { + pb += 'system.SetSessionVar("sessionCTV", "true");'; + } + else + { + pb += 'system.SetSessionVar("sessionCTV", "false");'; + } + var opts = + { + postBody: ReGa.encode(pb), + evalScripts: true, + onComplete: function(t) + { + reloadSortedPage(); + } + }; + new Ajax.Request(url, opts); + }, + + saveDisplayValues: function(chnId) + { + var id = chnId; + conInfo( "iseChannels.saveDisplayValues("+id+");" ); + var url = "/esp/channels.htm?sid="+SessionId; + var sEnum = "TEXT\tBEEP\tUNIT\tBACKLIGHT"; + var pb = ""; + pb += 'string action = "saveDisplayValues";'; + pb += 'string chnId = "'+id+'";'; + pb += 'string varTEXT = "'+$("txt"+id).value+'";'; + pb += 'string varUNIT = "'+$("selUnit"+id).selectedIndex+'";'; + pb += 'string varBACKLIGHT = "'+$("selLight"+id).selectedIndex+'";'; + pb += 'string varBEEP = "'+$("selBeep"+id).selectedIndex+'";'; + if( $("cBulb"+id).checked ) { sEnum += "\tBULB"; } + if( $("cSwitch"+id).checked ) { sEnum += "\tSWITCH"; } + if( $("cWnd"+id).checked ) { sEnum += "\tWINDOW"; } + if( $("cDoor"+id).checked ) { sEnum += "\tDOOR"; } + if( $("cBlind"+id).checked ) { sEnum += "\tBLIND"; } + if( $("cScene"+id).checked ) { sEnum += "\tSCENE"; } + if( $("cPhone"+id).checked ) { sEnum += "\tPHONE"; } + if( $("cBell"+id).checked ) { sEnum += "\tBELL"; } + if( $("cArrUp"+id).checked ) { sEnum += "\tARROW_UP"; } + if( $("cArrDown"+id).checked ) { sEnum += "\tARROW_DOWN"; } + if( $("cClock"+id).checked ) { sEnum += "\tCLOCK"; } + sEnum += "\tSUBMIT"; + pb += 'string StateEnum = "'+sEnum+'";'; + conInfo( "StateEnum=["+sEnum+"]" ); + new Ajax.Request(url, {postBody: ReGa.encode(pb),onSuccess:function(t){conInfo(t.responseText);}}); + } +}; + +iseChannels = new ise.Channels(); + +// ##################### +// ### ISE: DEVICES ### +// ##################### + +/** + * @class + **/ +ise.Devices = Class.create(); + +ise.Devices.prototype = { + + //deviceOperateGroupOnly: false, + + initialize: function() { + //this.deviceOperateGroupOnly = false; + }, + setOperateGroupOnly: function(mode) { + //this.deviceOperateGroupOnly = mode; + }, + + // ### SetReadyConfig + // [id]: id of device + setReadyConfig: function(id) { + // dazugehörige Tabellenreihe ausblenden + //$("tr" + id).hide(); + var url = "/esp/devices.htm?sid="+SessionId; + var pb = "integer devId = " + id + ";"; + pb += "string action= 'setReadyConfig';"; + new Ajax.Updater("dummy", url, {postBody: ReGa.encode(pb), evalScripts: true, onComplete: function(t){if(dbg){alert(t.responseText);}}}); + + // Gerät in Geräteliste übernehmen + //DeviceList.beginUpdateDevice(id); + + // Gerät in Geräteliste übernehmen + DeviceList.beginUpdateDevice(id, function() { + //DeviceList.devices[id].isOperateGroupOnly = this.deviceOperateGroupOnly; + if (DeviceList.devices[id]) { + DeviceList.devices[id].isOperateGroupOnly = false; + DeviceList.devices[id].inInbox = false; + } + + }); + + }, + + setHandling: function(id, ctrlId) { + var url = "/esp/devices.htm?sid="+SessionId; + var pb = "integer devId = " + id + ";"; + pb += "string action= 'setHandling';"; + pb += "integer iHandling = "+($(ctrlId).checked? 1: 0)+";"; + new Ajax.Updater("dummy", url, {postBody: ReGa.encode(pb), evalScripts:true}); + }, + + setVisible: function(id, ctrlId, mode) { + var url = "/esp/devices.htm?sid="+SessionId; + var pb = "integer devId = " + DeviceList.getChannel(id).deviceId + ";"; + pb += "string action= 'setVisible';"; + + if (mode) { + homematic("Device.setVisibility", {"id": DeviceList.getChannel(id).deviceId, "isVisible": true}); + pb += "integer iVis = " + 1 + ";"; + } else { + pb += "integer iVis = " + ($(ctrlId).checked? 1: 0) + ";"; + } + new Ajax.Updater("dummy", url, {postBody: ReGa.encode(pb), evalScripts:true}); + }, + + setProto: function(id, ctrlId) + { + var url = "/esp/devices.htm?sid="+SessionId; + var pb = "integer devId = " + id + ";"; + pb += "string action= 'setProto';"; + pb += "integer iProto = "+($(ctrlId).checked? 1: 0)+";"; + new Ajax.Updater("dummy", url, {postBody: ReGa.encode(pb), evalScripts:true}); + } +}; + +iseDevices = new ise.Devices(); + + + + +// ##################### +// ### ISE: SYSTEM ### +// ##################### + +/** + * @class + **/ +ise.System = Class.create(); + +ise.System.prototype = { + initialize: function() { + }, + + checkName: function(name,divid) + { + var url = "/esp/exec.htm?sid="+SessionId; + var pb = ''; + pb += 'string sUniqueName;'; + pb += 'dom.CheckName("'+name+'", &sUniqueName, ID_SYSTEM_VARIABLES );'; + pb += 'Write( sUniqueName );'; + var opts = { postBody: ReGa.encode(pb) }; + new Ajax.Updater(divid,url,opts); + }, + + saveName: function(id, name, ctrlId, callStrFunc) { + var url = "/esp/system.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "saveName";'; + pb += 'string id = "'+id+'";'; + pb += 'string name = "'+name+'";'; + if(dbg){alert(pb);} + var opts = { + postBody: ReGa.encode(pb), + onComplete: function(resp) { + if ($(ctrlId)) { + // alert("iseSystem.saveName: " + resp.responseText + "(" + resp.responseText.length + ")"); + if (callStrFunc) { + if (callStrFunc == CALL_STRCUT) + $(ctrlId).innerHTML = strCut(resp.responseText, true, true); + if (callStrFunc == CALL_SPACECUT) + $(ctrlId).innerHTML = spaceCutHtmlIf(resp.responseText, 1); + } + else + $(ctrlId).innerHTML = resp.responseText; + } + } + }; + new Ajax.Request(url, opts); + }, + + saveDesc: function(id, desc) { + var url = "/esp/system.htm?sid="+SessionId; + var pb = "integer objId = " + id + ";"; + pb += "string desc = '"+desc+"';"; + pb += "string action = 'saveDesc';"; + if(dbg){alert(pb);} + new Ajax.Request(url, {postBody: ReGa.encode(pb),onComplete:function(t){if(dbg){alert(t.responseText);}}}); + }, + + saveDpProto: function(id, ctrlId) { + var url = "/esp/system.htm?sid="+SessionId; + var pb = "string action = 'saveDpProto';"; + pb += "integer dpId = " + id + ";"; + pb += "integer iProto = '"+($(ctrlId).checked ? 1 : 0)+"';"; + new Ajax.Request(url, {postBody: ReGa.encode(pb)}); + }, + + saveDpVisibility: function(id, ctrlId) { + var url = "/esp/system.htm?sid="+SessionId; + var pb = "string action = 'saveDpVisibility';"; + pb += "integer dpId = " + id + ";"; + pb += "integer iVisible = '"+($(ctrlId).checked ? 1 : 0)+"';"; + new Ajax.Request(url, {postBody: ReGa.encode(pb)}); + }, + + saveDpInternal: function(id, ctrlId) { + var url = "/esp/system.htm?sid="+SessionId; + var pb = "string action = 'saveDpInternal';"; + pb += "integer dpId = " + id + ";"; + pb += "integer iInternal = '"+($(ctrlId).checked ? 1 : 0)+"';"; + new Ajax.Request(url, {postBody: ReGa.encode(pb)}); + }, + + ClearHistoryData: function() + { + var url = "/esp/system.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "ClearHistoryData";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + reloadPage(); + } + }; + new Ajax.Request(url,opts); + } +}; + +iseSystem = new ise.System(); + +// ####################### +// ### ISE: PROGRAMS ### +// ####################### + +/** + * @class + **/ +ise.Programs = Class.create(); + +ise.Programs.prototype = { + initialize: function() { + }, + + SetBreakOnRestart: function( rid, id, value ) + { + + var url = "/esp/programs.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "SetBreakOnRestart";'; + pb += 'string id = "'+id+'";'; + pb += 'string value = "'+value+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + ReloadRule(rid); + } + }; + new Ajax.Request(url,opts); + if(dbg)alert(pb); + }, + + SetActive: function( id, value ) + { + var url = "/esp/programs.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "SetActive";'; + pb += 'string id = "'+id+'";'; + pb += 'string value = "'+value+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + //reloadPage(); + } + }; + new Ajax.Request(url,opts); + }, + + SetVisible: function( id, value ) + { + var url = "/esp/programs.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "SetVisible";'; + pb += 'string id = "'+id+'";'; + pb += 'string value = "'+value+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + //reloadPage(); + } + }; + new Ajax.Request(url,opts); + }, + + SetOperate: function( id, value ) + { + var url = "/esp/programs.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "SetOperate";'; + pb += 'string id = "'+id+'";'; + pb += 'string value = "'+value+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + //reloadPage(); + } + }; + new Ajax.Request(url,opts); + }, + + ProgramUpdate: function( id ) + { + var url = "/esp/programs.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "ProgramUpdate";'; + pb += 'string id = "'+id+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + reloadPage(); + } + }; + new Ajax.Request(url,opts); + }, + + SetVisibility: function( id, value ) + { + var url = "/esp/programs.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "SetVisibility";'; + pb += 'string id = "'+id+'";'; + pb += 'string value = "'+value+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + //reloadPage(); + } + }; + new Ajax.Request(url,opts); + }, + + // ### CONDITIONS ### + AddCondition: function(rid) { + var url = "/esp/programs.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "AddCondition";'; + pb += 'string rid = "'+rid+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + ReloadRule(rid); + } + }; + new Ajax.Request(url,opts); + }, + DeleteCondition: function(rid,cid) { + var url = "/esp/programs.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "DeleteCondition";'; + pb += 'string rid = "'+rid+'";'; + pb += 'string cid = "'+cid+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + ReloadRule(rid); + } + }; + new Ajax.Request(url,opts); + }, + // ### SINGLE CONDITIONS ### + AddSingleCondition: function(rid, cid) { + var url = "/esp/programs.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "AddSingleCondition";'; + pb += 'string cid = "'+cid+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + ReloadRule( rid ); + } + }; + new Ajax.Request(url,opts); + }, + DeleteSingleCondition: function(rid,cid,sid) { + var url = "/esp/programs.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "DeleteSingleCondition";'; + pb += 'string cid = "'+cid+'";'; + pb += 'string sid = "'+sid+'";'; + pb += 'string rid = "'+rid+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + ReloadRule(rid); + } + }; + new Ajax.Request(url,opts); + }, + // ### SINGLE DESTINATIONS ### + AddSingleDestination: function(rid,did) { + var url = "/esp/programs.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "AddSingleDestination";'; + pb += 'string did = "'+did+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + ReloadRule(rid); + } + }; + new Ajax.Request(url,opts); + }, + DeleteSingleDestination: function(rid,did,sid) { + var url = "/esp/programs.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "DeleteSingleDestination";'; + pb += 'string did = "'+did+'";'; + pb += 'string sid = "'+sid+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + ReloadRule(rid); + } + }; + new Ajax.Request(url,opts); + }, + // #### SUB RULES #### + AddSubRule: function(rid) + { + if(dbg){alert("Call AddSubRule");} + var url = "/esp/programs.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "AddSubRule";'; + pb += 'string rid = "'+rid+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + reloadPage(); + } + }; + new Ajax.Request(url,opts); + }, + AddSubRuleDest: function(rid) + { + if(dbg){alert("Call AddSubRuleDest");} + var url = "/esp/programs.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "AddSubRuleDest";'; + pb += 'string rid = "'+rid+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + reloadPage(); + //ReloadRule( rid ); + } + }; + new Ajax.Request(url,opts); + }, + AddSubRuleBreakOnRestart: function(rid) + { + if(dbg){alert("Call AddSubRuleBreakOnRestart");} + var url = "/esp/programs.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "AddSubRuleBOR";'; + pb += 'string rid = "'+rid+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + reloadPage(); + } + }; + new Ajax.Request(url,opts); + }, + AddNewElseRule: function(rid) + { + if(dbg){alert("Call AddNewElseRule");} + var url = "/esp/programs.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "AddNewElseRule";'; + pb += 'string rid = "'+rid+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + //ReloadRule(rid); + reloadPage(); + } + }; + new Ajax.Request(url,opts); + }, + DeleteSubRule: function(rid) + { + var url = "/esp/programs.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "DeleteSubRule";'; + pb += 'string rid = "'+rid+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + //ReloadRule(rid); + //ReloadProgram(pid); + reloadPage(); + } + }; + new Ajax.Request(url,opts); + }, + OperatorType: function(rid,id,value) + { + var url = "/esp/programs.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "SetOperatorType";'; + pb += 'string id = "'+id+'";'; + pb += 'string value = "'+value+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + ReloadRule(rid); + } + }; + new Ajax.Request(url,opts); + }, + Delete: function(id,prevPage) + { + var url = "/esp/programs.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "DeleteProgram";'; + pb += 'string id = "'+id+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + WebUI.enter(( prevPage && prevPage === 'control/programs' ) ? ControlProgramsPage : ProgramListPage); + } + }; + new Ajax.Request(url,opts); + }, + Restore: function(orig,copy,prevPage) + { + var url = "/esp/programs.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "RestoreProgram";'; + pb += 'string orig = "'+orig+'";'; + pb += 'string copy = "'+copy+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + WebUI.enter(( prevPage && prevPage === 'control/programs' ) ? ControlProgramsPage : ProgramListPage); + } + }; + new Ajax.Request(url,opts); + }, + CopyToNewProgram: function(id,prevPage) + { + var url = "/esp/programs.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "CopyToNewProgram";'; + pb += 'string id = "'+id+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + WebUI.enter(( prevPage && prevPage === 'control/programs' ) ? ControlProgramsPage : ProgramListPage); + } + }; + new Ajax.Request(url,opts); + } +}; + +isePrograms = new ise.Programs(); + +// ############################## +// ### ISE: SINGLE CONDITIONS ### +// ############################## + +/** + * @class + **/ +ise.SingleCondition = Class.create(); + +ise.SingleCondition.prototype = +{ + initialize: function() + { + }, + + OperatorType: function(cid,id,value) + { + var url = "/esp/sico.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "SetOperatorType";'; + pb += 'string cid = "'+cid+'";'; + pb += 'string id = "'+id+'";'; + pb += 'string value = "'+value+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + conInfo( t.responseText ); + ReloadRule(rid); + } + }; + new Ajax.Request(url,opts); + }, + + SetValueRange: function(id,rv1,rv2,ct) + { + var url = "/esp/sico.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "SetValueRange";'; + pb += 'string id = "'+id+'";'; + pb += 'string rv1 = "'+rv1+'";'; + pb += 'string rv2 = "'+rv2+'";'; + pb += 'string ct = "'+ct+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + ReloadSingleCondition(id); + } + }; + new Ajax.Request(url,opts); + }, + + SetNegateCondition: function(scid,nc) { + var url = "/esp/sico.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "SetNegateCondition";'; + pb += 'string scid = "'+scid+'";'; + pb += 'string nc = "'+nc+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + ReloadSingleCondition(scid); + } + }; + new Ajax.Request(url,opts); + }, + + SetLeftValue: function(scid,lv) + { + var url = "/esp/sico.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "SetLeftValue";'; + pb += 'string scid = "'+scid+'";'; + pb += 'string lv = "'+lv+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + ReloadSingleCondition(scid); + } + }; + new Ajax.Request(url,opts); + }, + + SetRightValue: function(scid,rv) + { + var url = "/esp/sico.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "SetRightValue";'; + pb += 'string scid = "'+scid+'";'; + pb += 'string rv = "'+rv+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + } + }; + new Ajax.Request(url,opts); + }, + + SetLeftAndRightValue: function(scid,lv,rv) + { + var url = "/esp/sico.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "SetLeftAndRightValue";'; + pb += 'string scid = "'+scid+'";'; + pb += 'string rv = "'+rv+'";'; + pb += 'string lv = "'+lv+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + conInfo( t.responseText ); + ReloadSingleCondition(scid); + } + }; + new Ajax.Request(url,opts); + }, + + SetLeftValType: function(scid,lvt) + { + var url = "/esp/sico.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "SetLeftValType";'; + pb += 'string scid = "'+scid+'";'; + pb += 'string lvt = "'+lvt+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + ReloadSingleCondition(scid); + } + }; + new Ajax.Request(url,opts); + }, + SetConditionType2: function(scid,ct) + { + var url = "/esp/sico.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "SetConditionType2";'; + pb += 'string scid = "'+scid+'";'; + pb += 'string ct = "'+ct+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + conInfo(t.responseText); + ReloadSingleCondition(scid); + } + }; + new Ajax.Request(url,opts); + }, + SetChannel: function(scid,chid) + { + var url = "/esp/sico.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "SetChannel";'; + pb += 'string scid = "'+scid+'";'; + pb += 'string chid = "'+chid+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + ReloadSingleCondition(scid); + } + }; + new Ajax.Request(url,opts); + }, + SetTimeModule: function(scid,tmid) + { + var url = "/esp/sico.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "SetTimeModule";'; + pb += 'string scid = "'+scid+'";'; + pb += 'string tmid = "'+tmid+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + ReloadSingleCondition(scid); + } + }; + new Ajax.Request(url,opts); + } +}; + +iseSingleCondition = new ise.SingleCondition(); + +// ################################ +// ### ISE: SINGLE DESTINATION ### +// ################################ + +/** + * @class + **/ +ise.SingleDestination = Class.create(); + +ise.SingleDestination.prototype = +{ + initialize: function() + { + this.reload = true; + }, + SetDP: function(id,value) + { + var url = "/esp/side.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "SetDP";'; + pb += 'string id = "'+id+'";'; + pb += 'string value = "'+value+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + //reloadPage(); + ReloadSingleDestination(id); + } + }; + new Ajax.Request(url,opts); + }, + SetChannel: function(id,value) + { + var url = "/esp/side.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "SetChannel";'; + pb += 'string id = "'+id+'";'; + pb += 'string value = "'+value+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + ReloadSingleDestination(id); + } + }; + new Ajax.Request(url,opts); + }, + SetParam: function(id,value) + { + var url = "/esp/side.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "SetParam";'; + pb += 'string id = "'+id+'";'; + pb += 'string value = "'+value+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + ReloadSingleDestination(id); + } + }; + new Ajax.Request(url,opts); + }, + SetValue: function(id,value,unit, isSysVar) + { + isSysVar = (typeof isSysVar == "undefined") ? false : true; + + var url = "/esp/side.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "SetValue";'; + pb += 'string id = "'+id+'";'; + pb += 'string value = "'+value+'";'; + pb += 'boolean isSysVar = "'+isSysVar+'";'; + if( typeof( unit ) != "undefined" ) + { + pb += 'string unit = "'+unit+'";'; + } + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + conInfo( t.responseText ); + if(iseSingleDestination.reload) { ReloadSingleDestination(id); } + iseSingleDestination.reload = true; + } + }; + new Ajax.Request(url,opts); + }, + + SetValueMinMax: function(id,value,unit,min,max) + { + var valElm = jQuery("#valSD_"+id); + + value = value.toString().replace(/,/g, "."); + + value = parseFloat(value); + if (isNaN(value)) + { + value = min; + } + + if ((unit == "°C" || unit == "°C") && (value != min) && (value != max)) { + value = roundValue05(value); + } + + if (unit == "%") {min = min * 100; max = max * 100;} + + if (value < min) {value = min;} + if (value > max) {value = max;} + + valElm.val(addTrailingZero(value)); + + var url = "/esp/side.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "SetValue";'; + pb += 'string id = "'+id+'";'; + pb += 'string value = "'+value+'";'; + if( typeof( unit ) != "undefined" ) + { + pb += 'string unit = "'+unit+'";'; + } + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + conInfo( t.responseText ); + if(iseSingleDestination.reload) { ReloadSingleDestination(id); } + iseSingleDestination.reload = true; + } + }; + new Ajax.Request(url,opts); + }, + SetValueType: function(id,value) + { + var url = "/esp/side.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "SetValueType";'; + pb += 'string id = "'+id+'";'; + pb += 'string value = "'+value+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + if(iseSingleDestination.reload) reloadPage(); + } + }; + new Ajax.Request(url,opts); + }, + SetValueAndType: function(id,value,type) + { + var url = "/esp/side.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "SetValueAndType";'; + pb += 'string id = "'+id+'";'; + pb += 'string value = "'+value+'";'; + pb += 'string type = "'+type+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + PopupClose(); + //if(iseSingleDestination.reload) reloadPage(); + } + }; + new Ajax.Request(url,opts); + }, + SetValueAndTypeMinMax: function(id,value,type, min, max) + { + + if ((value < min) || (isNaN(value))) {value = min;} + if (value > max) {value = max;} + + var url = "/esp/side.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "SetValueAndType";'; + pb += 'string id = "'+id+'";'; + pb += 'string value = "'+value+'";'; + pb += 'string type = "'+type+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + PopupClose(); + //if(iseSingleDestination.reload) reloadPage(); + } + }; + new Ajax.Request(url,opts); + }, + SetValueAndDP: function(id,value,dp, elem) + { + var url = "/esp/side.htm?sid="+SessionId; + var pb = ''; + var arValue = elem.value.split("|"); + + if (arValue[1]) { + var arParamName = arValue[1].split("."), + paramName = arParamName[arParamName.length - 1]; + if (paramName == "PARTY_MODE_SUBMIT") { + value = getDefaultPartyModeString(); + } + } + pb += 'string action = "SetValueAndDP";'; + pb += 'string id = "'+id+'";'; + pb += 'string value = "'+value+'";'; + pb += 'string dp = "'+dp+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + ReloadSingleDestination(id); + } + }; + new Ajax.Request(url,opts); + }, + SetValueParam: function(id,value) + { + var url = "/esp/side.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "SetValueParam";'; + pb += 'string id = "'+id+'";'; + pb += 'string value = "'+value+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + ReloadSingleDestination(id); + } + }; + new Ajax.Request(url,opts); + }, + SetValueParamType: function(id,value) + { + var url = "/esp/side.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "SetValueParamType";'; + pb += 'string id = "'+id+'";'; + pb += 'string value = "'+value+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + ReloadSingleDestination(id); + } + }; + new Ajax.Request(url,opts); + }, + SetScript: function(id,script) + { + var url = "/esp/side.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "SetScript";'; + pb += 'string id = "'+id+'";'; + pb += 'string value = ^'+script.replace(/\^/g, '^#\'^\'#^')+'^;'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + ReloadSingleDestination(id); + } + }; + new Ajax.Request(url,opts); + } +}; + +iseSingleDestination = new ise.SingleDestination(); + +// ################### +// ### ISE: USER ### +// ################### + +/** + * @class + **/ +ise.User = Class.create(); + +ise.User.prototype = +{ + initialize: function() + { + }, + + buildSysVarTable: function(uid) { + var url = "/esp/system.htm?sid="+SessionId; + var pb = "string action = 'BuildUserSvTable';"; + pb += "integer userId = "+ uid +";"; + var opts = { + postBody: ReGa.encode(pb), + onComplete: function(response) { + if (200 == response.status) { + translatePage("#userSysVarTbl"); + } + } + }; + new Ajax.Updater("userSysVarTbl", url, opts); + }, + + sortSysVarTable: function(uid) { + var url = "/esp/system.htm?sid="+SessionId; + var pb = "((dom.GetObject(ID_USERS)).Get(" + uid + ")).UserSharedObjects().SortByName();"; + pb += "string action = 'BuildUserSvTable';"; + pb += "integer userId = "+ uid +";"; + var opts = { + postBody: ReGa.encode(pb), + onComplete: function(response) { + if (200 == response.status) { + translatePage("#userSysVarTbl"); + } + } + }; + new Ajax.Updater("userSysVarTbl", url, opts); + }, + + addSysVarBuildTable: function(uid, newVarId) { + //var url = "/esp/system.htm?sid="+SessionId+"&curDateTime="+new Date().getTime(); + var url = "/esp/system.htm?sid="+SessionId; + var pb = "string action = 'AddSysVarAndBuildTable';"; + pb += "integer userId = "+ uid +";"; + pb += "integer newSvId = " + newVarId + ";"; + var opts = { + postBody: ReGa.encode(pb), + onSuccess: function(t) { + // funktioniert seltsamerweise nur durch den "Updater"-Aufruf nicht + $("userSysVarTbl").innerHTML = t.responseText; + }, + onComplete: function(response) { + if (200 == response.status) { + translatePage("#userSysVarTbl"); + } + } + }; + new Ajax.Updater("userSysVarTbl", url, opts); + }, + + DeleteSysVar: function(uid, svId) { + var url = "/esp/system.htm?sid=" + SessionId; + var pb = "string action = 'UserDeleteSysVarBuildTable';"; + pb += "integer userId = "+ uid +";"; + pb += "integer svId = " + svId + ";"; + var opts = { + postBody: ReGa.encode(pb), + onSuccess: function(t) { + // funktioniert seltsamerweise nur durch den "Updater"-Aufruf nicht + $("userSysVarTbl").innerHTML = t.responseText; + }, + onComplete: function(response) { + if (200 == response.status) { + translatePage("#userSysVarTbl"); + } + } + }; + new Ajax.Updater("userSysVarTbl", url, opts); + }, + + MoveSysVar: function(uid, svId, dir) { + var url = "/esp/system.htm?sid=" + SessionId; + var pb = "string action = 'UserMoveSysVarBuildTable';"; + pb += "integer userId = "+ uid +";"; + pb += "integer svId = " + svId + ";"; + pb += "integer svMoveDirection = " + dir + ";"; + var opts = { + postBody: ReGa.encode(pb), + onSuccess: function(t) { + // funktioniert seltsamerweise nur durch den "Updater"-Aufruf nicht + $("userSysVarTbl").innerHTML = t.responseText; + }, + onComplete: function(response) { + if (200 == response.status) { + translatePage("#userSysVarTbl"); + } + } + }; + new Ajax.Updater("userSysVarTbl", url, opts); + }, + + buildTmpSysVarTable: function(arSysVars) { + var url = "/esp/system.htm?sid="+SessionId; + var pb = "string action = 'BuildUserSvTable';"; + pb += "integer userId = 0;"; + + var s = ""; + for(var i = 0; i < arSysVars.length; i++) { + s += arSysVars[i] + "\t"; + } + s = s.substr(0, s.length - 1); + pb += "string sTmpVars = '"+s+"';"; + var opts = { + postBody: ReGa.encode(pb), + onSuccess: function(t) { + // funktioniert seltsamerweise nur durch den "Updater"-Aufruf nicht + $("userSysVarTbl").innerHTML = t.responseText; + }, + onComplete: function(response) { + if (200 == response.status) { + translatePage("#userSysVarTbl"); + } + } + }; + new Ajax.Updater("userSysVarTbl", url, opts); + }, + + setAutoLogin: function(alPC, alPDA) { + var url = "/esp/system.htm?sid="+SessionId; + var pb = "string action = 'setAutoLogin';"; + pb += "integer alPC = " + alPC + ";"; + pb += "integer alPDA = " + alPDA + ";"; + + var opts = { + postBody: ReGa.encode(pb), + onComplete:function() + { + PopupClose(); + reloadPage(); + } + }; + new Ajax.Request(url, opts); + } +}; + +iseUser = new ise.User(); +/** + * ise/iseRefresher.js + **/ + +/** + * @fileOverview ? + * @author ise + **/ + +/** + * @class + **/ +iseRefresher = Class.create(); + +iseRefresher.prototype = +{ + initialize: function(iPollingInterval) + { + this.updating = false; + this.ajax = null; + this.pe = new PeriodicalExecuter(this.refresh, iPollingInterval); + }, + refresh: function() + { + if( rfr ) + { + if( !this.updating ) + { + this.updating = true; + var t = this; + SwitchOnFlashLight(); + var url = "/esp/system.htm?sid="+SessionId+"&action=UpdateUI"; + var pb = ''; + pb += 'string channels = "'+iseUpdateIDArray.join("\t")+'";'; + pb += 'string timestamps = "'+iseUpdateTMArray.join("\t")+'";'; + var opts = + { + method: 'post', + postBody: ReGa.encode(pb), + evalScripts:true, + onComplete: function() + { + delete t.ajax; + t.ajax = null; + iseRefrTimer = 0; + t.updating = false; + } + }; + if(dbg)alert(pb); + this.ajax = new Ajax.Updater("dummy", url, opts); + } + } + } +};/** + * ise/iseMessageBox.js + **/ + +/** + * @fileOverview ? + * @author ise + **/ + +/** + * @class + **/ +iseMessageBox = Class.create(); + +iseMessageBox.prototype = +{ + /* id: Steuert welches Popup dargestellt wird + * type: "Extra-parameter" für einige Popups + * secondary: Popup wird über einem anderen Popup eingeblendet + * showAll: All Kanäle auch virtuelle sollen angezeigt werden + * popUpTitle:Titel der auf dem popUp angezeigt werden soll + */ + initialize: function(id, type, secondary) + { + iseRefr(false); + this.id = id; + this.setTopMargin(6); + this.setLeftMargin(6); + this.type = type; + this.operations = iufVisible|iufReadyState|iufOperated|iufReadable|iufWriteable|iufEventable; + this.bMultiChooser = true; + this.title = ""; + this.pb = ""; + this.file = ""; + this.draggable = true; + + if(secondary) + { + this.secondary = true; + this.oldMsgHtml = $("messagebox").innerHTML; + this.oldMsgWidth = $("messagebox").getWidth(); + //$("messagebox").style.width = this.width + "px"; + } + else + { + this.secondary = false; + if (PLATFORM == 'Central') { + this.createMessagebox(); + } + } + + this.initPopup(id); + + this.load(); + }, + initPopup: function(id) + { + var screenWidth = WebUI.getWidth(); + var screenHeight = WebUI.getHeight(); + + switch(this.id) + { + case ID_ROOMS: + this.setTitle( translateKey("dialogEditRoom") /*"Raum bearbeiten"*/ ); + this.setWidth75Perc(); + this.setFile( "/pages/msg/popupPropEditor.htm" ); + break; + case ID_FUNCTIONS: + this.setTitle( translateKey("dialogEditFunction") /*"Gewerk bearbeiten"*/ ); + this.setWidth75Perc(); + this.setFile( "/pages/msg/popupPropEditor.htm" ); + break; + case ID_TRANSFER_PARAMETERS: + + if (PLATFORM == 'Central') { + this.setTitle( translateKey("dialogChooseTransmitMode") /*"Auswahl Übertragungsmodus"*/ ); + this.addToPostBody( 'integer chnId = '+this.type+';' ); + this.setWidth(1000); + this.setFile( "/pages/msg/popupTransEditor.htm" ); + } else { + + //ConfigTool + ResetPostString(); + poststr += "&title=" + translateKey("dialogChooseTransmitMode") /*"Auswahl Übertragungsmodus"*/; + poststr += "&channel=" + this.type; + //SendRequest('/popupTransEditor.cgi'); + } + + break; + case ID_CHANNEL_LIST: + this.setTitle( translateKey("dialogChannelOverView") /*"Kanalübersicht"*/ ); + //this.stretchToMax(); + this.setHeight(700); + this.setFile( "/pages/msg/channelList.htm" ); + break; + case ID_NEW_SYSVAR: + this.setTitle( translateKey("dialogCreateNewSysVar") /*"Systemvariable neu anlegen"*/ ); + this.addToPostBody( 'integer varid = 0;' ); + this.addToPostBody( 'integer createNew = 1;' ); + this.setWidth(1100); + this.setFile( "/pages/tabs/admin/msg/newSysVar.htm" ); + break; + case ID_EDIT_SYSVAR: + this.setTitle( translateKey("dialogEditSysVar") /*"Systemvariable bearbeiten"*/ ); + this.addToPostBody( 'integer varid = '+this.type+';' ); + this.addToPostBody( 'integer createNew = 0;' ); + this.setWidth(1100); + this.setFile( "/pages/tabs/admin/msg/newSysVar.htm" ); + break; + case ID_EDIT_SYSVAR_VALUE: + this.setTitle( translateKey("dialogEditSysVarValue") /*"Systemvariablenwert bearbeiten"*/ ); + this.addToPostBody( 'integer varid = '+this.type+';' ); + this.addToPostBody( 'integer createNew = 0;' ); + this.addToPostBody( 'boolean editValueOnly = 1;' ); + this.setWidth(240); + this.setFile( "/pages/tabs/admin/msg/newSysVar.htm" ); + break; + case ID_CREATE_SCRIPT: + this.setTitle( translateKey("dialogCreateScript") /*"Skript erstellen"*/ ); + this.addToPostBody( 'string iSDID = "'+this.type+'";' ); + this.setWidth(800); + this.setFile( "/pages/msg/createScript.htm" ); + break; + case ID_EDIT_SCRIPT: + this.setTitle( translateKey("dialogEditScript") /*"Skript bearbeiten"*/ ); + this.setWidth(parseInt(screenWidth * 0.8)); + this.setHeight(parseInt(screenHeight * 0.8)); + this.addToPostBody( 'string sdid = "'+this.type+'";' ); + this.addToPostBody( 'string frameHeight = "'+this.height+'";' ); + this.setFile( "/pages/msg/editScript.htm" ); + break; + case ID_CONTROL_TEST: + this.setWidth(800); + this.setFile( "/pages/msg/controls.htm" ); + break; + case ID_INSERT_VALUE: + this.setTitle( translateKey("dialogEnterValue") /*"Wert eingeben"*/ ); + this.addToPostBody( 'string type = "'+this.type+'";' ); + this.setWidth(800); + this.setFile( "/pages/msg/insertValue.htm" ); + break; + case ID_INSERT_STRING: + this.setTitle( translateKey("dialogEnterText") /*"Text eingeben" */); + this.addToPostBody( 'integer type = '+this.type+';' ); + this.setWidth(800); + this.setFile( "/pages/msg/insertValue.htm" ); + break; + case ID_SET_VALUE_RANGE: + this.setTitle( translateKey("dialogRangeOfValues") /*"Einstellung des Wertebereiches"*/ ); + this.addToPostBody( 'integer type = '+this.type+';' ); + this.setWidth(500); + this.setFile( "/pages/msg/setValueRange.htm" ); + break; + case ID_DEL_SYS_VARIABLE: + this.setTitle( translateKey("dialogDeleteSysVar") /*"Systemvariable löschen" */); + this.setWidth(800); + this.setFile( "/pages/msg/delSysVariable.htm" ); + break; + case ID_SYS_VARS_SELECTION: + this.setTitle( translateKey("dialogProgChoseSysVar") ); + this.addToPostBody( 'integer iShowAll = ' + this.type + ';' ); + this.addToPostBody( 'integer iSecondary = '+(this.secondary?"1":"0")+';' ); + this.setWidth(1000); + this.setFile( "/pages/msg/sysVarsSelection.htm" ); + this.draggable = false; // Scroll bar not working otherwise + break; + case ID_PROGRAM_CHOOSER: + this.setTitle( translateKey("dialogCreateFavChooseProg") /*"Favoritenerstellung - Programmauswahl" */); + this.addToPostBody( 'integer iSecondary = '+(this.secondary?"1":"0")+';' ); + this.setWidth(1000); + this.setFile( "/pages/msg/programChooser.htm" ); + break; + case ID_TIMEMODULE: + this.setTitle( translateKey("dialogSetTimeModul") /*"Einstellung des Zeitmoduls"*/ ); + this.addToPostBody( 'integer tmId = '+this.type+';' ); + this.setWidth(700); + this.setFile( "/pages/tabs/admin/msg/timemodule.htm" ); + break; + case ID_STATUSINFO: + this.setTitle( translateKey("dialogStateInfoDataTransferToDeviceSuccess") /*"Statusinfo: Datenübertragung zum Gerät erfolgreich abgeschlossen!" */); + this.setWidth(800); + this.setFile( "/pages/msg/statusinfo.htm" ); + break; + case ID_STATUSINFO_WARNING: + this.setTitle( translateKey("dialogWarningDataTransferToDeviceNotPossible") /*"Warnung: Übertragung der Daten zum Gerät nicht möglich!" */); + this.setWidth(800); + this.setFile( "/pages/msg/statusinfoWarning.htm" ); + break; + case ID_USER_ACCOUNT_CONFIG_ADMIN: + this.setTitle(translateKey("dialogUserAccountTitle")/*"Benutzerkonto - Konfiguration"*/); + this.addToPostBody( 'integer userid = '+this.type+';' ); + this.setWidth(800); + this.setFile( "/pages/msg/userAccountConfigAdmin.htm" ); + break; + case ID_USER_ACCOUNT_CONFIG_USER: + this.setTitle(translateKey("dialogUserAccountTitle")/*"Benutzerkonto - Konfiguration" */); + this.setWidth(1000); + this.setFile( "/pages/msg/userAccountConfigUser.htm" ); + break; + case ID_AUTO_LOGIN_CONFIG: + this.setTitle( translateKey("dialogConfigAutomaticLogin") /*"Automatische Anmeldung - Konfiguration" */); + this.setWidth(800); + this.setFile( "/pages/msg/autoLoginConfig.htm" ); + break; + case ID_SYSTEM_LANGUAGE_CONFIG: + this.setTitle( translateKey("dialogConfigSystemLanguage") /*"Systemsprache waehlen - Konfiguration" */); + this.setWidth(800); + this.setFile( "/pages/msg/systemLanguageConfig.htm" ); + break; + case ID_CHOOSE_LED: + this.setTitle( translateKey("dialogEnterValue") /*"Wert eingeben" */); + this.addToPostBody( 'string type = "'+this.type+'";' ); + this.setWidth(800); + this.setFile( "/pages/msg/chooseOULED16.htm" ); + break; + case ID_SET_OUCFM_MODE: + this.setTitle( translateKey("dialogEnterValue") /*"Wert eingeben" */); + this.addToPostBody( 'string type = "'+this.type+'";' ); + this.setWidth(400); + this.setFile( "/pages/msg/setOUCFMMode.htm" ); + break; + case ID_SET_STATUS_DISPLAY: + this.setTitle( translateKey("dialogEnterValue") /*"Wert eingeben" */); + this.addToPostBody( 'string type = "'+this.type+'";' ); + this.setWidth(400); + this.setFile( "/pages/msg/setStatusDisplay.htm" ); + break; + //ConfigTool + case ID_BIDCOS_INTERFACE: + ResetPostString(); + poststr += "&title=" + translateKey("dialogChooseBidCosInterface") /*"Auswahl BidCoS-Interface"*/; + poststr += "&channel=" + this.type; + //SendRequest('/popupInterfaceEditor.cgi'); + break; + + default: + throw new Error("unknown id (" + this.id + ")"); + break; + } + + if (this.draggable) { + jQuery("#messagebox").draggable({ + cancel: "input,textarea,button,select,option,.FooterButton,.StdButton,.CodeMirror,.CodeMirror-line" + }); + } + + }, + buildPostBody: function() + { + this.pb += 'integer id='+this.id+';'; + this.pb += 'string title="'+this.title+'";'; + this.pb += 'string sOperations = "'+this.operations+'";'; + if( this.bMultiChooser ) + { + this.pb += 'string MultiChooser = "'+this.type+'";'; + } + }, + load: function() + { + this.buildPostBody(); + //alert("PB:"+this.pb); + //alert("FN:"+this.file); + this.LoadFromFile(this.file, this.pb); + }, + setWidth: function(width) + { + this.width = width; + }, + stretchToMax: function() { + var maxHeight = 0; + if (window.innerHeight) { + maxHeight = window.innerHeight; + } + else { + if (window.document.documentElement && window.document.documentElement.clientHeight) + maxHeight = window.document.documentElement.clientHeight; + else + maxHeight = window.document.body.offsetHeight; + + this.setHeight(maxHeight - 50); + } + var maxWidth = screen.availWidth; + this.setWidth(maxWidth - 50); + }, + setWidth75Perc: function(perc) + { + var maxHeight = 0; + if (window.innerHeight) + { + maxHeight = window.innerHeight; + } + else + { + if (window.document.documentElement && window.document.documentElement.clientHeight) + maxHeight = window.document.documentElement.clientHeight; + else + maxHeight = window.document.body.offsetHeight; + + // this.setHeight(maxHeight * 0.5); + } + + var maxWidth = document.body.offsetWidth; + if(typeof(perc) == 'undefined') + { + this.setWidth(maxWidth * 0.75); + } + else + { + this.setWidth(maxWidth * perc); + } + }, + setHeight: function(height) + { + this.height = height; + }, + setLeftMargin: function(left) + { + this.LeftMargin = left; + }, + setTopMargin: function(top) + { + this.TopMargin = top; + }, + createMessagebox: function() + { + if ( !$('messagebox') ) + { + var newDiv = document.createElement("div"); + var newDivId = document.createAttribute("id"); + newDivId.nodeValue = "messagebox"; + newDiv.setAttributeNode(newDivId); + var newDivStyle = document.createAttribute("style"); + + if ((this.baseId != ID_CHANNEL_LIST)) + { + newDivStyle.nodeValue = "width:"+this.width+"px;height:"+this.height+"px;padding: 0px;position:absolute;left: 50%;margin-left: -"+(this.width/2)+"px;margin-top: -"+(this.height/2)+"px;"; + } + else + { + newDivStyle.nodeValue = "width:"+this.width+"px;height:"+this.height+"px;padding: 0px;position:absolute;"; + } + + if( typeof( newDiv.style.cssText ) == "string" ) + newDiv.style.cssText = newDivStyle.nodeValue; + else + newDiv.setAttributeNode(newDivStyle); + + $('centerbox').appendChild(newDiv); + + } + }, + removeMessagebox: function() + { + if ( $('messagebox') ) + { + $('messagebox').remove(); + } + }, + readaptSize: function() + { + if ( $('messagebox') ) + { + if ((this.baseId != ID_CHANNEL_LIST)) + { + var h = $("messagebox").getHeight(); + $('messagebox').style.marginLeft = ($('messagebox').style.width.replace(/px$/,"")/2)*(-1)+"px"; + $('messagebox').style.marginTop = (h/2)*(-1)+"px"; + } + } + }, + show: function() + { + this.readaptSize(); + $('trlayer').show(); + $('centerbox').show(); + }, + hide: function(o) + { + $('centerbox').hide(); + this.remove(); + $('trlayer').hide(); + //this.peKeepAlive.stop(); + iseRefr(true); + }, + remove: function() + { + this.removeMessagebox(); + }, + LoadFromFile: function(fn,pb) { + var url = fn; + if(url.indexOf('?sid=') === -1) + { + url = url+'?sid='+SessionId; + } + var t = this; + var opt = + { + method: 'post', + evalScripts: true, + postBody: ReGa.encode(pb), + onComplete: function(trans) + { + //$("messagebox").style.width = t.width + "px"; + if(t.width !== "undefined") { + jQuery("#messagebox").width(t.width + "px"); + } + if(t.height !== "undefined") { + jQuery("#messagebox").height(t.height + "px"); + } + jQuery("#tableContainer").css("max-height",(parseInt(jQuery(window).height() * 0.75)) + "px"); + centerMessageBox(); + iseRefr(true); + translatePage("#messagebox"); + } + }; + new Ajax.Updater('messagebox',url,opt); + }, + ShowPopup: function() { + this.show(); + setTimeout(function() { + eQ3.HomeMatic.Event.fire({type:'ContentLoaded'}); + }, 100); + }, + + restorePrevious: function() { + $("messagebox").innerHTML = this.oldMsgHtml; + $("messagebox").setStyle({width: this.oldMsgWidth + "px"}); + }, + + keepAlive: function() { + var url = "/esp/system.htm?sid="+SessionId+"&action=keepAlive"; + new Ajax.Updater("divTitle", url, {}); + }, + + addToPostBody: function(pb) + { + this.pb += pb; + }, + + setOperations: function(iOperations) + { + this.operations = iOperations; + }, + + setTitle: function(sTitle) + { + this.title = sTitle; + }, + + setFile: function(sFile) + { + this.file = sFile; + } +}; +/** + * ise/iseSubMenuControl.js + **/ + +/** + * @fileOverview ? + * @author Michael Niehaus (ise) + **/ + + +// file: iseSubMenuControl +// author: Michael Niehaus +// date created: 18.04.2007 + +/** + * @class + **/ +iseSubMenuControl = Class.create(); + +iseSubMenuControl.prototype = { + // topMenuId: Id des TopMenüs bei dessen MouseOver das Submenü eingeblendet werden soll + // subMenuId: Id des SubMenüs das eingeblendet werden soll + // offsetDivId [optional]: wird benötigt um Verhalten des IE7 bei Positionierung auszugleichen + // + // Wird eine Seite per Ajax nachgeladen ergibt im IE7 der Aufruf von Position.page() und + // Position.cumulativeOffset() (für ein Element bei dem Position auf 'aboslute' oder 'relative' + // gesetzt ist) immer die Position vom Ursprung der nachgeladenen Seite wieder, + // nicht die Position vom Ursprung des Browser-Fensters. + // Wenn ein Div direkt am Anfang der nachgeladenen Seite eingefügt wird (mit Position:'static'), kann mit + // Position.cumulativeOffset() etc. dessen Position zum Ursprung des Browser-Fenstern ermittelt + // werden, und somit kann man die Position des SubMenüs berechnen. + // shiftLeft: zur Darstellungs-Korrektur + // mouseOpts: Um Custom-MouseOvers etc. hinzuzufügen + // popup: submenüs sind in einem Popup (Darstellungskorrektur MOZ) + // bOnClick: Submenüs öffnen bei OnClick, nicht bei MouseOver + initialize: function(topMenuId, subMenuId, offsetDivId, shiftOpts, mouseOpts, popup, bOnClick,iFuncCount,iScreenHight) + { + this.bIE = NAV_IE; + this.bMoz = NAV_MOZ; + + this.top = $(topMenuId); + this.sub = $(subMenuId); + this.offsetDiv = null; + if (offsetDivId !== null) { + this.offsetDiv = $(offsetDivId); + } + //this.offsetDiv = $("indexOffset"); + this.shiftOpts = shiftOpts; + this.mouseOpts = mouseOpts; + this.popup = false; + if (popup) + this.popup = popup; + if (iFuncCount) + this.iFuncCount = iFuncCount; + if (iScreenHight) // Get iScreenHight from calling application, if possible , cause both browsers are doing wrong with screen hight. + { + this.iScreenHight = iScreenHight; + } + else + { + this.iScreenHight = document.body.clientHeight; + } + + this.positionSubMenu(); + + // Top menu Click (DEBUG) + this.topMenuClick = this.topMenuMouseClick.bindAsEventListener(this); + Event.observe($(topMenuId), 'click', this.topMenuClick); + + if (bOnClick) + { + // Top menu Mouseover + this.topMenuOver = this.topMenuMouseOver.bindAsEventListener(this); + Event.observe($(topMenuId), 'click', this.topMenuOver); + } + else + { + // Top menu Mouseover + this.topMenuOver = this.topMenuMouseOver.bindAsEventListener(this); + Event.observe($(topMenuId), 'mouseover', this.topMenuOver); + + // Top menu Mouseout + this.topMenuOut = this.topMenuMouseOut.bindAsEventListener(this); + Event.observe($(topMenuId), 'mouseout', this.topMenuOut); + + // Sub menu Mouseout + this.subMenuOut = this.subMenuMouseOut.bindAsEventListener(this); + Event.observe($(subMenuId), 'mouseout', this.subMenuOut); + } + + // Sub menu Mouseover + this.subMenuOver = this.subMenuMouseOver.bindAsEventListener(this); + Event.observe($(subMenuId), 'mouseover', this.subMenuOver); + }, + + positionSubMenu: function() + { + /* + if (this.top.id == "TestTd") { + this.sub.style.top = "20px"; + this.sub.style.left = "20px"; + return; + } + */ + + var newX = 0; + var newY = 0; + + //var topCoords = Position.cumulativeOffset(this.top); + var topCoords = Position.page(this.top); + + var dimTop = this.top.getDimensions(); + var offsetCoords = new Array(2); + + if (this.popup) + { + var tp = Position.page(this.top); + var rp = Position.page($("rowhead")); + var t = $("rowhead").getHeight() + $("rowflt").getHeight(); + if (this.bMoz) + t += $("divTitle").getHeight(); + var l = tp[0] - rp[0]; + newX = l; + newY = t; + newY -= 4; + + } + else + { + if ( this.offsetDiv && this.bIE ) + { + offsetCoords = Position.page(this.offsetDiv); + newY = topCoords[1] - offsetCoords[1] + dimTop.height; + newX = topCoords[0] - offsetCoords[0]; +/* + // Function is disabled, because another solution is avaiable, but is possibly needed once. + if (this.iFuncCount) + { + //alert(newY+170+(this.iFuncCount*16)+' > '+(this.iScreenHight)); // Have a lock for debugging. + if ( (newY+170+(this.iFuncCount*16)>this.iScreenHight) ) + newY -= (this.iFuncCount*16)+3; // Pull-down-menu pulls up, if screen is to short. + + } +*/ + if (this.shiftOpts.l) + newX -= this.shiftOpts.l; + if (this.shiftOpts.r) + newX += this.shiftOpts.r; + if (this.shiftOpts.d) + newY += this.shiftOpts.d; + if (this.shiftOpts.u) + newY -= this.shiftOpts.u; +/* + if (this.offsetDiv.getHeight() > 0) { + newY -= this.offsetDiv.getHeight(); + } +*/ + } + else + { + newY = parseInt(topCoords[1] + dimTop.height); +/* + // Function is disabled, because another solution is avaiable, but is possibly needed once. + if (this.iFuncCount) + { + if ( (newY+(this.iFuncCount*16)>this.iScreenHight) ) + { + newY -= ((this.iFuncCount*16)+1); // Pull-down-menu pulls up, if screen is to short. + } + } +*/ + newX = topCoords[0]; + if (this.bMoz) { + newY -= 1; + } + } + } + + this.sub.style.top = newY + "px"; + this.sub.style.left = newX + "px"; + + jQuery("#btnFilterFuncSub").draggable(); + jQuery("#btnFilterRoomSub").draggable(); + }, + + topMenuMouseClick: function(mEvent) + { + // this.sub.style.left = "0px"; + // this.sub.style.top = "0px"; + }, + + topMenuMouseOver: function(mEvent) + { + this.sub.show(); + this.positionSubMenu(); + if (this.mouseOpts) { + if (typeof(this.mouseOpts.onTopOver) == 'function') + this.mouseOpts.onTopOver(this.sub.id); + } + + }, + + topMenuMouseOut: function(mEvent) + { + var xPos = Event.pointerX(mEvent); + var yPos = Event.pointerY(mEvent); + if (!Position.within(this.sub, xPos, yPos)) + { + this.sub.hide(); + } + }, + + subMenuMouseOver: function(mEvent) + { + var xPos = Event.pointerX(mEvent); + var yPos = Event.pointerY(mEvent); + }, + + subMenuMouseOut: function(mEvent) + { + var xPos = Event.pointerX(mEvent); + var yPos = Event.pointerY(mEvent); + + if (this.bIE) { // IE-Probleme für linken Rand beheben + var subCoords = Position.cumulativeOffset(this.sub); + if (xPos < (subCoords[0] + 5)) // wenn Maus am linken Rand... + xPos = xPos - 3; + } + if ( (!Position.within(this.top, xPos, yPos)) && (!Position.within(this.sub, xPos, yPos)) ) { + this.sub.hide(); + } + }, + + dbgLog: function(s) + { + if ($("dbgLog")) + $("dbgLog").update(s); + } +};/** + * ise/isePropEditorRow.js + **/ + +/** + * @fileOverview ? + * @author ise + **/ + +// isePropEditorRow +// Repräsentiert eine Zeile in den Popup-Fenstern "Eigenschaft bearbeiten" + +/** + * @class + **/ +isePropEditorRow = Class.create(); + +isePropEditorRow.prototype = { + + // id: Id des Objekts dessen Inhalt in der Zeile dargestellt wird + // Bei neu angelegten Zeilen = -1 + // baseId: ID_ROOMS, ID_FUNCTIONS etc + // objInfo + // .name, .comment + initialize: function(id, baseId, objInfo) { + this.id = id; + this.baseId = parseInt(baseId); + this.objInfo = { + comment: "< "+translateKey("lblEmpty")+" >" + }; + Object.extend(this.objInfo, objInfo || {}); + + if (id == -1) { + switch(this.baseId) { + case ID_ROOMS: + this.objInfo.name = "< "+translateKey("lblNewRoom")+" >"; + break; + case ID_FUNCTIONS: + this.objInfo.name = "< "+translateKey("lblNewFunction")+" >"; + break; + default: + break; + } + } + bNecc = true; + this.oldVal = ""; + + // IDs der einzelnen Tabellenzellen + this.nameCellId = (id == -1 ? 'newName' : 'name' + id); + this.commentCellId = (id == -1 ? 'newComment' : 'comment' + id); + + var tr = Builder.node("tr", {className: "popupWhiteCells"}); + + // Namen erzeugen + var td1 = Builder.node("td", {id: this.nameCellId}, this.objInfo.name); + tr.appendChild(td1); + this.nameListener = this.editName.bindAsEventListener(this); + Event.observe(td1, 'click', this.nameListener); + + // Kommentar erzeugen + var td4 = Builder.node("td", {id: this.commentCellId}, this.objInfo.comment); + tr.appendChild(td4); + this.commentListener = this.editComment.bindAsEventListener(this); + Event.observe(td4, 'click', this.commentListener); + + $("propTable").appendChild(tr); + jQuery("#tableContainer").animate({scrollTop: jQuery("#propTable").height()},1000); + }, + + /*---------------------------------*/ + /*----- Name Functions -----*/ + /*---------------------------------*/ + editName: function() { + var inputId = 'nEdit' + this.id; + var nameElem = $(this.nameCellId); + this.oldVal = nameElem.innerHTML; + if (this.oldVal.toLowerCase().indexOf('input') == -1) { + var s = ""; + nameElem.innerHTML = s; + + // Namen im DOM ändern beim Verlassen des Textfeldes + var changeListener = this.saveNameToDom.bindAsEventListener(this); + Event.observe($(inputId), 'blur', changeListener); + + $(inputId).focus(); + } + }, + + saveNameToDom: function () { + var newName = $("nEdit" + this.id).value; + if (newName === "") { + if (this.oldVal !== "") { + $(this.nameCellId).innerHTML = this.oldVal; + } + else { + if (this.baseId == ID_ROOMS) { + $(this.nameCellId).innerHTML = "< neuer Raum >"; + } + if (this.baseId == ID_FUNCTIONS) { + $(this.nameCellId).innerHTML = "< neues Gewerk >"; + } + } + return; + } + if( !isTextAllowed( newName , 1 ) ) return; + $(this.nameCellId).innerHTML = newName; + if(newName != this.objInfo.name) { + var opts; + var t = this; + var url = "/esp/system.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "checkName";'; + pb += 'string checkName = "'+newName+'";'; + pb += 'integer checkTypeId = '+ this.baseId +';'; + + if (this.baseId == ID_ROOMS) { + if (this.id == -1) { + opts = { + postBody: ReGa.encode(pb), + asynchronous: false, + onComplete: function(resp) { + newName = resp.responseText.replace(/[\r\n\t]/g, ""); + iseRooms.CreateRoomRetId(newName, t.baseId); + } + }; + new Ajax.Request(url, opts); + } + else { + iseSystem.saveName(this.id, newName, this.nameCellId); + } + } + + + if (this.baseId == ID_FUNCTIONS) { + if (this.id == -1) { + opts = { + postBody: ReGa.encode(pb), + asynchronous: false, + onComplete: function(resp) { + newName = resp.responseText.replace(/[\r\n\t]/g, ""); + iseFunctions.CreateFunctionRetId(newName, t.baseId); + } + }; + new Ajax.Request(url, opts); + } + else { + iseSystem.saveName(this.id, newName, this.nameCellId); + } + } + } + }, + + /*---------------------------------*/ + /*----- Comment Functions -----*/ + /*---------------------------------*/ + editComment: function() { + var inputId = 'cEdit' + this.id; + var commentElem = $(this.commentCellId); + var oldVal = commentElem.innerHTML; + + if (oldVal.toLowerCase().indexOf('input') == -1) { + var s = ""; + commentElem.innerHTML = s; + + // Namen im DOM ändern beim Verlassen des Textfeldes + var changeListener = this.saveCommentToDom.bindAsEventListener(this); + Event.observe($(inputId), 'blur', changeListener); + + $(inputId).focus(); + } + }, + + saveCommentToDom: function() { + var newComment = $("cEdit" + this.id).value; + $(this.commentCellId).innerHTML = newComment; + + if (this.baseId == ID_ROOMS) { + iseRooms.ChangeRoomComment(this.id, newComment); + } + + if (this.baseId == ID_FUNCTIONS) { + iseFunctions.ChangeFunctionComment(this.id, newComment); + } + } +}; + + +/* +iseCellEditor = Class.create(); + +iseCellEditor.prototype = { + initialize: function(ctrlObj, id) { + this.cell = ctrlObj; + this.id = id; + this.oldVal = ""; + var clickListener = this.editName.bindAsEventListener(this); + Event.observe(this.cell, 'click', clickListener); + }, + + editName: function() { + var inputId = 'nEdit' + this.cell.id; + this.oldVal = this.cell.innerHTML; + + if (this.oldVal.toLowerCase().indexOf('input') == -1) { + var s = ""; + this.cell.innerHTML = s; + + // Namen im DOM ändern beim Verlassen des Textfeldes + var changeListener = this.saveNameToDom.bindAsEventListener(this); + Event.observe($(inputId), 'blur', changeListener); + + $(inputId).focus(); + } + }, + + saveNameToDom: function () { + var newName = $("nEdit" + this.cell.id).value; + $(this.cell).innerHTML = newName; + iseSystem.saveName(this.id, newName); + }, +}; +*//** + * ise/iseEventLog.js + **/ + +/** + * @fileOverview ? + * @author Michael Niehaus (ise) + **/ + +// Author: Michael Niehaus +// Created: 16.04.2007 +// 2007-08-03 ASC: added deleteAll method. +// 2007-08-04 ASC: tblId not defined error fixed. + +/** + * @class + **/ +iseEventLog = Class.create(); + +iseEventLog.prototype = { + initialize: function(parentElemId, bIsAlarms) { + this.parentElemId = parentElemId; + this.tblId = "tbl" + parentElemId; + this.bIsAlarms = bIsAlarms; + this.tBodyElem = null; + this.buildTable(); + }, + + // Add a message to the table structure + add: function(s1, s2, s3) { + var tr = Builder.node("tr"); + var td1 = Builder.node("td", {}, s1); + var td2 = Builder.node("td", {}, s2); + var td3= Builder.node("td", {}, s3); + tr.appendChild(td1); + if (!this.bIsAlarms) // Kanalname bei Alarmen ausblenden + tr.appendChild(td2); + tr.appendChild(td3); + if (this.bIsAlarms) { + var tdTmp = Builder.node("td", {}, ""); + tr.appendChild(tdTmp); + } + this.tBodyElem.appendChild(tr); + }, + + // Delete all rows in the table + deleteAll: function() + { + if( $(this.tblId) ) + { + while( $(this.tblId).rows.length ) + { + $(this.tblId).deleteRow(0); + } + } + }, + + // Build table node + buildTable: function() { + var table = Builder.node("table", {id: this.tblId, style: "width:100%;white-space: nowrap;color:Black;"}); + var colgroup = Builder.node("colgroup"); + var col1 = Builder.node("col", {width: "25%"}); + var col2 = Builder.node("col", {width: "50%"}); + var col3= Builder.node("col", {width: "25%"}); + colgroup.appendChild(col1); + colgroup.appendChild(col2); + colgroup.appendChild(col3); + table.appendChild(colgroup); + var tbody = Builder.node("tbody"); + table.appendChild(tbody); + + this.tBodyElem = tbody; + $(this.parentElemId).appendChild(table); + } +};/** + * ise/functions.js + **/ + +/** + * @fileOverview Allgemeine Funktionen + * @author ise, Änderungen durch Falk Werner (eQ-3) + **/ + +/* * * * * * * * * * * * * * * * * * * * * * * * * + * * * * * Global Constants * * * * * + * * * * * * * * * * * * * * * * * * * * * * * * */ + +iseDOM_BuildLabel = "R1.00.0381.0100"; +dbg = false; +rfr = true; + +ID_EDIT_SYSVAR_VALUE = 9921; + +ID_ROOMS = 101; // Rooms collection ID. +ID_FUNCTIONS = 151; // Functions collection ID. +ID_FAVORITES = 201; // Favorites collection ID. +ID_LINKS = 301; // Links collection ID. +ID_TRANSFER_PARAMETERS = 1001; +ID_CHANNEL_LIST = 1002; +ID_NEW_SYSVAR = 1003; +ID_CREATE_SCRIPT = 1005; +ID_EDIT_SCRIPT = 1006; +ID_CONTROL_TEST = 1007; +ID_INSERT_VALUE = 1008; +ID_INSERT_STRING = 1009; +ID_SET_VALUE_RANGE = 1010; +ID_DEL_SYS_VARIABLE = 1011; +ID_SYS_VARS_SELECTION = 1012; +ID_TIMEMODULE = 1013; +ID_STATUSINFO = 1014; +ID_STATUSINFO_WARNING = 1015; +ID_USER_ACCOUNT_CONFIG_ADMIN = 1016; +ID_USER_ACCOUNT_CONFIG_USER = 1017; +ID_AUTO_LOGIN_CONFIG = 1018; +ID_PROGRAM_CHOOSER = 1019; +ID_EDIT_SYSVAR = 1021; +ID_CHOOSE_LED = 1022; +ID_SET_OUCFM_MODE = 1023; +ID_SET_STATUS_DISPLAY = 1024; +ID_BIDCOS_INTERFACE = 1025; +ID_SYSTEM_LANGUAGE_CONFIG = 2001; + +nUA = navigator.userAgent; +NAV_IE = false; +NAV_MOZ = false; + +if (nUA.toLowerCase().indexOf("msie") > -1) { + NAV_IE = true; +} +if (nUA.toLowerCase().indexOf("gecko") > -1) { + NAV_MOZ = true; +} +SCREEN_HEIGHT = 0; // wird in index.htm gesetzt +SCREEN_WIDTH = 0; // wird in index.htm gesetzt + +// Sortier-IDs +SORT_NAME = 1; +SORT_TYPE = 2; +SORT_DESC = 3; +SORT_SN = 4; +SORT_IFACE = 5; +SORT_IMODE = 6; +SORT_FUNC = 7; +SORT_ROOM = 8; + +// Sysvar Types +SYSVAR_ALARM = 6; +SYSVAR_BOOL = 2; +SYSVAR_ENUM = 29; +SYSVAR_GENERIC = 0; +SYSVAR_STRING = 11; + +// Filter-IDs +FIL_NAME = 1; +FIL_TYPE = 2; +FIL_DESC = 3; +FIL_SN = 4; +FIL_IFACE = 5; +FIL_IFACE_S = 6; +FIL_IFACE_R = 7; +FIL_MODE = 8; +FIL_MODE_AES = 9; +FIL_MODE_STD = 10; +FIL_FUNCS = 11; +FIL_ROOMS = 12; +FIL_UNIT = 13; +FIL_CHN = 14; +FIL_TIME = 15; +FIL_DATE = 16; +FIL_USERS = 17; + +TM_ONCE = 8; // ttCalOnce +TM_PERIODIC = 4; // ttCalPeriodic +TM_DAILY = 9; // ttCalDaily +TM_WEEKLY = 5; // ttCalWeekly +TM_MONTHLY = 6; // ttCalMonthly +TM_YEARLY = 7; // ttCalYearly +TM_MON = 1; +TM_TUE = 2; +TM_WED = 4; +TM_THU = 8; +TM_FRI = 16; +TM_SAT = 32; +TM_SUN = 64; +TM_WEEKEND = 96; +TM_WORKDAYS = (TM_FRI * 2) - 1; + +CALL_STRCUT = 1; +CALL_SPACECUT = 2; + +GROUPASSIGNMENT = null; + +dlgResult = ""; +sPreviousPage = ""; +sPreviousPage2 = ""; +sPreviousPageArgs = ""; +sPreviousPageArgs2 = ""; +sActPage = ""; +sActPageArgs = ""; +sPrevVal = ""; +ul = 0; +var wndHelp; +bTxtEditMode = 0; +tmpNoOfChannels = []; +timeoutCounter = []; +deviceInputCheckedDevices = []; +doClearTempView = true; +bUpdateContentRunning = false; +bCheckForAllChannels = false; + +/*#########################*/ +/*# Erweiterte Funktionen #*/ +/*#########################*/ + +setTime = function(time) +{ + if ($("maintime")) { $("maintime").innerHTML = time; } +}; + +setDate = function(date) +{ + if ($("maindate")) { $("maindate").innerHTML = date; } +}; + +resetReGaSaveButton = function () { + document.getElementById("btnReGaSave").style.color=WebUI.getColor("textColorB"); + document.getElementById("btnReGaSave").onclick=function() { LogoClick(); }; +}; + +setAlarmMessageCount = function (count) { + if ($("msgAlarms")) { + const newMsg = translateKey('alarmMsg') + " (" + count + ")"; + if ($("msgAlarms").innerHTML !== newMsg) { + $("msgAlarms").innerHTML = newMsg; + } + } + if ($("imgAlarms")) { + const newImg = (count === 0 ? '/ise/img/dot/green.png' : '/ise/img/dot/red.png'); + if ($("imgAlarms").getAttribute('src') !== newImg) { + $("imgAlarms").src = newImg; + } + } +}; + +setServiceMessageCount = function (count) { + if ($("msgServices")) { + const newMsg = translateKey('serviceMsg') + " (" + count + ")"; + if ($("msgServices").innerHTML !== newMsg) { + $("msgServices").innerHTML = newMsg; + } + } + if ($("imgServices")) { + const newImg = (count === 0 ? '/ise/img/dot/green.png' : '/ise/img/dot/yellow.png'); + if ($("imgServices").getAttribute('src') !== newImg) { + $("imgServices").src = newImg; + } + } +}; + +ReceiptAlarm = function(id,reload) +{ + var url = '/esp/functions.htm?sid='+SessionId; + var pb = ""; + pb += 'string action = "ReceiptAlarm";'; + pb += 'string id = "'+id+'";'; + var opt = { + postBody: pb, + onComplete: function(transport) + { + if( $("al"+id) ) + { + hide( "al"+id ); + } + else + { + if( typeof(reload) == "undefined" ) + { + reloadPage(); + } + } + } + }; + new Ajax.Request(url,opt); +}; + +/*setOldEnergyCounterVal = function(chn, value) { + arrOldEnergyCounterVal[chn] = value; +}; + +getOldEnergyCounterVal = function(chn) { + + if (typeof arrOldEnergyCounterVal === "undefined") { + arrOldEnergyCounterVal = []; + arrOldEnergyCounterVal[chn] = 0; + } + + return arrOldEnergyCounterVal[chn]; +};*/ + +setValueOfEnergyCounters = function() { + jQuery.each(arrEnergyCounter, function(index, counter){ + var id = counter.name.split("_")[1], + chnVal = homematic("Channel.getValue", {"id": id}); + + // Setze EnergyCounter-Variable + homematic("SysVar.setFloat", {"name" : counter.name, "value" : chnVal}); + }); +}; + +/** + * Ermittelt die Systemvariablen f. d. Energiemessung + */ +updateSysVarEnergyCounter = function() { + // conInfo("update SysVar EnergyCounter"); + + if (typeof readEnergyCounter === "undefined" || readEnergyCounter == true) { + var allSysVars = homematic("SysVar.getAll", {}); + + arrEnergyCounter = []; + + jQuery.each(allSysVars, function(index, sysvar){ + if (sysvar.name.match(/EnergyCounter/) != null) { + arrEnergyCounter.push(sysvar); + } + }); + readEnergyCounter = false; // wird beim Anlernen eines neuen Gerätes wieder auf true gesetzt + } + setValueOfEnergyCounters(); + }; + +/** + * Markiert ein Gerät im Posteingang als fertig bzw. nicht fertig + **/ +setDeviceReadyConfig = function(id, isReady) +{ + var readyButton = $("readyBtn" + id); + + if (readyButton) + { + readyButton._isReady = isReady; + } +}; + +/** + * Markiert einen Kanal im Posteingang als ferig bzw. nicht fertig + **/ +setChannelReadyConfig = function(id, isReady) +{ + var readyBox = $("inp" + id); + + if (readyBox) + { + readyBox.checked = isReady; + readyBox._isReady = isReady; + } +}; + +/* * * * * * * * * * * * * * * * * * * * * * * * * + * * * * * Navigation Functions * * * * * + * * * * * * * * * * * * * * * * * * * * * * * * */ + +LoadingHTML = function() +{ + return ''; +}; + + + +updateContent = function(file, argsForUrl, codeToExec, bDontSaveUrl) +{ + if( !bUpdateContentRunning ) + { + bUpdateContentRunning=true; + iseRefr(false); + /* */ + if (dbg) { alert(file); } + $("content").innerHTML = LoadingHTML(); + //sPreviousPage = sActPage; + //sActPage = file; + var pb = ''; + if( doClearTempView ) + { + pb += 'system.SetSessionVar("sessionCTV", "true");'; + } + else + { + pb += 'system.SetSessionVar("sessionCTV", "false");'; + } + if(codeToExec) + { + pb += codeToExec; + } + + iseInitUpdateArrays(); + + /* */ + + //console.info( "updateContent with "+pb ); + + new Ajax.Updater("content", url, opts); + } +}; + +clearUserTempViewIDs2Room = function() +{ + clearUserTempViewIDs2('/pages/tabs/admin/views/rooms.htm'); +}; + +clearUserTempViewIDs2Function = function() +{ + clearUserTempViewIDs2('/pages/tabs/admin/views/functions.htm'); +}; + +clearUserTempViewIDs2 = function(file, args) +{ + // $("content").innerHTML = LoadingHTML(); + sPreviousPage = sActPage; + sActPage = file; + var pb = ''; + pb += 'system.SetSessionVar("sessionCTV2", "true");'; + var opts = + { + postBody: ReGa.encode(pb), + evalScripts: true + }; + var url = file + "?sid=" + SessionId; + if (args){ url += args; } + // new Ajax.Updater("content", url, opts); +}; + +reloadSortedPage = function() { + doClearTempView = false; + updateContent(sActPage, sActPageArgs, "", true); +}; + +reloadPage = function() { + doClearTempView = true; + updateContent(sActPage, sActPageArgs); +}; + +loadStartPage = function(fid) +{ + var startPage = "/pages/tabs/startpage.htm"; + + //wenn Konfigtool, dann eine andere Startseite anzeigen + if (PLATFORM != "Central") {startPage = "/configapp/devices.cgi";} + + doClearTempView = true; + if( typeof(fid) == "undefined" ) + { + updateContent(startPage); + } + else + { + updateContent(startPage,"&fid="+fid); + } +}; + +loadStartPageGuest = function() { + doClearTempView = true; + if( typeof fid == "undefined" ) + { + updateContent("/pages/tabs/guest/startpageguest.htm"); + } + else + { + updateContent("/pages/tabs/guest/startpageguest.htm","&fid="+fid); + } + +}; + +_loadHandling = function(fid) { + doClearTempView = true; + if (typeof fid == "undefined") + updateContent("/pages/tabs/handling.htm"); + else + updateContent("/pages/tabs/handling.htm", "&fid="+fid); +}; + +loadDeviceConfig = function() { + doClearTempView = true; + updateContent("/pages/tabs/admin/deviceconfig.htm"); +}; + +loadHelp = function() +{ + wndHelp = null; + doClearTempView = true; + updateContent("/config/help.cgi", "&from=internal"); +}; + +loadStatus = function() { + doClearTempView = true; + updateContent("/pages/tabs/control.htm"); +}; + +loadAlarmMessages = function() { + doClearTempView = true; + updateContent("/pages/tabs/statusviews/alarmMessages.htm"); +}; + +loadServiceMessages = function() { + var file = "serviceMessages.htm"; + if (PLATFORM != "Central") {file = "serviceMessages.cgi";} + doClearTempView = true; + updateContent("/pages/tabs/statusviews/" + file); +}; + +loadFavorites = function() { + doClearTempView = true; + updateContent("/pages/tabs/favorites.htm"); +}; + +loadFavViewer = function(id) { + doClearTempView = true; + updateContent("/pages/tabs/favViewer.htm","&id="+id); +}; + +loadFavOverview = function() { + doClearTempView = true; + updateContent("/pages/tabs/user/favOverview.htm"); +}; + +loadNewFav = function() { + doClearTempView = true; + updateContent("/pages/tabs/user/newFav.htm"); +}; + +loadLinkProg = function() { + doClearTempView = true; + updateContent("/pages/tabs/admin/linkprog.htm"); +}; + +loadSystemConfig = function() { + doClearTempView = true; + updateContent("/pages/tabs/admin/systemconfig.htm"); +}; + +loadSystemConfigUser = function() { + doClearTempView = true; + updateContent("/pages/tabs/user/systemConfigUser.htm"); +}; + +loadSystemVars = function() { + doClearTempView = true; + updateContent("/pages/tabs/admin/systemvars.htm"); +}; + +loadPrograms = function() +{ + doClearTempView = true; + updateContent("/pages/tabs/admin/views/programs.htm"); +}; + +loadProgramList = function(filter) +{ + doClearTempView = true; + if( typeof filter == "string" ) + { + conInfo("loadProgramList: Filter = ["+filter+"]"); + updateContent("/pages/tabs/admin/views/programlist.htm", "", 'system.SetSessionVar("sessionPrgIsFiltered", true);system.SetSessionVar("sessionPrgFilter","'+filter+'");' ); + } + else + { + updateContent("/pages/tabs/admin/views/programlist.htm"); + } +}; + +loadHandlingRooms = function(roomId) +{ + doClearTempView = true; + if (typeof(roomId) == "undefined") { updateContent('/pages/tabs/control/rooms.htm'); } + else { updateContent('/pages/tabs/control/rooms.htm', roomId); } +}; + +loadHandlingFunctions = function(funcId) +{ + doClearTempView = true; + if (typeof(funcId) == "undefined") { updateContent('/pages/tabs/control/functions.htm'); } + else { updateContent('/pages/tabs/control/functions.htm', funcId); } +}; + +loadHandlingDevices = function() +{ + doClearTempView = true; + updateContent('/pages/tabs/control/devices.htm'); +}; + +loadHandlingPrograms = function() +{ + doClearTempView = true; + updateContent('/pages/tabs/control/programs.htm'); +}; + +ccuAdminFirstStartup = function() { + doClearTempView = true; + updateContent('/pages/tabs/admin/adminFirstStart.htm'); +}; + +ccuUserFirstStartup = function() { + doClearTempView = true; + updateContent('/pages/tabs/user/userFirstStart.htm'); +}; + +loadSysconfigUserAdmin = function() +{ + doClearTempView = true; + updateContent('/pages/tabs/admin/userAdministration.htm'); +}; + +loadSysconfigSysVars = function() +{ + doClearTempView = true; + updateContent('/pages/tabs/admin/systemvars.htm'); +}; + +loadStatusviewSysProtocol = function() +{ + doClearTempView = true; + updateContent('/pages/tabs/control/systemProtocol.htm'); +}; + + +loadStatusviewSysVars = function() +{ + doClearTempView = true; + updateContent('/pages/tabs/control/sysvars.htm'); +}; + + +loadNewDevices = function(options) { + doClearTempView = true; + bCheckForAllChannels = true; + //bCheckForAllChannels = false; + /* + if (options) { + bCheckForAllChannels = (options.fromTeachIn == true) ? true : false; + } + */ + + updateContent("/pages/tabs/admin/views/newdevices.htm"); +}; + +loadDevicesToChange = function(SNNewDev, TypeNewDev, IDNewDev) +{ + doClearTempView = true; + updateContent("/config/ic_seldevice.cgi", "&SNNewDev="+SNNewDev+"&TypeNewDev="+TypeNewDev+"&IDNewDev="+IDNewDev); +}; + +loadRoomList = function() { + doClearTempView = true; + updateContent("/pages/tabs/admin/views/rooms.htm"); +}; + +loadFunctionList = function() { + doClearTempView = true; + updateContent("/pages/tabs/admin/views/functions.htm"); +}; + +loadSystemControl = function() { + doClearTempView = true; + updateContent("/config/control_panel.cgi"); +}; + +loadNewLinkPage = function() +{ + updateContent("/config/ic_selchannel.cgi"); +}; + +setPath = function (path) { + var title=document.title; + if (title != 'RaspberryMatic WebUI') { + title = '[' + title + '] '; + } else { + title = ''; + } + + if ($("PagePath")) { + var s = ''; + if (path.length > 0) { + s = "" + title + translateKey('startPage') + " > " + path; + } else { + s = "" + title + translateKey('startPage') + ""; + } + + $("PagePath").innerHTML = s; + translatePage("#PagePath"); + } +}; + + + +logout = function() { + // disable logout button + jQuery("#btnLogOut > div").css('color', 'graytext'); + jQuery("#btnLogOut > div").attr("onclick", "").unbind("click"); + + // create ProgressBar + ProgressBar = new ProgressBarMsgBox(translateKey('logoutInProgress'), 1); + ProgressBar.show(); + ProgressBar.StartKnightRiderLight(); + + // stop all update monitors + regaMonitor.stop(); + InterfaceMonitor.stop(); + + // logout and make sure we save the regadom + homematic('Session.logout', {}, function() { + homematic('system.saveObjectModel', {}, function() { + ProgressBar.hide(); + ProgressBar.StopKnightRiderLight(); + location.href = "/logout.htm?lang="+getLang(); + }); + }); +}; + + +/* * * * * * * * * * * * * * * * * * * * * * * * * + * * * * * Misc Functions * * * * * * * + * * * * * * * * * * * * * * * * * * * * * * * * */ + +/* Funktion für Popup */ +CreatePopup = function(id, type) +{ + dlgPopup = new iseMessageBox(id, type, false); + PopupClose = function() + { + dlgPopup.hide(); + }; + dlgPopup.ShowPopup(); +}; + +buildPropTable= function(id) { + var opts = { + evalScripts: true, + onComplete: function(trans) { + centerMessageBox(); + } + }; + var url = "/esp/system.htm?sid=" + SessionId + "&action=buildPropTable&id="+id; + new Ajax.Updater("propTable", url, opts); +}; + +TestMe = function(id) { + iseChannel.Test(id); +}; + +initCenterBox = function() { + var centerBoxSel = jQuery("#centerbox"); + centerBoxSel.css({"overflow":"", "top":"50%"}); +}; + +centerMessageBox = function() { + var dimCenterBox = $("centerbox").getDimensions(); + + initCenterBox(); + + if ($("messagebox")) { + var msgbox = $("messagebox"), + dimMsgBox = msgbox.getDimensions(); + msgbox.style.marginLeft = -(dimMsgBox.width / 2) + 'px'; + msgbox.style.left = '50%'; + msgbox.style.marginTop = -(dimMsgBox.height / 2) + 'px'; + + /*if(dimCenterBox.height == 0) { + msgbox.style.marginTop = -(dimMsgBox.height / 2) + 'px'; + } else { + msgbox.style.marginTop = (dimMsgBox.height / 2) + 'px'; + }*/ + } +}; + +saveDlgResult = function(id) { + dlgResult = id; +}; + +checkTimeVal = function(val) { + var sSplit = new Array(2); + + if (val.length != 5) { return false; } + sSplit = val.split(':'); + if (sSplit.length != 2) { return false; } + if (isNaN(sSplit[0])) { return false; } + if (isNaN(sSplit[1])) { return false; } + + var iTmp = parseInt(sSplit[0],10); + if ((iTmp < 0) || (iTmp > 23)) { return false; } + iTmp = parseInt(sSplit[1],10); + if ( (iTmp < 0) || (iTmp > 59) ) { return false; } + + return true; +}; + +setFooter = function(s) +{ + $("footer").innerHTML = s; + translatePage("#footer"); +}; + +SetFilter = function(id) +{ + return; +/* + if ($(id)) { + var inplist = $(id).getElementsByTagName('input'); + for (var i = 0; i < inplist.length; i++) { + var tmpId = inplist[i].id.substr(6); + if (inplist[i].checked === true) + filterOptions.addFilter(tmpId); + else + filterOptions.removeFilter(tmpId); + // TODO: Channel-Liste neu laden (mit Filtern) + } + } +*/ +}; + + // Prüft anhand der filterOptions ob Checkboxen in Submenüs gesetzt werden sollen +selectFilters = function(divToShow) { + if ($(divToShow)) { + var inplist = $(divToShow).getElementsByTagName('input'); + for (var i = 0; i < inplist.length; i++) { + var tmpId = inplist[i].id.substr(6); + if (filterOptions.isFilterId(tmpId)) + inplist[i].checked = true; + else + inplist[i].checked = false; + } + } +}; + +writeDevProg = function(tdParent, chnObj, bClosePopup) { + var tblSub = Builder.node('table', {width: '100%'}); + var tbodySub = Builder.node('tbody'); + var trSub = Builder.node('tr'); + var tdSub = Builder.node('td'); + var divSub = Builder.node('div', {className: 'StdButton'}, translateKey('btnDirectLinks')); + + divSub = $(divSub); + var iTmp = 0; + if( chnObj['gm'] ) + iTmp = 1; + divSub.onclick = function() + { + WebUI.enter(LinkListPage, { + "iface" : chnObj['deviface'], + "channel": chnObj['sn'], + "keypair": iTmp + }); + if (bClosePopup) { PopupClose(); } + }; + tdSub.appendChild(divSub); + trSub.appendChild(tdSub); + tbodySub.appendChild(trSub); + trSub = Builder.node('tr'); + tdSub = Builder.node('td'); + divSub = Builder.node('div', {className: 'StdButton'}, translateKey('btnPrograms')); + + divSub.onclick = function() { loadProgramList(chnObj['enumprgfilter']); if(bClosePopup)PopupClose(); }; + tdSub.appendChild(divSub); + trSub.appendChild(tdSub); + tbodySub.appendChild(trSub); + tblSub.appendChild(tbodySub); + tdParent.appendChild(tblSub); +}; + +writeTestField = function(td, ids, tm, exist, running) +{ + var cn = "TestButtonDisabled"; + var sDate = '--:--:--'; + var sStyle = "OkButton"; + if( running ) + { + sStyle = "OkButtonRunning"; + } + else + { + sDate = tm; + if( exist ) { cn = "TestButton colorGradient borderRadius2px"; } + } + + var chid = ids.toString().split("\t").join("T"); + var div = Builder.node('div', {id:'TestButtonCH'+chid,className: cn}, translateKey('btnTest') /*'Test'*/); + td.appendChild(div); + + if( exist && !running ) + { + div.onclick = function() + { + iseChannels.Test(ids); + $('TestButtonCH'+chid).className = 'TestButtonDisabled'; + $('OkButtonCH'+chid).className = 'OkButtonRunning'; + $('TestDateCH'+chid).innerHTML = '--:--:--'; + }; + } + div = Builder.node('div', {id:'OkButtonCH'+chid,className: sStyle}, translateKey('btnOk') /*'OK'*/); + td.appendChild(div); + div = Builder.node('div', {id:'TestDateCH'+chid,className: 'TestDate'}, sDate); + td.appendChild(div); +}; + +startUpdateTest = function(chid) +{ + setTimeout( "callbackStartUpdateTest("+chid+")", 5000 ); +}; + +callbackStartUpdateTest = function(chid) +{ + var url = "/esp/system.htm?sid=" + SessionId; + var pb = "string action = 'TestRunning';"; + pb += 'string id = "' + chid + '";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete: function(t) + { + $("TestDateCH"+chid).innerHTML = t.responseText; + if( t.responseText == "--:--:--" ) + { + $("OkButtonCH"+chid).className = "OkButton"; + } + else + { + $("OkButtonCH"+chid).className = "OkButtonRunning"; + } + } + }; + new Ajax.Request(url, opts); +}; + +showInvisibleElems = function(devID) { + var jBtnAddToGroupElm = jQuery("#btnAddToGroup" + devID), + jBtnCreateNewGroupElm = jQuery("#btnCreateNewGroup" + devID), + jActionElms = jQuery("[name='newDevAction" + devID + "']"), + jBtnAutoRename = jQuery("#btnRename_" + devID); + jActionElms.show(); + jBtnAddToGroupElm.show(); + jBtnCreateNewGroupElm.show(); + jBtnAutoRename.show(); +}; + +showDeviceError = function(devID) { + jQuery("#readyBtn" + devID).text(translateKey("stringTableError")); +}; + +allChannelsAvailable = function(devID) { + var numberOfLoops = 60; + conInfo("timeoutCounter " + devID + ": " + timeoutCounter[devID] ); + if (timeoutCounter[devID] < numberOfLoops) { + timeoutCounter[devID]++; + + homematic("Device.get", {"id": devID}, function (device) { + devID = devID.toString(); + var numberOfChannels = device.channels.length; + conInfo("numberOfChannels: " + numberOfChannels); + + // Noch kein Kanal vorhanden + if (numberOfChannels == 0) { + window.setTimeout(function () { + conInfo("No channels available yet. Check again"); + allChannelsAvailable(devID); + }, 1000); + } else { + if (numberOfChannels != tmpNoOfChannels[devID]) { + window.setTimeout(function () { + conInfo("tmpNoOfChannels: " + tmpNoOfChannels[devID] + "- numberOfChannels: " + numberOfChannels + " Check again number of channels"); + tmpNoOfChannels[devID] = numberOfChannels; + allChannelsAvailable(devID); + }, 1000); + } else { + conInfo("All channels available - number of channels: " + numberOfChannels); + var jReadyBtnElm = jQuery("#readyBtn" + devID), + jWaitAnimationElm = jQuery("#waitForReadyBtn"+devID); + jWaitAnimationElm.hide(); + jReadyBtnElm.addClass("StdButton CLASS04308 border1px"); + jReadyBtnElm.text(translateKey('btnReady')); + jReadyBtnElm.bind("click", function () { + arrayDeleteVal(deviceInputCheckedDevices, devID.toString()); + SetReadyConfigAndHideImgs(devID); + }); + showInvisibleElems(devID); + deviceInputCheckedDevices.push(devID); + } + } + }); + } else { + // Emergency - timeout reached :-( + jQuery("#newDevActionDEL"+devID).show(); + showDeviceError(devID); + if (sessionStorage) { + sessionStorage.setItem("teachInFailure_" + devID, "true"); + } + return; + } +}; + +deviceAlreadyChecked = function(devID) { + var result = false; + jQuery.each(deviceInputCheckedDevices, function(index,deviceID){ + if (deviceID == devID) { + result = true; + } + }); + return result; +}; + +writeReadyField = function(tdParent, obj) { + var devAlreadyChecked = deviceAlreadyChecked(obj.id), + devFailure = false; + + if (bCheckForAllChannels && ! devAlreadyChecked) { + timeoutCounter[obj.id] = 0; + tmpNoOfChannels[obj.id.toString()] = -1; + allChannelsAvailable(obj.id); + } else { + if (sessionStorage) { + if (sessionStorage.getItem("teachInFailure_" + obj.id) == "true") { + devFailure = true; + } + } + } + + var sn = obj['sn']; + var objId = obj['id']; + var tbl = Builder.node('table', {width: '100%', cellpadding: '0', id:obj['sn'] }); + var tr = Builder.node('tr'); + var td = Builder.node('td'); + var div; + + if ((bCheckForAllChannels && (! devAlreadyChecked)) || (devFailure)) { + div = Builder.node('div', { + id: 'readyBtn' + objId + }, '' /*show waiting animation*/ ); + + img = Builder.node('img', { + id: 'waitForReadyBtn' + objId, + src: '/ise/img/ajaxload_white.gif' + }, ''); + + div.appendChild(img); + + } else { + div = Builder.node('div', { + className: 'StdButton CLASS04308 border1px', + id: 'readyBtn' + objId, + onclick: "SetReadyConfigAndHideImgs(" + objId + ")" + }, translateKey('btnReady') /*"Fertig"*/); + window.setTimeout(function() {jQuery("#btnRename_" + objId).show();}, 100); // Show the auto rename btn + } + + if( ! obj['readyconfig'] ) + { + div._isReady = false; + } + else + { + div._isReady = true; + } + td.appendChild(div); + tr.appendChild(td); + tbl.appendChild(tr); + tdParent.appendChild(tbl); +}; + +removeErrorFlag = function(devID) { + if (sessionStorage && sessionStorage.getItem("teachInFailure_" + devID) != null) { + sessionStorage.removeItem("teachInFailure_" + devID); + } +}; + +writeDeviceAction = function(tdParent, includeChecks, bIsDev, bDelBtn, obj, bIsGroup) { + var HmIPIfaceSelector = "HmIP-RF", + devFailure = false; + + if (sessionStorage) { + if (sessionStorage.getItem("teachInFailure_" + obj.id) == "true") { + devFailure = true; + } + } + + var id = 0; + var hidden = ((! bCheckForAllChannels || deviceAlreadyChecked(obj.id)) && (devFailure == false)) ? "" : "hidden"; + + if (obj) { id = obj['id']; } + var tbl = Builder.node('table', { + width: '100%', + cellpadding: '0' + }, [ + Builder.node('colgroup', [ + Builder.node('col', {width: '40%'}), + Builder.node('col', {width: '60%'}) + ]) + ]); + var tbody = Builder.node('tbody'); + var tr = Builder.node('tr'); + var tdLeft = Builder.node('td'); + var tdRight = Builder.node('td'); + + // buttons Löschen / Einstellen + var tblSub = Builder.node('table', {width: '100%'}); + var tbodySub = Builder.node('tbody'); + var trSub; + + if (!devFailure) { + trSub = Builder.node('tr', {id: "newDevActionDEL" + id, name: 'newDevAction' + id, className: hidden}); + } else { + window.setTimeout(function() {showDeviceError(id);},500); + trSub = Builder.node('tr', {id: "newDevActionDEL" + id, name: 'newDevAction' + id}); + } + var tdSub = Builder.node('td'); + var s; + + if (bIsDev && bDelBtn) { + s = "PrepareDeleteDeviceForm('"+ obj['iface']+"', '"+obj['sn']+"', '"+obj['name']+"', '"+obj['type']+"'), arrayDeleteVal(deviceInputCheckedDevices, "+obj['id']+"), removeErrorFlag("+obj['id']+");"; + + var divSub = Builder.node('div', { + className: 'StdButton', + onclick: s}, translateKey('btnRemove')); + tdSub.appendChild(divSub); + trSub.appendChild(tdSub); + tbodySub.appendChild(trSub); + } + trSub = Builder.node('tr', {name: 'newDevAction' + id, className: hidden}); + tdSub = Builder.node('td'); + + s = ""; + if ( + (obj['type'] != "HmIPW-DRBL4") + && (obj['type'] != "HmIP-DRBLI4") + && (obj['type'] != "HmIP-RGBW") + && (obj['type'] != "HmIPW-WGD") + && (obj['type'] != "HmIPW-WGD-PL") + && (obj['type'] != "HmIP-ESI") + && (obj['type'] != "HmIP-DRG-DALI") + ) { + + if (bIsDev) { + s = "WebUI.enter(DeviceConfigPage, {'iface': '" + obj['iface'] + "', 'address': '" + obj['sn'] + "', 'redirect_url':'GO_BACK'});"; + } else { + if (bIsGroup) { + s = "WebUI.enter(DeviceConfigPage, {'iface': '" + obj['deviface'] + "' ,'address': '" + obj['sn'] + "', 'redirect_url':'GO_BACK', 'with_group': 1});"; + } else { + s = "WebUI.enter(DeviceConfigPage, {'iface': '" + obj['deviface'] + "' ,'address': '" + obj['sn'] + "', 'redirect_url':'GO_BACK'});"; + } + } + } else { + s = "alert(translateKey('hintSetReady'));"; + } + divSub = Builder.node('div', {className: 'StdButton', onclick: s + "devToConfigure=" + obj['id']}, translateKey('btnConfigure') /*'Einstellen'*/); + + tdSub.appendChild(divSub); + trSub.appendChild(tdSub); + tbodySub.appendChild(trSub); + + /* Geraetetausch */ + if (bIsDev && bDelBtn && (obj['iface'] != HmIPIfaceSelector)) { + //divSub = Builder.node('div', {className: 'StdButton', onclick: 'loadDevicesToChange(\''+obj['sn']+'\',\''+obj['type']+'\')'}, translateKey('replaceDeviceBtn')); + divSub = Builder.node('div', {className: 'StdButton', onclick: 'loadDevicesToChange(\''+obj['sn']+'\',\''+obj['type']+'\',\''+obj['id']+'\')'}, translateKey('replaceDeviceBtn')); + tdSub.appendChild(divSub); + trSub.appendChild(tdSub); + tbodySub.appendChild(trSub); + } + /* END Geraetetausch */ + + tblSub.appendChild(tbodySub); + tdLeft.appendChild(tblSub); + + // checkboxes + if (includeChecks) + { + tblSub = Builder.node('table', {name: 'newDevAction' + id, width: '100%', className: hidden}); + tbodySub = Builder.node('tbody'); + trSub = Builder.node('tr'); + var h = {type: 'checkbox', id: 'ha' + id}; + var sH = ""; + + + if( bIsDev ) + { + sH = 'iseDevices.setHandling('+id+',id)'; + } + else + { + sH = 'iseChannels.setHandling('+id+',id)'; + } + switch( obj['handle'] ) + { + case "YES": + h = Object.extend(h, {checked: ''}); + break; + case "READONLY": + sH = ""; + h = Object.extend(h, {disabled: ''}); + h = Object.extend(h, {readonly: ''}); + break; + default: break; + } + h = Object.extend(h, {onclick: sH}); + tdSub = Builder.node('td', [Builder.node('input', h), translateKey('lblUsable') /*'bedienbar'*/]); + Element.setStyle(tdSub, {textAlign:"left"}); + trSub.appendChild(tdSub); + tbodySub.appendChild(trSub); + trSub = Builder.node('tr'); + var v = {type: 'checkbox', id: 'vi' + id}; + if( obj['vis'] ) + { + v = Object.extend(v, {checked: ''}); + conInfo("Object "+obj['id']+":"+obj['name']+" is visble"); + } + else + { + conInfo("Object "+obj['id']+":"+obj['name']+" is NOT visble"); + } + if( bIsDev ) + { + v = Object.extend(v, {onclick: 'iseDevices.setVisible('+id+',id)'}); + } + else + { + v = Object.extend(v, {onclick: 'iseChannels.setVisible('+id+',id)'}); + } + tdSub = Builder.node('td', [Builder.node('input', v), translateKey('lblVisible') /*'sichtbar'*/]); + Element.setStyle(tdSub, {textAlign:"left"}); + + trSub.appendChild(tdSub); + tbodySub.appendChild(trSub); + trSub = Builder.node('tr'); + var p = {type: 'checkbox', id: 'pr' + id}; + if (obj['proto']) + p = Object.extend(p, {checked: ''}); + if (bIsDev) + p = Object.extend(p, {onclick: 'iseDevices.setProto('+id+',id)'}); + else + p = Object.extend(p , {onclick: 'iseChannels.setProto('+id+',id)'}); + tdSub = Builder.node('td', [Builder.node('nobr', [Builder.node('input', p), translateKey('lblRecorded') /*'protokolliert'*/])]); + Element.setStyle(tdSub, {textAlign:"left"}); + trSub.appendChild(tdSub); + tbodySub.appendChild(trSub); + tblSub.appendChild(tbodySub); + tdRight.appendChild(tblSub); + } + + tr.appendChild(tdLeft); + tr.appendChild(tdRight); + tbody.appendChild(tr); + tbl.appendChild(tbody); + tdParent.appendChild(tbl); +}; + +spaceCut = function(s) { + if (s) + { + var arTmp = s.split(' '); + var z = new Array(); + + for(var i = 0; i < arTmp.length; i++) + { + if (arTmp[i] !== "") + { + z[z.length] = document.createTextNode(arTmp[i]); + z[z.length] = document.createElement('br'); + } + } + z.pop(); + return z; + } + return ""; +}; + +spaceCutHtmlIf = function(s, iCount) { + if (s) + { + var sRet = ""; + var arTmp = s.split(' '); + var iTmp = 0; + + if (arTmp.length > iCount) + { + for (var i = 0; i < arTmp.length; i++) + { + sRet += arTmp[i] + " "; + iTmp++; + if (iTmp == iCount) + { + sRet += "
"; + iTmp = 0; + } + } + return sRet; + } + else { return s; } + } + else { return ""; } +}; + +semCut = function(s) { + if (s) + { + var arTmp = s.split(';'); + var z = new Array(); + for (var i = 0; i < arTmp.length; i++) + { + if (arTmp[i] !== "") + { + z[z.length] = document.createTextNode(arTmp[i]); + z[z.length] = document.createElement('br'); + } + } + z.pop(); + return z; + } + return ""; +}; + +strCut = function(s, bCountOnly, bPlainText) { + var CUTS = ".:-"; + var MAX_WITHOUT_CUT = 8; + var bCutChar = false; + var iSinceLastCut = 0; + var ret = ""; + var arSplit = new Array(); + var iLastCutPos = 0; + var i; + + if(s) + { + for (i = 0; i < s.length; i++) { + var c = s.charAt(i); + + if (!bCountOnly) { + for (var x = 0; x < CUTS.length; x++) { + bCutChar = false; + if (c == CUTS.charAt(x)) { + arSplit[arSplit.length] = s.slice(iLastCutPos, i+1); + iLastCutPos = i+1; + iSinceLastCut = 0; + break; + } + } + } + + iSinceLastCut++; + if (iSinceLastCut == MAX_WITHOUT_CUT) { + arSplit[arSplit.length] = s.slice(iLastCutPos, i); + iLastCutPos = i; + iSinceLastCut = 0; + } + } + if (iLastCutPos !== 0) { arSplit[arSplit.length] = s.slice(iLastCutPos, i); } + else { arSplit[arSplit.length] = s; } + + if (bPlainText) { + var _s = ""; + for (i = 0; i < arSplit.length; i++) { + _s += arSplit[i] + "
"; + } + return _s; + } + else { + var z = new Array(); + for (i = 0; i < arSplit.length; i++) { + z[z.length] = document.createTextNode(arSplit[i]); + z[z.length] = document.createElement('br'); + } + return z; + } + } +}; + +tabToBr = function(s) { + if (s) { + var arTmp = s.split('\t'); + var z = new Array(); + for(var i = 0; i < arTmp.length; i++) + { + if (arTmp[i] !== "") + { + z[z.length] = document.createTextNode(arTmp[i]); + z[z.length] = document.createElement('br'); + } + } + z.pop(); + return z; + } + return ""; +}; + +insertBR = function(s) { + var z = new Array(); + var arSplit = s.split('\t'); + for (var i = 0; i < arSplit.length; i++) + { + if (arSplit[i] !== "") + { + z[z.length] = document.createTextNode(arSplit[i]); + z[z.length] = document.createElement('br'); + } + } + if (z.length > 1) + z.pop(); + return z; +}; + +show = function(id) { + if ($(id)) + $(id).show(); +}; + +hide = function(id) { + if($(id)) + $(id).hide(); +}; + +setProtoIfExist = function(id, bProto) { + if ($("pr" + id)) { + $("pr" + id).checked = bProto; + } +}; + +setHandlingIfExist = function(id, bHand) { + if ($("ha" + id)) { + $("ha" + id).checked = bHand; + } +}; + +setVisibleIfExist = function(id, bVisi) { + if ($("vi" + id)) { + $("vi" + id).checked = bVisi; + } +}; + +/* +textEdit = function(ctrlId, id, allowEmptyString, callback, callStrFunc) +{ + bTxtEditMode = true; + var iSize = 8; + if (screen.availWidth >= 1024) iSize = 12; + if (!$(ctrlId+"inp")) + { + sPrevVal = $(ctrlId).innerHTML; + var isEmptyAllowed = false; + if ((allowEmptyString !== null) && (allowEmptyString === true)) + { + isEmptyAllowed = true; + } + var sValue = $(ctrlId).innerHTML; + while (sValue.indexOf("
") > -1){ + sValue = sValue.replace("
",""); + } + while (sValue.indexOf("
") > -1){ + sValue = sValue.replace("
",""); + } + sValue = sValue.replace(/^\s+/,""); // Left trim + sValue = sValue.replace(/$\s+/,""); // Left trim + sValue = sValue.replace(/
/gi, ""); + var s = ""; + //var s = ""; + s = s+""; + // var s = ""; + $(ctrlId).innerHTML = s; + $(ctrlId+'inp').focus(); + $(ctrlId+'inp').select(); + } +}; +*/ + +textEdit = function(ctrlId, id, allowEmptyString, callback, callStrFunc) +{ + bTxtEditMode = true; + var iSize = 8; + if (screen.availWidth >= 1024) iSize = 12; + if (!$(ctrlId+"inp")) + { + sPrevVal = $(ctrlId).innerHTML; + var isEmptyAllowed = false; + var s; + if ((allowEmptyString !== null) && (allowEmptyString === true)) + { + isEmptyAllowed = true; + } + var sValue = $(ctrlId).innerHTML; + while (sValue.indexOf("
") > -1){ + sValue = sValue.replace("
",""); + } + while (sValue.indexOf("
") > -1){ + sValue = sValue.replace("
",""); + } + sValue = sValue.replace(/^\s+/,""); // Left trim + sValue = sValue.replace(/$\s+/,""); // Left trim + sValue = sValue.replace(/
/gi, ""); + // var s = ""; + if (PLATFORM == "Central") { + s = ""; + s = s+""; + } else { + s = ""; + s = s+""; + } + $(ctrlId).innerHTML = s; + $(ctrlId+'inp').focus(); + $(ctrlId+'inp').select(); + } +}; + +checkkey = function(ctrlId, id, allowEmptyString, callback, callStrFunc, e) { + var keycode = 0; + if (window.event) keycode = window.event.keyCode; + else if(e) keycode = e.which; + if (keycode == 13) + saveEdit(ctrlId, id, allowEmptyString, callback, callStrFunc); +}; + +checkKeyInfo = function(ctrlId, id, allowEmptyString, e) { + var keycode = 0; + if (window.event) keycode = window.event.keyCode; + else if(e) keycode = e.which; + if (keycode == 13) + saveEditInfo(ctrlId, id, allowEmptyString); +}; + +textEditInfo = function(ctrlId, id, allowEmptyString) +{ + bTxtEditMode = true; + var iSize = 8; + if (screen.availWidth >= 1024) iSize = 12; + if (!$(ctrlId+"inp")) + { + var isEmptyAllowed = false; + if ((allowEmptyString !== null) && (allowEmptyString === true)) + { + isEmptyAllowed = true; + } + sPrevValInfo = $(ctrlId).innerHTML; + var sValue = $(ctrlId).innerHTML; + sValue = sValue.replace(/^\s+/,""); // Left trim + sValue = sValue.replace(/$\s+/,""); // Left trim + sValue = sValue.replace(/
/gi,""); + sValue = sValue.replace(/ /gi,""); + $(ctrlId).innerHTML = ""; + $(ctrlId+'inp').focus(); + $(ctrlId+'inp').select(); + } +}; + +isPasswordAllowed = function(text,minLen,suppressAlert) +{ + var re = new RegExp( '^[a-zA-Z0-9.=!$():;#*ßüäö-]{'+minLen+',}$', 'i' ); + var bRet = re.test( text ); + var bShowAlert = (typeof(suppressAlert)=="undefined"); + //if( !bRet && ( bShowAlert ) ) alert( "Bitte verwenden Sie nur die erlaubten Sonderzeichen [., !, $, (, ), :, ;, #, ß, ä, ö, ü, -]." ); + if( !bRet && ( bShowAlert ) ) alert( translateKey("alertUseOnlySpecialChars") ); + return bRet; +}; + +/** + * Prüft, ob ein Text verbotene Sonderzeichen verwendet. + * Zu diesen Zeichen gehören: <, >, ', ", &, $, [, ], {, } und \ + * --> Es ist alles erlaubt, was nicht verboten ist + **/ +isTextAllowed = function(text, minLen, suppressAlert) +{ + var forbidden = /[<>'"&$\[\]\{\}\\]/; + var isForbidden = forbidden.test( text ); + + if ((isForbidden) && (typeof(suppressAlert) == "undefined")) + { + //alert("Bezeichnungen dürfen keines der folgenden Zeichen enthalten: <, >, ', \", &, $, [, ], {, } und \\"); + alert(translateKey("alertCharsNotAllowed")); + } + + return !(isForbidden); +}; + + + +isNumber = function(str) { + var reg = new RegExp('^[0-9]+$'); + return reg.test(str); +}; + +if (PLATFORM == "Central") +{ + saveEdit = function(ctrlId, id, allowEmptyString, callback, callStrFunc) + { + // verhindern dass das OnBlur-Event ausgelöst wird wenn mit ENTER bestätigt wurde + if (!bTxtEditMode) return; + bTxtEditMode = false; + var divId = ctrlId.substr(0, ctrlId.length - 3); + var newVal = $(ctrlId).value; + var oldV = ""; + if($(divId+"old")){ + oldV = $(divId+"old").value; + oldV = oldV.replace(/\n/,""); // trim + if (NAV_IE) { + oldV = oldV.replace(/^\s+|$\s+/,""); // trim + } else { + oldV = oldV.replace(/^\s+|\s+$/,""); // trim + } + } + var minLen = 1; + if ((allowEmptyString !== null) && (allowEmptyString === true)) + { + minLen = 0; + } + if ( isTextAllowed(newVal,minLen) ) + { + if( id !== 0 ) + { + if (typeof callback == "function") + { + callback(id, newVal); + } + iseSystem.saveName(id, newVal, divId, callStrFunc); + $(divId).innerHTML = newVal; + } + else + { + if (newVal != oldV){ + iseSystem.checkName( newVal, divId ); + } else { + $(divId).innerHTML = sPrevVal; + } + } + } + else + { + $(divId).innerHTML = sPrevVal; + } + }; + + saveEditInfo = function(ctrlId, id, allowEmptyString) + { + // verhindern dass das OnBlur-Event ausgelöst wird wenn mit ENTER bestätigt wurde + if (!bTxtEditMode) return; + bTxtEditMode = false; + var divId = ctrlId.substr(0, ctrlId.length - 3); + var newVal = $(ctrlId).value; + var minLen = 1; + if ((allowEmptyString !== null) && (allowEmptyString === true)) + { + minLen = 0; + } + if ( isTextAllowed(newVal,minLen) ) + { + $(divId).innerHTML = newVal; + if( id !== 0 ) { iseSystem.saveDesc(id, newVal); } + } + else + { + $(divId).innerHTML = sPrevValInfo; + } + }; +} +else +{ + //Funktionen für das Konfigtool + saveEdit = function(ctrlId, id, allowEmptyString, callback, callStrFunc) + { + // verhindern dass das OnBlur-Event ausgelöst wird wenn mit ENTER bestätigt wurde + if (!bTxtEditMode) return; + bTxtEditMode = false; + var divId = ctrlId.substr(0, ctrlId.length - 3); + var newVal = $(ctrlId).value; + var oldV = ""; + if($(divId+"old")){ + oldV = $(divId+"old").value; + oldV = oldV.replace(/\n/,""); // trim + if (NAV_IE) { + oldV = oldV.replace(/^\s+|$\s+/,""); // trim + } else { + oldV = oldV.replace(/^\s+|\s+$/,""); // trim + } + } + var minLen = 1; + if(allowEmptyString != null && allowEmptyString == true) + { + minLen = 0; + } + if ( isTextAllowed(newVal,minLen) ) + { + if( id != 0 ) + { + if (typeof callback == "function") + { + callback(id, newVal); + }else{ + configMetadata.save(id, newVal, divId, callStrFunc); + } + $(divId).innerHTML = newVal; + } + else + { + if (newVal != oldV){ + //iseSystem.checkName( newVal, divId ); + } else { + $(divId).innerHTML = sPrevVal; + } + } + } + else + { + $(divId).innerHTML = sPrevVal; + } + }; + saveEditInfo = function(ctrlId, id, allowEmptyString) + { + // verhindern dass das OnBlur-Event ausgelöst wird wenn mit ENTER bestätigt wurde + if (!bTxtEditMode) return; + bTxtEditMode = false; + var divId = ctrlId.substr(0, ctrlId.length - 3); + var newVal = $(ctrlId).value; + var minLen = 1; + if(allowEmptyString != null && allowEmptyString == true) + { + minLen = 0; + } + if ( isTextAllowed(newVal,minLen) ) + { + $(divId).innerHTML = newVal; + if( id != 0 ) iseSystem.saveDesc(id, newVal); + } + else + { + $(divId).innerHTML = sPrevValInfo; + } + }; +} + + +/* * * * * * * Overlay * * * * * * * * * * * * * * * * * * * */ +showRoomOverlay = function(tdId, chnId) { + var chnType = homematic("Channel.getChannelType", {"id": chnId}); + iLastChnId = chnId; + + // A channel of type CCESSPOINT_GENERIC_RECEIVER (e. g. DRAP chn 1 and 2) is not eligible for assigning to a room + if (chnType != "ACCESSPOINT_GENERIC_RECEIVER") { + translatePage("#roomOverlay"); + var elmPos = getElemCenterPos("#roomOverlay"); + $("roomOverlay").style.top = elmPos.top; //tdPos[1]+"px"; + $("roomOverlay").style.left = elmPos.left; //tdPos[0]+"px"; + iseChannels.showOverlay(chnId, ID_ROOMS); + } else { + alert(translateKey("lblChnNotAllowedInRoom")); + } +}; + +showFuncOverlay = function(tdId, chnId) { + var chnType = homematic("Channel.getChannelType", {"id": chnId}); + iLastChnId = chnId; + + // A channel of type ACCESSPOINT_GENERIC_RECEIVER (e. g. DRAP chn 1 and 2) is not eligible for assigning to a function + if (chnType != "ACCESSPOINT_GENERIC_RECEIVER") { + translatePage("#funcOverlay"); + var elmPos = getElemCenterPos("#funcOverlay"); + $("funcOverlay").style.top = elmPos.top; //tdPos[1]+"px"; + $("funcOverlay").style.left = elmPos.left; //tdPos[0]+"px"; + iseChannels.showOverlay(chnId, ID_FUNCTIONS); + } else { + alert(translateKey("lblChnNotAllowedInFunc")); + } +}; + +addRoom = function(ctrlId, roomId) { + iseChannels.chnToRoom(iLastChnId, roomId, $(ctrlId).checked); +}; + +addFunc = function(ctrlId, funcId) { + iseChannels.chnToFunc(iLastChnId, funcId, $(ctrlId).checked); +}; + +convertDomDate = function(s) +{ + var arTmp = s.split(' '); + arTmp = arTmp[0].split('-'); + return arTmp[2]+'.'+arTmp[1]+'.'+arTmp[0]; +}; + +convertDomTime = function(s) { + if (s.length === 0) { return ""; } + var arTmp = s.split(' '); + arTmp = arTmp[1].split(':'); + return arTmp[0]+':'+arTmp[1]; +}; + +ExecuteProgram = function(dpid, thenOnly) +{ + var url = "/esp/exec.htm?sid=" + SessionId; + var pb = ""; + pb += "object o = dom.GetObject( "+dpid+" );"; + pb += "if( o )"; + pb += "{"; + pb += (thenOnly === true) ? " o.ProgramExecute();" : " o.State(1);"; + pb += "}"; + var opts = {postBody: ReGa.encode(pb)}; + if(dbg)alert(pb); + new Ajax.Request(url, opts); +}; + +setDpState = function(dpid, iState, boolVal) +{ + conInfo("setDPState - dpID: " + dpid + " - value: " + iState); + var url = "/esp/system.htm?sid="+SessionId; + var pb = "string action = 'setDpState';"; + pb += "integer dpid = "+dpid+";"; + if (boolVal) + { + pb += "boolean iState = "+(iState == 1? true : false)+";"; + } + else + { + pb += "integer iState = '"+iState+"';"; + } + var opts = + { + postBody: ReGa.encode(pb) + }; + if(dbg)alert(pb); + new Ajax.Request(url, opts); +}; + +removeDuplicates = function(s1, s2, splitChar, bPlainText) { + var arTmp = new Array(); + var iAr; + var bFound; + var sSC = ' '; + if (splitChar) { sSC = splitChar; } + var ar1 = s1.split(sSC); + var ar2 = s2.split(sSC); + + for (var i1 = 0; i1 < ar1.length; i1++) { + bFound = false; + for (iAr = 0; iAr < arTmp.length; iAr++) { + if (ar1[i1] == arTmp[iAr]) { + bFound = true; + break; + } + } + if (!bFound) { + arTmp[arTmp.length] = ar1[i1]; + } + } + for (var i2 = 0; i2 < ar2.length; i2++) { + bFound = false; + for (iAr = 0; iAr < arTmp.length; iAr++) { + if (ar2[i2] == arTmp[iAr]) { + bFound = true; + break; + } + } + if (!bFound) { + arTmp[arTmp.length] = ar2[i2]; + } + } + + var i; + if (bPlainText) + { + var sRet = ""; + for(i = 0; i < arTmp.length; i++) { + if (arTmp[i] !== "") { + sRet += arTmp[i] + "
"; + } + } + sRet = sRet.substr(0, sRet.length - 4); + return sRet; + } + else { + var z = new Array(); + for(i = 0; i < arTmp.length; i++) { + if (arTmp[i] !== "") { + z[z.length] = document.createTextNode(arTmp[i]); + z[z.length] = document.createElement('br'); + } + } + z.pop(); + return z; + } +}; + +lastSort = ""; +lastDir = 0; + +lastSort2 = ""; +lastDir2 = 0; + +iseSetLastSort = function(sort) +{ + lastSort = sort; +}; + +iseClearLastSort = function() +{ + lastSort = ""; + iseResetDirection(); + iseClearLastSort2(); +}; + +iseClearLastSort2 = function() +{ + lastSort2 = ""; + iseResetDirection2(); +}; + +iseChangeDirection = function() +{ + if( lastDir == 1 ) + { + lastDir = 0; + } + else + { + lastDir = 1; + } +}; + +iseChangeDirection2 = function() +{ + if( lastDir2 == 1 ) + { + lastDir2 = 0; + } + else + { + lastDir2 = 1; + } +}; + +iseResetDirection = function() +{ + lastDir = 0; +}; + +iseResetDirection2 = function() +{ + lastDir2 = 0; +}; + +iseArraySwap = function(arr,entryA,entryB) +{ + var tmp = arr[entryA]; + arr[entryA] = arr[entryB]; + arr[entryB] = tmp; + return arr; +}; + +iseSortMultiArray = function(arr,dsc,dir,sln, sessionVar,popup) +{ + conInfo("Sort multi array2."); + const collator = new Intl.Collator(undefined, {numeric: true, sensitivity: 'base'}); + /* arr.forEach( x => { if( typeof x[dsc] == "undefined" ) { x[dsc] = ""; } } ); */ + arr.sort( (x, y) => { return collator.compare(x[dsc], y[dsc]); } ); + if( dir === 1 ) { arr.reverse(); } + if (!popup) iseTransferSortedArray(arr,dsc,sln, sessionVar); +}; + +iseTransferSortedArray = function(arr,dsc,sortListNumber, sessionVar) +{ + conInfo("Transferring sorted array."); + var url = "/esp/system.htm?sid="+SessionId; + var pb = ""; + pb += 'string action = "AddToTempView'+sortListNumber+'";'; + + var s = "sessionLS"; + if (typeof(sessionVar) != 'undefined') s = sessionVar; + pb += 'system.SetSessionVar("'+s+'", "'+dsc+'");'; + pb += 'string ids = "'; + for(var i=0;i -1 ) + { + iseUpdateTMArray[iPos] = lastTimestamp; + } + else + { + iseUpdateIDArray.push( chnId ); + iseUpdateTMArray.push( lastTimestamp ); + } + + translatePage("#tblfav"); + +}; + +callbackUpdateChannelControl = function( chnId, lastTimestamp ) +{ + conInfo("callbackUpdateChannelControl"); + var url = "/esp/system.htm?sid=" + SessionId; + var pb = "string action = 'getLastTimeOfChn';"; + pb += 'string chnId = "' + chnId + '";'; + var opts = + { + postBody: Rega.encode(pb), + onComplete: function(t) + { + var sResp = t.responseText; + // CR or LF may be appended which must be ignored + if( sResp.length > lastTimestamp.length ) + { + sResp = sResp.substr( 0, lastTimestamp.length ); + } + if( sResp != lastTimestamp ) + { + reloadPage(); + } + else + { + updateChannelControl( chnId, lastTimestamp ); + } + } + }; + + new Ajax.Request(url, opts); +}; + +changeTransMode = function(chnId, ctrlId) { + dlgPopup = new iseMessageBox(ID_TRANSFER_PARAMETERS, chnId); + PopupClose = function(selIdx) + { + dlgPopup.hide(); + if (selIdx === 0) { + $(ctrlId).innerHTML = translateKey("lblStandard"); + } + else { + $(ctrlId).innerHTML = translateKey("lblSecured"); + } + }; + if (PLATFORM != 'Central') { + SendRequest('/popupTransEditor.cgi'); + } + dlgPopup.ShowPopup(); +}; + +recreateControl = function(chnId,sTimeStamp) +{ + var url; + var pb; + var opts; + + //alert("recreating control "+chnId+" at "+sTimeStamp); + conInfo("recreateControl"); + if( $("tmc"+chnId) ) + { + if( typeof sTimeStamp == "undefined" ) + { + url = "/esp/system.htm?sid="+SessionId; + pb = "string action = 'getLastTimeOfChn';"; + pb += "integer cId = "+chnId+";"; + opts = + { + postBody: ReGa.encode(pb), + onSuccess: function(t) { + translatePage("#dpc"+chnId); + } + }; + new Ajax.Updater("tmc"+chnId, url, opts); + } + else + { + $("tmc"+chnId).innerHTML = sTimeStamp; + } + } + + if( $("dpc" + chnId) ) + { + var iStatusOnly = 0; + if (sActPage.indexOf("statusviews") > -1) + { + iStatusOnly = 1; + } + url = "/esp/datapointconfigurator.htm?sid="+SessionId; + pb = "string action = 'dcCreate';"; + pb += "integer cId = "+chnId+";"; + pb += "integer iStatusOnly = " + iStatusOnly + ";"; + opts = + { + postBody: ReGa.encode(pb), + evalScripts: true, + onComplete: function(t) + { + //alert(t.responseText); + translatePage("#dpc"+chnId); + } + }; + //alert(pb); + new Ajax.Updater("dpc"+chnId, url, opts); + } +}; + +LogoClick = function() +{ + document.getElementById("btnReGaSave").style.color=WebUI.getColor("grayText"); + document.getElementById("btnReGaSave").onclick=""; + + //alert( iseUpdateIDArray.join("_") ); + //alert( iseUpdateTMArray.join("_") ); + //loadLinkList(); + saveObjectModel(); + +}; + +updateGroupCell = function(prefix, chnId1, chnId2, content) { + var sCellId = prefix + chnId1 + chnId2; + if ($(sCellId)) + $(sCellId).innerHTML = content; + else { + sCellId = prefix + chnId2 + chnId1; + if ($(sCellId)) + $(sCellId).innerHTML = content; + } +}; + + +saveObjectModel = function() { + var userNameElm = jQuery("#UserName"), + savingColor = "#afafaf", + restoreColor = "white"; + conInfo("The CCU is saving the ObjectModel"); + userNameElm.css('color',savingColor); + homematic("system.saveObjectModel", {}, function () { + conInfo("ObjectModel saved"); + userNameElm.css('color',restoreColor); + }); +}; + +pause = function(ms) +{ + var currentTime = new Date(); + var exitTime = currentTime.getTime() + ms; + while( true ) + { + currentTime = new Date(); + if( currentTime.getTime() > exitTime ) return; + } +}; + +iseFlasher = null; + +StartFlashing = function() +{ + iseFlasher = new PeriodicalExecuter( + function(pe) + { + if( $("headerLogo") ) + { + if( $("headerLogo").src.indexOf("_red") >= 0 ) + { + $("headerLogo").src = "/ise/img/rm-logo_small.png"; + } + else + { + $("headerLogo").src = "/ise/img/rm-logo_small_red.png"; + } + } + }, + 1); +}; + +StopFlashing = function() +{ + iseFlasher.stop(); + iseFlasher = null; +}; + +SwitchOnFlashLight = function() +{ + if ($("headerLogo")) { $("headerLogo").classList.add('hidden'); } + if ($("headerLogoRed")) { $("headerLogoRed").classList.remove('hidden'); } +}; + +SwitchOffFlashLight = function() +{ + if ($("headerLogo")) { $("headerLogo").classList.remove('hidden'); } + if ($("headerLogoRed")) { $("headerLogoRed").classList.add('hidden'); } +}; + +getAjaxLoadElem = function() { + return jQuery("#ajaxload"); +}; + +getWaitAnimElem = function() { + return jQuery("#waitAnim"); +}; + +isWaitAnimActive = function() { + var waitAnimElem = getWaitAnimElem(); + var result = false; + if (!waitAnimElem.hasClass("hidden")) { + result = true; + } + return result; +}; + +// Only visible when the waitAnimElem is hidden +// See ShowWaitAnim ... +ShowAjaxLoad = function() +{ + var ajaxLoadElem = getAjaxLoadElem(); + if (ajaxLoadElem && !isWaitAnimActive()) + ajaxLoadElem.show().removeClass('hidden'); +}; + +HideAjaxLoad = function() +{ + var ajaxLoadElem = getAjaxLoadElem(); + if (ajaxLoadElem) + ajaxLoadElem.hide().addClass('hidden'); +}; + +ShowWaitAnim = function() { + var waitAnimElem = getWaitAnimElem(), + ajaxLoadElem = getAjaxLoadElem(); + ajaxLoadElem.hide().addClass('hidden'); + waitAnimElem.show().removeClass('hidden'); +}; + +HideWaitAnim = function() { + var waitAnimElem = getWaitAnimElem(); + waitAnimElem.hide().addClass('hidden'); + +}; + +HideWaitAnimAutomatically = function(seconds) { + window.setTimeout("HideWaitAnim()", seconds * 1000); + +}; + +buildObj = function(id, trId, ctrlId, name, rooms, funcs, roomIDs, funcIDs) { + var tmp = new Object(); + tmp['id'] = id; + tmp['trid'] = trId; + tmp['ctrlId'] = ctrlId; + tmp['name'] = name; + tmp['room'] = rooms; + tmp['func'] = funcs; + tmp['fltOpts'] = new Object(); + tmp['fltOpts']['rooms'] = roomIDs; + tmp['fltOpts']['funcs'] = funcIDs; + return tmp; +}; + +RemoveAllRowsFromTable = function(table) +{ + if( $(table) ) + { + while($(table).rows.length ) + { + $(table).deleteRow(0); + } + } +}; + +array_merge = function(one,two) +{ + one.push(two); + return one.flatten(); +}; + +arrayDeleteVal = function(arr, item) { + var index = arr.indexOf(item); + arr.splice(index, 1); +}; + +DeleteObject = function(id) +{ + var url = "/esp/system.htm?sid="+SessionId; + var pb = ""; + pb += 'string action = "DeleteObject";'; + pb += 'string id = "'+id+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onSuccess: function(t) + { + if( t.responseText == "false" ) + { + //if(dbg){alert("Objekt konnte nicht gelöscht werden.");} + if(dbg){alert(translateKey("alertErrorDeleteObject"));} + } + reloadPage(); + } + }; + new Ajax.Request(url, opts); +}; + +DeleteObject2 = function(id) +{ + var url = "/esp/system.htm?sid="+SessionId; + var pb = ""; + pb += 'string action = "DeleteObject";'; + pb += 'string id = "'+id+'";'; + var opts = { + postBody: ReGa.encode(pb), + onSuccess: function(t) + { + if( t.responseText == "false" ) + { + //if(dbg){alert("Objekt konnte nicht gelöscht werden.");} + if(dbg){alert(translateKey("alertErrorDeleteObject"));} + } + dlgPopup.load(); + } + }; + new Ajax.Request(url, opts); +}; + +iseRefr = function(state) +{ + //rfr = state; +}; + +conInfo = function(msg) +{ + if( (typeof console != "undefined") && (urlDebug =="true") ) + { + console.info(msg); + } +}; + +conError = function(msg) +{ + if( typeof console != "undefined" ) + { + console.error(msg); + } +}; + +ResetGAC = function() +{ + conInfo("ResetGAC called."); + GetAllChannels = function() + { + conInfo("GetAllChannels: NOP"); + }; +}; + +addLeadingZero = function( iValue ) +{ + var sRet = ""+iValue; + if( iValue < 10 ) + { + sRet = "0"+iValue; + } + return sRet; +}; + +addTrailingZero = function(val) { + var sVal = val.toString(), + decPlace = sVal.split(".")[1]; + if (!decPlace) { + return sVal + ".00"; + } + if (decPlace.length == 1) { + return sVal + "0"; + } + return sVal; +}; + +roundValue05 = function(val) { + var intVal = Math.floor(val); + if (val - intVal > 0.5) { + return Math.ceil(val); + } + + if (val - intVal == 0) { + return val; + } + + return intVal + 0.5; +}; + +round = function(x, n) +{ + // x = Fließkommazahl, n = gewünschte Nachkommastellen + if (!n) n = 2; //wenn n fehlt wird n = 2 + if (n < 1 || n > 14) return false; + var e = Math.pow(10, n); + var k = (Math.round(x * e) / e).toString(); + if (k.indexOf('.') == -1) k += '.'; + k += e.toString().substring(1); + return k.substring(0, k.indexOf('.') + n+1); +}; + +convertMin2Hour = function(valMin) { + var min = parseInt(valMin), + hours = Math.floor(valMin / 60), + minutes = valMin % 60; + + hours = (isNaN(hours)) ? 0 : hours; + minutes = (isNaN(minutes)) ? 0 : minutes; + + return hours + ' h : ' + ((minutes <= 9) ? "0"+minutes+" m" : minutes+" m"); +}; + +// Check if a bit is set in val (max. 32 bit operation) +// Returns true/false +isBitSet = function (val, bit) { + return ((val>>bit) % 2 != 0); +}; + +// another way to check the bit (64 bit operation possible) +_isBitSet = function(no, index) { + var bin = no.toString(2); + // Convert to Binary + + index = bin.length - index; + // Reverse the index, start from right to left + + return bin[index] == 1; +}; + +/** + * Entfernt einen Kanal aus einem Raum. + **/ +removeChannelFromRoom = function(roomId, channelId) +{ + decChnCount(roomId); + iseChannels.delChnFromID(channelId, roomId, true); + clearUserTempViewIDs2Room(); + + var room = RoomList.get(roomId); + if (room) + { + room.removeChannel(channelId); + } +}; + +/** + * Entfernt einen Kanal aus allen Räumen. + **/ +removeChannelFromAllRooms = function(roomId, channelId) +{ + decChnCount(roomId); + iseChannels.delChnFromAllRooms(channelId, true); + clearUserTempViewIDs2Room(); + + RoomList.list().each(function (room) { + room.removeChannel(channelId); + }); +}; + +removeChannelFromSubsection = function(subsectionId, channelId) +{ + decChnCount(subsectionId); + iseChannels.delChnFromID(channelId, subsectionId, true); + clearUserTempViewIDs2Function(); + + var subsection = SubsectionList.get(subsectionId); + if (subsection) + { + subsection.removeChannel(channelId); + } +}; + +removeChannelFromAllSubsections = function(subsectionId, channelId) +{ + decChnCount(subsectionId); + iseChannels.delChnFromAllFunctions(channelId, true); + clearUserTempViewIDs2Function(); + + SubsectionList.list().each(function (subsection) { + subsection.removeChannel(channelId); + }); +}; + +removeRoomOrSubsection = function(id) +{ + var room = RoomList.get(id); + if (room) { RoomList.remove(room); } + + var subsection = SubsectionList.get(id); + if (subsection) { SubsectionList.remove(subsection); } + +}; + +changeRoomOrSubsection = function(id) +{ + var room = RoomList.get(id); + if (room) { RoomList.beginUpdate(id); } + + var subsection = SubsectionList.get(id); + if (subsection) { SubsectionList.beginUpdate(id); } +}; + + +showDutyCycle = function() { + if (jQuery("#PagePathSpan").text().endsWith(translateKey("startPage"))) { + var ifaceBidCosRF = "BidCos-RF", + ifaceHmIPRF = "HmIP-RF", + arInterfaceDutyCycle = {}, + arInterfaceCarrierSense = {}, + showPartingLine = false, + dcUnit = "%", + dcNotAvailable = -1, + csNotAvailable = -1, + dcWarn = 69, // Warning when dc >= 70% + dcAlarm = 89, // Attention when dc >= 90% + csWarn = 10, // Warning when cs >= 11% + csAlarm = 19; // Attention when cs >= 20% + + homematic("Interface.getDutyCycle", {}, function(dcArray) { + if(jQuery.isArray(dcArray)) { + jQuery.each(dcArray, function(index, iface) { + var dutyCycleValElm = jQuery("#dutyCycleVal"+index), + dutyCycleAddrElm = jQuery("#dutyCycleAddr"+index), + trDutyCycle = jQuery("[name='trDutyCycle"+index+"']"), + dutyCycleBar = jQuery("[name='dutyCycleBar"+index+"']"), + carrierSenseValElm = jQuery("#carrierSenseVal"+index), + carrierSenseBar = jQuery("[name='carrierSenseBar"+index+"']"), + carrierSenseCol = jQuery("[name='carrierSenseCol"+index+"']"), + trPartingLineElm = jQuery("#partingLine1"), + csVal, + dcVal; + + if (typeof iface.dutyCycle !== "undefined") { + dcVal = Math.floor(iface.dutyCycle); + csVal = Math.floor(iface.carrierSense); + conInfo("dutyCycle - " + ifaceBidCosRF + ": " + dcVal + " " + dcUnit); + conInfo("carrierSense - " + ifaceBidCosRF + ": " + csVal + " " + dcUnit); + arInterfaceDutyCycle[ifaceBidCosRF] = ((dcVal >= 0) && (dcVal <= 100)) ? dcVal : dcNotAvailable; + arInterfaceCarrierSense[ifaceBidCosRF] = ((csVal >= 0) && (csVal <= 100)) ? csVal : csNotAvailable; + } else { + conInfo("No gateway status for the interface " + ifaceBidCosRF + " available!"); + arInterfaceDutyCycle[ifaceBidCosRF] = dcNotAvailable; + } + + if (arInterfaceDutyCycle[ifaceBidCosRF] != dcNotAvailable) { + dutyCycleValElm.text(arInterfaceDutyCycle[ifaceBidCosRF] + " " + dcUnit); + if (iface.type === "CCU2") { + dutyCycleAddrElm.text("CCU:"); + } else if(iface.type === "HMIP-HAP") { + if(iface.name !== "") { + dutyCycleAddrElm.text("HAP ("+iface.name+"):"); + } else { + dutyCycleAddrElm.text("HAP ("+iface.address+"):"); + } + } else if(iface.name !== "") { + dutyCycleAddrElm.text("LGW ("+iface.name+"):"); + } else { + dutyCycleAddrElm.text("LGW ("+iface.address+"):"); + } + + dutyCycleBar.css("width", arInterfaceDutyCycle[ifaceBidCosRF]+"%").attr('aria-valuenow', arInterfaceDutyCycle[ifaceBidCosRF]); + dutyCycleBar.removeClass("bg-success"); + dutyCycleBar.removeClass("bg-warning"); + dutyCycleBar.removeClass("bg-danger"); + + if (arInterfaceDutyCycle[ifaceBidCosRF] > dcAlarm) { + dutyCycleBar.addClass("bg-danger"); + } else if (arInterfaceDutyCycle[ifaceBidCosRF] > dcWarn) { + dutyCycleBar.addClass("bg-warning"); + } else { + dutyCycleBar.addClass("bg-success"); + } + + if (arInterfaceCarrierSense[ifaceBidCosRF] != csNotAvailable) { + carrierSenseValElm.text(arInterfaceCarrierSense[ifaceBidCosRF] + " " + dcUnit); + carrierSenseBar.css("width", arInterfaceCarrierSense[ifaceBidCosRF]+"%").attr('aria-valuenow', arInterfaceCarrierSense[ifaceBidCosRF]); + carrierSenseBar.removeClass("bg-info"); + carrierSenseBar.removeClass("bg-warning"); + carrierSenseBar.removeClass("bg-danger"); + + if (arInterfaceCarrierSense[ifaceBidCosRF] > csAlarm) { + carrierSenseBar.addClass("bg-danger"); + } else if (arInterfaceCarrierSense[ifaceBidCosRF] > csWarn) { + carrierSenseBar.addClass("bg-warning"); + } else { + carrierSenseBar.addClass("bg-info"); + } + } else { + carrierSenseValElm.text("n/a"); + carrierSenseBar.css("width", "0%"); + } + trPartingLineElm.show(); + showPartingLine = true; + trDutyCycle.css("display", "table-row"); + } else { + trDutyCycle.css("display", "none"); + } + + if (!showPartingLine) { + trPartingLineElm.hide(); + } + }); + } + }); + } +}; + +showDutyCycleHmIP = function() { + // Currently only in use for HAPs. Here we collect the available HAP addresses. + // The display of the HAP-DutyCycle is done in showDCAllInterfaces() + if (jQuery("#PagePathSpan").text() == translateKey("startPage")) { + var linkElem = jQuery("#iFaceShowAll"), + arRelevantAddresses = []; + + jQuery.each(DeviceList.devices, function(index, dev) { + //if ((dev.typeName == "HmIP-CCU3") || (dev.typeName.indexOf("HmIP-HAP") > -1)) { + // We fetch only the HAP addresses + if (dev.typeName.indexOf("HmIP-HAP") > -1) { + arRelevantAddresses.push(dev.channels[0].address.split(":")[0]); + } + }); + + if ((arRelevantAddresses.length > 0) && (!linkElem.hasClass("UILink"))) { + linkElem + .addClass("UILink") + .on("click", function () { + showDutyCycle(); // actualize the dc value of the start page + showDCAllInterfaces(arRelevantAddresses); + }); + } + } +}; + +//Attention: To work properly Adapter.Local.Device.Enabled of the crRFD.conf must be set to true +showCarrierSense = function() { + if (jQuery("#PagePathSpan").text() == translateKey("startPage")) { + var ccuAddress = homematic("CCU.getSerial"), + linkElem = jQuery("#lblCarrierSense"), + arHAPAddresses = []; + + jQuery.each(DeviceList.devices, function(index, dev) { + if (dev.typeName.indexOf("HmIP-HAP") > -1) { + arHAPAddresses.push(dev.channels[0].address.split(":")[0]); + } + }); + + if ((arHAPAddresses.length > 0) && (!linkElem.hasClass("UILink"))) { + linkElem + .addClass("UILink") + .on("click", function () { + showCarrierSense(); // actualize the cs value of the start page + showAllCarrierSense(ccuAddress, arHAPAddresses); + }); + } + + if ((typeof ccuAddress != "undefined") && (ccuAddress != "")) { + homematic("Interface.getValue", { + "interface": "HmIP-RF", + "address": ccuAddress + ":0", + "valueKey": "CARRIER_SENSE_LEVEL" + }, function (result) { + if (result != null) { + var carrierSenseProgressElm = jQuery("#carrierSenseProgress"), + carrierSenseProgressBarElm = jQuery("#carrierSenseProgressBar"), + carrierSenseValElm = jQuery("#carrierSenseVal"), + trCarrierSense = jQuery("[name='trCarrierSense']"), + csUnit = "%", + csVal = parseInt(result), + width, value; + + if ((typeof csVal == "number") && ((csVal >= 0) && (csVal <= 100))) { + trCarrierSense.css("visibility", "visible"); + + width = parseInt(carrierSenseProgressElm.css("width")); + value = width - (width / 100 * csVal); + + carrierSenseValElm.text(csVal + csUnit); + carrierSenseProgressBarElm.css("margin-left", (width - parseInt(value)) + "px"); + + } else { + trCarrierSense.css("visibility", "hidden"); + } + } + }); + } + } +}; + +// Show the duty cycle of all relevant interfaces and available HAPs +showDCAllInterfaces = function(arRelevantAddresses) { + var ifaceBidCosRF = "BidCos-RF", + arInterfaceDutyCycle = {}, + showPartingLine = false, + dcUnit = "%", + dcNotAvailable = -1, + dcAlarm = 89, // Attention when dc >= 90% + elmCounter = 0, + html = "", + dlg; + + homematic("Interface.listBidcosInterfaces", {"interface": ifaceBidCosRF}, function (BidCosIFaces) { + html += ""; + + jQuery.each(BidCosIFaces, function(index, iFace){ + var dcVal = (typeof iFace.dutyCycle != 'undefined') ? parseInt(iFace.dutyCycle) : 'unknown'; + elmCounter = index; + html += ""; + html += ""; + html += ""; + + html += ""; + html += ""; + html += ""; + + window.setTimeout(function() { + var dutyCycleProgressElem = jQuery("#dutyCycleProgress_" + index), + dutyCycleProgressBarElm = jQuery("#dutyCycleProgressBar_" + index), + dutyCycleValElm = jQuery("#dutyCycleVal" + index), + trDutyCycle = jQuery("[name='trDutyCycle']"), + dcVal, + width, value; + + + + if (typeof iFace.dutyCycle != "undefined") { + dcVal = parseInt(iFace.dutyCycle); + conInfo("dutyCycle - " + ifaceBidCosRF + ": " + dcVal + dcUnit); + arInterfaceDutyCycle[ifaceBidCosRF] = ((dcVal >= 0) && (dcVal <= 100)) ? dcVal : dcNotAvailable; + } else { + conInfo("No gateway status for the interface " + ifaceBidCosRF + " available!"); + arInterfaceDutyCycle[ifaceBidCosRF] = dcNotAvailable; + } + + if (arInterfaceDutyCycle[ifaceBidCosRF] != dcNotAvailable) { + dutyCycleValElm.text(arInterfaceDutyCycle[ifaceBidCosRF] + dcUnit); + + width = parseInt(dutyCycleProgressElem.css("width")); + value = width - (width / 100 * arInterfaceDutyCycle[ifaceBidCosRF]); + + dutyCycleProgressBarElm.css("width", value + "px"); + } + }, 50); + }); + + /* Show HmIP HAPs */ + if (typeof arRelevantAddresses == "object" && (arRelevantAddresses.length > 0)) { + var dc = [], counter = [], + lastIndex = elmCounter + 1; + + jQuery.each(arRelevantAddresses, function (index, address) { + counter[index] = lastIndex + index; + dc[index] = parseInt(homematic("Interface.getValue", { + "interface": "HmIP-RF", + "address": address + ":0", + "valueKey": "DUTY_CYCLE_LEVEL" + })); + + if (!isNaN(dc[index])) { + html += ""; + html += ""; + html += ""; + html += ""; + html += ""; + html += ""; + + window.setTimeout(function () { + var dutyCycleProgressElem = jQuery("#dutyCycleProgress_" + counter[index]), + dutyCycleProgressBarElm = jQuery("#dutyCycleProgressBar_" + counter[index]), + dutyCycleValElm = jQuery("#dutyCycleVal" + counter[index]), + trDutyCycle = jQuery("[name='trDutyCycle']"), + dcVal = parseInt(dc[index]), + width, value; + + dcVal = ((dcVal >= 0) && (dcVal <= 100)) ? dcVal : dcNotAvailable; + + if (dcVal != dcNotAvailable) { + dutyCycleValElm.text(dcVal + dcUnit); + + width = parseInt(dutyCycleProgressElem.css("width")); + value = width - (width / 100 * dcVal); + + dutyCycleProgressBarElm.css("width", value + "px"); + } + }, 50); + } + }); + } + /* END HAP's */ + + html += "
"; + html += ""; + + html += ""; + if (iFace.type != "CCU2") { + html += ""; + } else { + html += ""; + } + html += ""; + + html += ""; + html += ""; + html += ""; + + html += "

" + iFace.type + " - " + translateKey('dialogSettingsBidCosRFLblSN') + ": " + iFace.address + "

" + translateKey('LabelCCU') + getProduct() + "

" + dcVal + dcUnit + "
"; + html += "
"; + html += ""; + html += ""; + html += ""; + html += ""; + html += ""; + html += ""; + html += ""; + html += ""; + html += "

" + translateKey('HmIP-HAP') + " - " + translateKey('dialogSettingsBidCosRFLblSN') + ": " + address + "

" + dc[index] + dcUnit + "
"; + html += "
"; + + dlg = new YesNoDialog(translateKey("lblDutyCycle"), html, "", "html"); + dlg.btnNoHide(); + dlg.btnTextYes(translateKey("btnOk")); + }); +}; + +// Show the Carrier Sense of the CCU and all available HAPs +showAllCarrierSense = function(ccuAddress, arHapAddress) { + var csCCU = null, + csHap = null, + csHAPs = [], + csUnit = "%", + html = "", + dlg; + + if ((typeof ccuAddress != "undefined") && (ccuAddress != "")) { + csCCU = homematic("Interface.getValue", { + "interface": "HmIP-RF", + "address": ccuAddress + ":0", + "valueKey": "CARRIER_SENSE_LEVEL" + }); + } + + jQuery.each(arHapAddress, function(index, hapAddress) { + csHap = homematic("Interface.getValue", { + "interface": "HmIP-RF", + "address": hapAddress + ":0", + "valueKey": "CARRIER_SENSE_LEVEL" + }); + csHAPs.push(csHap); + }); + + var getHtml = function(index, address, csVal) { + + var csValUnknown = "--"; + + var lblDev = (index == 0) ? translateKey("LabelCCU") : translateKey('HmIP-HAP'); + lblDev += " - " + translateKey('dialogSettingsBidCosRFLblSN') + ": " + address; + + var csValue = (! isNaN(parseInt(csVal))) ? parseInt(csVal) : csValUnknown, + html = ""; + + if (csValue == csValUnknown) {csUnit = "";} + + html += "
"; + html += ""; + + html += ""; + html += ""; + html += ""; + + html += ""; + html += ""; // CCU Carrier Sense + html += ""; + + html += "

"+ lblDev +"

" + csValue + csUnit + "
"; + html += "

"; + html += getHtml(0, ccuAddress, csCCU); + + jQuery.each(arHapAddress, function(index, hapAddress) { + html += getHtml(index + 1, hapAddress, csHAPs[index]); + }); + + html += "
"; + + dlg = new YesNoDialog(translateKey("lblCarrierSense"), html, "", "html"); + dlg.btnNoHide(); + dlg.btnTextYes(translateKey("btnOk")); + +}; + +encodeStringStatusDisplay = function(elmID, is4Dis, specialSZ) +{ + //Wird zur Zeit nur für die Textzeilen des HM-PB-4Dis-WM und des HM-Dis-WM55 genutzt, + //da dort einige Zeichen im Speicher an anderer Stelle liegen. + var jElm = jQuery("#"+elmID), + inString = jElm.val(), + outString = "", + szKey = "0x5f"; + + conInfo("encodeStringStatusDisplay - inString: " + inString); + + // Beim HM-PB-4Dis-WM wird die Tilde zum Darstellen des ß benutzt. + // Hier ist kein ReGa im Spiel. + // Beim HM-Dis-WM55 ist ReGA im Spiel. Leider wandelt Ise-Script + // die Tilde in ein " um, so daß der generierte String zerstört wird. + // Daher hier die Prüfung .... + szKey = (is4Dis == true) ? "~" : szKey; + + if (specialSZ) { + szKey = specialSZ; + } + + if (is4Dis == true) { + outString = inString.replace(/Ä/g, "["); + outString = outString.replace(/Ö/g, "#"); + outString = outString.replace(/Ü/g, "$"); + outString = outString.replace(/ä/g, "{"); + outString = outString.replace(/ö/g, "|"); + outString = outString.replace(/ü/g, "}"); + outString = outString.replace(/ß/g, szKey); + outString = outString.replace(/&/g, "]"); + outString = outString.replace(/=/g, "'"); + jQuery("#"+elmID.replace(/^_/, "")).val(outString); + return; + } else { + outString = inString.replace(/0xc4/g, "0x5b"); //Ä + outString = outString.replace(/0xd6/g, "0x23"); // Ö + outString = outString.replace(/0xdc/g, "0x24"); // Ü + outString = outString.replace(/0xe4/g, "0x7b"); // ä + outString = outString.replace(/0xf6/g, "0x7c"); // ö + outString = outString.replace(/0xfc/g, "0x7d"); // ü + outString = outString.replace(/0xdf/g, szKey); // ß + outString = outString.replace(/0x26/g, "0x5d"); // & + outString = outString.replace(/0x3d/g, "0x27"); // = + } + jElm.val(outString); +}; + +decodeStringStatusDisplay = function(sString) { + var outString = sString.replace(/\[/g,"Ä"); + outString = outString.replace(/#/g,"Ö"); + outString = outString.replace(/\$/g,"Ü"); + outString = outString.replace(/{/g,"ä"); + outString = outString.replace(/\|/g,"ö"); + outString = outString.replace(/}/g,"ü"); + outString = outString.replace(/\_/g,"ß"); + outString = outString.replace(/\]/g,"&"); + outString = outString.replace(/\'/g,"="); + return outString; +}; + +// For testing only +showInterfaces = function() +{ + var elemInfoPanel = jQuery("#infoPanel"); + if (elemInfoPanel.hasClass('hidden')) { + jQuery("#btnInterfaces").removeClass("hidden").bind("click", function() {showAllInterfaces();}); + elemInfoPanel.removeClass("hidden"); + } +}; + +setReGaBtn = function() { + homematic("ReGa.isPresent", null, function(result) { + //console.log("ReGa is present: " + result + " - typeof result: " + typeof result); + jQuery("#btnRestartReGa").children().first().css("color", "red").html("ReGa
Ready"); + }); +}; + +showHmAPITools = function() +{ + if (getUPL() == UPL_ADMIN) { + var elemInfoPanel = jQuery("#infoPanel"); + if (elemInfoPanel.hasClass('hidden')) { + jQuery("#btnAPITools").removeClass("hidden"); + jQuery("#btnShowAPITools").bind("click", function () { + showAllAPITools(); + }); + elemInfoPanel.removeClass("hidden"); + } + jQuery("#btnRestartReGa").bind("click", function () { + jQuery(this).children().first().css("color", "green"); + homematic("CCU.restartReGa"); + setReGaBtn(); + }); + } +}; + +getParamset = function(method) { + var iFace = jQuery("#iFace").val(), + address = jQuery("#address").val(), + paramsetKey = jQuery("#paramset").val(); + + var paramSet = homematic("Interface." + method, {"interface":iFace, "address" : address, "paramsetKey" : paramsetKey}); + console.log(address + ": " + method + " - " + paramsetKey + "\n", paramSet); +}; + +getDeviceDescription = function(method) { + var iFace = jQuery("#iFace").val(), + address = jQuery("#address").val(); + + homematic("Interface." + method, {"interface":iFace, "address" : address}, function(result) { + // result contains the device description + if (result != null) { + if (address.split(":").length == 1) { + var rfAddress = homematic("Device.getRFAddressByAddress", {'address': address}); + console.log(address + "\n" + rfAddress + " hex: 0x" + parseInt(rfAddress.split(":")[1]).toString(16) + "\n\n" + method + "\n", result); + } else { + console.log(address + ": " + method + "\n", result); + } + } else { + console.log(address + " doesn't exist"); + } + }); +}; + +getRFAddressOfAllDevices = function(method) { + var result = homematic("Device.getRFAddressOfAllDevices"), + arResult = result.split("\n"), + arOut = [], + sOut = ""; + jQuery.each(arResult, function(index,val) { + arOut = val.split("\t"); + if (typeof arOut[1] != "undefined") { + sOut = arOut[0] + " hex: 0x" + parseInt(arOut[0].split(":")[1]).toString(16); + sOut += " - " + arOut[1] + " - " + arOut[2]; + console.log((index + 1) + ": " + sOut); + } + }); +}; + +getAllSysVars = function() { + homematic("SysVar.getAll",{}, function(result) { + console.log(result); + }); +}; + +getAllDataPointIds = function() { + var + devAddress, + arValue, + counter = 0, + style = "color:blue", + tmpDevAddress, + ind, + html = ""; + + + homematic("ReGa.getAllDatapoints",{}, function(result) { + jQuery.each(result, function(index, value){ + arValue = value.split("--"); + ind = (typeof arValue[4] != "undefined") ? 4 : 3; + if (typeof arValue[ind] != "undefined") { // Device address + devAddress = arValue[ind].split(":")[0]; + if (tmpDevAddress != devAddress) { + tmpDevAddress = devAddress; + counter++; + } + style = (counter%2 == 0) ? "color:blue" : "color:red"; + console.log("%c" + translateString(value), style); + //html += "
" + translateString(value) + "
"; + } else { + console.log(translateString(value)); + //html += "
" + translateString(value) + "
"; + } + }); + + //var outWindow = window.open(); + //outWindow.document.write(html); + }); +}; + +getProduct = function() { + // Returns the mayor number of the WEBUI_VERSION + return WEBUI_VERSION.split(".")[0]; +}; + +getDevFirmware = function(addr, iface) { + if (typeof addr == "undefined" ) { + return "x.y.z"; + } + var iFace = (typeof iface == "undefined") ? "HmIP-RF" : iface, + devAddress = addr.split(":")[0], + devDescr = homematic("Interface.getDeviceDescription", { + "interface" : iFace, + "address" : devAddress + }); + + return devDescr.firmware; +}; + +showAllAPITools = function() { + var self = this; + var url = "/tools/HomeMatic-API.html"; + + var req = jQuery.ajax({ + url : url +"?sid=" + SessionId, + cache: false, + dataType: "html" + }); + + req.done(function(htmlContent) { + var boxWidth = 470, + boxHeight = 200; + + if (getUPL() != UPL_ADMIN) { + boxHeight = 105; + } + + MessageBox.show("HomeMatic API - CCU-SN: " + homematic("CCU.getSerial") + " - Address: " + homematic("CCU.getAddress"), htmlContent, null, boxWidth, boxHeight, null, null,translateKey("btnCancel")); + window.setTimeout(function() { + if (getUPL() != UPL_ADMIN) { + jQuery("[name='uLevel8']").remove(); + } else if((window.navigator.userAgent.toLowerCase().indexOf("firefox") == -1) && ((window.navigator.userAgent.toLowerCase().indexOf("chrome")) == -1)) { + jQuery("#allDPIds").hide(); + } + },100); + }); + + req.fail(function() { + alert("Error while loading " + url); + }); +}; + +showAllInterfaces = function() { + var sOutput = ""; + var iface = "Unknown Iface"; + + homematic("Interface.listBidcosInterfaces", {"interface": "BidCos-RF"}, function(interfaceStatus) { + iface = "BidCos-RF"; + if (interfaceStatus) + { + for (var loop = 0; loop < interfaceStatus.length; loop++) { + sOutput += iface + " address: " + interfaceStatus[loop].address; + sOutput += "
"+iface + " type: " + interfaceStatus[loop].type; + sOutput += "
"+iface + " fwVersion: " + interfaceStatus[loop].fwVersion; + sOutput += "
"+iface + " description: " + interfaceStatus[loop].description; + sOutput += "
"+iface + " dutyCycle: " + interfaceStatus[loop].dutyCycle; + sOutput += "
"+iface + " isConnected: " + interfaceStatus[loop].isConnected; + sOutput += "
"+iface + " isDefault: " + interfaceStatus[loop].isDefault; + sOutput += "


"; + } + MessageBox.show(translateKey("dialogAllRFInterfacesTitle"), sOutput, null, 350,150); + } + + homematic("Interface.listBidcosInterfaces", {"interface": "BidCos-Wired"}, function(interfaceStatus) { + iface = "BidCos-Wired"; + if (interfaceStatus) + { + for (var loop = 0; loop < interfaceStatus.length; loop++) { + sOutput += iface + " address: " + interfaceStatus[loop].address; + sOutput += "
"+iface + " type: " + interfaceStatus[loop].type; + sOutput += "
"+iface + " fwVersion: " + interfaceStatus[loop].fwVersion; + sOutput += "
"+iface + " description: " + interfaceStatus[loop].description; + sOutput += "
"+iface + " dutyCycle: " + interfaceStatus[loop].dutyCycle; + sOutput += "
"+iface + " isConnected: " + interfaceStatus[loop].isConnected; + sOutput += "
"+iface + " isDefault: " + interfaceStatus[loop].isDefault; + sOutput += "


"; + } + MessageBox.close(); + MessageBox.show(translateKey("dialogAllRFInterfacesTitle"), sOutput, null, 350,300); + } + + homematic("Interface.listBidcosInterfaces", {"interface": "HmIP-RF"}, function(interfaceStatus) { + iface = "HmIP-RF"; + if (interfaceStatus) + { + for (var loop = 0; loop < interfaceStatus.length; loop++) { + sOutput += iface + " address: " + interfaceStatus[loop].address; + sOutput += "
"+iface + " type: " + interfaceStatus[loop].type; + sOutput += "
"+iface + " fwVersion: " + interfaceStatus[loop].fwVersion; + sOutput += "
"+iface + " description: " + interfaceStatus[loop].description; + sOutput += "
"+iface + " dutyCycle: " + interfaceStatus[loop].dutyCycle; + sOutput += "
"+iface + " isConnected: " + interfaceStatus[loop].isConnected; + sOutput += "
"+iface + " isDefault: " + interfaceStatus[loop].isDefault; + sOutput += "


"; + } + MessageBox.close(); + MessageBox.show(translateKey("dialogAllRFInterfacesTitle"), sOutput, null, 350,300); + } + }); + }); + }); + return sOutput; +}; + +setBtnPress = function(elmId, time) { + var onTime = (time) ? time : 500, + elm = jQuery("#"+elmId); + + elm.removeClass("ControlBtnOff").addClass("ControlBtnOn"); + window.setTimeout(function() {elm.removeClass("ControlBtnOn").addClass("ControlBtnOff");},onTime); +}; + +getExtendedDescription = function(oChannelDescr) { + var result = ""; + var noDescrNecessary = "noDescrNecessary"; + var chType = "unknown"; + var channelAddress = oChannelDescr.channelAddress, + channelRegaID = oChannelDescr.channelID, + deviceType = oChannelDescr.deviceType, + channelType = oChannelDescr.channelType, + channelIndex = parseInt(oChannelDescr.channelIndex), + channelIsVisible = oChannelDescr.isVisible, + multiMode = oChannelDescr.multiMode; + var tmpDev; + + if (typeof channelType != "undefined") { + chType = channelType; + } else if (typeof channelAddress != "undefined") { + var channel = DeviceList.getChannelByAddress(channelAddress); + if (channel) { + chType = channel.channelType; + channelIsVisible = channel.isVisible; + } + } + + if (chType == "KEY_TRANSCEIVER") { + if (deviceType.toLowerCase().indexOf("hmip-asir") != -1) { + result = translateKey("chType_SABOTAGECONTACT"); + } + + if (deviceType.toLowerCase() == "hmip-mod-rc8") { + result = translateKey("chType_MOD_RC8"); + } + + } + + if (chType == "SWITCH_TRANSMITTER") { + var devType = deviceType.toLowerCase(); + if ((devType == "hmip-mod-oc8") || (devType == "elv-sh-sb8")) { + if (devType == "elv-sh-sb8") { + result = translateKey("chType_SWITCH_TRANSMITTER_LED"); + } else { + result = translateKey("chType_SWITCH_TRANSMITTER_OC"); + } + } + } + + // HM-LC-RGBW-WM - special description for the HM-LC-RGBW-WM + /* Uncomment this to hide the channel description of a general dimmer + if (chType == "DIMMER") { + result = (deviceType == "HM-LC-RGBW-WM" ) ? translateKey("chType_DIMMER") : noDescrNecessary; + } + */ + + if (chType == "DIMMER_TRANSMITTER") { + if (deviceType == "HmIP-WUA" || deviceType == "ELV-SH-WUA") { + result = translateKey("chType_UNIVERSAL_ACTOR_TRANSMITTER_010V"); + } + + if (deviceType == "HmIP-BSL") { + result = translateKey("chType_OPTICAL_SIGNAL_RECEIVERB"); + } + } + + if (chType == "DIMMER_VIRTUAL_RECEIVER") { + if (deviceType == "HmIP-WUA" || deviceType == "ELV-SH-WUA") { + result = translateKey("chType_UNIVERSAL_ACTOR_VIRTUAL_RECEIVER_010V"); + } + + if (deviceType == "HmIP-BSL") { + // console.log("B firmware:q! " + getDevFirmware(channelAddress)); + result = translateKey("chType_OPTICAL_SIGNAL_RECEIVER"); + } + } + + if (chType == "SWITCH_VIRTUAL_RECEIVER") { + if ((deviceType.toLowerCase() == "hmip-ps" + || deviceType.toLowerCase() == "hmip-psm" + || deviceType.toLowerCase() == "hmip-psm-pe" + || deviceType.toLowerCase() == "hmip-ps-uk" + || deviceType.toLowerCase() == "hmip-psm-it" + || deviceType.toLowerCase() == "hmip-psm-ch" + ) && (! channelIsVisible)) { + result = translateKey("lblHmIP_NotSupported"); + } else { + if (deviceType.toLowerCase() == "elv-sh-sb8") { + result = translateKey("chType_SWITCH_VIRTUAL_RECEIVER_LED"); + } else { + result = translateKey("chType_SWITCH_VIRTUAL_RECEIVER"); + } + } + } + + if (chType == "SWITCH_SENSOR") { + tmpDev = deviceType.toLowerCase(); + if (tmpDev == "hm-sec-sir-wm" && channelIndex == 1) { + result = translateKey("chType_SWITCH_SENSOR_Int"); + } else if (tmpDev == "hm-sec-sir-wm" && channelIndex == 2) { + result = translateKey("chType_SWITCH_SENSOR_Ext"); + } + } + + if (chType == "COND_SWITCH_TRANSMITTER") { + tmpDev = deviceType.toLowerCase(); + + switch (tmpDev) { + case "hmip-stho": + case "hmip-stho-a": + case "elv-sh-cth": + if (channelIndex == 2) result = translateKey("chType_COND_TEMPERATURE"); + if (channelIndex == 3) result = translateKey("chType_COND_HUMIDITY"); + break; + case "hmip-scth230": + if (channelIndex == 2) result = translateKey("chType_COND_CO2"); + if (channelIndex == 3) result = translateKey("chType_COND_CO2"); + if (channelIndex == 5) result = translateKey("chType_COND_TEMPERATURE"); + if (channelIndex == 6) result = translateKey("chType_COND_HUMIDITY"); + break; + } + } + + if (chType == "LEVEL_COMMAND_TRANSMITTER_CO2") { + result = translateKey("chType_COND_CO2"); + } + + if (chType == "LEVEL_COMMAND_TRANSMITTER_HUMIDITY") { + result = translateKey("chType_COND_HUMIDITY"); + } + + if (chType == "LEVEL_COMMAND_TRANSMITTER_TEMPERATURE") { + result = translateKey("chType_COND_TEMPERATURE"); + } + + if (chType == "PASSAGE_DETECTOR_DIRECTION_TRANSMITTER") { + if (channelIndex == 2) result = translateKey("chType_PASSAGE_DETECTOR_DIRECTION_TRANSMITTER_RL"); + if (channelIndex == 3) result = translateKey("chType_PASSAGE_DETECTOR_DIRECTION_TRANSMITTER_LR"); + } + + if (chType == "ROTARY_CONTROL_TRANSCEIVER") { + if (deviceType.toLowerCase() == "hmip-wrcr") { + if (channelIndex == 2) result = translateKey("chType_ROTARY_CONTROL_TRANSCEIVER_TR"); + if (channelIndex == 3) result = translateKey("chType_ROTARY_CONTROL_TRANSCEIVER_TL"); + } + } + + if (chType == "DOOR_RECEIVER") { + switch ( deviceType.toLowerCase()) { + case "hmip-mod-tm": + result = translateKey("chType_DOOR_RECEIVER_MOD_TM"); + break; + case "hmip-mod-ho": + result = translateKey("chType_DOOR_RECEIVER_MOD_HO"); + break; + } + } + + if (chType == "SIMPLE_SWITCH_RECEIVER") { + switch ( deviceType.toLowerCase()) { + case "hmip-mod-tm": + result = translateKey("chType_SIMPLE_SWITCH_RECEIVER_MOD_TM"); + break; + case "hmip-mod-ho": + result = translateKey("chType_SIMPLE_SWITCH_RECEIVER_MOD_HO"); + break; + } + } + + if (chType == "MULTI_MODE_INPUT_TRANSMITTER") { + var getMode = false, + typeExt = ""; + + if (typeof channelRegaID != "undefined") { + getMode = true; + } else if (typeof channel != "undefined" ) { + channelRegaID = channel.id; + getMode = true; + } + + if (getMode) { + if ((multiMode != "--") && (typeof multiMode != "undefined")) { + typeExt = "_" + multiMode; + } else { + if (channelAddress != "undefined") { + var chn = DeviceList.getChannelByAddress(channelAddress), + chnMode = parseInt(chn.multiMode); + if (! isNaN(chnMode)) { + typeExt = "_" + chnMode; + } else { + typeExt = ""; + } + } else { + typeExt = "_1"; + } + } + } + result = translateKey("chType_MULTI_MODE_INPUT_TRANSMITTER" + typeExt); + } + + if (((deviceType.indexOf("HmIPW-") != -1) && (chType.indexOf("BLIND_") != -1)) + || (deviceType.toLowerCase() == "hmip-drbli4") + || (deviceType.toLowerCase() == "hmip-bbl-2") + ) { + + if (chType == "BLIND_WEEK_PROFILE") { + result = translateKey("chType_BLIND_WEEK_PROFILE"); + } else { + if (typeof channel != "undefined") { + var virtChannelType = channel.getVirtChannelType(), + devMode = virtChannelType.split("_")[0].toLowerCase(); + result = (devMode == "shutter") ? translateKey("chType_" + chType.replace("BLIND", "SHUTTER")) : translateKey("chType_" + chType.replace("SHUTTER", "BLIND")); + } + } + } + + if ((chType == "COND_SWITCH_TRANSMITTER_TEMPERATURE") && (deviceType.toLowerCase() == "hmip-ste2-pcb")) { + if (channelIndex == 3) { + result = translateKey("chType_COND_SWITCH_TRANSMITTER_TEMPERATURE_DIFF"); + } + } + + if ((chType == "COND_SWITCH_TRANSMITTER_PARTICULATE_MATTER") && (deviceType.toLowerCase() == "hmip-sfd")) { + if (channelIndex == 4) { + result = translateKey("chType_COND_SWITCH_TRANSMITTER_PARTICULATE_MATTER25"); + } + + if (channelIndex == 5) { + result = translateKey("chType_COND_SWITCH_TRANSMITTER_PARTICULATE_MATTER100"); + } + + if (channelIndex == 6) { + result = translateKey("chType_COND_SWITCH_TRANSMITTER_PARTICULATE_MATTER10"); + } + + } + + if (chType == "OPTICAL_SIGNAL_RECEIVER") { + //HmIPW-WRC6 - ch. 13 activates all keys + result = (channelIndex < 13) ? translateKey("chType_OPTICAL_SIGNAL_RECEIVER") : translateKey("chType_OPTICAL_SIGNAL_RECEIVERA"); + } + + if (chType == "ACCESS_RECEIVER") { + if ((deviceType.toLowerCase() == "hmip-dld") || (deviceType.toLowerCase() == "hmip-dld-a") || (deviceType.toLowerCase() == "hmip-dld-s") ) { + result = translateKey("chType_ACCESS_RECEIVER") + " " + (channelIndex - 1); + } + } + + if (chType == "DOOR_LOCK_STATE_TRANSMITTER") { + if ((deviceType.toLowerCase() == "hmip-dld") || (deviceType.toLowerCase() == "hmip-dld-a") || (deviceType.toLowerCase() == "hmip-dld-s") ) { + result = translateKey("chType_DOOR_LOCK_STATE_TRANSMITTER"); + } + } + + if (chType == "SERVO_TRANSMITTER") { + if (deviceType.toLowerCase() == "hmip-wsc") { + result = translateKey("chType_SERVO_TRANSMITTER"); + } + } + + if (chType == "SERVO_VIRTUAL_RECEIVER") { + if (deviceType.toLowerCase() == "hmip-wsc") { + result = translateKey("chType_SERVO_VIRTUAL_RECEIVER"); + } + } + + if (chType == "ACCESS_TRANSCEIVER") { + if (deviceType.toLowerCase() == "hmip-fwi") { + tmpfCounter = (typeof tmpfCounter == "undefined") ? 1 : tmpfCounter; + result = translateKey("lblUser") + " " + tmpfCounter + " "; + tmpfCounter++; + if (typeof tmpfTimer == "undefined") { + tmpfTimer = window.setTimeout(function () { + delete tmpfCounter; + delete tmpfTimer; + }, 1000); + } + } + + if (deviceType.toLowerCase() == "hmip-wkp") { + tmpCounter = (typeof tmpCounter == "undefined") ? 1 : tmpCounter; + result = translateKey("lblUser") + " " + tmpCounter + " "; + + if (channelIndex % 2 != 0) { + result += translateKey("chType_ACCESS_TRANSCEIVER_LOCk"); + } else { + result += translateKey("chType_ACCESS_TRANSCEIVER_UNLOCk"); + tmpCounter++; + } + + if (typeof tmpTimer == "undefined") { + tmpTimer = window.setTimeout(function () { + delete tmpCounter; + delete tmpTimer; + }, 1000); + } + //result += (channelIndex % 2 == 0) ? translateKey("chType_ACCESS_TRANSCEIVER_UNLOCk") : translateKey("chType_ACCESS_TRANSCEIVER_LOCk"); + } + } + + if ((chType == "DISPLAY_INPUT_TRANSMITTER") && (deviceType.toLowerCase() == "hmipw-wgd" || deviceType.toLowerCase() == "hmipw-wgd-pl")) { + var oddChn = [1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39, 41]; + jQuery.each(oddChn, function(index, value) { + if (channelIndex == value) { + if (channelIndex <=7) { + result = translateKey("chType_DISPLAY_SCREEN") + " 1 - " + translateKey("chType_DISPLAY_TILE") + " " + (index + 1) + translateKey("chType_DISPLAY_KEY"); + return; // leave each loop + } else if (channelIndex >=9 && channelIndex <= 15) { + result = translateKey("chType_DISPLAY_SCREEN") + " 2 - " + translateKey("chType_DISPLAY_TILE") + " " + (index -3) + translateKey("chType_DISPLAY_KEY"); + return; // leave each loop + } else if (channelIndex >=17 && channelIndex <= 23) { + result = translateKey("chType_DISPLAY_SCREEN") + " 3 - " + translateKey("chType_DISPLAY_TILE") + " " + (index - 7) + translateKey("chType_DISPLAY_KEY"); + return; // leave each loop + } else if (channelIndex >=25 && channelIndex <= 31) { + result = translateKey("chType_DISPLAY_SCREEN") + " 4 - " + translateKey("chType_DISPLAY_TILE") + " " + (index - 11) + translateKey("chType_DISPLAY_KEY"); + return; // leave each loop + } else if (channelIndex >=33 && channelIndex <= 39) { + result = translateKey("chType_DISPLAY_SCREEN") + " 5 - " + translateKey("chType_DISPLAY_TILE") + " " + (index - 15) + translateKey("chType_DISPLAY_KEY"); + return; // leave each loop + } else if (channelIndex == 41) { + result = translateKey(("chType_DISPLAY_UNKNOWN")); + } + } + }); + } + + if ((chType == "DISPLAY_LEVEL_INPUT_TRANSMITTER") && (deviceType.toLowerCase() == "hmipw-wgd" || deviceType.toLowerCase() == "hmipw-wgd-pl")) { + var evenChn = [2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40]; + + jQuery.each(evenChn, function(index, value) { + if (channelIndex == value) { + if (channelIndex <= 8) { + result = translateKey("chType_DISPLAY_SCREEN") + " 1 - " + translateKey("chType_DISPLAY_TILE") + " " + (index + 1) + translateKey("chType_DISPLAY_LEVEL"); + return; // leave each loop + } else if (channelIndex >= 10 && channelIndex <= 16) { + result = translateKey("chType_DISPLAY_SCREEN") + " 2 - " + translateKey("chType_DISPLAY_TILE") + " " + (index - 3) + translateKey("chType_DISPLAY_LEVEL"); + return; // leave each loop + } else if (channelIndex >= 18 && channelIndex <= 24) { + result = translateKey("chType_DISPLAY_SCREEN") + " 3 - " + translateKey("chType_DISPLAY_TILE") + " " + (index - 7) + translateKey("chType_DISPLAY_LEVEL"); + return; // leave each loop + } else if (channelIndex >= 26 && channelIndex <= 32) { + result = translateKey("chType_DISPLAY_SCREEN") + " 4 - " + translateKey("chType_DISPLAY_TILE") + " " + (index - 11) + translateKey("chType_DISPLAY_LEVEL"); + return; // leave each loop + } else if (channelIndex >= 34 && channelIndex <= 40) { + result = translateKey("chType_DISPLAY_SCREEN") + " 5 - " + translateKey("chType_DISPLAY_TILE") + " " + (index - 15) + translateKey("chType_DISPLAY_LEVEL"); + return; // leave each loop + } + } + }); + } + + if ((chType == "DISPLAY_THERMOSTAT_INPUT_TRANSMITTER") && (deviceType.toLowerCase() == "hmipw-wgd" || deviceType.toLowerCase() == "hmipw-wgd-pl")) { + var oddChn = [43,45,47,49,51], + evenChn = [42,44,46,48,50]; + + jQuery.each(oddChn, function(index, value) { + if (channelIndex == value) { + result = translateKey("chType_DISPLAY_SCREEN") + " " + (index + 6) + " - " + translateKey("chType_DISPLAY_TILE") + " 2" + translateKey("chType_DISPLAY_CLIMATE"); + return; // leave each loop + } + }); + + jQuery.each(evenChn, function(index, value) { + if (channelIndex == value) { + result = translateKey("chType_DISPLAY_SCREEN") + " " + (index + 6) + " - " + translateKey("chType_DISPLAY_TILE") + " 1" + translateKey("chType_DISPLAY_CLIMATE"); + return; // leave each loop + } + }); + } + + if ((deviceType.toLowerCase() == "hmip-drg-dali") && ((chType == "MAINTENANCE") || (chType == "UNIVERSAL_LIGHT_RECEIVER"))) { + result = translateKey("chType_DALI_UNIVERSAL_LIGHT_RECEIVER"); + if (channelIndex > 32) { + result += "
" + translateKey("lblGroup") + " " + (channelIndex - 32); + } + } + + if ((deviceType.toLowerCase().includes("hmip-smo230")) || (deviceType.toLowerCase().includes("hmipw-smo230"))) { + var arAppendix = ["", "LEFT", "RIGHT", "BOTTOM", "VIRTUEL", "ZONE1", "ZONE2", "ZONE3", "VIRTUEL"]; + + if ((channelIndex >= 1) && (channelIndex <= 8)) { + result = translateKey("chType_" + chType + "_" + arAppendix[channelIndex]); + } + } + + if (chType == "CLIMATE_TRANSCEIVER") { + if (deviceType == "ELV-SH-TACO") { + result = translateKey("chType_CLIMATE_TRANSCEIVER_TEMP"); + } + } + + /* Uncomment this to hide the channel description of a particular channel type + if (chType == "KEY") { + result = noDescrNecessary; + } + */ + + if (result == "") {result = translateKey("chType_" + chType);} + if (result == noDescrNecessary) {result = "";} + return (result.split("_")[0] == "chType") ? "" : result; +}; + +getElemCenterPos = function(jElemStr) { + var elmWindow = jQuery(window), + elm = jQuery(jElemStr), + viewPortHeight = elmWindow.height(), + viewPortWidth = elmWindow.width(), + elmHeight = elm.height(), + elmWidth = elm.width(); + + return { + "top" : ((viewPortHeight / 2) - (elmHeight / 2)) + "px", + "left" : ((viewPortWidth / 2) - (elmWidth / 2)) + "px" + }; + +}; + +getVerticalCenterPos = function(jElemStr) { + var viewPortHeight = jQuery(window).height(), + elemHeight = jQuery(jElemStr).height(); + return ((viewPortHeight / 2) - (elemHeight / 2)) + "px"; +}; + +getHorizontalCenterPos = function(jElemStr) { + var viewPortWidth = jQuery(window).width(), + elemWidth = jQuery(jElemStr).width(); + return ((viewPortWidth / 2) - (elemWidth / 2)) + "px"; +}; + +getDefaultPartyModeString = function() { + var curDate = new Date(), + partyTemp = "21", + strPartyMode = ""; + + strPartyMode += partyTemp + ","; + strPartyMode += (parseInt(curDate.getHours()) + 1) * 60 + ","; + strPartyMode += curDate.getDate() + ","; + strPartyMode += curDate.getMonth() + 1 + ","; + strPartyMode += curDate.getFullYear() - 2000 + ","; + + strPartyMode += (parseInt(curDate.getHours()) + 3) * 60 + ","; + strPartyMode += curDate.getDate() + ","; + strPartyMode += curDate.getMonth() + 1 + ","; + strPartyMode += curDate.getFullYear() - 2000; + + return strPartyMode; +}; + +isIPv4AddressValid = function(ipAddress) { + var validator = /^(\d|[1-9]\d|1\d\d|2([0-4]\d|5[0-5]))\.(\d|[1-9]\d|1\d\d|2([0-4]\d|5[0-5]))\.(\d|[1-9]\d|1\d\d|2([0-4]\d|5[0-5]))\.(\d|[1-9]\d|1\d\d|2([0-4]\d|5[0-5]))$/; + return ipAddress.match(validator); +}; + +// This validates IPv4 (e. g. 192.168.0.1 or 192.168.0.0/16 - whereas the /16 is cut off and not examined) AND IPv6 addresses +isIPAddressValid = function(ipAddress) { + ipAddress = ipAddress.split("/")[0]; + var validator = /^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-zA-Z]|[a-zA-Z][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z]|[A-Za-z][A-Za-z0-9\-]*[A-Za-z0-9])$|^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/; + return ipAddress.match(validator); +}; + +isSubnetMaskValid = function(subNet) { + var validator = /^(((255\.){3}(255|254|252|248|240|224|192|128|0+))|((255\.){2}(255|254|252|248|240|224|192|128|0+)\.0)|((255\.)(255|254|252|248|240|224|192|128|0+)(\.0+){2})|((255|254|252|248|240|224|192|128|0+)(\.0+){3}))$/g; + return subNet.match(validator); +}; + +// Currently this function checks, if the device or channel is an coupling device/channel, e. g. OSRAM-Lightify device or an OSRAM-Lightify gateway +// The parameter is either a device object, channel object or a label +isNonCCUDevice = function(dev_chn_lbl) { + var result = false; + + // Check if this an coupling device, e. g OSRAM-Lightify device + if (dev_chn_lbl.typeName != undefined) { + var headChannelType = dev_chn_lbl.typeName.slice(0,7), + isGatewayLightify = dev_chn_lbl.typeName.match("VIR-OL-GTW"), + isGatewayHue = dev_chn_lbl.typeName.match("VIR-HUE-GTW"); + result = ( + (headChannelType == "VIR-LG-") + || isGatewayLightify != null + || isGatewayHue != null + ) ? true : false; + } else if (typeof dev_chn_lbl == "string") { + result = ( + (dev_chn_lbl.slice(0,7) == "VIR-LG-") + || (dev_chn_lbl.match("VIR-OL-GTW") != null) + || (dev_chn_lbl.match("VIR-HUE-GTW") != null) + ) ? true : false; + } + return result; +}; + +// Currently this function checks, if the device or channel is a coupling gateway (e. g. OSRAM-Lightify) +// For more tests this function must be extended. +isNonCCUGateway = function(oDevChn) { + var result = false; + if (oDevChn != undefined) { + result = ( + (oDevChn.typeName.match("VIR-OL-GTW") != undefined) + || (oDevChn.typeName.match("VIR-HUE-GTW") != undefined) + ) ? true : false; + } + return result; +}; + +isDevTypeHmIPW = function(type) { + return (type.indexOf("HmIPW-") != -1) ? true : false; +}; + +// Global object for the diagrams of the dual white controller +getDualWhiteControllerDiagramURLs = function() { + if (typeof dualWhiteControllerDiagramURL != "object") { + var path = "/ise/img/icons_hm_lc_dw/"; + dualWhiteControllerDiagramURL = {}; + + dualWhiteControllerDiagramURL["0000"] = path + "Crossfade_linear_konstant_niedrigistwarm.png"; + dualWhiteControllerDiagramURL["0001"] = path + "Crossfade_linear_konstant_niedrigistkalt.png"; + dualWhiteControllerDiagramURL["0010"] = path + "Crossfade_linear_maximal_niedrigistwarm.png"; + dualWhiteControllerDiagramURL["0011"] = path + "Crossfade_linear_maximal_niedrigistkalt.png"; + dualWhiteControllerDiagramURL["0100"] = path + "Crossfade_quadratisch_konstant_niedrigistwarm.png"; + dualWhiteControllerDiagramURL["0101"] = path + "Crossfade_quadratisch_konstant_niedrigistkalt.png"; + dualWhiteControllerDiagramURL["0110"] = path + "Crossfade_quadratisch_maximal_niedrigistwarm.png"; + dualWhiteControllerDiagramURL["0111"] = path + "Crossfade_quadratisch_maximal_niedrigistkalt.png"; + + dualWhiteControllerDiagramURL["1000"] = path + "Dim2Warm_linear_halb_niedrigistwarm.png"; + dualWhiteControllerDiagramURL["1001"] = path + "Dim2Warm_linear_halb_niedrigistkalt.png"; + dualWhiteControllerDiagramURL["1010"] = path + "Dim2Warm_linear_maximal_niedrigistwarm.png"; + dualWhiteControllerDiagramURL["1011"] = path + "Dim2Warm_linear_maximal_niedrigistkalt.png"; + dualWhiteControllerDiagramURL["1100"] = path + "Dim2Warm_quadratisch_halb_niedrigistwarm.png"; + dualWhiteControllerDiagramURL["1101"] = path + "Dim2Warm_quadratisch_halb_niedrigistkalt.png"; + dualWhiteControllerDiagramURL["1110"] = path + "Dim2Warm_quadratisch_maximal_niedrigistwarm.png"; + dualWhiteControllerDiagramURL["1111"] = path + "Dim2Warm_quadratisch_maximal_niedrigistkalt.png"; + + dualWhiteControllerDiagramURL["2000"] = path + "Dim2Hot_linear_halb_niedrigistwarm.png"; + dualWhiteControllerDiagramURL["2001"] = path + "Dim2Hot_linear_halb_niedrigistkalt.png"; + dualWhiteControllerDiagramURL["2010"] = path + "Dim2Hot_linear_maximal_niedrigistwarm.png"; + dualWhiteControllerDiagramURL["2011"] = path + "Dim2Hot_linear_maximal_niedrigistkalt.png"; + dualWhiteControllerDiagramURL["2100"] = path + "Dim2Hot_quadratisch_halb_niedrigistwarm.png"; + dualWhiteControllerDiagramURL["2101"] = path + "Dim2Hot_quadratisch_halb_niedrigistkalt.png"; + dualWhiteControllerDiagramURL["2110"] = path + "Dim2Hot_quadratisch_maximal_niedrigistwarm.png"; + dualWhiteControllerDiagramURL["2111"] = path + "Dim2Hot_quadratisch_maximal_niedrigistkalt.png"; + } +}; + +setPositionAllDevices = function() { + if (ConfigData.isPresent) { + + homematic("system.getPositionData", {}, function(posData) { + var lon = posData[0].split(":")[1], + lat = posData[1].split(":")[1], + utcOffset = posData[2].split(":")[1], + utcOffsetDST = posData[3].split(":")[1]; + + jQuery.each(DeviceList.devices, function (index, device) { + var iFace = device.interfaceName; + if ((iFace.toLowerCase() == "hmip-rf") && (device.typeName.toLowerCase() != "hmip-rcv-50") && (device.typeName.toLowerCase() != "hmip-dld") && (device.typeName.toLowerCase() != "hmip-dld-a") && (device.typeName.toLowerCase() != "hmip-dld-s") ) { + // Check if the device has the channel *_WEEK_PROFILE + jQuery.each(device.channels, function (index, channel) { + if (channel.channelType.indexOf("_WEEK_PROFILE") != -1) { + conInfo("Set utcOffsets+position of this device: " + channel.address.split(":")[0] + ":0 - lon: " + lon + " - lat: " + lat + " - utcOffset: " + utcOffset + " - utcOffsetDST: " + utcOffsetDST ); + + homematic("Interface.putParamset", { + 'interface': iFace, + 'address': channel.address.split(":")[0] + ":0", + 'paramsetKey': 'MASTER', + 'set': + [ + {name: 'LONGITUDE', type: 'double', value: lon}, + {name: 'LATITUDE', type: 'double', value: lat}, + {name: 'UTC_OFFSET', type: 'double', value: utcOffset}, + {name: 'UTC_DST_OFFSET', type: 'double', value: utcOffsetDST} + ] + }, function (result) { + conInfo(result); + }); + } else if (channel.channelType == "HEATING_CLIMATECONTROL_TRANSCEIVER") { + conInfo("Set utcOffsets of this device: " + channel.address.split(":")[0] + ":0 - utcOffset: " + utcOffset + " - utcOffsetDST: " + utcOffsetDST ); + + homematic("Interface.putParamset", { + 'interface': iFace, + 'address': channel.address.split(":")[0] + ":0", + 'paramsetKey': 'MASTER', + 'set': + [ + {name: 'UTC_OFFSET', type: 'double', value: utcOffset}, + {name: 'UTC_DST_OFFSET', type: 'double', value: utcOffsetDST} + ] + }, function (result) { + conInfo(result); + }); + } + }); + } + }); + }); + } else { + window.setTimeout(function() { + conInfo("ConfigData.isPresent: " + ConfigData.isPresent); + counterSetPosition++; + if (counterSetPosition < 30) { + setPositionAllDevices(); + } + }, 2500); + } +}; + +setNewDevicePos2SystemPos = function(oDevice) { + homematic("system.getPositionData", {}, function(posData) { + var lon = posData[0].split(":")[1], + lat = posData[1].split(":")[1], + utcOffset = posData[2].split(":")[1], + utcOffsetDST = posData[3].split(":")[1]; + + var iFace = oDevice.iface; + if (iFace.toLowerCase() == "hmip-rf" && (oDevice.type.toLowerCase() != "hmip-rcv-50") && (oDevice.type.toLowerCase() != "hmip-dld") && (oDevice.type.toLowerCase() != "hmip-dld-a") && (oDevice.type.toLowerCase() != "hmip-dld-s")) { + // Check if the device has the channel *_WEEK_PROFILE + jQuery.each(oDevice.chnTypes, function (index, channelType) { + if (channelType.indexOf("_WEEK_PROFILE") != -1) { + conInfo("Set the position of this device: " + oDevice.sn +":0 - lon: " + lon + " - lat: " + lat ); + + homematic("Interface.putParamset", { + 'interface': iFace, + 'address': oDevice.sn + ":0", + 'paramsetKey': 'MASTER', + 'set': + [ + {name: 'LONGITUDE', type: 'double', value: lon}, + {name: 'LATITUDE', type: 'double', value: lat}, + {name: 'UTC_OFFSET', type: 'double', value: utcOffset}, + {name: 'UTC_DST_OFFSET', type: 'double', value: utcOffsetDST} + ] + }, function (result) { + conInfo(result); + }); + return false ; // leave jQuery.each + } + }); + } + }); +}; + +setColorWebUI = function() { + var colorKeys = [ + "background", + "activeBackground", + "contentBackground", + "white" + ]; + + var counter = 0, + copyFile = 0; + + var modifiyColorMap = function () { + copyFile = ((counter + 1) == dlg.key.length) ? 1 : 0; + homematic("WebUI.setWebUIColors", {"key": colorKeys[counter], "color": dlg.key[counter], "cpFile" : copyFile}, function (result) { + counter++; + if (counter == colorKeys.length) { + window.location.reload(); + } else { + modifiyColorMap(); + } + }); + }; + + var html = ""; + jQuery.each(colorKeys, function(index, val) { + html += ""; + }); + + html += "
"+val+"
"; + + dlg = new YesNoDialog(translateKey("SetWebUIScheme"), html, function(result) { + if ((result == YesNoDialog.RESULT_YES)) { + modifiyColorMap(); + } + }, "html"); + + dlg.key = []; + dlg.btnYesHide(); + dlg.btnTextNo(translateKey("btnCancel")); + dlg.btnTextYes(translateKey("btnOk")); + + dlg.run = function() { + jQuery.each(colorKeys, function(index, val) { + jQuery("#colorPicker_"+val).spectrum({ + preferredFormat: 'hex', + //showInput: true, + color: WebUI.getColor(val), + //showPalette: true, + cancelText: translateKey('btnCancel'), + chooseText: translateKey('btnOk'), + + show: function () { + jQuery("#colorPicker_" + val).val(WebUI.getColor(val)); + dlg.btnYesHide(); + }, + hide: function (color) { + dlg.changeColor = true; + dlg.btnYesShow(); + dlg.key[index] = color.toHexString(); + } + }); + }); + }; + dlg.run(); + dlg.resetHeight(); +}; + +function activateDeviceBetaFw() { + var showBetaDevFw = jQuery("#inputShowBetaFw").is(":checked"), + fieldTestActive = "/etc/config/fieldTestActive"; + + if (showBetaDevFw) { + if (! homematic('CCU.existsFile', {'file': fieldTestActive})) { + homematic("CCU.createFile", {'file': fieldTestActive}); + } + } else { + if (homematic('CCU.existsFile', {'file': fieldTestActive})) { + homematic("CCU.removeFieldTestActive"); + } + } +}; + + +/** + * + * Tmporarily introduced with the HmIP-RGBW - this may not be the best place here + * + */ + +// `hsvToRgb` +// Converts an HSV color value to RGB. +// *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100] +// *Returns:* { r, g, b } in the set [0, 255] + +function isOnePointZero(n) { + return typeof n == "string" && n.indexOf('.') != -1 && parseFloat(n) === 1; +} + +// Check to see if string passed in is a percentage +function isPercentage(n) { + return typeof n === "string" && n.indexOf('%') != -1; +}; + + +function bound01(n, max) { + if (isOnePointZero(n)) { n = "100%"; } + + var processPercent = isPercentage(n); + n = Math.min(max, Math.max(0, parseFloat(n))); + + // Automatically convert percentage into number + if (processPercent) { + n = parseInt(n * max, 10) / 100; + } + + // Handle floating point rounding errors + if ((Math.abs(n - max) < 0.000001)) { + return 1; + } + + // Convert into [0, 1] range if it isn't already + return (n % max) / parseFloat(max); +}; + + +function hsvToRgb(h, s, v) { + + h = bound01(h, 360) * 6; + s = bound01(s, 100); + v = bound01(v, 100); + + var i = Math.floor(h), + f = h - i, + p = v * (1 - s), + q = v * (1 - f * s), + t = v * (1 - (1 - f) * s), + mod = i % 6, + r = [v, q, p, p, t, v][mod], + g = [t, v, v, q, p, p][mod], + b = [p, p, t, v, v, q][mod]; + + return { r: r * 255, g: g * 255, b: b * 255 }; +};/** + * Created by grobelnik on 01.08.2016. + */ + + +iseAcousticDisplayReceiver = Class.create(); + +iseAcousticDisplayReceiver.prototype = { + initialize: function (id, chnAddress, iface) { + var self = this; + this.id = id; + + statusDisplayDialog = new StatusDisplayDialogAcousticEPaper(translateKey("statusDisplayDialogTitle"), this._getAnchor(), "", function (result) { + if (result == this.RESULT_YES) { + var configString = this.getConfigString(); + //conInfo("statusDisplayDialog configString: " + configString); + + if (configString.length > 0) { + conInfo("Set the display"); + setDpState(self.id, configString); + } else { + conInfo("Don't set the display"); + } + } + },"html"); + + }, + + _getAnchor: function() { + return "" + + "" + + "" + + "
"; + } +}; +/** + * ise/debug_funcs.js + **/ + +/** + * @fileOverview Debug-Funktionen + * @author ise + **/ + +debugAddMsg = function() { + if(typeof(eventLogSystem) == "undefined") { + $("dbgLog").innerHTML = "eventLogSystem -> undefined"; + } + else { + $("dbgLog").innerHTML = "calling eventLogSystem.add()"; + eventLogSystem.add("10.07.2007 12:15", "Wetterstation", "LowBat"); + } +}; + +createDebugAlarmMsgs = function() { + + var table = Builder.node("table", {id:"tblDebugAlarms", style: "width:100%;color:Black;"}); + var colgroup = Builder.node("colgroup"); + var col1 = Builder.node("col", {width: "25%"}); + var col2 = Builder.node("col", {width: "50%"}); + var col3= Builder.node("col", {width: "25%"}); + colgroup.appendChild(col1); + colgroup.appendChild(col2); + colgroup.appendChild(col3); + table.appendChild(colgroup); + // Zeile 1 erstellen + var tbody = Builder.node("tbody"); + var tr = Builder.node("tr"); + var td1 = Builder.node("td", {}, "01.03. 13:22"); + var td2 = Builder.node("td", {}, "Bewegungsmelder - Eingang"); + var td3 = Builder.node("td", {}, "Low Bat"); + + // Zeile 1 hinzufügen + tr.appendChild(td1); + tr.appendChild(td2); + tr.appendChild(td3); + tbody.appendChild(tr); + + // Zeile 2 erstellen + tr = Builder.node("tr"); + td1 = Builder.node("td", {}, "01.03. 13:19"); + td2 = Builder.node("td", {}, "Kombi-Wettersensor"); + td3 = Builder.node("td", {}, "Empfangsausfall"); + + // Zeile 2 hinzufügen + tr.appendChild(td1); + tr.appendChild(td2); + tr.appendChild(td3); + + tbody.appendChild(tr); + + tr = Builder.node("tr");td1 = Builder.node("td", {}, "01.03. 13:44");td2 = Builder.node("td", {}, "Mülleimer");td3 = Builder.node("td", {}, "Voll");tr.appendChild(td1);tr.appendChild(td2);tr.appendChild(td3); + tbody.appendChild(tr); + tr = Builder.node("tr");td1 = Builder.node("td", {}, "01.03. 13:45");td2 = Builder.node("td", {}, "Badewanne");td3 = Builder.node("td", {}, "Übergelaufen");tr.appendChild(td1);tr.appendChild(td2);tr.appendChild(td3); + tbody.appendChild(tr); + + table.appendChild(tbody); + + if( $('logAlarms') ) + { + $('logAlarms').appendChild(table); + } +}; + +debugCreatePopup = function() { + var s = $("dbgSelect").options[$("dbgSelect").selectedIndex].text; + var type = 0; + if (s == "ID_INSERT_VALUE") + type = 1; + if (s == "ID_INSERT_STRING") + type = 2; + CreatePopup(eval(s), type); +}; + +debugForcePos = function() { + if ($("btnRoomsSub")) { + var topCoords = Position.positionedOffset($("btnRooms")); + var offsetCoords = Position.positionedOffset($("subOffsetDiv")); + var dimTop = $("btnRooms").getDimensions(); + + $("btnRoomsSub").style.top = topCoords[1] - offsetCoords[1] + dimTop.height; + $("btnRoomsSub").style.left = topCoords[0] - offsetCoords[0] - 5; + $("btnRoomsSub").show(); + } +}; + +debugShowFilters = function() { + if (typeof(filterOptions) != 'undefined') { + var s = ""; + for (var i = 0; i < filterOptions.filters.length; i++) { + s += filterOptions.filters[i]["id"] + "\n"; + } + if(dbg)alert(s); + } + else { + if(dbg)alert("No filter options"); + } +}; + +showTimemodule = function() { + CreatePopup(ID_TIMEMODULE, $("tmID").value); +};/** + * ise/iseFilter.js + **/ + +/** + * @fileOverview Speichert und verwaltet Filter-Kriterien für Listen-Ansichten + * @author Michael Niehaus (ise) + **/ + +// file: iseFilter +// author: Michael Niehaus +// date created: 15.05.2007 +// +// speichert und verwaltet Filter-Kriterien für Listen-Ansichten +FLT_OBJ_TYP_VARS = 1; +bFilterUsed = false; + +/** + * @class + **/ +iseFilter = Class.create(); +iseFilter.prototype = { + initialize: function(sPageId, fltObjType) { + this.filRooms = ""; + this.filFuncs = ""; + this.filType = ""; + this.filDesc = ""; + this.filSn = ""; + this.filName = ""; + this.filUnit = ""; + this.filChnLink = ""; + this.filVarTypes = ""; + this.filTime = ""; + this.filDate = ""; + this.bSend = false; + this.bRec = false; + this.bStd = false; + this.bSafe = false; + this.bTypeLogic = false; + this.bTypeValueList = false; + this.bTypeNumber = false; + this.bTypeAlarm = false; + this.bTypeString = false; + this.bColLeft = false; + this.bColCenter = false; + this.bNameLeft = false; + this.bNameTop = false; + this.bPC = false; + this.bPDA = false; + this.bCentral = false; + this.filUsers = ""; + this.pageID = sPageId; + this.fltObjType = 0; + if (fltObjType) + this.fltObjType = fltObjType; + + var self = this; + function fltrHandler() { + eQ3.HomeMatic.Event.unsubscribe('ContentLoaded', fltrHandler); + self.restoreFilters(); + } + eQ3.HomeMatic.Event.subscribe('ContentLoaded', fltrHandler); + }, + + restoreFilters: function() { + try { + var iseSFilters = JSON.parse(localStorage.getItem('iseSFilters_' + this.pageID)); + Object.keys(iseSFilters).forEach(function(id) { + var val = iseSFilters[id]; + if ($(id)) { + $(id).value = val; + $(id).nextSiblings()[0].click(); + } + }); + } catch(e) { + console.error(e); + } + }, + + + saveModeFilter: function(bModeStd, bModeSafe) + { + this.bStd = bModeStd; + this.bSafe = bModeSafe; + var url = "/esp/system.htm?sid="+SessionId; + var pb = ""; + pb += 'string action = "saveModeFilter";'; + pb += 'string sPageId = "'+this.pageID+'";'; + pb += 'integer iModeStd = '+(bModeStd? 1:0)+';'; + pb += 'integer iModeSafe = '+(bModeSafe? 1:0)+';'; + var opt = + { + postBody: ReGa.encode(pb) + }; + new Ajax.Request(url, opt); + }, + + saveIfaceFilter: function(bSend, bRec) + { + this.bSend = bSend; + this.bRec = bRec; + var url = "/esp/system.htm?sid="+SessionId; + var pb = ""; + pb += 'string action = "saveIfaceFilter";'; + pb += 'string sPageId = "'+this.pageID+'";'; + pb += 'integer iSend = '+(bSend? 1:0)+';'; + pb += 'integer iRec = '+(bRec? 1:0)+';'; + var opt = + { + postBody: ReGa.encode(pb) + }; + new Ajax.Request(url, opt); + }, + + + addStringFilter: function(fId, s) { + s = s.toLowerCase(); + switch(fId) { + case FIL_NAME: this.filName = s; break; + case FIL_DESC: this.filDesc = s; break; + case FIL_SN: this.filSn = s; break; + case FIL_TYPE: this.filType = s; break; + case FIL_ROOMS: this.filRooms = s; break; + case FIL_FUNCS: this.filFuncs = s; break; + case FIL_UNIT: this.filUnit = s; break; + case FIL_TIME: this.filTime = s; break; + case FIL_DATE: this.filDate = s; break; + case FIL_USERS: this.filUsers = s; break; + case FIL_CHN: this.filChnLink = s; break; + default: break; + } + }, + + isFilterType: function(ft) { + switch(ft) { + case FIL_MODE_AES: return this.bSafe; + case FIL_MODE_STD: return this.bStd; + case FIL_IFACE_S : return this.bSend; + case FIL_IFACE_R : return this.bRec; + default : return null; + } + }, + + objPassFilter: function(obj) + { + var bFound; + var arF; + var arO; + var i; + var x; + + bFilterUsed = true; + if (this.filRooms !== "") + { + bFound = false; + arF = this.filRooms.split('\t'); + + if (obj['fltOpts']['rooms']) + { + arO = obj['fltOpts']['rooms'].split('\t'); + for (i = 0; i < arF.length; i++) + { + if (!bFound) + { + for (x = 0; x < arO.length; x++) + { + if (arF[i] == arO[x]) + { + bFound = true; + break; + } + } + } + } + } + if (!bFound) { return false; } + } + + if (this.filFuncs !== "") + { + bFound = false; + arF = this.filFuncs.split('\t'); + arO = obj['fltOpts']['funcs'].split('\t'); + + for (i = 0; i < arF.length; i++) + { + if (!bFound) { + for (x = 0; x < arO.length; x++) + { + if (arF[i] == arO[x]) + { + bFound = true; + break; + } + } + } + } + if (!bFound) { return false; } + } + if (this.filType !== "") + { + if (typeof obj['type'] != 'undefined') { + if (obj['type'] === "") { return false; } + if (isValidRegex(this.filType)) + { + var r = new RegExp(this.filType); + if (r.test(obj['type'].toLowerCase()) === false) { return false; } + } + else + { + if (obj['type'].toLowerCase().indexOf(this.filType) == -1) { return false; } + } + } + } + if (this.filDesc !== "") + { + //conInfo( "iseFilter: filDesc="+this.filDesc ); + if (typeof obj['desc'] != 'undefined') + { + //conInfo( "iseFilter: desc="+obj['desc'] ); + if (obj['desc'] === "") { return false; } + if (isValidRegex(this.filDesc)) + { + var r = new RegExp(this.filDesc); + if (r.test(obj['desc'].toLowerCase()) === false) { return false; } + } + else + { + if (obj['desc'].toLowerCase().indexOf(this.filDesc) == -1) { return false; } + } + } + } + if (this.filName !== "") + { + if (typeof obj['name'] != 'undefined') + { + if (obj['name'] === "") { return false; } + var transName = translateString(obj['name']); + if (isValidRegex(this.filName)) + { + var r = new RegExp(this.filName); + if (r.test(transName.toLowerCase()) === false) { return false; } + } + else + { + if (transName.toLowerCase().indexOf(this.filName) == -1) { return false; } + } + } + } + if (this.filSn !== "") + { + if (typeof obj['sn'] != 'undefined') + { + if (obj['sn'] === "") { return false; } + if (isValidRegex(this.filSn)) + { + var r = new RegExp(this.filSn); + if (r.test(obj['sn'].toLowerCase()) === false) { return false; } + } + else + { + if (obj['desc'].toLowerCase().indexOf(this.filSn) == -1) { return false; } + } + } + } + if (this.filUnit !== "") + { + if (typeof obj['unit'] != 'undefined') + { + if (obj['unit'] === "") { return false; } + if (isValidRegex(this.filUnit)) + { + var r = new RegExp(this.filUnit); + if (r.test(obj['unit'].toLowerCase()) === false) { return false; } + } + else + { + if (obj['unit'].toLowerCase().indexOf(this.filUnit) == -1) { return false; } + } + } + } + + if (this.filTime !== "") + { + if (typeof obj['time'] != 'undefined') + { + if (obj['time'] === "") { return false; } + if (obj['time'].toLowerCase().indexOf(this.filTime) == -1) { return false; } + } + } + + if (this.filDate !== "") + { + if (typeof obj['date'] != 'undefined') + { + if (obj['date'] === "") { return false; } + if (obj['date'].toLowerCase().indexOf(this.filDate) == -1) { return false; } + } + } + if (this.filChnLink !== "") + { + if (obj['chn'] === "") { return false; } + if (isValidRegex(this.filChnLink)) + { + var r = new RegExp(this.filChnLink); + if (r.test(obj['chn'].toLowerCase()) === false) { return false; } + } + else + { + if (obj['chn'].toLowerCase().indexOf(this.filChnLink) == -1) { return false; } + } + } +/* + if (this.filVarTypes !== "") + { + } +*/ + if (this.bSend != this.bRec) { + if (this.bSend) { + if (obj['fltOpts']['iCat'] == 2) + return false; + } + if (this.bRec) { + if (obj['fltOpts']['iCat'] == 1) + return false; + } + } + if (this.bStd != this.bSafe) { + if (this.bStd) { + if (obj['fltOpts']['iTrans'] === true) { return false; } + } + if (this.bSafe) { + if (obj['fltOpts']['iTrans'] === false) { return false; } + } + } + if (this.fltObjType == FLT_OBJ_TYP_VARS) { + if (this.varTypeFilterSet()) { + var bRet = false; + if (this.bTypeLogic) { + if ((obj['type'] == "bool") || (obj['type'] == "boolean") ) { bRet = true; } + } + if (this.bTypeValueList) { + if (obj['type'] == "enum") + { + if (!bRet) { bRet = true; } + } + } + if (this.bTypeNumber) { + if (obj['type'] == "generic") + { + if (!bRet) { bRet = true; } + } + } + if (this.bTypeAlarm) { + if (obj['type'] == "alarm") + { + if (!bRet) { bRet = true; } + } + } + if (this.bTypeString) { + if (obj['type'] == "string") + { + if (!bRet) { bRet = true; } + } + } + return bRet; + } + } + if (this.bColLeft != this.bColCenter) { + if (this.bColLeft) { + if (obj['colpos'] == 1) { return false; } + } + if (this.bColCenter) { + if (obj['colpos'] == 0) { return false; } + } + } + if (this.bNameLeft != this.bNameTop) { + if (this.bNameLeft) { + if (obj['namepos'] == 1) { return false; } + } + if (this.bNameTop) { + if (obj['namepos'] == 0) { return false; } + } + } + if (this.bPC){ + if (!obj['devPC']) { return false; } + } + if (this.bPDA) { + if (!obj['devPDA']) { return false; } + } + if (this.bCentral) { + if (!obj['devCentral']) { return false; } + } + if (this.filUsers) { + bFound = false; + arF = this.filUsers.split('\t'); + arO = obj['users'].split('\t'); + for (i = 0; i < arF.length; i++) { + if (!bFound) { + for (x = 0; x < arO.length; x++) { + if (arF[i] == arO[x]) { + bFound = true; + break; + } + } + } + } + if (!bFound) + return false; + } + return true; + }, + + varTypeFilterSet: function() { + if (this.bTypeLogic) return true; + if (this.bTypeValueList) return true; + if (this.bTypeNumber) return true; + if (this.bTypeAlarm) return true; + if (this.bTypeString) return true; + return false; + }, + + isFilterId: function(id, fId) + { + var i; + var rIds; + var fIds; + + switch(fId) + { + case FIL_ROOMS: + rIds = this.filRooms.split('\t'); + for(i = 0; i < rIds.length; i++) { + if (rIds[i] == id) { return true; } + } + return false; + case FIL_FUNCS: + fIds = this.filFuncs.split('\t'); + for(i = 0; i < fIds.length; i++) { + if (fIds[i] == id) { return true; } + } + return false; + case FIL_USERS: + fIds = this.filUsers.split('\t'); + for(i = 0; i < fIds.length; i++) { + if (fIds[i] == id) { return true; } + } + return false; + default: + return false; + } + }, + + clearFilters: function(id, ftType) + { +// var url = "/esp/system.htm?sid="+SessionId; +// var pb = 'string action = "clearFilter";'; +// pb += 'string sPageId = "' + this.pageID + '";'; +// var opt = +// { +// postBody: ReGa.encode(pb), +// onSuccess: function(t) +// { +// conInfo( t.responseText ); +// } +// } +// new Ajax.Request(url, opt); + + this.filRooms = ""; + this.filFuncs = ""; + this.filType = ""; + this.filDesc = ""; + this.filSn = ""; + this.filName = ""; + this.filUnit = ""; + this.filChnLink = ""; + this.filVarTypes = ""; + this.filTime = ""; + this.filDate = ""; + this.bSend = false; + this.bRec = false; + this.bStd = false; + this.bSafe = false; + this.bColLeft = false; + this.bColCenter = false; + this.bNameLeft = false; + this.bNameTop = false; + this.bPC = false; + this.bPDA = false; + this.bCentral = false; + this.filUsers = ""; + this.bTypeLogic = false; + this.bTypeValueList = false; + this.bTypeNumber = false; + this.bTypeAlarm = false; + this.bTypeString = false; + localStorage.removeItem('iseSFilters_' + this.pageID); + var filterButtons = document.querySelectorAll('.FilterSetButton[onclick*=' + this.pageID + ']'); + filterButtons.forEach(function(el) { + try { + el.parentElement.parentElement.querySelector('.FilterBtn').style.color = ''; + } catch(e) { + console.error(e); + } + }); + conInfo("Alle Filter wurden zurückgesetzt."); + } +}; + +/* * * * * * * * * * * * * HILFS-FUNKTIONEN * * * * * * * * * * * * * * */ + +// Prüft anhand der filterOptions ob Checkboxen in Submenüs gesetzt werden sollen +selectFilters = function(fltObj, divToShow) +{ + var i; + var inplist; + + switch(divToShow) { + case "btnFilterRoomSub": + inplist = $("btnFilterRoomSub").getElementsByTagName('input'); + for (i = 0; i < inplist.length; i++) { + var roomId = parseInt(inplist[i].id.substr(2)); + inplist[i].checked = fltObj.isFilterId(roomId, FIL_ROOMS); + } + break; + case "btnFilterFuncSub": + inplist = $("btnFilterFuncSub").getElementsByTagName('input'); + for (i = 0; i < inplist.length; i++) { + var funcId = parseInt(inplist[i].id.substr(2)); + inplist[i].checked = fltObj.isFilterId(funcId, FIL_FUNCS); + } + break; + case "btnFilterVarTypeSub": + $("cbLogic").checked = fltObj.bTypeLogic; + $("cbValueList").checked = fltObj.bTypeValueList; + $("cbNumber").checked = fltObj.bTypeNumber; + $("cbAlarm").checked = fltObj.bTypeAlarm; + $("cbString").checked = fltObj.bTypeString; + break; + case "btnFilterIfaceSub": + $("cbSend").checked = fltObj.isFilterType(FIL_IFACE_S); + $("cbRec").checked = fltObj.isFilterType(FIL_IFACE_R); + break; + case "btnFilterModeSub": + $("cbSafe").checked = fltObj.isFilterType(FIL_MODE_AES); + $("cbStd").checked = fltObj.isFilterType(FIL_MODE_STD); + break; + case "btnFilterNameSub": + $("ftName").value = fltObj.filName; + break; + case "btnFilterTypeSub": + $("ftType").value = fltObj.filType; + break; + case "btnFilterDescSub": + $("ftDesc").value = fltObj.filDesc; + break; + case "btnFilterSNSub": + $("ftSN").value = fltObj.filSn; + break; + case "btnFilterTimeSub": + $("ftTime").value = fltObj.filTime; + break; + case "btnFilterDateSub": + $("ftDate").value = fltObj.filDate; + break; + case "btnFilterColPos": + $("cbColLeft").checked = fltObj.bColLeft; + $("cbColCenter").checked = fltObj.bColCenter; + break; + case "btnFilterNamePos": + $("cbNameLeft").checked = fltObj.bNameLeft; + $("cbNameTop").checked = fltObj.bNameTop; + break; + case "btnFilterEndDev": + $("cbPC").checked = fltObj.bPC; + $("cbPDA").checked = fltObj.bPDA; + $("cbCentral").checked = fltObj.bCentral; + break; + case "btnFilterUsersSub": + inplist = $("btnFilterUsersSub").getElementsByTagName('input'); + for (i = 0; i < inplist.length; i++) { + var userId = parseInt(inplist[i].id.substr(2)); + inplist[i].checked = fltObj.isFilterId(userId, FIL_USERS); + } + break; + case "btnFilterChn": + $("ftChn").value = fltObj.filChnLink; + break; + default: + break; + } +}; + + +iseSFilterCheckEnterEsc = function(keyCode, idSet, idCancel) +{ + switch (keyCode) { + case 13: + // Set the filter -- press ok + jQuery("#"+ idSet).click(); + break; + case 27: + jQuery("#"+ idCancel).click(); + break; + default: + break; + } +}; + +// Freitext-Filter +setSFilter = function(fltObj, ctrlId, fId) +{ + //conInfo("iseFilter: setSFilter "+fId+" to "+$(ctrlId).value); + fltObj.addStringFilter(fId, $(ctrlId).value); + try { + var iseFilters = JSON.parse(localStorage.getItem('iseSFilters_' + fltObj.pageID)) || {}; + iseFilters[ctrlId] = $(ctrlId).value; + localStorage.setItem('iseSFilters_' + fltObj.pageID, JSON.stringify(iseFilters)); + $(ctrlId).parentElement.previous().style.color = $(ctrlId).value ? 'red' : 'black'; + } catch(e) { console.error(e); } +}; + +// Integer-Filter (Modus, Iface) +setIFilter = function(fltObj, sId) +{ + switch (sId) + { + case "mode": + fltObj.saveModeFilter($("cbStd").checked, $("cbSafe").checked); + break; + case "iface": + fltObj.saveIfaceFilter($("cbSend").checked, $("cbRec").checked); + break; + default: + break; + } +}; + +// ID-Filter (rooms, funcs) +setAFilter = function(fltObj, sId) +{ + var sTmp = ""; + var inplist; + var i; + + switch(sId) { + case "rooms": + inplist = $("btnFilterRoomSub").getElementsByTagName('input'); + for (i = 0; i < inplist.length; i++) { + var roomId = parseInt(inplist[i].id.substr(2)); + if (inplist[i].checked) + sTmp += roomId + "\t"; + } + sTmp = sTmp.substr(0, sTmp.length - 1); + fltObj.addStringFilter(FIL_ROOMS, sTmp); + break; + case "funcs": + inplist = $("btnFilterFuncSub").getElementsByTagName('input'); + for (i = 0; i < inplist.length; i++) { + var funcId = parseInt(inplist[i].id.substr(2)); + if (inplist[i].checked) + sTmp += funcId + "\t"; + } + sTmp = sTmp.substr(0, sTmp.length - 1); + fltObj.addStringFilter(FIL_FUNCS, sTmp); + break; + case "vartypes": + fltObj.bTypeLogic = $("cbLogic").checked; + fltObj.bTypeValueList = $("cbValueList").checked; + fltObj.bTypeNumber = $("cbNumber").checked; + fltObj.bTypeAlarm = $("cbAlarm").checked; + fltObj.bTypeString = $("cbString").checked; + break; + case "colPos": + fltObj.bColLeft = $("cbColLeft").checked; + fltObj.bColCenter = $("cbColCenter").checked; + break; + case "namePos": + fltObj.bNameLeft = $("cbNameLeft").checked; + fltObj.bNameTop = $("cbNameTop").checked; + break; + case "endDev": + fltObj.bPC = $("cbPC").checked; + fltObj.bPDA = $("cbPDA").checked; + fltObj.bCentral = $("cbCentral").checked; + break; + case "users": + inplist = $("btnFilterUsersSub").getElementsByTagName('input'); + for (i = 0; i < inplist.length; i++) { + var userId = parseInt(inplist[i].id.substr(2)); + if (inplist[i].checked) + sTmp += userId + "\t"; + } + sTmp = sTmp.substr(0, sTmp.length - 1); + fltObj.addStringFilter(FIL_USERS, sTmp); + break; + default: + break; + } +}; + +filterBtn = function(id) { + if ($(id)) + $(id).style.backgroundColor = WebUI.getColor("clickable"); +}; + +filterBtnSelected = function(id) { + if ($(id)) + $(id).style.backgroundColor = WebUI.getColor("active"); +}; + +colorFilterBtns = function(fltObj) +{ + if (fltObj.filName !== "") filterBtnSelected('btnFilterName'); + else filterBtn('btnFilterName'); + if (fltObj.filType !== "") filterBtnSelected('btnFilterType'); + else filterBtn('btnFilterType'); + if (fltObj.filDesc !== "") filterBtnSelected('btnFilterDesc'); + else filterBtn('btnFilterDesc'); + if (fltObj.filSn !== "") filterBtnSelected('btnFilterSN'); + else filterBtn('btnFilterSN'); + if (fltObj.filRooms !== "") filterBtnSelected('btnFilterRoom'); + else filterBtn('btnFilterRoom'); + if (fltObj.filFuncs !== "") filterBtnSelected('btnFilterFunc'); + else filterBtn('btnFilterFunc'); + if (fltObj.bSend||fltObj.bRec) filterBtnSelected('btnFilterIface'); + else filterBtn('btnFilterIface'); + if (fltObj.bStd||fltObj.bSafe) filterBtnSelected('btnFilterMode'); + else filterBtn('btnFilterMode'); + if (fltObj.varTypeFilterSet()) filterBtnSelected('btnFilterVarType'); + else filterBtn('btnFilterVarType'); + if (fltObj.filTime !== "") filterBtnSelected('btnFilterTime'); + else filterBtn('btnFilterTime'); + if (fltObj.filDate !== "") filterBtnSelected('btnFilterDate'); + else filterBtn('btnFilterDate'); + if (fltObj.bColLeft) filterBtnSelected('btnFilterColPos'); + else filterBtn('btnFilterColPos'); + if (fltObj.bColCenter) filterBtnSelected('btnFilterColPos'); + else filterBtn('btnFilterColPos'); + if (fltObj.bNameLeft) filterBtnSelected('btnFilterNamePos'); + else filterBtn('btnFilterNamePos'); + if (fltObj.bNameTop) filterBtnSelected('btnFilterNamePos'); + else filterBtn('btnFilterNamePos'); + if (fltObj.filChnLink !== "") filterBtnSelected('btnFilterChn'); + else filterBtn('btnFilterChn'); + +}; +/** + * ise/iseButtonsSwitch.js + **/ + +/** + * @fileOverview ? + * @author ise + **/ + +/** + * @class + **/ +iseButtonsSwitch = Class.create(); + +iseButtonsSwitch.prototype = { + /* + * id = datapoint-ID of switch + * initState = Creation State (0 or 1) + * idDpState = id of state-DP + */ + initialize: function(id, initState, idDpState, iViewOnly, chnAddress, chnLabel, iFace) { + this.id = id; + this.state = initState; + this.divOn = $(this.id + "On"); + this.divOff = $(this.id + "Off"); + this.idDpState = idDpState; + this.chnAddress = chnAddress; + this.chnLabel = chnLabel; + this.iFace = iFace; + this.HmIPInterfaceID = "HmIP-RF"; + this.labelGarageDoorController = "HmIP-WGC"; + this.labelVIR_LG_ONOFF = "VIR-LG-ONOFF"; + this.labeldrgDali = "HmIP-DRG-DALI"; + + this.garageDoorControllerOnTime = 0.5; + + if (initState) { ControlBtn.on(this.divOn); } + else { ControlBtn.on(this.divOff); } + + // Add event handlers + if (iViewOnly === 0) + { + this.clickOff = this.onClickOff.bindAsEventListener(this); + Event.observe(this.divOff, 'mousedown', this.clickOff); + + this.clickOn = this.onClickOn.bindAsEventListener(this); + Event.observe(this.divOn, 'mousedown', this.clickOn); + } + }, + + onClickOff: function() { + ControlBtn.pushed(this.divOff); + //this.state = false; + if ((this.chnLabel != this.labelVIR_LG_ONOFF) && (this.chnLabel != this.labeldrgDali)) { + setDpState(this.idDpState, 0, true); + } else { + setDpState(this.idDpState,0); + } + var t = this; + new PeriodicalExecuter(function(pe) { + t.refresh(); + pe.stop(); + }, 1); + }, + + onClickOn: function() { + ControlBtn.pushed(this.divOn); + if (this.chnLabel != this.labelGarageDoorController) { + if ((this.chnLabel != this.labelVIR_LG_ONOFF) && (this.chnLabel != this.labeldrgDali)) { + setDpState(this.idDpState, 1, true); + } else { + setDpState(this.idDpState,1); + } + } else { + homematic("Interface.putParamset",{'interface': this.HmIPInterfaceID, 'address' : this.chnAddress, 'paramsetKey' : 'VALUES', 'set': + [ + {name:'ON_TIME', type: 'double', value: this.garageDoorControllerOnTime}, + {name:'STATE', type: 'bool', value: true} + ] + },function(result){conInfo(result);}); + } + var t = this; + new PeriodicalExecuter(function(pe) { + t.refresh(); + pe.stop(); + }, 1); + }, + + + refresh: function() { + if (this.state) { + ControlBtn.on(this.divOn); + ControlBtn.off(this.divOff); + } + else { + ControlBtn.off(this.divOn); + ControlBtn.on(this.divOff); + } + } +}; + +/** + * @class + **/ +iseButtonsKey = Class.create(); + +iseButtonsKey.prototype = { + /* + * id = datapoint-ID of switch + */ + initialize: function(id, shortId, longId, iViewOnly) { + this.id = id; + this.divShort = $(this.id + "Short"); + this.divLong = $(this.id + "Long"); + this.shortId = shortId; + this.longId = longId; + + if( this.divShort ) { ControlBtn.off(this.divShort); } + if( this.divLong ) { ControlBtn.off(this.divLong); } + + // Add event handlers + if (iViewOnly === 0) + { + if (this.divShort) { + this.clickShort = this.onClickShort.bindAsEventListener(this); + Event.observe(this.divShort, 'mousedown', this.clickShort); + } + if (this.divLong) { + this.clickLong = this.onClickLong.bindAsEventListener(this); + Event.observe(this.divLong, 'mousedown', this.clickLong); + } + } + }, + + onClickShort: function() { + setDpState(this.shortId, 1); + ControlBtn.pushed(this.divShort); + $("btn" + this.shortId + "s").src = "/ise/img/btn_press.png"; + var t = this; + new PeriodicalExecuter(function(pe) { + ControlBtn.off(t.divShort); + $("btn" + t.shortId + "s").src = "/ise/img/btn_no_press.png"; + pe.stop(); + }, 1); + }, + + onClickLong: function() { + setDpState(this.longId, 1); + ControlBtn.pushed(this.divLong); + $("btn" + this.longId + "l").src = "/ise/img/btn_press.png"; + var t = this; + new PeriodicalExecuter(function(pe) { + ControlBtn.off(t.divLong); + $("btn" + t.longId + "l").src = "/ise/img/btn_no_press.png"; + pe.stop(); + }, 1); + } +}; + +/** + * @class + **/ +iseButtonProg = Class.create(); +iseButtonProg.prototype = { + initialize: function(id, progActive, thenOnly) { + this.id = id; + this.progActive = progActive; + + this.startBtn = (thenOnly === true) ? $(id + "StartThenOnly") : $(id + "Start"); + this.actBtn = $(id + "Act"); + + this.thenOnly = thenOnly; + + if ( progActive ) { ControlBtn.on(this.actBtn); } + + // Add event handlers + this.clickStart = this.onClickStart.bindAsEventListener(this); + Event.observe(this.startBtn, 'mousedown', this.clickStart); + }, + + onClickStart: function() + { + ControlBtn.pushed(this.startBtn); + ExecuteProgram(this.id, this.thenOnly); + var t = this; + new PeriodicalExecuter(function(pe) + { + ControlBtn.off(t.startBtn); + pe.stop(); + }, 1); + } +}; + +/** + * @class + **/ +iseButtonsEvent = Class.create(); +iseButtonsEvent.prototype = { + /* + * id = datapoint-ID of Event + */ + initialize: function(id, eventId, iViewOnly) { + this.id = id; + this.divEvent = $(this.id + "event"); + this.eventId = eventId; + + if( this.divEvent ) { ControlBtn.off(this.divEvent); } + + // Add event handlers + if (iViewOnly === 0) + { + this.clickEvent = this.onClickEvent.bindAsEventListener(this); + Event.observe(this.divEvent, 'mousedown', this.clickEvent); + } + }, + + onClickEvent: function() { + setDpState(this.eventId, 1); + ControlBtn.pushed(this.divEvent); + $("btn" + this.id + "s").src = "/ise/img/btn_press.png"; + var t = this; + new PeriodicalExecuter(function(pe) { + ControlBtn.off(t.divEvent); + $("btn" + t.id + "s").src = "/ise/img/btn_no_press.png"; + pe.stop(); + }, 1); + } + +};/** + * ise/iseButtonsDimmer.js + **/ + +/** + * @fileOverview ? + * @author ise + **/ + +/** + * @class + **/ +iseButtonsDimmer = Class.create(); + +iseButtonsDimmer.prototype = { + /* + * id = DOM-ID of switch + * initState = Creation State + */ + initialize: function(id, initState, lvlDP, oldLvlDP, iViewOnly, bSliderPosFlag, label) + { + conInfo( "iseDimmer: initialize()" ); + this.id = id; + this.state = initState; + this.lvlDP = lvlDP; + this.oldLvlDP = oldLvlDP; + // For some new devices (OSRAM-Lightify e. g.) we don`t know the state of the button + // so we treat the On/Off button as a push-button instead of a switch. + this.OnOffEqualsSwitch = (isNonCCUDevice(label)) ? false : true; + + + if(bSliderPosFlag) + { + this.bSliderPosFlag = bSliderPosFlag; + } + else + { + this.bSliderPosFlag = false; + } + this.slider = new sliderControl("dimmer", this.id, initState, iViewOnly,this.bSliderPosFlag); + + this.hasRampClicked = false; + + this.txtPerc = $(this.id + "Perc"); + + // Add event handlers + if (iViewOnly === 0) + { + this.mouseOut = this.onMouseOut.bindAsEventListener(this); + //Event.observe($("slidCtrl" + this.id), 'mouseout', this.mouseOut); + Event.observe($("slidCtrl" + this.id), 'mouseleave', this.mouseOut); + + this.rampClick = this.onRampClick.bindAsEventListener(this); + Event.observe(this.slider.e_base, 'mousedown', this.rampClick); + + this.handleClick = this.onHandleClick.bindAsEventListener(this); + Event.observe($("slidCtrl" + this.id), 'mouseup', this.handleClick); + + this.clickUp = this.onClickUp.bindAsEventListener(this); + Event.observe($(this.id + "Up"), 'click', this.clickUp); + + this.clickDown = this.onClickDown.bindAsEventListener(this); + Event.observe($(this.id + "Down"), 'click', this.clickDown); + + if (this.oldLvlDP >= 1 ) { + this.clickOn = this.onClickOn.bindAsEventListener(this); + Event.observe($(this.id + "On"), 'mousedown', this.clickOn); + } else { + this.clickOn = this.onClickOnA.bindAsEventListener(this); + Event.observe($(this.id + "On"), 'mousedown', this.clickOn); + } + this.clickOff = this.onClickOff.bindAsEventListener(this); + Event.observe($(this.id + "Off"), 'mousedown', this.clickOff); + + this.percChange = this.onPercChange.bindAsEventListener(this); + Event.observe($(this.id + "Perc"), 'change', this.percChange); + } + this.refresh(false); + }, + + onMouseOut: function(event) + { + var self = this; + var e = event; + if (!e) { e = window.event; } + var relTarg = e.relatedTarget || e.fromElement; + if( relTarg ) + { + var b1 = (relTarg.id.indexOf("slider")!=-1); + var b2 = (relTarg.id.indexOf("base")!=-1); + var b3 = (relTarg.id.indexOf("green")!=-1); + if( !b1 && !b2 && !b3 ) + { + if( this.hasRampClicked ) + { + conInfo( "iseDimmer: onMouseOut() ["+relTarg.id+"]" ); + this.hasRampClicked = false; + window.setTimeout(function() { + self.state = self.slider.n_value; + self.refresh(); + },100); + } + } + } + }, + + onRampClick: function(ev) + { + conInfo( "iseDimmer: onRampClick()" ); + this.hasRampClicked = true; + var pos = Position.page(this.slider.e_base); + var offset = ev.clientX - pos[0]; + var val = ( offset * 100 ) / this.slider.n_controlWidth; + var oldstate = parseInt(this.state); + this.state = Math.floor(val); + if (this.state < (oldstate-3)) + { + this.slider.f_setValue(val); + } + else if (this.state > (oldstate+3)) + { + this.slider.f_setValue(val); + } + //conInfo("setting Dimmer DP "+this.lvlDP+" State --> " + this.state + " -- old State --> "+oldstate); + //window.setTimeout("ibd"+this.id+".refresh()",1000); + }, + + onHandleClick: function() + { + conInfo( "iseDimmer: onHandleClick()" ); + this.state = this.txtPerc.value; + this.refresh(); + }, + + onClickUp: function() + { + conInfo( "iseDimmer: onClickUp()" ); + this.state = this.slider.n_value; + this.state += 10; + if (this.state > 100) + { + this.state = 100; + } + this.refresh(); + }, + + onClickDown: function() + { + conInfo( "iseDimmer: onClickDown()" ); + this.state = this.slider.n_value; + this.state -= 10; + if (this.state < 0) + this.state = 0; + this.refresh(); + }, + + onClickOn: function() + { + conInfo( "iseDimmer: onClickOn()" ); + var url = "/esp/channels.htm?sid=" + SessionId; + var pb = "integer chnId = "+this.id+";"; + pb += "string action = 'dimmerOldVal';"; + var t = this; + new PeriodicalExecuter(function(pe) + { + if( t.state > 0 ) + { + if( $(t.id + "On") ) { ControlBtn.on($(t.id + "On")); } + if( $(t.id + "Off") ) {ControlBtn.off($(t.id + "Off")); } + } + else + { + if( $(t.id + "On") ) { ControlBtn.off($(t.id + "On")); } + if( $(t.id + "Off") ) { ControlBtn.on($(t.id + "Off")); } + } + pe.stop(); + }, 1); + var opts = + { + postBody: ReGa.encode(pb), + onComplete: function(resp) + { + t.refresh(false); + } + }; + new Ajax.Request(url, opts); + ControlBtn.pushed($(this.id + "On")); + }, + + onClickOnA: function() + { + conInfo( "iseDimmer: onClickOnA()" ); + var t = this; + if (this.OnOffEqualsSwitch) { + new PeriodicalExecuter(function (pe) { + if (t.state > 0) { + if ($(t.id + "On")) { + ControlBtn.on($(t.id + "On")); + } + if ($(t.id + "Off")) { + ControlBtn.off($(t.id + "Off")); + } + } + else { + if ($(t.id + "On")) { + ControlBtn.off($(t.id + "On")); + } + if ($(t.id + "Off")) { + ControlBtn.on($(t.id + "Off")); + } + } + pe.stop(); + }, 1); + } + setDpState(this.lvlDP, 1); + ControlBtn.pushed($(this.id + "On")); + + if (! this.OnOffEqualsSwitch) { + window.setTimeout(function() {ControlBtn.off( $(t.id + "On") );},1000); + } + + }, + + onClickOff: function() + { + conInfo( "iseDimmer: onClickOff()" ); + var t = this; + if (this.OnOffEqualsSwitch) { + new PeriodicalExecuter(function (pe) { + if (t.state > 0) { + if ($(t.id + "On")) { + ControlBtn.on($(t.id + "On")); + } + if ($(t.id + "Off")) { + ControlBtn.off($(t.id + "Off")); + } + } + else { + if ($(t.id + "On")) { + ControlBtn.off($(t.id + "On")); + } + if ($(t.id + "Off")) { + ControlBtn.on($(t.id + "Off")); + } + } + pe.stop(); + }, 1); + } + setDpState(this.lvlDP, 0); + ControlBtn.pushed($(this.id + "Off")); + + if (! this.OnOffEqualsSwitch) { + window.setTimeout(function() {ControlBtn.off( $(t.id + "Off") );},1000); + } + + }, + + + onPercChange: function() + { + conInfo( "iseDimmer: onPercChange()" ); + if( isNaN(this.txtPerc.value) ) return; + if( parseInt(this.txtPerc.value) > 100 ) this.txtPerc.value = 100; + if( parseInt(this.txtPerc.value) < 0 ) this.txtPerc.value = 0; + this.state = this.txtPerc.value; + this.refresh(); + }, + + update: function(newVal) + { + conInfo( "iseDimmer: update()" ); + this.state = newVal; + this.refresh(newVal); + }, + + refresh: function(setstate) + { + conInfo( "iseDimmer: refresh()" ); + var self = this; + this.slider.f_setValue(this.state, true); + this.txtPerc.value = this.state; + + if (this.OnOffEqualsSwitch) { + + window.setTimeout(function() { + if (self.state > 0) { + ControlBtn.on($(self.id + "On")); + ControlBtn.off($(self.id + "Off")); + } else { + ControlBtn.off($(self.id + "On")); + ControlBtn.on($(self.id + "Off")); + } + },1000); + + } else { + // This is for devices without a state, e. g. OSRAM-Lightify + ControlBtn.off($(this.id + "On")); + ControlBtn.off($(this.id + "Off")); + } + if(typeof setstate == "undefined") + { + conInfo("setting Dimmer DP "+this.lvlDP+" State -------> " + this.state); + setDpState(this.lvlDP, (this.state / 100)); + } + } +}; +/** + * ise/iseThermostat.js + **/ + +/** + * @fileOverview ? + * @author ise + **/ + + /** + * @class + **/ +iseThermostat = Class.create(); + +iseThermostat.prototype = { + /* + * id = DOM-ID of switch + * initState = Creation State + */ + initialize: function(id, initState, lvlDP, min, max, iViewOnly, bSliderPosFlag, opts) + { + conInfo( "iseThermostat: initialize()" ); + conInfo ("value(: " + initState + ") min(" + min + ") max(" + max + ")"); + this.id = id; + this.state = initState; + this.lvlDP = lvlDP; + this.min = min; + this.max = max; + this.factor = 100/(max-min); + this.unit = " °C"; + this.statusOFF = "OFF"; + this.statusON = "ON"; + this.opts = opts; + if(bSliderPosFlag) + { + this.bSliderPosFlag = bSliderPosFlag; + } + else + { + this.bSliderPosFlag = false; + } + // AG this.slider = new sliderControl( "thermo", this.id, initState, iViewOnly, this.bSliderPosFlag,this.min, this.max, this.factor, this.unit); + this.slider = new sliderControl( "thermo", this.id, this.state, iViewOnly, this.bSliderPosFlag,this.min, this.max, this.factor, this.unit); + this.hasRampClicked = false; + this.txtDeg = $(this.id + "Deg"); + this.unitDegree = $(this.id + "unitDegree"); + // Add event handlers + if (iViewOnly === 0) + { + this.mouseOut = this.onMouseOut.bindAsEventListener(this); + Event.observe($("slidCtrl" + this.id), 'mouseout', this.mouseOut); + + this.rampClick = this.onRampClick.bindAsEventListener(this); + Event.observe(this.slider.e_base, 'mousedown', this.rampClick); + + this.handleClick = this.onHandleClick.bindAsEventListener(this); + Event.observe($("slidCtrl" + this.id), 'mouseup', this.handleClick); + + this.clickUp = this.onClickUp.bindAsEventListener(this); + Event.observe($(this.id + "Up"), 'click', this.clickUp); + + this.clickDown = this.onClickDown.bindAsEventListener(this); + Event.observe($(this.id + "Down"), 'click', this.clickDown); + + this.percChange = this.onPercChange.bindAsEventListener(this); + Event.observe($(this.id + "Deg"), 'change', this.percChange); + + this.init2ndGen(); + } + this.refresh(false); + }, + + init2ndGen: function() {}, + + onMouseOut: function(event) + { + var e = event; + if (!e) { e = window.event; } + var relTarg = e.relatedTarget || e.fromElement; + if( relTarg ) + { + var b1 = (relTarg.id.indexOf("slider")!=-1); + var b2 = (relTarg.id.indexOf("base")!=-1); + var b3 = (relTarg.id.indexOf("green")!=-1); + var b4 = (relTarg.id.indexOf("spec")!=-1); + if( !b1 && !b2 && !b3 && !b4) + { + if( this.hasRampClicked ) + { + conInfo( "iseThermostat: onMouseOut() ["+relTarg.id+"], wanna set: " + ( (this.slider.n_value/this.factor) + this.min) ); + this.hasRampClicked = false; + + this.state = (this.slider.n_value/this.factor) + this.min; + this.refresh(); + } + } + } + }, + + onRampClick: function(ev) + { + this.hasRampClicked = true; + var pos = Position.page(this.slider.e_base); + var offset = ev.clientX - pos[0]; + var val = ( offset * 100 ) / this.slider.n_controlWidth; + this.slider.f_setValue(val); + this.state = (Math.floor(val)/ this.factor) + this.min; + conInfo( "iseThermostat: onRampClick() at ("+val + ") set-> " + this.state ); + // this.refresh(); + //window.setTimeout("ibd"+this.id+".refresh()",1000); + }, + + onHandleClick: function() + { + conInfo( "iseThermostat: onHandleClick() deg: " + this.txtDeg.value); + this.hasRampClicked = false; + this.state = this.txtDeg.value; + //this.refresh(); + + if(this.state < this.min){ this.state = this.min; } + if (this.state > this.max) this.state = this.max; + conInfo("onHandleClick - setting DP "+this.lvlDP+" State -------> " + this.state); + setDpState(this.lvlDP, (this.state)); + }, + + onClickUp: function() + { + conInfo( "iseThermostat: onClickUp()" ); + // this.state = (this.slider.n_value/this.factor); + this.state = Math.round(this.state + 1); + if (this.state > this.max) + this.state = this.max; + + this.refresh(); + }, + + onClickDown: function() + { + conInfo( "iseThermostat: onClickDown()" ); + // this.state = (this.slider.n_value/this.factor); + this.state = Math.round(this.state - 1); + if (this.state < this.min) + this.state = this.min; + + this.refresh(); + }, + + onPercChange: function() + { + conInfo( "iseThermostat: onPercChange()" ); + if( isNaN(this.txtDeg.value) ) return; + if( parseInt(this.txtDeg.value) > this.max ) this.txtDeg.value = this.max; + if( parseInt(this.txtDeg.value) < this.min ) this.txtDeg.value = this.min; + this.state = this.txtDeg.value; + this.refresh(); + }, + + update: function(newVal) + { + conInfo( "iseThermostat: update()" ); + this.state = newVal; + this.refresh(newVal); + }, + + hideUnitDegree: function() + { + if (this.unitDegree != null) { + this.unitDegree.hide(); + } + }, + + refresh: function(setstate) + { + conInfo( "iseThermostat: refresh()"+this.state ); + if(this.state < 0){ this.state = 0; } + if (this.state > this.max) this.state = this.max; + this.slider.f_setValue((this.state -this.min) * this.factor, true); + switch (this.state) { + case 4.5: + this.txtDeg.value = this.statusOFF; + this.hideUnitDegree(); + break; + case 30.5: + this.txtDeg.value = this.statusON; + this.hideUnitDegree(); + break; + default: + this.txtDeg.value = round(this.state, 1); + if(this.unitDegree != null) { + this.unitDegree.show(); + } + } + if(typeof setstate == "undefined") + { + conInfo("setting DP "+this.lvlDP+" State -------> " + this.state); + setDpState(this.lvlDP, (this.state)); + } + } +}; + +iseThermostat_2ndGen = Class.create(iseThermostat, { + + init2ndGen: function() { + conInfo("2nd Generation"); + conInfo(this.opts); + this.level = parseFloat(this.opts.stLevel); + this.activeMode = this.opts.stControlMode; // stControlMode = 0 - 3 / AUTO, MANU, HOLIDAY, BOOST + this.inputDegree = $(this.id + "Deg"); + this.btnHeatingUncertain = $(this.id + "HeatingModeUncertain"); + this.btnHeatingON = $(this.id + "modeON"); + this.btnHeatingOFF = $(this.id + "modeOFF"); + this.btnModeAuto = $(this.id + "mode0"); + this.btnModeManu = $(this.id + "mode1"); + this.btnModeParty = $(this.id + "mode2"); + this.btnModeBoost = $(this.id + "mode3"); + this.btnTempComfort = $(this.id + "tempCOMFORT"); + this.btnTempEco = $(this.id + "tempECO"); + this.chn = homematic("Device.get",{"id": this.id}); + + if (this.opts.stTemp) { + this.showActualTemp(); + } + if (this.opts.stHum) { + this.showActualHumidity(); + } + if (this.opts.stBat) { + this.showActualBat(); + } + if (this.opts.stValve !== null) { + this.showActualValve(); + } + if (this.opts.idComfort && this.opts.idLowering) { + this.showComfortEco(); + } + if (this.opts.idAuto && this.opts.idManu && this.opts.idBoost) { + this.showChangeMode(); + } + + if (this.opts.idPartyTemp) { + this.showPartyMode(); + } + + this.showOnOff(); + + // opts.stPartyStartTime and opts.stPartyStopTime will be overwritten here because ReGa is setting this values wrong. + // This seems to be a 8 bit problem. ReGa sets a real value of 300 (5 hours since midnight ) e. g. to 44 which equals 300 - 256 + // As a result the party mode dialog will show a time of AM 5:00 as AM 0:44 + this.opts.stPartyStartTime = homematic("Interface.getValue", {'interface': this.chn["interface"], 'address' : this.chn["address"], 'valueKey': 'PARTY_START_TIME'}); + this.opts.stPartyStopTime = homematic("Interface.getValue", {'interface': this.chn["interface"], 'address' : this.chn["address"], 'valueKey': 'PARTY_STOP_TIME'}); + + if (this.activeMode == 2) { + // Holiday mode active + this.showHolidayEndTime(); + } + try { + this.initButtons(); + this.bindEvents(); + } catch (e) {} + }, + + initButtons: function() { + this.initOnOffBtn(); + this.setActiveMode(); + }, + + initOnOffBtn: function() { + + if (this.level < 4.5 || this.level > 30.5) { + //ControlBtn.on(this.btnHeatingUncertain); + ControlBtn.off(this.btnHeatingON); + ControlBtn.off(this.btnHeatingOFF); + this.clearDegree(); + return; + } + + if (this.level < 5.0) { + ControlBtn.on(this.btnHeatingOFF); + ControlBtn.off(this.btnHeatingON); + this.clearDegree(); + } else if (this.level > 30.0) { + ControlBtn.on(this.btnHeatingON); + ControlBtn.off(this.btnHeatingOFF); + this.clearDegree(); + } else { + ControlBtn.off(this.btnHeatingON); + ControlBtn.off(this.btnHeatingOFF); + } + }, + + // sets the button of the active mode + setActiveMode: function() { + ControlBtn.on(this.id + "mode" + this.activeMode); + }, + + // Clears the temperature field whithin the temp. box + clearDegree: function() { + this.inputDegree.value = ""; + }, + + bindEvents: function() { + this.clickModeAuto = this.onClickModeAuto.bindAsEventListener(this); + Event.observe(this.btnModeAuto, 'mousedown', this.clickModeAuto); + + this.clickModeManu = this.onClickModeManu.bindAsEventListener(this); + Event.observe(this.btnModeManu, 'mousedown', this.clickModeManu); + + this.clickModeBoost = this.onClickModeBoost.bindAsEventListener(this); + Event.observe(this.btnModeBoost, 'mousedown', this.clickModeBoost); + + // Party Mode currently deactivated + this.clickModeParty = this.onClickModeParty.bindAsEventListener(this); + Event.observe(this.btnModeParty, 'mousedown', this.clickModeParty); + + this.clickHeatingOFF = this.onClickHeatingOFF.bindAsEventListener(this); + Event.observe(this.btnHeatingOFF, 'mousedown', this.clickHeatingOFF); + + this.clickHeatingON = this.onClickHeatingON.bindAsEventListener(this); + Event.observe(this.btnHeatingON, 'mousedown', this.clickHeatingON); + + this.clickTempCOMFORT = this.onClickTempComfort.bindAsEventListener(this); + Event.observe(this.btnTempComfort, 'mousedown', this.clickTempCOMFORT); + + this.clickTempECO = this.onClickTempEco.bindAsEventListener(this); + Event.observe(this.btnTempEco, 'mousedown', this.clickTempECO); + + }, + + onClickModeAuto: function() { + conInfo("clickModeAuto"); + setDpState(this.opts.idAuto, 1); + this.setModeButton(this.btnModeAuto); + }, + + onClickModeManu: function() { + conInfo("clickModeManu"); + setDpState(this.opts.idManu, this.level); + this.setModeButton(this.btnModeManu); + }, + + + onClickModeBoost: function() { + conInfo("clickModeBoost"); + setDpState(this.opts.idBoost, 1); + this.setModeButton(this.btnModeBoost); + }, + + onClickModeParty: function() { + conInfo("clickModeParty"); + var self = this; + var url = "/pages/msg/setPartyMode.htm"; + + var req = jQuery.ajax({ + url : url +"?sid=" + SessionId, + cache: false, + dataType: "html" + }); + + req.done(function(data) { + + partyModeDialog = new PartyModeDialog(translateKey("partyModeDialogTitle"), data, self.opts ,function(result) { + if (result == 1) { + conInfo("SET PARTYMODE"); + var oPartyMode = this.getPartyModeObject(); + conInfo("iseThermostat_2ndGen - oPartyMode: "); + conInfo(oPartyMode); + homematic("Interface.putThermParamset",{'interface': self.chn["interface"], 'address' : self.chn["address"], 'set': + [ + {name:'PARTY_TEMPERATURE', type: 'string', value: oPartyMode.temp}, + {name:'PARTY_START_TIME', type: 'string', value: oPartyMode.startMinutesSinceMidnight}, + {name:'PARTY_START_DAY', type: 'string', value: oPartyMode.startDay}, + {name:'PARTY_START_MONTH', type: 'string', value: oPartyMode.startMonth}, + {name:'PARTY_START_YEAR', type: 'string', value: oPartyMode.startYear}, + {name:'PARTY_STOP_TIME', type: 'string', value: oPartyMode.stopMinutesSinceMidnight}, + {name:'PARTY_STOP_DAY', type: 'string', value: oPartyMode.stopDay}, + {name:'PARTY_STOP_MONTH', type: 'string', value: oPartyMode.stopMonth}, + {name:'PARTY_STOP_YEAR', type: 'string', value: oPartyMode.stopYear} + ] + }); + self.setModeButton(self.btnModeParty); + } + }, "html"); + }); + + req.fail(function() { + alert("Error while loading " + url); + }); + //this.setModeButton(this.btnModeParty); + }, + + + onClickHeatingOFF: function() { + conInfo("clickTempOFF"); + setDpState(this.opts.idManu, 4.5); + ControlBtn.on(this.btnHeatingOFF); + ControlBtn.off(this.btnHeatingON); + }, + + onClickHeatingON: function() { + conInfo("clickTempON"); + setDpState(this.opts.idManu, 30.5); + ControlBtn.on(this.btnHeatingON); + ControlBtn.off(this.btnHeatingOFF); + }, + + onClickTempComfort: function() { + var self = this; + conInfo("clickTempComfort"); + setDpState(this.opts.idComfort, 1); + ControlBtn.pushed(this.btnTempComfort); + setTimeout(function() {ControlBtn.off(self.btnTempComfort);},3000); + }, + + onClickTempEco: function() { + var self = this; + conInfo("clickTempEco"); + setDpState(this.opts.idLowering, 1); + ControlBtn.pushed(this.btnTempEco); + setTimeout(function() {ControlBtn.off(self.btnTempEco);},3000); + }, + + showActualTemp: function() { + jQuery("#"+this.id +"actTemp").text(this.opts.stTemp); + jQuery("#"+this.id +"tblShowTemp").show(); + }, + + showActualHumidity: function() { + if (parseInt(this.opts.stHum) === 20) { + jQuery("#"+this.id +"actHumidity").text('n/a'); + } else { + jQuery("#"+this.id +"actHumidity").text(this.opts.stHum); + jQuery("#"+this.id +"actHumidityUnit").show(); + } + jQuery("#"+this.id +"tblShowHumidity").show(); + }, + + showActualBat: function() { + jQuery("#"+this.id +"actBatteryState").text(this.opts.stBat); + jQuery("#"+this.id +"tblShowBatteryState").show(); + }, + + showActualValve: function() { + jQuery("#"+this.id +"actValveState").text(this.opts.stValve); + jQuery("#"+this.id +"tblShowValveState").show(); + }, + + showHolidayEndTime: function() { + var stopTime = this.getHolidayEndTime(); + if (stopTime) { + jQuery("#"+this.id+"partyEndTime").text(stopTime); + jQuery("#"+this.id+"showPartyEnd").show(); + } + }, + + showChangeMode: function() { + jQuery("#tblChangeMode"+this.id).show(); + }, + + showOnOff: function() { + jQuery("#"+this.id+"modeOFF, #"+this.id+"modeON").show(); + }, + + showComfortEco: function() { + jQuery("#"+this.id+"tempECO, #"+this.id+"tempCOMFORT").show(); + }, + + showPartyMode: function() { + jQuery("#"+this.id + "mode2").show(); + }, + + setModeButton: function(btn) { + ControlBtn.off(this.btnModeAuto); + ControlBtn.off(this.btnModeManu); + ControlBtn.off(this.btnModeBoost); + ControlBtn.off(this.btnModeParty); + ControlBtn.on(btn); + }, + + getHolidayEndTime: function() { + if (isNaN(parseInt(this.opts.stPartyStopTime))) {return false;} + var stopTime = ""; + stopTime += addLeadingZero(this.opts.stPartyStopDay) + "."; + stopTime += addLeadingZero(this.opts.stPartyStopMonth) + "."; + stopTime += addLeadingZero(this.opts.stPartyStopYear) + " - "; + stopTime += addLeadingZero(parseInt((parseInt(this.opts.stPartyStopTime) / 60))) + ":" + addLeadingZero(parseInt(this.opts.stPartyStopTime) % 60); + + // Device firmware < 1.3 + if ((stopTime == "01.01.00 - 00:00") || (stopTime.indexOf("undefined") > -1)) {return false;} + + return stopTime; + } + +}); + +iseThermostatHMIP = Class.create(); + +iseThermostatHMIP.prototype = { + + initialize: function(opts) { + conInfo(opts); + var self = this; + this.opts = opts; + this.devId = opts.devID; + this.chId = this.opts.chID; + this.chAddress = this.opts.chAddress; + this.iface = this.opts.chInterface; + this.setPointID = this.opts.setPointID; + this.setPointModeID = this.opts.setPointModeID; + this.controlModeID = this.opts.controlModeID; + this.boostID = this.opts.boostID; + this.partyStartID = this.opts.partyStartID; + this.partyEndID = this.opts.partyEndID; + this.partyEndValue = this.opts.partyEndValue; + this.partyMode = this.opts.partyMode; + this.windowStateID = this.opts.windowStateID; + this.statusOFF = "OFF"; + this.statusON = "ON"; + this.activeProfileID = this.opts.activeProfileID; + + var paramSetMaster = homematic('Interface.getParamset', {"interface": this.iface, "address" : this.chAddress, "paramsetKey" : "MASTER"}); + + this.confTempMin = parseFloat(paramSetMaster["TEMPERATURE_MINIMUM"]); // Configured min temp (device settings) + this.confTempMax = parseFloat(paramSetMaster["TEMPERATURE_MAXIMUM"]); // Configured max temp (device settings); + + this.offTemp = 4.5; + this.onTemp = 30.5; + this.min = (this.confTempMin < 5) ? 5 : this.confTempMin; + this.max = (this.confTempMax > 30) ? 30 : this.confTempMax; + this.off = (this.confTempMin < 5) ? this.offTemp : this.confTempMin; + this.on = (this.confTempMax > 30) ? this.onTemp : this.confTempMax; + this.unit = " °C"; + this.factor = 100/(this.max-this.min); + this.iViewOnly = false; + this.bSliderPosFlag = false; + this.hasRampClicked = false; + this.btnUpElem = this.getElemByID("Up"); + this.btnDownElem = this.getElemByID("Down"); + this.percentElem = this.getElemByID("Deg"); + this.sliderControl = jQuery("#slidCtrl"+ this.chId); + this.btnAuto = this.getElemByID("Auto"); + this.btnManu = this.getElemByID("Manu"); + this.btnBoost = this.getElemByID("Boost"); + this.btnParty = this.getElemByID("Party"); + this.btnON = this.getElemByID("On"); + this.btnOFF = this.getElemByID("Off"); + + this.btnHeating = this.getElemByID("Heating"); + this.btnCooling = this.getElemByID("Cooling"); + + this.activeProfileElm = this.getElemByID("ActiveProfile"); + this.unitDegree = this.getElemByID("unitDegree"); + this.unknownState = "--"; + + this.heatingCoolingAllowed = (this.iface != 'VirtualDevices') ? true : false; + this.checkIfHeatingCoolingAllowed(); + + + this.setResult(opts); + this.setSControl("ACTUAL_TEMPERATURE", this.ACTUAL_TEMPERATURE); + this.setSControl("HUMIDITY", this.HUMIDITY); + this.setSControl("WINDOW_STATE", this.WINDOW_STATE); + this.setSControl("BATTERY_STATE", this.BATTERY_STATE); + this.setSControl("LEVEL", this.LEVEL); + this.setSlider(); + this.initElements(); + this.bindEvents(); + }, + + setResult: function(opts) { + //conInfo(opts); + this.ACTIVE_PROFILE = this.checkValue(opts.ACTIVE_PROFILE, 0); + this.ACTUAL_TEMPERATURE = this.checkValue(parseFloat(opts.ACTUAL_TEMPERATURE).toFixed(2), this.unknownState); + this.BOOST_MODE = (this.checkBool(opts.BOOST_MODE, false) == "true") ? true : false; + //this.FROST_PROTECTION = opts.FROST_PROTECTION; + this.HUMIDITY = this.checkValue(opts.HUMIDITY, this.unknownState); + this.BATTERY_STATE = this.checkValue(opts.BATTERY_STATE, this.unknownState); + this.LEVEL = this.checkValue(opts.LEVEL, this.unknownState); + //this.PARTY_MODE = opts.PARTY_MODE; + this.SET_POINT_MODE = this.checkValue(opts.SET_POINT_MODE, 0); + this.SET_POINT_TEMPERATURE = this.checkValue(opts.SET_POINT_TEMPERATURE, 4.5); + this.WINDOW_STATE = this.checkWindowState(opts.WINDOW_STATE); + this.state = this.SET_POINT_TEMPERATURE; + }, + + checkValue: function(val, substitute) { + return ((val == undefined) || (isNaN(parseFloat(val)))) ? substitute : val; + }, + + checkBool: function(val, substitute) { + return ((val == undefined) || (val == "")) ? substitute : val; + }, + + checkWindowState: function(windowState) { + var state = (windowState == undefined || windowState == "") ? this.unknownState : windowState; + if (parseInt(state) == 0) { + state = translateKey("infoStatusControlLblClosed"); + } else if (parseInt(state) == 1) { + state =translateKey("infoStatusControlLblOpen"); + } + return state; + }, + + initElements: function() { + + if (this.confTempMin == this.offTemp) {this.btnOFF.show().text(translateKey("actionStatusControlLblOff"));} else {this.btnOFF.show().html(translateKey("minTemp")).css("line-height", "");} + if (this.confTempMax == this.onTemp) {this.btnON.show().text(translateKey("actionStatusControlLblOn"));} else {this.btnON.show().html(translateKey("maxTemp")).css("line-height", "");} + + + if (this.BOOST_MODE) { + JControlBtn.on(this.btnBoost); + } else { + JControlBtn.off(this.btnBoost); + } + + switch (this.SET_POINT_MODE) { + case "0": + JControlBtn.off(this.btnManu); + JControlBtn.off(this.btnParty); + JControlBtn.on(this.btnAuto); + break; + case "1": + JControlBtn.off(this.btnAuto); + JControlBtn.off(this.btnParty); + JControlBtn.on(this.btnManu); + break; + case "2": + JControlBtn.off(this.btnAuto); + JControlBtn.off(this.btnManu); + JControlBtn.on(this.btnParty); + } + + if (this.SET_POINT_TEMPERATURE < 5.0) { + JControlBtn.off(this.btnAuto); + JControlBtn.on(this.btnOFF); + this.percentElem.val(this.statusOFF); + } else if (this.SET_POINT_TEMPERATURE > 30.0) { + JControlBtn.off(this.btnOFF); + JControlBtn.on(this.btnON); + this.percentElem.val(this.statusON); + } else { + JControlBtn.off(this.btnOFF); + JControlBtn.off(this.btnON); + this.percentElem.val(parseFloat(this.state).toFixed(1)); + } + + switch (this.percentElem.val()) { + case this.statusOFF: + this.hideUnitDegree(); + break; + case this.statusON: + this.hideUnitDegree(); + break; + default: + if(this.unitDegree != null) { + this.unitDegree.show(); + } + } + this.activeProfileElm.val(this.ACTIVE_PROFILE); + + if (this.partyMode == "true") { + // Holiday mode active + this.showHolidayEndTime(); + } + + }, + + getHolidayEndTime: function() { + var result = null; + if (this.partyEndValue) { + var arTimeString = this.partyEndValue.split(" "), + arDate = arTimeString[0].split("_"), + oDate = {}, + time = arTimeString[1]; + + oDate.year = addLeadingZero(parseInt(arDate[0])); + oDate.month = addLeadingZero(parseInt(arDate[1])); + oDate.day = addLeadingZero(parseInt(arDate[2])); + + result = oDate.day + "." + oDate.month + "." + oDate.year + " - " + time; + } + return result; + }, + + showHolidayEndTime: function() { + var stopTime = this.getHolidayEndTime(); + if (stopTime != null) { + jQuery("#"+this.chId+"partyEndTime").text(stopTime); + jQuery("#"+this.chId+"showPartyEnd").show(); + } + }, + + getElemByID: function(elm) { + var chId = this.chId; + return jQuery("#"+chId + elm); + }, + + getElemByName: function(elm) { + var chId = this.chId; + return jQuery("[name='"+chId+elm+"']"); + }, + + // Control with string value + setSControl: function(elm, val) { + this.getElemByID("val"+elm).text(val); + this.getElemByID(elm).show(); + }, + + setSlider: function() { + this.slider = new sliderControl( "thermo", this.chId, this.SET_POINT_TEMPERATURE, this.iViewOnly, this.bSliderPosFlag,this.min, this.max, this.factor, this.unit); + this.slider.f_setValue((this.SET_POINT_TEMPERATURE - this.min) * this.factor, true); + }, + + bindEvents: function() { + + this.sliderControl.bind("mouseout", {that: this}, this.onMouseOut); + //this.sliderControl.bind("mouseup", {that: this}, this.onHandleClick); + jQuery(this.slider.e_base).bind("mousedown", {that: this}, this.onRampClick); + + this.btnUpElem.bind("click", {that:this}, this.onClickUp); + this.btnDownElem.bind("click", {that:this}, this.onClickDown); + this.percentElem.bind("change", {that:this}, this.onPercChange); + + this.btnAuto.bind("click", {that:this}, this.onClickModeAuto); + this.btnManu.bind("click", {that:this}, this.onClickModeManu); + this.btnBoost.bind("click", {that:this}, this.onClickModeBoost); + this.btnParty.bind("click", {that:this}, this.onClickModeParty); + this.btnON.bind("click", {that:this}, this.onClickModeON); + this.btnOFF.bind("click", {that:this}, this.onClickModeOFF); + }, + + onRampClick: function(event){ + event.data.that.hasRampClicked = true; + + var pos = Position.page(event.data.that.slider.e_base); + var offset = event.clientX - pos[0]; + var val = ( offset * 100 ) / event.data.that.slider.n_controlWidth; + event.data.that.slider.f_setValue(val); + event.data.that.state = (Math.floor(val)/ event.data.that.factor) + event.data.that.min; + conInfo( "iseThermostat: onRampClick() at ("+val + ") set-> " + event.data.that.state ); + }, + + onMouseOut: function(event) + { + var e = event; + if (!e) { e = window.event; } + var relTarg = e.relatedTarget || e.fromElement; + + if( relTarg ) + { + var b1 = (relTarg.id.indexOf("slider")!=-1); + var b2 = (relTarg.id.indexOf("base")!=-1); + var b3 = (relTarg.id.indexOf("green")!=-1); + var b4 = (relTarg.id.indexOf("spec")!=-1); + if( !b1 && !b2 && !b3 && !b4) + { + if( event.data.that.hasRampClicked ) + { + event.data.that.hasRampClicked = false; + event.data.that.state = event.data.that.percentElem.val(); + event.data.that.refresh(event.data.that.setPointID); + } + } + } + }, + + onHandleClick: function(event) { + conInfo("onHandleClick- hasRampClicked: " +event.data.that.hasRampClicked); + }, + + onClickUp: function(event) + { + conInfo( "iseThermostat: onClickUp()" ); + event.data.that.state = (parseFloat(event.data.that.state) + 1); + if (event.data.that.state > event.data.that.max) + event.data.that.state = event.data.that.max; + event.data.that.refresh(event.data.that.setPointID); + }, + + onClickDown: function(event) + { + conInfo( "iseThermostat: onClickDown()" ); + event.data.that.state = (parseFloat(event.data.that.state) -1); + if (event.data.that.state < event.data.that.min) + event.data.that.state = event.data.that.min; + event.data.that.refresh(event.data.that.setPointID); + }, + + onPercChange: function(event) + { + conInfo( "iseThermostat: onPercChange()" ); + if( isNaN(event.data.that.percentElem.val()) ) return; + if( parseInt(event.data.that.percentElem.val()) > event.data.that.max ) event.data.that.percentElem.val(event.data.that.max); + if( parseInt(event.data.that.percentElem.val()) < this.min ) event.data.that.percentElem.val(event.data.that.min); + event.data.that.state = event.data.that.percentElem.val(); + + event.data.that.refresh(event.data.that.setPointID); + }, + + onClickModeAuto: function(event) { + conInfo("clickModeAuto"); + if (event.data.that.SET_POINT_MODE != 0) { + setDpState(event.data.that.controlModeID, 0); + //JControlBtn.off(event.data.that.btnManu); + JControlBtn.pressed(event.data.that.btnAuto); + } + }, + + onClickModeManu: function(event) { + conInfo("clickModeManu"); + if (event.data.that.SET_POINT_MODE != 1) { + setDpState(event.data.that.controlModeID, 1); + //JControlBtn.off(event.data.that.btnAuto); + JControlBtn.pressed(event.data.that.btnManu); + } + }, + + onClickModeBoost: function(event) { + conInfo("clickModeBoost"); + var self = event.data.that; + if ((parseFloat(self.state) > 4.5) && (parseFloat(self.state) < 30.5)) { + if (! self.BOOST_MODE) { + setDpState(self.boostID, 1); + JControlBtn.pressed(self.btnBoost); + } else { + setDpState(self.boostID, 0); + JControlBtn.off(self.btnBoost); + } + } else { + JControlBtn.pressed(self.btnBoost); + } + }, + + onClickModeON: function(event) { + conInfo("clickModeON"); + //setDpState(event.data.that.setPointID, event.data.that.on); + //JControlBtn.off(event.data.that.btnOFF); + + var self = event.data.that; + JControlBtn.pressed(self.btnON); + homematic("Interface.putParamset",{'interface': self.iface, 'address' : self.chAddress, 'paramsetKey' : 'VALUES', 'set': + [ + {name:'SET_POINT_MODE', type: 'int', value: "1"}, + {name:'CONTROL_MODE', type: 'int', value: "1"}, + {name:'SET_POINT_TEMPERATURE', type: 'double', value:self.on} + ] + }); + + }, + + onClickModeOFF: function(event) { + conInfo("clickModeOFF - SET_POINT_TEMPERATURE: " + this.off); + //setDpState(event.data.that.setPointID, event.data.that.off); + //JControlBtn.off(event.data.that.btnON); + + var self = event.data.that; + JControlBtn.pressed(self.btnOFF); + homematic("Interface.putParamset",{'interface': self.iface, 'address' : self.chAddress, 'paramsetKey' : 'VALUES', 'set': + [ + {name:'SET_POINT_MODE', type: 'int', value: "1"}, + {name:'CONTROL_MODE', type: 'int', value: "1"}, + {name:'SET_POINT_TEMPERATURE', type: 'double', value: self.off} + ] + }); + }, + + onClickModeParty: function(event) { + conInfo("clickModeParty"); + var self = this; + var url = "/pages/msg/setPartyMode.htm"; + + var partyStartTime = event.data.that.opts.partyStartValue, + partyEndTime = event.data.that.opts.partyEndValue, + partySetPointTemp = event.data.that.opts.partySetPointTempValue; + + var oPartyValues = event.data.that.formatPartyTime(partyStartTime, partyEndTime); + oPartyValues.stPartyTemp = parseInt(partySetPointTemp); + + var req = jQuery.ajax({ + url : url +"?sid=" + SessionId, + cache: false, + dataType: "html" + }); + + req.done(function(htmlContent) { + partyModeDialog = new PartyModeDialog(translateKey("partyModeDialogTitle"), htmlContent, oPartyValues,function(result) { + + var self = event.data.that; + var iface = self.iface, + chAddress = self.chAddress; + + if (result == 1) { + conInfo("SET PARTYMODE"); + var oPartyMode = self.formatPartyMode(this.getPartyModeObject()); + + var partyTimeStart = + oPartyMode.startYear + "_" + oPartyMode.startMonth + "_" + oPartyMode.startDay + " " + oPartyMode.startHour + ":" + oPartyMode.startMin, + partyTimeEnd = + oPartyMode.stopYear + "_" + oPartyMode.stopMonth + "_" + oPartyMode.stopDay + " " + oPartyMode.stopHour + ":" + oPartyMode.stopMin; + + conInfo("iseThermostatHMIP - partyTimeStart: " + partyTimeStart + " - partyTimeEnd: " + partyTimeEnd + " - temp: " + oPartyMode.temp); + + homematic("Interface.putParamset",{'interface': iface, 'address' : chAddress, 'paramsetKey' : 'VALUES', 'set': + [ + {name:'SET_POINT_MODE', type: 'int', value: "2"}, + {name:'SET_POINT_TEMPERATURE', type: 'double', value: oPartyMode.temp}, + {name:'PARTY_TIME_START', type: 'string', value: partyTimeStart}, + {name:'PARTY_TIME_END', type: 'string', value: partyTimeEnd} + ] + }); + //self.setModeButton(self.btnModeParty); + } + }, "html"); + }); + + req.fail(function() { + alert("Error while loading " + url); + }); + //this.setModeButton(this.btnModeParty); + }, + + formatPartyTime: function(partyStart, partyEnd) { + + var result = {}; + + if (this.isPartyTimeAvailable(partyStart) && this.isPartyTimeAvailable(partyEnd)) { + var arPartyStartDate = partyStart.split(" ")[0].split("_"), + arPartyStartTime = partyStart.split(" ")[1].split(":"), + startYear = arPartyStartDate[0], + startMonth = arPartyStartDate[1], + startDay = arPartyStartDate[2], + startTime = parseInt(arPartyStartTime[0]) * 60 + parseInt(arPartyStartTime[1]); + + var arPartyStopDate = partyEnd.split(" ")[0].split("_"), + arPartyStopTime = partyEnd.split(" ")[1].split(":"), + stopYear = arPartyStopDate[0], + stopMonth = arPartyStopDate[1], + stopDay = arPartyStopDate[2], + stopTime = parseInt(arPartyStopTime[0]) * 60 + parseInt(arPartyStopTime[1]); + + result.stPartyStartDay = startDay; + result.stPartyStartMonth = startMonth; + result.stPartyStartYear = startYear; + result.stPartyStartTime = startTime; + + result.stPartyStopDay = stopDay; + result.stPartyStopMonth = stopMonth; + result.stPartyStopYear = stopYear; + result.stPartyStopTime = stopTime; + } else { + result.showEmptyFields = true; + } + + return result; + }, + + isPartyTimeAvailable: function(timeString) { + return ((timeString != undefined) && (timeString != "")) ? true : false; + }, + + formatTimeVal: function(val) { + return (parseInt(val) < 10) ? "0" + val : val; + }, + + formatPartyMode: function(oPartyMode) { + oPartyMode.startYear = "20" + oPartyMode.startYear; + oPartyMode.stopYear = "20" + oPartyMode.stopYear; + oPartyMode.startMonth = this.formatTimeVal(oPartyMode.startMonth); + oPartyMode.stopMonth = this.formatTimeVal( oPartyMode.stopMonth); + oPartyMode.startDay = this.formatTimeVal(oPartyMode.startDay); + oPartyMode.stopDay = this.formatTimeVal(oPartyMode.stopDay); + oPartyMode.startHour = this.formatTimeVal(oPartyMode.startHour); + oPartyMode.stopHour = this.formatTimeVal(oPartyMode.stopHour); + oPartyMode.startMin = this.formatTimeVal(oPartyMode.startMin); + oPartyMode.stopMin = this.formatTimeVal(oPartyMode.stopMin); + return oPartyMode; + }, + + hideUnitDegree: function() + { + if (this.unitDegree != null) { + this.unitDegree.hide(); + } + }, + + refresh: function(setPointID) + { + if(this.state < this.min) { this.state = this.min; } + if (this.state > this.max) { this.state = this.max; } + this.slider.f_setValue((this.state -this.min) * this.factor, true); + this.percentElem.val(parseFloat(this.state).toFixed(1)); + conInfo("refresh: setting DP "+this.setPointID+" State -------> " + this.state); + setDpState(setPointID, this.state); + }, + + // SPHM-1231 - When a link between a CLIMATECONTROL_FLOOR_TRANSMITTER (eg. WTH chn. 7) and a CLIMATECONTROL_FLOOR_TRANSCEIVER (e. g. FALMOT-C12 chn. 1 - 12) exists, + // the buttons Heating and Cooling must be only readable. + checkIfHeatingCoolingAllowed: function () { + var self = this; + if (this.heatingCoolingAllowed) { + var dev, chn, arLinkPeers = []; + + dev = DeviceList.getDeviceByAddress(this.chAddress.split(":")[0]); + if (typeof dev != "undefined") { + jQuery.each(dev.channels, function (index, chn) { + if (chn.channelType == "CLIMATECONTROL_FLOOR_TRANSMITTER") { + arLinkPeers = homematic("Interface.getLinkPeers", {'interface': self.iface, 'address': chn.address}); + jQuery.each(arLinkPeers, function (index, chnAddress) { + chn = DeviceList.getChannelByAddress(chnAddress); + if (chn.channelType == "CLIMATECONTROL_FLOOR_TRANSCEIVER") { + self.heatingCoolingAllowed = false; + } + }); + } + }); + + if (!this.heatingCoolingAllowed) { + this.btnHeating.prop("onclick", null); + this.btnCooling.prop("onclick", null); + this.btnHeating.unbind("click").click(function () { + MessageBox.show(translateKey("dialogHint"), translateKey("hintHeatingCoolngNotAllowed"), function () { + loadChannels(self.devId); + }, 500, 125); + }).css("cursor", "default"); + this.btnCooling.unbind("click").click(function () { + MessageBox.show(translateKey("dialogHint"), translateKey("hintHeatingCoolngNotAllowed"), function () { + loadChannels(self.devId); + }, 500, 125); + }).css("cursor", "default"); + } + } else { + window.setTimeout(function() {self.checkIfHeatingCoolingAllowed();}, 2000); + } + } + } + +};/** + * ise/iseFrequency.js + **/ + +/** + * @fileOverview ? + * @copy of iseThermostat.js + **/ + + /** + * @class + **/ +iseFrequency = Class.create(); + +iseFrequency.prototype = { + /* + * id = DOM-ID of switch + * initState = Creation State + */ + initialize: function(id, initState, lvlDP, min, max, iViewOnly, bSliderPosFlag) + { + conInfo( "iseFrequency: initialize()" ); + conInfo ("value(: " + initState + ") min(" + min + ") max(" + max + ")"); + this.id = id; + this.state = initState; + this.lvlDP = lvlDP; + this.min = min; + this.max = max; + this.factor = 100/(max-min); + this.unit = " mHz"; + if(bSliderPosFlag) + { + this.bSliderPosFlag = bSliderPosFlag; + } + else + { + this.bSliderPosFlag = false; + } + this.slider = new sliderControl( "thermo", this.id, initState, iViewOnly, this.bSliderPosFlag,this.min, this.max, this.factor, this.unit); + this.hasRampClicked = false; + this.txtDeg = $(this.id + "Deg"); + // Add event handlers + if (iViewOnly === 0) + { + this.mouseOut = this.onMouseOut.bindAsEventListener(this); + Event.observe($("slidCtrl" + this.id), 'mouseout', this.mouseOut); + + this.rampClick = this.onRampClick.bindAsEventListener(this); + Event.observe(this.slider.e_base, 'mousedown', this.rampClick); + + this.handleClick = this.onHandleClick.bindAsEventListener(this); + Event.observe($("slidCtrl" + this.id), 'mouseup', this.handleClick); + + this.clickUp = this.onClickUp.bindAsEventListener(this); + Event.observe($(this.id + "Up"), 'click', this.clickUp); + + this.clickDown = this.onClickDown.bindAsEventListener(this); + Event.observe($(this.id + "Down"), 'click', this.clickDown); + + this.percChange = this.onPercChange.bindAsEventListener(this); + Event.observe($(this.id + "Deg"), 'change', this.percChange); + } + this.refresh(false); + }, + + onMouseOut: function(event) + { + var e = event; + if (!e) { e = window.event; } + var relTarg = e.relatedTarget || e.fromElement; + if( relTarg ) + { + var b1 = (relTarg.id.indexOf("slider")!=-1); + var b2 = (relTarg.id.indexOf("base")!=-1); + var b3 = (relTarg.id.indexOf("green")!=-1); + var b4 = (relTarg.id.indexOf("spec")!=-1); + if( !b1 && !b2 && !b3 && !b4) + { + if( this.hasRampClicked ) + { + conInfo( "iseFrequency: onMouseOut() ["+relTarg.id+"], wanna set: " + ( (this.slider.n_value/this.factor) + this.min) ); + this.hasRampClicked = false; + + this.state = (this.slider.n_value/this.factor) + this.min; + this.refresh(); + } + } + } + }, + + onRampClick: function(ev) + { + this.hasRampClicked = true; + var pos = Position.page(this.slider.e_base); + var offset = ev.clientX - pos[0]; + var val = ( offset * 100 ) / this.slider.n_controlWidth; + this.slider.f_setValue(val); + this.state = (Math.floor(val)/ this.factor) + this.min; + conInfo( "iseFrequency: onRampClick() at ("+val + ") set-> " + this.state ); + // this.refresh(); + //window.setTimeout("ibd"+this.id+".refresh()",1000); + }, + + onHandleClick: function() + { + conInfo( "iseFrequency: onHandleClick() perc: " + this.txtDeg.value); + this.hasRampClicked = false; + this.state = this.txtDeg.value; + this.refresh(); + }, + + onClickUp: function() + { + conInfo( "iseFrequency: onClickUp()" ); + // this.state = (this.slider.n_value/this.factor); + this.state = Math.round(this.state + 100); + if (this.state > this.max) + this.state = this.max; + + this.refresh(); + }, + + onClickDown: function() + { + conInfo( "iseFrequency: onClickDown()" ); + // this.state = (this.slider.n_value/this.factor); + this.state = Math.round(this.state - 100); + if (this.state < this.min) + this.state = this.min; + + this.refresh(); + }, + + onPercChange: function() + { + conInfo( "iseFrequency: onPercChange()" ); + if( isNaN(this.txtDeg.value) ) return; + if( parseInt(this.txtDeg.value) > this.max ) this.txtDeg.value = this.max; + if( parseInt(this.txtDeg.value) < this.min ) this.txtDeg.value = this.min; + this.state = this.txtDeg.value; + this.refresh(); + }, + + update: function(newVal) + { + conInfo( "iseFrequency: update()" ); + this.state = newVal; + this.refresh(newVal); + }, + + refresh: function(setstate) + { + conInfo( "iseFrequency: refresh()"+this.state ); + if(this.state < 0){ this.state = 0; } + if (this.state > this.max) this.state = this.max; + this.slider.f_setValue((this.state -this.min) * this.factor, true); + this.txtDeg.value = round(this.state,2); + if(typeof setstate == "undefined") + { + conInfo("setting DP "+this.lvlDP+" State -------> " + this.state); + setDpState(this.lvlDP, (this.state)); + } + } +}; +/** + * ise/iseButtonsDoorContact.js + **/ + +/** + * @fileOverview ? + * @author ise + **/ + +/** + * @class + **/ +iseButtonsDoorContact = Class.create(); + +iseButtonsDoorContact.prototype = { + /* + * id = datapoint-ID of switch + * initState = Creation State (0 or 1) + */ + initialize: function(id, initState) + { + this.id = id; + this.state = this.convertInitState(initState); + this.divOpen = $(this.id + "Open"); + this.divClosed = $(this.id + "Closed"); + + if( this.state > 0 ) + { + ControlBtn.on(this.divOpen); + } + else + { + ControlBtn.on(this.divClosed); + } + }, + + convertInitState: function(initState) { + + switch (initState) { + case "0": + case "false": + case "CLOSED": + return 0; + case "1": + case "200": + case "true": + case "OPEN": + return 1; + } + return -1; + } + +};/** + * ise/iseButtonsWindow.js + **/ + +/** + * @fileOverview ? + * @author ise + **/ + +/* * * * * * * * * * * * * * * * * * * * * * * * + * iseButtonsWindow * + * * * * * * * * * * * * * * * * * * * * * * * */ + +/** + * @class + **/ +iseButtonsWindow = Class.create(); + +iseButtonsWindow.prototype = { + /* + * id = datapoint-ID of switch + * initState = Creation State (0 or 1) + */ + initialize: function(id, initState) { + this.id = id; + this.state = initState; + this.divOpenH = $(this.id + "OpenH"); + this.divOpenV = $(this.id + "OpenV"); + this.divClosed = $(this.id + "Closed"); + + switch (initState) { + case 0: + case false: + ControlBtn.on(this.divClosed); + break; + case 1: + ControlBtn.on(this.divOpenV); + break; + case 2: + case true: + ControlBtn.on(this.divOpenH); + break; + default: + break; + } + } +}; + + +/* * * * * * * * * * * * * * * * * * * * * * * * + * iseButtonsWinMatic * + * * * * * * * * * * * * * * * * * * * * * * * */ + +/** + * @class + **/ +iseButtonsWinMatic= Class.create(); + +iseButtonsWinMatic.prototype = { + /* + * id = datapoint-ID of switch + * initState = Creation State (0 or 1) + */ + initialize: function(id, opts, iViewOnly) + { + this.Window = "WinMatic"; + conInfo(this.Window); + this.id = id; + this.opts = opts; + this.Circle = $(this.id + "Circle"); + this.Perc = $(this.id + "Perc"); + this.divPercUp = $(this.id + "PercUp"); + this.divPercDown = $(this.id + "PercDown"); + this.divStop = $(this.id + "Stop"); + this.divOpen = $(this.id + "Open"); + this.divClose = $(this.id + "Close"); + this.divLocked = $(this.id + "Locked"); + this.divUnknown = $(this.id + "Unknown"); + this.state = this.opts.stLevel * 100; + Released = false; + // Draw WinMatic Control + var s = "
" + + "
"; + this.Circle.innerHTML = s; + this.graphics = new jsGraphics(this.id+"Ctrl"); + this.graphics.setColor(WebUI.getColor("active")); // grün + + // Add event handlers + if (iViewOnly === 0) { + this.bindEvents(); + this.initSpecialDevice(); + } + this.refresh(false); + }, + + onClickCtrl: function(ev) { + var pos = Position.page(this.Circle); + var offsetX = ev.clientX - pos[0]; + var offsetY = ev.clientY - pos[1]; + if (offsetX < 60) + this.state = 0; + else { + if (this.isInZone50(offsetX, offsetY) ) + this.state = 50; + else + this.state = 100; + } + this.refresh(); + }, + + isInZone50: function(x, y) + { + var px = x; + var py = y; + var x1 = 57; + var y1 = 0; + var x2 = 57; + var y2 = 100; + var x3 = 120; + var y3 = 0; + + var fAB = (py-y1)*(x2-x1) - (px-x1)*(y2-y1); + var fCA = (py-y3)*(x1-x3) - (px-x3)*(y1-y3); + var fBC = (py-y2)*(x3-x2) - (px-x2)*(y3-y2); + + var bRet = false; + if ( (fAB*fBC > 0) && (fBC*fCA > 0) ) + { + bRet = true; + } + return bRet; + }, + + onClickPercUp: function() + { + this.state += 10; + if( this.state > 100 ) this.state = 100; + this.Perc.value = this.state; + this.refresh(); + }, + + onClickPercDown: function() + { + this.state -= 10; + if( this.state < 0 ) this.state = 0; + this.refresh(); + }, + + onChangePerc: function() + { + if( !isNaN( this.Perc.value ) ) + { + var iTmp = parseInt(this.Perc.value); + if (iTmp < 0) + iTmp = 0; + this.state = iTmp; + this.refresh(); + } + }, + + onClickOpen: function() { + this.state = 100; + ControlBtn.pushed(this.divOpen); + var t = this; + new PeriodicalExecuter(function(pe) { + ControlBtn.off(t.divOpen); + t.refresh(); + pe.stop(); + }, 1); + }, + + onClickClose: function() { + this.state = 0; + this.Perc.value = this.state; + ControlBtn.pushed(this.divClose); + var t = this; + new PeriodicalExecuter(function(pe) { + ControlBtn.off(t.divClose); + t.refresh(); + pe.stop(); + }, 1); + }, + + onClickStop: function() + { + var t = this; + conInfo( this.Window + " OnClickStop [ID:"+this.opts.idStop+"]" ); + setDpState(this.opts.idStop, 1); + ControlBtn.pushed(this.divStop); + new PeriodicalExecuter(function(pe) + { + ControlBtn.off(t.divStop); + pe.stop(); + }, 1); + }, + + onClickLock: function() { + ControlBtn.pushed(this.divLocked); + this.state = -5; + var t = this; + new PeriodicalExecuter(function(pe) { + ControlBtn.off(t.divLocked); + t.refresh(); + pe.stop(); + }, 1); + }, + + bindEvents: function() { + this.clickCtrl = this.onClickCtrl.bindAsEventListener(this); + Event.observe(this.Circle, 'mousedown', this.clickCtrl); + + this.clickPercUp = this.onClickPercUp.bindAsEventListener(this); + Event.observe($(this.id + "PercUp"), 'click', this.clickPercUp); + this.clickPercDown = this.onClickPercDown.bindAsEventListener(this); + Event.observe($(this.id + "PercDown"), 'click', this.clickPercDown); + this.changePerc = this.onChangePerc.bindAsEventListener(this); + Event.observe(this.Perc, 'change', this.changePerc); + + this.clickOpen = this.onClickOpen.bindAsEventListener(this); + Event.observe($(this.id + "Open"), 'mousedown', this.clickOpen); + + this.clickClose = this.onClickClose.bindAsEventListener(this); + Event.observe($(this.id + "Close"), 'mousedown', this.clickClose); + + this.clickLock = this.onClickLock.bindAsEventListener(this); + Event.observe($(this.id + "Locked"), 'mousedown', this.clickLock); + + this.clickStop = this.onClickStop.bindAsEventListener(this); + Event.observe($(this.id + "Stop"), 'mousedown', this.clickStop); + }, + + + initSpecialDevice: function() {}, + + refresh: function(bRefresh) + { + this.Perc.value = this.state; + if (this.state == -5 || this.state == -0.5 || isNaN(this.state)) + { + this.Perc.value = "0"; + } + + + this.graphics.clear(); + var startAngle = 90 - (this.state * 0.45); + if( (startAngle > 0) && (startAngle < 90)) + { + // verhindern dass ein voller Kreis gezeichnet wird + this.graphics.fillArc(-65, 5, 188, 179 , startAngle, 90); + } + this.graphics.paint(); + + if( typeof( bRefresh ) == "undefined" ) + { + setDpState(this.opts.idLevel, (this.state / 100)); + } + if (this.state == -0.5) + { + // Zustand verriegelt ?? + ControlBtn.off(this.divOpen); + ControlBtn.on(this.divClose); + ControlBtn.on(this.divLocked); + } + else + { + ControlBtn.off(this.divLocked); + if (this.state > 0) + { + ControlBtn.on(this.divOpen); + ControlBtn.off(this.divClose); + } + else + { + ControlBtn.off(this.divOpen); + ControlBtn.on(this.divClose); + } + } + + if( this.opts.stUncertain ) + { + ControlBtn.on(this.divUnknown); + } + else + { + ControlBtn.off(this.divUnknown); + } + } +}; + +iseButtonsWin_SC = Class.create(iseButtonsWinMatic, { + + initSpecialDevice: function() { + this.Window = "WIN_SC"; + conInfo(this.Window); + this.LEDMode1 = $(this.id + "LEDMode1"); + this.LEDMode2 = $(this.id + "LEDMode2"); + this.LEDMode3 = $(this.id + "LEDMode3"); + this.SummerMode = $(this.id + "SummerMode"); + this.WinterMode = $(this.id + "WinterMode"); + this.HandleLock = $(this.id + "HandleLock"); + this.HandleUnlock = $(this.id + "HandleUnlock"); + this.Open = $(this.id + "Open"); + this.Close = $(this.id + "Close"); + this.Release = $(this.id + "Release"); + this.elmHH = jQuery("#winterModeHH"); + this.elmMM = jQuery("#winterModeMM"); + this.elmSS = jQuery("#winterModeSS"); + this.initControls(); + this.bindAdditionalEvents(); + }, + + + initControls: function() { + var controls = [ + this.LEDMode1, + this.LEDMode2, + this.LEDMode3, + this.SummerMode, + this.WinterMode, + this.HandleLock, + this.HandleUnlock + //this.Open, + //this.Close, + //this.Release + ]; + + // All off + jQuery(controls).each(function(){ + ControlBtn.off(this); + }); + + switch (this.opts.stLEDMode.toString()) { + case "0" : + ControlBtn.on(this.LEDMode1); + break; + case "1" : + ControlBtn.on(this.LEDMode2); + break; + case "2" : + ControlBtn.on(this.LEDMode3); + break; + } + + if (this.opts.stWinterMode != 111600) { + ControlBtn.on(this.WinterMode); + this.setValueWinterMode(true); + } else { + ControlBtn.on(this.SummerMode); + this.setValueWinterMode(false); + } + + if (this.opts.stHandleLock) { + ControlBtn.on(this.HandleLock); + } else { + ControlBtn.on(this.HandleUnlock); + } + + // Window is released + /* + if (this.opts.stRelease) { + ControlBtn.on(this.Release); + ControlBtn.off(this.Open); + ControlBtn.off(this.Close); + } else { + // Window is either closed or open + ControlBtn.off(this.Release); + + if (this.opts.stLevel <= 0) { + // Window is closed + ControlBtn.on(this.Close); + ControlBtn.off(this.Open); + } else { + // Window is open + ControlBtn.on(this.Open); + ControlBtn.off(this.Close); + } + } + */ + }, + + /** + * Sets the input fields for the time of the winter mode control + * @param bMode true = winter mode - false = summer mode + */ + setValueWinterMode: function(bMode) { + if (bMode) { + var oTime = this.getHHMMSSWinterMode(); + this.elmHH.val(oTime.hh); + this.elmMM.val(oTime.mm); + this.elmSS.val(oTime.ss); + } else { + this.elmHH.val("18"); + this.elmMM.val("12"); + this.elmSS.val("15"); + } + }, + + getHHMMSSWinterMode: function() { + var s = this.opts.stWinterMode; + var h = Math.floor(s/3600); + s -= h*3600; + var m = Math.floor(s/60); + s -= m*60; + return {"hh" : h, "mm":m, "ss": s}; + }, + + getSecondsWinterMode: function() { + return (parseInt(this.elmHH.val() * 3600)) + (parseInt(this.elmMM.val() * 60)) + parseInt(this.elmSS.val()); + }, + + checkValue: function(val) { + + switch (val) { + case "hh" : + var val = parseInt(this.elmHH.val()); + if (val > 18) {this.elmHH.val("18");break;} + if (val < 0 ) {this.elmHH.val("0");break;} + if (isNaN(val)) {this.elmHH.val("0");} + break; + case "mm" : + var val = parseInt(this.elmMM.val()); + if (val > 59) {this.elmMM.val("59");break;} + if (val < 0 ) {this.elmMM.val("0");break;} + if (isNaN(val)) {this.elmMM.val("0");} + break; + case "ss" : + var val = parseInt(this.elmSS.val()); + if (val > 59) {this.elmSS.val("59");break;} + if (val < 0 ) {this.elmSS.val("0");break;} + if (isNaN(val)) {this.elmSS.val("0");} + break; + } + }, + + bindAdditionalEvents : function() { + var self = this; + + this.clickWinRelease = this.onClickWinRelease.bindAsEventListener(this); + Event.observe($(this.id + "Release"), 'mousedown', this.clickWinRelease); + + this.clickHandleUnlock = this.onClickHandleUnlock.bindAsEventListener(this); + Event.observe($(this.id + "HandleUnlock"), 'mousedown', this.clickHandleUnlock); + + this.clickHandleLock = this.onClickHandleLock.bindAsEventListener(this); + Event.observe($(this.id + "HandleLock"), 'mousedown', this.clickHandleLock); + + this.clickSummerMode = this.onClickSummerMode.bindAsEventListener(this); + Event.observe(this.SummerMode, 'mousedown', this.clickSummerMode); + + this.clickWinterMode = this.onClickWinterMode.bindAsEventListener(this); + Event.observe(this.WinterMode, 'mousedown', this.clickWinterMode); + + this.clickLEDMode1 = this.onClickLEDMode1.bindAsEventListener(this); + Event.observe(this.LEDMode1, 'mousedown', this.clickLEDMode1); + + this.clickLEDMode2 = this.onClickLEDMode2.bindAsEventListener(this); + Event.observe(this.LEDMode2, 'mousedown', this.clickLEDMode2); + + this.clickLEDMode3 = this.onClickLEDMode3.bindAsEventListener(this); + Event.observe(this.LEDMode3, 'mousedown', this.clickLEDMode3); + + this.elmHH.bind("blur", function() {self.checkValue("hh");}); + this.elmMM.bind("blur", function() {self.checkValue("mm");}); + this.elmSS.bind("blur", function() {self.checkValue("ss");}); + + }, + + onClickOpen: function() { + if (Released == undefined || Released == false) { + this.state = 100; + setDpState(this.opts.idLevel, (this.state / 100)); + } + }, + + onClickClose: function() { + if (Released == undefined || Released == false) { + this.state = 0; + this.Perc.value = this.state; + setDpState(this.opts.idLevel, (this.state / 100)); + } + }, + + _onClickWinRelease : function() { + //setDpState(this.opts.idRelease, true); + setDpState(this.opts.idRelease, 1); + if (this.state > 0) { + ControlBtn.off(this.Open); + ControlBtn.off(this.Close); + ControlBtn.on(this.Release); + } + }, + + onClickWinRelease : function() { + setDpState(this.opts.idRelease, 1); + }, + + onClickHandleUnlock : function() { + //alert("HANDLE UNLOCK"); + setDpState(this.opts.idHandleLock, false); + //ControlBtn.pushed(this.HandleUnlock); + //ControlBtn.on(this.HandleUnlock); + //ControlBtn.off(this.HandleLock); + }, + + onClickHandleLock : function() { + //alert("HANDLE LOCK"); + setDpState(this.opts.idHandleLock, true); + //ControlBtn.pushed(this.HandleLock); + //ControlBtn.off(this.HandleUnlock); + //ControlBtn.on(this.HandleLock); + }, + + onClickSummerMode : function() { + //alert("Summer Mode"); + setDpState(this.opts.idWinterMode, 111600); + ControlBtn.pushed(this.SummerMode); + var t = this; + new PeriodicalExecuter(function(pe) { + //ControlBtn.on(t.SummerMode); + //ControlBtn.off(t.WinterMode); + pe.stop(); + }, 1); + }, + + onClickWinterMode : function() { + //alert("Winter Mode"); + fixTimeForWinterMode = 600; + + this.checkValue("hh"); + this.checkValue("mm"); + this.checkValue("ss"); + + //setDpState(this.opts.idWinterMode, this.getSecondsWinterMode()); // for development only + + setDpState(this.opts.idWinterMode, fixTimeForWinterMode); + ControlBtn.pushed(this.WinterMode); + var t = this; + new PeriodicalExecuter(function(pe) { + //ControlBtn.off(t.SummerMode); + //ControlBtn.on(t.WinterMode); + pe.stop(); + }, 1); + }, + + onClickLEDMode1 : function() { + // LED OFF + conInfo("WIN_SC.HANDLE_LED_MODE 0"); + setDpState(this.opts.idLEDMode, 0); + ControlBtn.pushed(this.LEDMode1); + var t = this; + new PeriodicalExecuter(function(pe) { + //ControlBtn.on(t.LEDMode1); + //ControlBtn.off(t.LEDMode2); + //ControlBtn.off(t.LEDMode3); + pe.stop(); + }, 1); + }, + + onClickLEDMode2 : function() { + // LED LOW + conInfo("WIN_SC.HANDLE_LED_MODE 1"); + setDpState(this.opts.idLEDMode, 1); + ControlBtn.pushed(this.LEDMode2); + var t = this; + new PeriodicalExecuter(function(pe) { + //ControlBtn.off(t.LEDMode1); + //ControlBtn.on(t.LEDMode2); + //ControlBtn.off(t.LEDMode3); + pe.stop(); + }, 1); + }, + + onClickLEDMode3 : function() { + // LED ON + conInfo("WIN_SC.HANDLE_LED_MODE 2"); + setDpState(this.opts.idLEDMode, 2); + ControlBtn.pushed(this.LEDMode3); + var t = this; + new PeriodicalExecuter(function(pe) { + //ControlBtn.off(t.LEDMode1); + //ControlBtn.off(t.LEDMode2); + //ControlBtn.on(t.LEDMode3); + pe.stop(); + }, 1); + }, + + onClickPercUp: function() + { + if (this.state <= 0) { + this.state = 20; + } else { + this.state += 10; + } + if( this.state > 100 ) this.state = 100; + this.Perc.value = this.state; + this.refresh(); + }, + + onClickPercDown: function() + { + if (this.state >= 30) { + this.state -= 10; + } else { + this.state-= 20; + } + if( this.state < 0 ) this.state = 0; + this.refresh(); + } + +}); + +iseButtonsWin_SC_SENSOR = Class.create(iseButtonsWinMatic, { + + initSpecialDevice: function() { + this.Window = "WIN_SC_SENSOR"; + conInfo(this.Window); + this.imgWinClosed = "/ise/img/window/closed.png"; + this.imgWinOpen = "/ise/img/window/open_v.png"; + this.imgWinReleased = "/ise/img/window/open_h.png"; + + //this.Open = $(this.id + "Open"); + //this.Close = $(this.id + "Close"); + this.stateIndicatorImgElem = jQuery("#" + this.id + "stateIndicatorImg"); + this.stateIndicatorDescrElem = jQuery("#" + this.id + "stateIndicatorDescr"); + this.stateDescrElem = jQuery("#" + this.id + "stateDescr"); + this.windowTypeDescr = jQuery("#" + this.id + "windowType"); + + + this.level = (this.state < 0 ) ? 0 : this.state; + + jQuery("#" + this.id + "lblPerc").html("Öffnungs-
winkel
" + this.level); + this.initControls(); + }, + + initControls: function() { + var tmpLevel; + + var release = $$(".j_winSC_Release")[0], + open = jQuery(".j_winSC_Open")[0], + close = jQuery(".j_winSC_Close")[0], + perc = jQuery(".j_winSC_Perc")[0], + + codeReleasedDue = 9, + codeReleased = 10; + + // Window released + if ((this.opts.stTipTronicState == codeReleased) || (this.opts.stTipTronicState == codeReleasedDue)) { + Released = true; + ControlBtn.on(release); + ControlBtn.off(open); + ControlBtn.off(close); + + this.stateIndicatorImgElem.attr('src', this.imgWinReleased); + this.stateIndicatorDescrElem.html(translateKey("actionStatusControlReleased")); + } else { + Released = false; + new PeriodicalExecuter(function(pe) { + ControlBtn.off(release); // channel 1 + pe.stop(); + }, 1); + tmpLevel = this.level; + // Window open + if (parseInt(tmpLevel) > 0) { + ControlBtn.on(open); // channel 1 + ControlBtn.off(close); // channel 1 + ControlBtn.off(release); // channel 1 + + this.stateIndicatorImgElem.attr('src', this.imgWinOpen); + this.stateIndicatorDescrElem.html(translateKey("actionStatusControlOpenB") + "
" + this.level + "%"); + } else { + // window closed + ControlBtn.on(close); // channel 1 + ControlBtn.off(open); // channel 1 + ControlBtn.off(release); // channel 1 + this.stateIndicatorImgElem.attr('src', this.imgWinClosed); + this.stateIndicatorDescrElem.html(translateKey("actionStatusControlClosed")); + } + } + jQuery(perc).val(this.level); + this.stateDescrElem.html(translateKey("stringTableActorWindowTT_"+this.opts.stTipTronicState)); + this.windowTypeDescr.html(translateKey("stringTableSensorWindowType_"+this.opts.stWindowType)); + + }, + + // No action when clicking the buttons + onClickCtrl: function() {}, + onClickOpen: function() {}, + onClickClose : function() {} +});/** + * ise/iseButtonsKeyMatic.js + **/ + +/** + * @fileOverview ? + * @author ise + **/ + +/* * * * * * * * * * * * * * * * * * * * * * * * + * iseButtonsKeyMatic * + * * * * * * * * * * * * * * * * * * * * * * * */ + +/** + * @class Bedien-Control für die KeyMatic + **/ +iseButtonsKeyMatic = Class.create(); + +iseButtonsKeyMatic.prototype = { + /* + * id = ID of KeyMatic + */ + initialize: function(id, opts, iViewOnly) { + this.id = id; + this.opts = opts; + this.divOpen = $(opts.idState + "Open"); + this.divClosed = $(opts.idState + "Close"); + this.divOpenDoor = $(opts.idOpen + "OpenDoor"); + this.divStatusIndefinite = $(opts.idUncertain + "na"); + + if (iViewOnly === 0) + { + this.clickClose = this.onClickClose.bindAsEventListener(this); + Event.observe(this.divClosed, 'mousedown', this.clickClose); + + this.clickOpen = this.onClickOpen.bindAsEventListener(this); + Event.observe(this.divOpen, 'mousedown', this.clickOpen); + + this.clickDoorOpen = this.onClickDoorOpen.bindAsEventListener(this); + Event.observe(this.divOpenDoor, 'mousedown', this.clickDoorOpen); + } + + if (opts.stState == 1) + { + ControlBtn.on(this.divOpen); + } + else + { + ControlBtn.on(this.divClosed); + } + + if (opts.stUncertain == 1) { + ControlBtn.on(this.divStatusIndefinite); + } + if (opts.stOpen == 1) { + ControlBtn.on(this.divOpenDoor); + } + }, + + onClickClose: function() { + ControlBtn.pushed(this.divClosed); + setDpState (this.opts.idState, 0); + var t = this; + new PeriodicalExecuter(function(pe) { + ControlBtn.on(t.divClosed); + ControlBtn.off(t.divOpen); + pe.stop(); + }, 1); + }, + + onClickOpen: function() { + ControlBtn.pushed(this.divOpen); + setDpState (this.opts.idState, 1); + var t = this; + new PeriodicalExecuter(function(pe) { + ControlBtn.on(t.divOpen); + ControlBtn.off(t.divClosed); + pe.stop(); + }, 1); + }, + + onClickDoorOpen: function() { + ControlBtn.pushed(this.divOpenDoor); + setDpState(this.opts.idOpen, 1); + var t = this; + new PeriodicalExecuter(function(pe) { + if (t.opts.stOpen == 1) { ControlBtn.on(t.divOpenDoor); } + else { ControlBtn.off(t.divOpenDoor); } + pe.stop(); + }, 1); + } +}; +/** + * ise/DoorOpener.js + * Türöffner. + **/ + +/** + * @fileOverview ? + * @author ise + **/ + +/** + * @class Bedien-Control für den Türöffner + **/ +DoorOpenerControl = Class.create(); +DoorOpenerControl.prototype = { + + /** + * Konstruktor. + * channelId : Id des Türöffners (Kanal) + * dataPointId: Id des Datenpunkts DOOROPENER.STATE + * iViewOnly : 0: Control bedienbar + * sonst: Control nicht bedienbar + **/ + initialize: function(channelId, dataPointId, iViewOnly) + { + this.channelId = channelId; + this.dataPointId = dataPointId; + this.doorOpenerDiv = $(channelId + "DoorOpener"); + + if( this.doorOpenerDiv ) { ControlBtn.off(this.doorOpenerDiv); } + + if (iViewOnly === 0) + { + this.click = this.onClick.bindAsEventListener(this); + Event.observe(this.doorOpenerDiv, 'mousedown', this.click); + Element.setStyle(this.doorOpenerDiv, {"cursor": "pointer"}); + } + }, + + /** + * Ereignis: Click auf this.doorOpenerDiv + * Öffnet die Tür. + **/ + onClick: function() + { + setDpState(this.dataPointId, 1); + ControlBtn.pushed(this.doorOpenerDiv); + var t = this; + new PeriodicalExecuter(function(pe) { + ControlBtn.off(t.doorOpenerDiv); + pe.stop(); + }, 1); + } + +}; +/** + * ise/iseSysProtoLoader.js + **/ + +/** + * @fileOverview ? + * @author ise + **/ + +/** + * @class + **/ +iseSysProtoLoader = Class.create(); +iseSysProtoLoader.prototype = +{ + initialize: function(sTBody,iCount,bUpdateOnly) + { + this.tbody = $(sTBody); + this.updateOnly = bUpdateOnly; + this.currentIndex = 0; + this.count = iCount; + this.url = "/pages/tabs/control/systemProtocolLoader.htm?sid="+SessionId; + Cursor.set(Cursor.WAIT); + if( this.updateOnly ) + { + this.updateTable(); + } + else + { + arHistoryData = new Array(); + this.loadHistoryData(); + } + }, + + loadHistoryData: function() + { + var btnRefreshTable = jQuery("#btnRefreshTable"); + btnRefreshTable.prop("onclick","").unbind(); + var t = this; + var pb = ''; + pb += 'string sStart = "'+this.currentIndex+'";'; + pb += 'string sCount = "'+this.count+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete: function(transParams) + { + transParams.responseText.evalScripts(); + var resp = iseStripAll(transParams.responseText.stripScripts()); + var iResponse = parseInt( resp ); + if( isNaN(iResponse) ) { iResponse = 0; } + if( iResponse !== 0 ) + { + t.updateTable(); + t.currentIndex += iResponse; + t.loadHistoryData(); + } + else + { + Cursor.set(Cursor.NORMAL); + // SPHM-645 + //if( !t.updateOnly ) DivSort("sqldate"); + btnRefreshTable.click(function() {refreshTable(false);}); + } + } + }; + new Ajax.Updater("dummy",this.url,opts); + }, + + updateTable: function() + { + if( this.updateOnly ) + { + arTempHistoryData = arHistoryData; + } + for (var i = 0; i < arTempHistoryData.length; i++) + { + var sName = arTempHistoryData[i]['name']; + var sValue = arTempHistoryData[i]['value']; + var sDateTime = arTempHistoryData[i]['datetime']; + var sDate = arTempHistoryData[i]['date']; + var sTime = arTempHistoryData[i]['time']; + + var tr = Builder.node('tr', {id: arTempHistoryData[i]['trid']} ); + var td; + + if( this.tbody.id == "sysprotopreview" ) + { + td = Builder.node('td', {className: "GrayBkg"}, sDate+" "+sTime); + tr.appendChild(td); + } + else + { + td = Builder.node('td', {className: "GrayBkg"}, sTime); + tr.appendChild(td); + + td = Builder.node('td', {className: "GrayBkg"}, sDate); + tr.appendChild(td); + } + + td = Builder.node('td', {className: "GrayBkg"}, translateString(sName)); + tr.appendChild(td); + + var div = document.createElement("div"); + //div.innerHTML = sValue; + div.innerHTML = translateString(sValue) ; + td = Builder.node('td', {className: "GrayBkg"}, div); + Element.setStyle(td, {textAlign: "left", paddingLeft: "6px"}); + tr.appendChild(td); + + if( this.tbody ) + { + this.tbody.appendChild(tr); + } + } + if( this.updateOnly ) Cursor.set(Cursor.NORMAL); + updateTable(); + arTempHistoryData = new Array(); + } +}; +/** + * ise/iseChannelLoader.js + **/ + +/** + * @fileOverview ? + * @author ise + **/ + +/** + * @class + **/ +iseChannelLoader = Class.create(); +iseChannelLoader.prototype = +{ + initialize: function(sTBody,iCountPerUpdate,bUpdateOnly) + { + this.tbody = $(sTBody); + this.updateOnly = bUpdateOnly; + this.currentIndex = 0; + this.count = iCountPerUpdate; + this.url = "/pages/tabs/statusviews/channelLoader.htm?sid="+SessionId; + Cursor.set(Cursor.WAIT); + if( this.updateOnly ) + { + this.updateTable(); + } + else + { + arChannels = new Array(); + this.loadChannels(); + } + }, + loadChannels: function() + { + var t = this; + var pb = ''; + pb += 'string sStart = "'+this.currentIndex+'";'; + pb += 'string sCount = "'+this.count+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete: function(transParams) + { + transParams.responseText.evalScripts(); + var resp = iseStripAll(transParams.responseText.stripScripts()); + //alert("["+resp+"]"); + if( resp != "0" ) + { + t.updateTable(); + t.currentIndex += parseInt(resp,10); + t.loadChannels(); + } + else + { + Cursor.set(Cursor.NORMAL); + if( !t.updateOnly ) DivSort("name"); + } + } + }; + new Ajax.Updater("dummy",this.url,opts); + }, + updateTable: function() + { + if( this.updateOnly ) + { + arTempChannels = arChannels; + } + for (var i = 0; i < arTempChannels.length; i++) + { + var tr = Builder.node('tr', {id: 'tr'+arTempChannels[i]['id']} ); + var td; + + var sName = arTempChannels[i]['name']; + td = Builder.node('td', {className: "GrayBkg"}, sName); + tr.appendChild(td); + + var sRooms = arTempChannels[i]['rooms']; + td = Builder.node('td', {className: "GrayBkg"}, sRooms); + tr.appendChild(td); + + var sFunctions = arTempChannels[i]['funcs']; + td = Builder.node('td', {className: "GrayBkg"}, sFunctions); + tr.appendChild(td); + + var sLastTime = arTempChannels[i]['lasttime']; + td = Builder.node('td', {id: 'tmc'+arTempChannels[i]['id'], className: "GrayBkg"}, sLastTime); + tr.appendChild(td); + + var sDatapoint = arTempChannels[i]['id']; + td = Builder.node('td', {id: 'dpc'+arTempChannels[i]['id'], className: "GrayBkg"}); + tr.appendChild(td); + + if( this.tbody ) this.tbody.appendChild(tr); + + recreateControl(arTempChannels[i]['id'],sLastTime); + } + + if( this.updateOnly ) Cursor.set(Cursor.NORMAL); + arTempChannels = new Array(); + } +}; +/** + * ise/shutterControl.js + **/ + +/** + * @fileOverview ? + * @author ise + **/ + +/** + * @class + **/ +shutterControl = Class.create(); + +shutterControl.prototype = { + + m_color: WebUI.getColor("shutterOpeningDegree"), + + /* + * id = id of div containing shutter-image + * initState + */ + initialize: function(id, initState) { + this.MAX_HEIGHT = 100; + this.state = initState; + + + $("shutter" + id).innerHTML = "
" + + "
" + + "
"; + this.divShutter = $("shutterCtrl" + id); + this.divShutterBg = $("shutterBg" + id); + }, + + setValue: function(val) { + this.state = val; + this.divShutter.style.height = parseInt(this.MAX_HEIGHT - (val * (this.MAX_HEIGHT / 100))) + "px"; + } +};/** + * ise/channelLoader.js + **/ + +/** + * @fileOverview ? + * @author ise + **/ + +/** + * @class + **/ +channelLoader = Class.create(); + +channelLoader.prototype = { + /* + * id = DOM-ID of switch + * initState = Creation State + */ + initialize: function(channelCount) { + this.channelCount = channelCount; + this.currentIndex = 0; + this.loadChannels(this.currentIndex); + }, + + + loadChannels: function(index) { + var url = ""; + var t = this; + var pb =""; + //pb += "system.SetSessionVar('sessionIdx', " + this.currentIndex + ");"; + pb += 'string index = "'+index+'";'; + var opts = { + postBody: ReGa.encode(pb), + evalScripts: true, + onComplete: function(transParams) { + t.currentIndex+=5; + if (t.currentIndex <= t.channelCount) + { + t.loadChannels(t.currentIndex); + } + else + { + if(FirstSort){FirstSort();} + } + Cursor.set(Cursor.NORMAL); + } + }; + new Ajax.Updater("dummy", "/pages/tabs/statusviews/channelBody.htm?sid=" + SessionId, opts); + } +}; + +/** + * @class + **/ +newDevChnLoader = Class.create(); +newDevChnLoader.prototype = { + /* + * id = DOM-ID of switch + * initState = Creation State + */ + initialize: function(channelCount) { + this.channelCount = channelCount; + this.currentIndex = 0; + this.loadChannels(channelCount); + }, + + + loadChannels: function(index) + { + var url = ""; + var t = this; + var pb =""; + pb += "system.SetSessionVar('sessionIdx', '" + this.currentIndex + "');"; + //pb += 'string index = "'+index+'";'; + var opts = { + postBody: ReGa.encode(pb), + evalScripts: true, + onComplete: function(transParams) { + t.currentIndex+=5; + if (t.currentIndex <= t.channelCount) + { + t.loadChannels(t.currentIndex); + } + else + { + Cursor.set(Cursor.NORMAL); + } + } + }; + new Ajax.Updater("dummy", "/pages/tabs/admin/views/newdevicechannelsloader.htm?sid=" + SessionId, opts); + } +}; + + +/** + * ise/channelPopupLoader.js + **/ + +/** + * @fileOverview ? + * @author ise + **/ + +/** + * @class + **/ +channelPopupLoader = Class.create(); +channelPopupLoader.prototype = +{ + initialize: function(path,colName,bSecondary,operations,channellist) + { + this.currentIndex = 0; + this.count = 5; + this.path = path; + this.colName = colName; + this.operations = operations; + this.channellist = channellist; + this.loadArray(this.currentIndex); + }, + + loadArray: function() + { + var url = this.path+"?sid="+SessionId; + var pb = ''; + pb += 'string sStartPos = "'+this.currentIndex+'";'; + pb += 'string sCount = "'+this.count+'";'; + pb += 'string sOperations = "'+this.operations+'";'; + pb += 'string eChannelList = "'+this.channellist+'";'; + var me = this; + var opts = + { + postBody: ReGa.encode(pb), + onComplete: function(t) + { + t.responseText.evalScripts(); + var resp = iseStripAll(t.responseText.stripScripts()); + if( resp == "stop" ) + { + ChnSort(ccLastSort); + } + else + { + me.currentIndex+=me.count; + me.loadArray(); + } + } + }; + Cursor.set(Cursor.WAIT); + new Ajax.Updater("dummy",url,opts); + } + +}; +/** + * ise/programPopupLoader.js + **/ + +/** + * @fileOverview ? + * @author ise + **/ + +/** + * @class + **/ +programPopupLoader = Class.create(); +programPopupLoader.prototype = +{ + + initialize: function(path,colName) + { + this.currentIndex = 0; + this.path = path; + this.colName = colName; + this.loadPopupProgram(this.currentIndex); + }, + + loadPopupProgram: function(index) + { + var t = this; + var url = t.path+"?sid="+SessionId; + var pb = ''; + pb += 'integer iCurrentIndex = '+this.currentIndex+';'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete: function(transParams) + { + transParams.responseText.evalScripts(); + var resp = iseStripAll(transParams.responseText.stripScripts()); + if( resp == "true" ) + { + t.currentIndex+=5; + t.loadPopupProgram(t.currentIndex); + } + else + { + t.updateTable(); + } + } + }; + new Ajax.Updater("dummy",url,opts); + }, + + updateTable: function() + { + var tableBody = $("prgBody"); + if( tableBody ) + { + var count = tableBody.rows.length-1; + for(var x=count; x > -1; x--) + { + tableBody.deleteRow(x); + } + + IseSort(arProgs,this.colName,false); + for (var i = 0; i < arProgs.length; i++) + { + var tr = Builder.node('tr', {id: arProgs[i]['trid']}); + //var td = Builder.node('td', {className: 'SysVarsTblPopup'}, strCut(translateString(arProgs[i]['name']) , true) ); + var td = Builder.node('td', {className: 'SysVarsTblPopup'}, translateString(arProgs[i]['name'])); + tr.appendChild(td); + td = Builder.node('td', {className: 'SysVarsTblPopup'}, arProgs[i]['prginfo']); + tr.appendChild(td); + td = Builder.node('td', {className: 'SysVarsTblPopup'}, translateString(arProgs[i]['active']) ); + tr.appendChild(td); + + td = Builder.node('td', {className: 'WhiteBkg'}, [ + Builder.node('div', {className: 'StdButton', onclick:"saveDlgResult(" + arProgs[i]['id'] + ");PopupClose();"}, translateKey('btnSelect')) + ]); + tr.appendChild(td); + + tableBody.appendChild(tr); + } + Cursor.set(Cursor.NORMAL); + } + } + +}; +/** + * ise/sysVarsPopupLoader.js + **/ + +/** + * @fileOverview ? + * @author ise + **/ + +/** + * @class + **/ +sysVarsPopupLoader = Class.create(); + +sysVarsPopupLoader.prototype = { + /* + * id = DOM-ID of switch + * initState = Creation State + */ + + initialize: function(path,colName,iSec) + { + this.currentIndex = 0; + this.path = path; + this.colName = colName; + this.sec = iSec; + this.loadPopupsysVars(this.currentIndex); + }, + + loadPopupsysVars: function() + { + var t = this; + var url = t.path+"?sid="+SessionId; + var pb = ''; + pb += 'integer iCurrentIndex = '+this.currentIndex+';'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete: function(transParams) + { + transParams.responseText.evalScripts(); + var resp = iseStripAll(transParams.responseText.stripScripts()); + if( resp == "true" ) + { + t.currentIndex+=5; + t.loadPopupsysVars(t.currentIndex); + } + else + { + t.updateTable(); + } + } + }; + new Ajax.Updater("dummy",url,opts); + }, + + updateTable: function() + { + var tableBody = $("sysVarDisplay"); + if( tableBody ) + { + var count = tableBody.rows.length-1; + for(var x=count; x > -1; x--) + { + tableBody.deleteRow(x); + } + + IseSort(arSysVars,this.colName,false,true); + for (var i = 0; i < arSysVars.length; i++) + { + var sOnclick = "PopupClose();"; + if( this.sec ) sOnclick = "restorePrevious();"; + sOnclick = "saveDlgResult("+arSysVars[i]['id']+");"+sOnclick; + + var cName = 'SysVarsTblPopup'; + if( arSysVars[i]['internal'] === 'true' ) { + cName = 'LightGrayBkg SysVarsTblPopup'; + } + + var tr = Builder.node('tr', {id: arSysVars[i]['trid'], className:cName, onclick:sOnclick, onmouseover:'this.className="SysVarsTblPopup_Highlight";', onmouseout:'this.className="' + cName + '";'}); + var td = Builder.node('td', {}, translateString(arSysVars[i]['name'])); + tr.appendChild(td); + td = Builder.node('td', {}, translateString(arSysVars[i]['desc'])); + tr.appendChild(td); + td = Builder.node('td', {}, translateString(arSysVars[i]['typenames'])); + tr.appendChild(td); + td = Builder.node('td', {}, translateString(arSysVars[i]['values'])); + tr.appendChild(td); + td = Builder.node('td', {}, translateString(arSysVars[i]['unit'])); + tr.appendChild(td); + + tableBody.appendChild(tr); + } + Cursor.set(Cursor.NORMAL); + } + + + } +}; +/** + * ise/checkUserInput.js + **/ + +/** + * @fileOverview ? + * @author ise + **/ + +/* + * * * checkUserInput.js + * * * Enthaltene Funktionen + * + * checkTemperatureMinMax(input, MinVal, MaxVal) + * Überprüft ob Temperatur gültig und innerhalb von MinVal und MaxVal ist + * + * checkTemperature(input) + * Überprüft Temperatur ohne Min- und Max-Werte + * Erlaubt sind Eingaben wie 12, 13, 12C, 12°C, 87F, 87°F (sowie Dezimalwerte) + * + * checkCharOnly(input) + * + * checkDigitsOnly(input) + * + * checkDecimal(input) + * Prüft auf eine Dezimalzahl + * + * checkPercentage(input) + * Erlaubte Eingaben: 50, 12, 13%, 13 % + * + * convertPercentage(input) + * Entfernt das Prozentzeichen der Eingabe und gibt (input / 100) zurück + * + * checkInput(input, type) + * Kann mit einer der globalen Konstanten aufgerufen werden + * + * checkTime(val) + * gültige Eingabe --> 12:54 + * + * checkDate(val) + * gültige Eingabe --> 18.09.2007 oder 18.09.07 + */ + + +// * * * Global Constants +CHK_TEMP = 1; +CHK_CHAR_ONLY = 2; +CHK_DIGITS_ONLY = 3; +CHK_PERCENT = 4; +CHK_DECIMAL = 5; + + +// * * * * * * * * * * * * * * * * +// * * * FUNCTIONS * +// * * * * * * * * * * * * * * * * + +// Temperatur: erlaubt sind Zahlen sowie '.' und ',' +// ausserdem: 'C', 'F', '°C'und '°F' als letzte Zeichen +// Bei Fahrenheit-Werten wird ausserdem nach Celsius umgerechnet +// und mit MinVal und MaxVal verglichen +// +// Wenn kein Vergleich mit Minimal- und Maximal-Werten gewünscht ist +// müssen MinVal und MaxVal auf 0 gesetzt werden +checkTemperatureMinMax = function(input, MinVal, MaxVal) { + var doMinMaxCheck = ((MinVal !== 0) || (MaxVal !== 0)); + var tmpInput = input; + var isFarVal = false; + if (!checkDecimal(tmpInput)) { + // Zeichen für Temperaturangaben rausfiltern + if (tmpInput.indexOf('°C') != -1) { + tmpInput = tmpInput.substr(0, tmpInput.indexOf('°C')); + } + if (tmpInput.indexOf('°C') != -1) { + tmpInput = tmpInput.substr(0, tmpInput.indexOf('°C')); + } + if (tmpInput.indexOf('C') != -1) { + tmpInput = tmpInput.substr(0, tmpInput.indexOf('C')); + } + if (tmpInput.indexOf('°F') != -1) { + tmpInput = tmpInput.substr(0, tmpInput.indexOf('°F')); + isFarVal = true; + } + if (tmpInput.indexOf('°F') != -1) { + tmpInput = tmpInput.substr(0, tmpInput.indexOf('°F')); + isFarVal = true; + } + if (tmpInput.indexOf('F') != -1) { + tmpInput = tmpInput.substr(0, tmpInput.indexOf('F')); + isFarVal = true; + } + + // Fall Abgleich mit MinValue und MaxValue gewünscht wird und ein + // Fahrenheit-Wert eingegeben wurde... + if (doMinMaxCheck) { + if (isFarVal) { + if (checkDecimal(tmpInput)) { + var celVal = farToCel(tmpInput); // Umrechnen und prüfen ob innerhalb MinVal und MaxVal + return ((celVal > MinVal) && (celVal < MaxVal)); + } + else { + return false; + } + } + } + } + // Falls Chars entfernt wurden nochmal auf Dezimalwert testen + if (checkDecimal(tmpInput)) { + if (doMinMaxCheck) { + tmpInput = tmpInput.replace(/,/, "."); // für WerteVergleich + return ((tmpInput >= MinVal) && (tmpInput <= MaxVal )); + } + else { + return true; + } + } + else { + return false; + } +}; + +// Temperatur-Überprüfung ohne Beachtung von Minimal- und Maximal-Werten +checkTemperature = function(input) { + return checkTemperatureMinMax(input, 0, 0); +}; + +checkCharOnly = function(input) { + ok = true; + for(var i = 0; i < input.length; i++) { + if (!isChar(input.charAt(i))) { + ok = false; + break; + } + } + return ok; +}; + +checkDigitsOnly = function(input) { + var ok = true; + for (var i = 0; i < input.length; i++) { + if (isNaN(input.charAt(i))) { + ok = false; + break; + } + } + return ok; +}; + +// CheckDecimal: erlaubt sind [0..9] und ' und . +// True wird auch bei ganzen oder negativen Zahlen zurückgegeben +checkDecimal = function(input) { + var ok = true; + var i = 0; + if (input.charAt(0) == '-') // für negative Zahlen + i = 1; + for (i; i < input.length; i++) { + tmp = input.charAt(i); + if (isNaN(tmp)) { + // Ausnahmen für '.' und ',' + if (tmp != '.' && tmp != ',') { + ok = false; + break; + } + } + } + return ok; +}; + +// Percentage: Erlaubt sind Zahlen zwischen 0 und 100, sowie +// Eingaben mit Prozentzeichen mit evtl. Leerzeichen zwischen +// Zahl und Prozentzeichen. Keine Dezimalwerte. +checkPercentage = function(input) { + var tmpInput = ""; + // Evtl. vorhandenes Prozentzeichen zuerst entfernen + if (input.indexOf('%') != -1) { + tmpInput = input.substr(0, input.indexOf('%')); + if(tmpInput.length < 1) { // falls nur '%' übergeben wurde + return false; + } + } + else { + tmpInput = input; + } + if (checkDigitsOnly(tmpInput)) { + if (tmpInput < 0) + return false; + if (tmpInput > 100) + return false; + } + else { + return false; + } + return true; +}; + +// Von einem Prozentwert (string: 50, 50%, 50 % usw.) wird das +// Prozentzeichen entfernt und der Wert geteilt durch 100 zurückgegeben +convertPercentage = function(input) { + var tmpInput = ""; + // Evtl. vorhandenes Prozentzeichen zuerst entfernen + if (input.indexOf('%') != -1) { + tmpInput = input.substr(0, input.indexOf('%')); + if(tmpInput.length < 1) { // falls nur '%' übergeben wurde + return false; + } + } + else { + tmpInput = input; + } + return parseInt(tmpInput,10) / 100; + +}; + +checkInput = function(input, type) { + if (type == CHK_TEMP){ + return checkTemperature(input); + } + if (type == CHK_CHAR_ONLY) { + return checkCharOnly(input); + } + if (type == CHK_DIGITS_ONLY) { + return checkDigitsOnly(input); + } + if (type == CHK_PERCENT) { + return checkPercentage(input); + } + if (type == CHK_DECIMAL) { + return checkDecimal(input); + } + // Wenn man hier ankommt wurde der typ nicht erkannt + alert("checkInput: type unknown"); + return null; +}; + +// * * * * * * * * * * * * * * * * +// * * * DATUMS-FUNKTIONEN * +// * * * * * * * * * * * * * * * * +checkDay = function(val) { + var ret = false; + if (checkDigitsOnly(val)) { + if ( (val >= 1) && (val <=31) ) + ret = true; + } + return ret; +}; + +checkMonth = function(val) { + var ret = false; + if (checkDigitsOnly(val)) { + if ( (val >= 1) && (val <=12) ) + ret = true; + } + return ret; +}; + +checkYear = function(val) { + var ret = false; + if (checkDigitsOnly(val)) { + if ( (val > 0) ) + ret = true; + } + return ret; +}; + +checkHours = function(val) +{ + if( checkDigitsOnly(val) ) + { + if( (val >= 0) && (val <= 23) ) return true; + } + return false; +}; + +checkMinutes = function(val) +{ + if( checkDigitsOnly(val) ) + { + if( (val >= 0) && ( val <= 59) ) return true; + } + return false; +}; + +checkSeconds = function(val) +{ + if( checkDigitsOnly(val) ) + { + if( (val >= 0) && ( val <= 59) ) return true; + } + return false; +}; + +// Eingabe abhängig von Parameter bSeparator +checkTime = function(val) +{ + var sSplit = new Array(2); + sSplit = val.split(":"); + if( val === "" ) return false; + if( sSplit.length != 2 ) return false; + var tHours = parseInt(sSplit[0],10); + var tMinutes = parseInt(sSplit[1],10); + if( isNaN(tHours) || isNaN(tMinutes) ) return false; + return ( checkHours(sSplit[0]) && checkMinutes(sSplit[1]) ); +}; + + +// Eingabe abhängig von Parameter bSeparator +checkDate = function(val) { + var ret = false; + var sSplit = new Array(3); + + if (val === "") + return false; + sSplit = val.split("."); + + if (sSplit.length != 3) + return false; + if (checkDay(sSplit[0])) { + if (checkMonth(sSplit[1])) { + if (checkYear(sSplit[2])) { + ret = true; + } + } + } + return ret; +}; + + +// * * * * * * * * * * * * * * * * +// * * * HILFS-FUNKTIONEN * +// * * * * * * * * * * * * * * * * + +// Konvertiert einen Fahrenheit- in einen Celsius-Wert +farToCel = function(farVal) { + return ((farVal - 32) / 1.8); +}; + +// Gibt true zurück falls ein Character übergeben wurde +isChar = function(Data) { + var varChars = "éèàùûôoöë-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ "; + return (varChars.indexOf(Data) != -1); +}; +/** + * ise/js/PowerMeter.js + * POWERMETER. POWERMETER_IGL + **/ + +/** + * @author gral + **/ + +/** + * @class Control for the 'POWERMETER' + **/ +isePowerMeter = Class.create(); + +isePowerMeter.prototype = { + + initialize: function(id, opts) { + conInfo("PowerMeter"); + var self = this; + this.opts = opts; + this.powerMeter = "POWERMETER"; // e. g. Hm-ES-PMSw1-PL-DN-R1 + this.POWERMETER_IEC = "POWERMETER_IEC"; // e. g. Hm-ES-TX-WM + this.energyMeterTransmitter = "ENERGIE_METER_TRANSMITTER"; // e. g. HmIP-PSM + this.arMeasurementTypes = []; + this.sensorTypeID = {}; + this.sensorTypeID.gas = "Gas"; + this.sensorTypeID.eletricity = "Electricity"; + this.sensorTypeID.iec = "IEC"; + this.sensorTypeID.unknown = "Unknown"; + this.kiloPrefix = ""; + this.hasFeedIn = (this.opts.chLabel == "HmIP-PSMCO") ? true : false; + + this.id = id; + this.summedUpEnergy = 0.0; + this.summedUpFeedIn = 0.0; + this.measurementType = this.getSensorType(); + conInfo("Identified sensor: " + this.measurementType); + + this.panel2Show = null; + + // Channel 2 is only visible when a IEC-Sensor is attached + if (this.opts.chType == "POWERMETER_IEC2") { + this.panel2Show = (this.measurementType == this.sensorTypeID.iec) ? this.getJElemsByName("channelActiv") : this.getJElemByID("channelNotActiv"); + + this.panel2Show.show(); + } else { + this.panel2Show = this.getJElemsByName("channelActiv"); + this.panel2Show.show(); + } + + this.EnergyCounterID = "svEnergyCounter" + this.getSensorExtension() + "_" + this.id + "_" + this.opts.chAddress; + this.EnergyCounterRESETID = "svEnergyCounter_" + this.id + "_" + this.opts.chAddress + "_RESET"; + this.EnergyCounterOldValID = "svEnergyCounter" + this.getSensorExtension() + "OldVal_" + this.id; + this.EnergyPrice = "unknown"; + + this.EnergyCounterFeedInID = "svEnergyCounterFeedIn_" + this.id + "_" + this.opts.chAddress; + + this.bindEvents(); + + this.setGenericInfoPanels(this.getVisibleInfoPanels()); + + // When gas sensor change the unit from Wh to m^3 and change the EnergyCounterID + if (this.measurementType == this.sensorTypeID.gas) { + this.opts.unitEnergyCounter = "m3"; + this.EnergyCounterID = "svEnergyCounterGas_" + this.id + "_" + this.opts.chAddress; + this.EnergyCounterRESETID = "svEnergyCounterGas_" + this.id + "_" + this.opts.chAddress + "_RESET"; + this.EnergyCounterOldValID = "svEnergyCounterGasOldVal_" + this.id; + } else if (this.measurementType == this.sensorTypeID.unknown) { + // Unknown sensor + this.opts.unitEnergyCounter = ""; + } else if (this.measurementType == this.sensorTypeID.iec) { + this.opts.unitEnergyCounter = this.opts.unitEnergyCounterIEC; + } + jQuery("[name = '" + this.id + "EnergyCostDeviceUnit']").html(this.opts.unitEnergyCounter).show(); + this.setEnergyCounterPanel(); + + if (this.hasFeedIn) { + this.setEnergyCounterFeedInPanel(); + } + + this.energyConfig = homematic("system.getEnergyPrice", {}, function (result) { + self.energyConfig = result; + // When the energy price config is available and it´s a known sensor (electricity or gas) + // then show the energy cost + if (result && (self.measurementType != self.sensorTypeID.unknown)) { + self.showEnergyCost(); + } + }); + jQuery("[name = '" + this.id + "sensor" + this.getSensorExtension() + "']").show(); + conInfo("Interface: " + this.opts.iface); + conInfo("MeasurementType: " + this.measurementType); + + }, + + getVisibleInfoPanels: function() { + switch (this.opts.chType) { + //Wireless sender for power meter sensor + case "POWERMETER_IGL": + case "POWERMETER_IEC1": + case "POWERMETER_IEC2": + return ["Power"]; + default: + // POWERMETER - power meter switch actuator + return ["Voltage", "Current", "Power", "Frequency"]; + } + }, + + getSensorType: function() { + // Determine the type of measurement (gas or electicity) + var paramSet = homematic("Interface.getParamset", {"interface": this.opts.iface, "address" : this.opts.chAddress, "paramsetKey" :"MASTER"}); + + /* No meter type available + this.energyMeterTransmitter = e. g. a PSM or a Hm-ES-TX-WM Fw. >= 2.0.0 + */ + if (typeof paramSet.METER_TYPE == "undefined") { + return ((this.opts.chType == this.energyMeterTransmitter) || (this.opts.chType == this.powerMeter)) ? this.sensorTypeID.eletricity : this.sensorTypeID.iec; + } + + // No IEC Sensor + // 0 = Gas-Sensor, 1 = Electricity (IR-Sensor), 2 = Electricity (LED-Sensor), 3 = Unknown + + // IEC-Sensor + // 0 = Gas-Sensor, 1 = Electricity (IR-Sensor), 2 = Electricity (LED-Sensor), 3 = IEC-Sensor, 4 = Unknown + + switch (this.opts.chType) { + case "POWERMETER": + case "POWERMETER_IGL": + this.arMeasurementTypes = ["Gas", "Electricity", "Electricity", "Unknown"]; + break; + case "POWERMETER_IEC1": + case "POWERMETER_IEC2": + this.arMeasurementTypes = ["Gas", "Electricity", "Electricity", "IEC", "Unknown"]; + break; + } + return this.arMeasurementTypes[parseInt(paramSet.METER_TYPE)]; + }, + + buttonPressed: function(btn) { + var elem = jQuery(btn); + elem.addClass("ControlBtnOn").removeClass("ControlBtnOff"); + setTimeout(function() { + elem.addClass('ControlBtnOff').removeClass('ControlBtnOn'); + }, 500); + + }, + + bindEvents: function() { + var self = this; + + + jQuery("#"+ this.id + "resetEnergyCounter").bind("click", function(){ + conInfo("Set EnergyCounter"); + var dlgContent = "
"+translateKey('lblEnergyConsumptionInWatt')+"
", + valMeterReading; + + setEnergyCounterDlg = new YesNoDialog(translateKey("lblSetEnergyCounter"), dlgContent, function(result) { + if (result == YesNoDialog.RESULT_YES) { + valMeterReading = parseFloat(jQuery("#meterReading").val()); + + // This removes the dialog from the screen + Layer.remove(this.m_layer); + + if (! isNaN(valMeterReading)) { + // This sets the new value of the power meter + homematic("SysVar.setFloat", {"name": self.EnergyCounterID, "value": valMeterReading}, function () { + self.setEnergyCounterPanel(); + self.showEnergyCost(); + }); + } + } else { + // NO pressed + // This removes the dialog from the screen + Layer.remove(this.m_layer); + } + }, "html"); + + setEnergyCounterDlg.btnTextNo(translateKey("dialogBack")); + setEnergyCounterDlg.btnTextYes(translateKey("btnOk")); + + // Overwrites the original close method + setEnergyCounterDlg.close = function(result) { + if (this.m_callback) { this.m_callback(result); } + }; + + }); + + // Feed In + jQuery("#"+ this.id + "resetFeedInCounter").bind("click", function(){ + conInfo("Set Feed In Counter"); + var dlgContent = "
"+translateKey('lblEnergyConsumptionInWatt')+"
", + valMeterReading; + + setEnergyCounterDlg = new YesNoDialog(translateKey("lblSetEnergyCounter"), dlgContent, function(result) { + if (result == YesNoDialog.RESULT_YES) { + valMeterReading = parseFloat(jQuery("#meterReading").val()); + + // This removes the dialog from the screen + Layer.remove(this.m_layer); + + if (! isNaN(valMeterReading)) { + // This sets the new value of the power meter + homematic("SysVar.setFloat", {"name": self.EnergyCounterFeedInID, "value": valMeterReading}, function () { + self.setEnergyCounterFeedInPanel(); + //self.showEnergyCost(); + }); + } + } else { + // NO pressed + // This removes the dialog from the screen + Layer.remove(this.m_layer); + } + }, "html"); + + setEnergyCounterDlg.btnTextNo(translateKey("dialogBack")); + setEnergyCounterDlg.btnTextYes(translateKey("btnOk")); + + // Overwrites the original close method + setEnergyCounterDlg.close = function(result) { + if (this.m_callback) { this.m_callback(result); } + }; + + }); + + }, + + /** + * Sets the different parameter elements of the powermeter + */ + setGenericInfoPanels: function(arElements) { + var self = this; + jQuery.each(arElements, function(index, panel) { + self.setGenericPanel(panel); + }); + }, + + /** + * Returns the jQuery element of a given parameter + * @param {string} elem The name of the desired element + * @return {object} The desired element + */ + getJElemByID: function(elem) { + return jQuery("#" + this.id + elem); + }, + + getJElemsByName: function(elem) { + return jQuery("[name='" + this.id + elem + "']"); + }, + + getSensorExtension: function() { + switch (this.measurementType) { + case this.sensorTypeID.gas: + return this.sensorTypeID.gas; + case this.sensorTypeID.iec: + return this.sensorTypeID.iec; + default: return ""; + } + }, + /** + * Sets the text (value + unit) of the desired element + * @param {string} panel The name of the desired element + */ + setGenericPanel: function(panel) { + var sensorExtension = this.getSensorExtension(); + var j_panel = this.getJElemByID(panel), + value = this.opts["val" + panel + sensorExtension], + unit = this.opts["unit" + panel + sensorExtension]; + if (value && unit) { + j_panel.text(value.toFixed(2) + " " + unit); + } + }, + + changeToKilo: function(x) { + if (x == "summedUpFeedIn") { + return (this.summedUpFeedIn/1000).toFixed(3); + } else { + return (this.summedUpEnergy/1000).toFixed(3); + } + + }, + + setEnergyCounterPanel: function() { + var j_panel = this.getJElemByID("EnergyCounter"); + // For a Hm-ES-TX-WM (POWERMETER_IEC) with a firmware >= 2.0.0 show 4 decimal places + var decimalPlace = ((this.opts.chType.indexOf(this.POWERMETER_IEC) != -1) && (parseInt(this.opts.devFirmwareMajor) >= 2)) ? 4 : 2; + this.summedUpEnergy = parseFloat(homematic("SysVar.getValue", {"id" : this.EnergyCounterID})).toFixed(decimalPlace); + conInfo("setEnergyCounterPanel - this.summedUpEnergy: " + this.summedUpEnergy); + + this.kiloPrefix = ""; + if (this.summedUpEnergy >= 1000.0 && (this.measurementType != this.sensorTypeID.gas) && (this.measurementType != this.sensorTypeID.iec)) { + this.kiloPrefix = "k"; + this.summedUpEnergy = this.changeToKilo('summedUpEnergy'); + } + + j_panel.html(this.summedUpEnergy + " " + this.kiloPrefix + this.opts.unitEnergyCounter); + }, + + setEnergyCounterFeedInPanel: function() { + var j_panel = this.getJElemByID("energyCounterFeedIn"); + var decimalPlace = 2; + + this.summedUpFeedIn = parseFloat(homematic("SysVar.getValue", {"id" : this.EnergyCounterFeedInID})).toFixed(decimalPlace); + conInfo("setEnergyCounterFeedInPanel - this.summedUpFeedIn: " + this.summedUpFeedIn); + + this.kiloPrefix = ""; + if (this.summedUpFeedIn >= 1000.0) { + this.kiloPrefix = "k"; + this.summedUpFeedIn = this.changeToKilo('summedUpFeedIn'); + } + + j_panel.html(this.summedUpFeedIn + " " + this.kiloPrefix + this.opts.unitEnergyCounter); + }, + + getEnergyConsumption: function(sType) { + // Electricity sensor + if ((this.measurementType == this.sensorTypeID.eletricity )) { + if (sType == "CCU") return this.summedUpEnergy; + if (sType == "Device") return this.opts.valEnergyCounter; + } + + // Gas sensor + if (this.measurementType == this.sensorTypeID.gas) { + if (sType == "CCU") return (this.summedUpEnergy * this.energyConfig.gasHeatingValue * this.energyConfig.gasConditionNumber) ; + if (sType == "Device") return (this.opts.valEnergyCounterGas * this.energyConfig.gasHeatingValue * this.energyConfig.gasConditionNumber); + } + + // IEC sensor + if ((this.measurementType == this.sensorTypeID.iec)) { + if (sType == "CCU") return this.summedUpEnergy; + if (sType == "Device") return this.opts["valEnergyCounter" + this.getSensorExtension()]; + } + + }, + + // Some channels aren't allowed to show the energy cost + // E. g. the channel POWERMETER_IEC2 measures the energy which a client feeds into the power supply system (solar, wind or so) + isChannelValid2ShowEnergyCost: function() { + return (this.opts.chType == "POWERMETER_IEC2") ? false : true; + }, + + showEnergyCost: function() { + if (this.energyConfig && (this.measurementType != this.sensorTypeID.unknown) && ( this.isChannelValid2ShowEnergyCost()) ) { + var unitFactorCCU = 1000, + unitFactorDevice = 1000, + kWh = " kWh"; + + if (this.kiloPrefix == "k") { + unitFactorCCU = 1; + } + + if ((this.measurementType == this.sensorTypeID.iec)) { + unitFactorCCU = 1; + unitFactorDevice = 1; + } + + if (this.measurementType == this.sensorTypeID.gas) { + this.EnergyPrice = this.energyConfig.gasPrice; + unitFactorCCU = 1; + unitFactorDevice = 1; + } + if (this.measurementType == this.sensorTypeID.eletricity || this.measurementType == this.sensorTypeID.iec) this.EnergyPrice = this.energyConfig.curPrice; + + if (this.EnergyPrice != "unknown" && this.energyConfig.currency != null) { + var j_energyCostCCU = this.getJElemByID("EnergyCostCCU"), + j_energyCostDevice = this.getJElemByID("EnergyCostDevice"+this.getSensorExtension()), + energyConsumptionCCU = this.getEnergyConsumption("CCU"), + energyConsumptionDevice = this.getEnergyConsumption("Device"), + energyCostCCU = ((energyConsumptionCCU * this.EnergyPrice) / unitFactorCCU).toFixed(2) + " " + this.energyConfig.currency, + energyCostDevice = ((energyConsumptionDevice * this.EnergyPrice) / unitFactorDevice).toFixed(2) + " " + this.energyConfig.currency; + if (this.measurementType == this.sensorTypeID.gas) { + j_energyCostCCU.text(energyConsumptionCCU.toFixed(1) + kWh + " = " + energyCostCCU).show(); + j_energyCostDevice.text(energyConsumptionDevice.toFixed(1) + kWh + " = " + energyCostDevice).show(); + } else { + j_energyCostCCU.text(energyCostCCU).show(); + j_energyCostDevice.text(energyCostDevice).show(); + } + } else { + conInfo("Unknown energy price"); + } + } + } +}; + + +isePowerMeterESI = Class.create(); + +isePowerMeterESI.prototype = { + + initialize: function(id, opts) { + //console.log(opts); + var self = this; + + this.iface = "HmIP-RF"; + this.id = id; + this.opts = opts; + + this.powerMeter = "POWERMETER"; // e. g. Hm-ES-PMSw1-PL-DN-R1 + this.POWERMETER_IEC = "POWERMETER_IEC"; // e. g. Hm-ES-TX-WM + + this.energyMeterTransmitter = "ENERGIE_METER_TRANSMITTER"; // e. g. HmIP-PSM + this.sensorTypeID = {}; + this.sensorTypeID.gas = "Gas"; + this.sensorTypeID.eletricity = "Electricity"; + this.sensorTypeID.iec = "IEC"; + this.sensorTypeID.unknown = "Unknown"; + this.kiloPrefix = ""; + + this.idBtnSelfCalibration = this.opts.idBtnSelfCalibration; + + this.chn = parseInt(this.opts.chn); + + this.summedUpEnergy = 0.0; + + this.arSensorTypes = [ + "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" + ]; + + this.measurementType = this.getSensorType(); // Connected Sensor + + if (this.chn == 1) { + this.sensor = homematic("Interface.getMetadata", {"objectId": this.id, "dataId": "sensor"}); + console.log("this.measurementType: " + this.measurementType ,"this.sensor: " + this.sensor); + + this.showPowerGasFlowPanel(); + + if (this.measurementType != this.sensor) { + console.log("set MetaData sensor: " + this.measurementType); + homematic("Interface.setMetadata", {"objectId": this.id, "dataId": "sensor", "value": this.measurementType}); + } + + } + + this.EnergyPrice = "unknown"; + + this.bindEvents(); + + jQuery("[name = '" + this.id + "EnergyCostDeviceUnit']").html(this.opts.unitEnergyCounter).show(); + this.setEnergyCounterPanel(); + + this.energyConfig = homematic("system.getEnergyPrice", {}, function (result) { + self.energyConfig = result; + // When the energy price config is available and it´s a known sensor (electricity or gas) + // then show the energy cost + if (result && (self.measurementType != self.sensorTypeID.unknown)) { + self.showEnergyCost(); + } + }); + jQuery("[name = '" + this.id + "sensor" + this.getSensorExtension() + "']").show(); + conInfo("Interface: " + this.opts.iface); + conInfo("MeasurementType: " + this.measurementType); + + }, + + + showPowerGasFlowPanel: function() { + var panelElm = jQuery("[name='curConsumptionPanel_"+this.id+"']"), + noSensorElm = jQuery("#noSensorAvailable_" + this.id), + sensorGas = jQuery("#gasFlow_" + this.id), + sensorElec = jQuery("#power_" + this.id); + + // console.log("showPowerGasFlowPanel", "this.measurementType: " + this.measurementType); + + if ((typeof this.measurementType == "undefined") || (this.measurementType == null) ) { + panelElm.hide(); + noSensorElm.show(); + return; + } + + switch (this.measurementType) { + case this.arSensorTypes[0]: // SENSOR_UNKNOWN + panelElm.hide(); + noSensorElm.show(); + break; + case this.arSensorTypes[1]: // SENSOR_ES_GAS + noSensorElm.hide(); + panelElm.show(); + sensorElec.hide(); + sensorGas.show(); + break; + default: + noSensorElm.hide(); // SENSOR_ES_LED and all SENSOR_ES_IEC sensors (e. g. SENSOR_ES_IEC_SML) + panelElm.show(); + sensorGas.hide(); + sensorElec.show(); + } + }, + + getSensorType: function() { + var paramSet = homematic("Interface.getParamset", {"interface": this.opts.iface, "address" : this.opts.chAddress, "paramsetKey" :"MASTER"}); + + // With the HmIP-ESI only channel 1 has the parameter CHANNEL_OPERATION_MODE + return (typeof paramSet.CHANNEL_OPERATION_MODE == "undefined") ? -1 : this.arSensorTypes[parseInt(paramSet.CHANNEL_OPERATION_MODE)]; + }, + + buttonPressed: function(btn) { + var elem = jQuery(btn); + elem.addClass("ControlBtnOn").removeClass("ControlBtnOff"); + setTimeout(function() { + elem.addClass('ControlBtnOff').removeClass('ControlBtnOn'); + }, 500); + + }, + + bindEvents: function() { + var self = this; + + jQuery("#"+ this.id + "startSelfCalibration").bind("click", function() { + // self.searchSensor(self.idBtnSelfCalibration); for setDpState + self.searchSensor(self.iface, self.opts.chAddress); + }); + + + jQuery("#"+ this.id + "resetEnergyCounter").bind("click", function() { + conInfo("Set EnergyCounter"); + var dlgContent = "
"+translateKey('lblEnergyConsumptionInWatt')+"
", + valMeterReading; + + setEnergyCounterDlg = new YesNoDialog(translateKey("lblSetEnergyCounter"), dlgContent, function(result) { + if (result == YesNoDialog.RESULT_YES) { + valMeterReading = parseFloat(jQuery("#meterReading").val()); + + // This removes the dialog from the screen + Layer.remove(this.m_layer); + + if (! isNaN(valMeterReading)) { + // This sets the new value of the power meter + homematic("SysVar.setFloat", {"name": self.EnergyCounterID, "value": valMeterReading}, function () { + self.setEnergyCounterPanel(); + self.showEnergyCost(); + }); + } + } else { + // NO pressed + // This removes the dialog from the screen + Layer.remove(this.m_layer); + } + }, "html"); + + setEnergyCounterDlg.btnTextNo(translateKey("dialogBack")); + setEnergyCounterDlg.btnTextYes(translateKey("btnOk")); + + // Overwrites the original close method + setEnergyCounterDlg.close = function(result) { + if (this.m_callback) { this.m_callback(result); } + }; + + }); + }, + + /** + * Returns the jQuery element of a given parameter + * @param {string} elem The name of the desired element + * @return {object} The desired element + */ + getJElemByID: function(elem) { + return jQuery("#" + this.id + elem); + }, + + getJElemsByName: function(elem) { + return jQuery("[name='" + this.id + elem + "']"); + }, + + getSensorExtension: function() { + switch (this.measurementType) { + case this.sensorTypeID.gas: + return this.sensorTypeID.gas; + case this.sensorTypeID.iec: + return this.sensorTypeID.iec; + default: return ""; + } + }, + + changeToKilo: function() { + return (this.summedUpEnergy/1000).toFixed(2); + }, + + setEnergyCounterPanel: function() { + var j_panel = this.getJElemByID("EnergyCounter"); + // For a Hm-ES-TX-WM (POWERMETER_IEC) with a firmware >= 2.0.0 show 4 decimal places + var decimalPlace = ((this.opts.chType.indexOf(this.POWERMETER_IEC) != -1) && (parseInt(this.opts.devFirmwareMajor) >= 2)) ? 4 : 2; + this.summedUpEnergy = parseFloat(homematic("SysVar.getValue", {"id" : this.EnergyCounterID})).toFixed(decimalPlace); + conInfo("setEnergyCounterPanel - this.summedUpEnergy: " + this.summedUpEnergy); + + this.kiloPrefix = ""; + if (this.summedUpEnergy >= 1000.0 && (this.measurementType != this.sensorTypeID.gas) && (this.measurementType != this.sensorTypeID.iec)) { + this.kiloPrefix = "k"; + this.summedUpEnergy = this.changeToKilo(); + } + + j_panel.html(this.summedUpEnergy + " " + this.kiloPrefix + this.opts.unitEnergyCounter); + }, + + getEnergyConsumption: function(sType) { + // Electricity sensor + if ((this.measurementType == this.sensorTypeID.eletricity )) { + if (sType == "CCU") return this.summedUpEnergy; + if (sType == "Device") return this.opts.valEnergyCounter; + } + + // Gas sensor + if (this.measurementType == this.sensorTypeID.gas) { + if (sType == "CCU") return (this.summedUpEnergy * this.energyConfig.gasHeatingValue * this.energyConfig.gasConditionNumber) ; + if (sType == "Device") return (this.opts.valEnergyCounterGas * this.energyConfig.gasHeatingValue * this.energyConfig.gasConditionNumber); + } + + // IEC sensor + if ((this.measurementType == this.sensorTypeID.iec)) { + if (sType == "CCU") return this.summedUpEnergy; + if (sType == "Device") return this.opts["valEnergyCounter" + this.getSensorExtension()]; + } + + }, + + // Some channels aren't allowed to show the energy cost + // E. g. the channel POWERMETER_IEC2 measures the energy which a client feeds into the power supply system (solar, wind or so) + isChannelValid2ShowEnergyCost: function() { + return (this.opts.chType == "POWERMETER_IEC2") ? false : true; + }, + + showEnergyCost: function() { + if (this.energyConfig && (this.measurementType != this.sensorTypeID.unknown) && ( this.isChannelValid2ShowEnergyCost()) ) { + var unitFactorCCU = 1000, + unitFactorDevice = 1000, + kWh = " kWh"; + + if (this.kiloPrefix == "k") { + unitFactorCCU = 1; + } + + if ((this.measurementType == this.sensorTypeID.iec)) { + unitFactorCCU = 1; + unitFactorDevice = 1; + } + + if (this.measurementType == this.sensorTypeID.gas) { + this.EnergyPrice = this.energyConfig.gasPrice; + unitFactorCCU = 1; + unitFactorDevice = 1; + } + if (this.measurementType == this.sensorTypeID.eletricity || this.measurementType == this.sensorTypeID.iec) this.EnergyPrice = this.energyConfig.curPrice; + + if (this.EnergyPrice != "unknown" && this.energyConfig.currency != null) { + var j_energyCostCCU = this.getJElemByID("EnergyCostCCU"), + j_energyCostDevice = this.getJElemByID("EnergyCostDevice"+this.getSensorExtension()), + energyConsumptionCCU = this.getEnergyConsumption("CCU"), + energyConsumptionDevice = this.getEnergyConsumption("Device"), + energyCostCCU = ((energyConsumptionCCU * this.EnergyPrice) / unitFactorCCU).toFixed(2) + " " + this.energyConfig.currency, + energyCostDevice = ((energyConsumptionDevice * this.EnergyPrice) / unitFactorDevice).toFixed(2) + " " + this.energyConfig.currency; + if (this.measurementType == this.sensorTypeID.gas) { + j_energyCostCCU.text(energyConsumptionCCU.toFixed(2) + kWh + " = " + energyCostCCU).show(); + j_energyCostDevice.text(energyConsumptionDevice.toFixed(2) + kWh + " = " + energyCostDevice).show(); + } else { + j_energyCostCCU.text(energyCostCCU).show(); + j_energyCostDevice.text(energyCostDevice).show(); + } + } else { + conInfo("Unknown energy price"); + } + } + }, + + searchSensor: function(iface, chnAddress) { + conInfo("searchSensor"); + ShowWaitAnim(); + homematic("Interface.putParamset",{'interface': iface, 'address' : chnAddress, 'paramsetKey' : 'VALUES', 'set': + [ + {name:'SELF_CALIBRATION', type: 'int', value: 1} + ] + },function(result){ + if (result) { + window.setTimeout(function() { + HideWaitAnim(); + reloadPage(); + },1000); + } else { + HideWaitAnim(); + alert("Please press the system button and try again."); + } + }); + HideWaitAnimAutomatically(5); + } +};// This class is currently not in use +// See esp/controls/rgbw.fn - CreateRGBWAutomaticControl + +iseRGBWController = Class.create(); + +iseRGBWController.prototype = { + + + initialize: function (chnId, opts) { + conInfo("iseRGBWController"); + this.chnId = chnId; + this.opts = opts; + this.program = this.opts.valProgram; + jQuery("#"+ this.chnId).text(this.program); + + this.brightness = this.opts.valBrightness; + this.rampTime = this.opts.valRampTime; + this.onTime = this.opts.valOnTime; + this.minColor = this.opts.valMinBorder; + this.maxColor = this.opts.valMaxBorder; + + this.chn = homematic("Device.get",{"id": this.chnId}); + this.value = + this.program + "," + + this.brightness + "," + + this.rampTime + "," + + this.onTime + "," + + this.minColor + "," + + this.maxColor; + + this.bindEvents(); + }, + + bindEvents: function() { + var self = this; + jQuery("#"+ this.chnId).bind("click", function(){ + conInfo("show program dialog"); + + + /*************/ + var url = "/pages/msg/setRGBWController.htm"; + + var req = jQuery.ajax({ + url : url +"?sid=" + SessionId, + cache: false, + dataType: "html" + }); + + req.done(function(htmlContent) { + + //var rgbwControllerDialog = new RGBWControllerDialog(translateKey("titleRGBWControllerDialogTitle"), htmlContent, "RGBW_AUTOMATIC", self.value, function(result) { + var rgbwControllerDialog = new RGBWControllerDialog(translateKey("titleRGBWControllerDialogTitle"), htmlContent, "USER_PROGRAM", self.value, function(result) { + if (result == 1) { + conInfo("SetRGBWController: Yes pressed"); + var arConfigString = this.getConfigString().split(","); + conInfo("rgbwControllerDialog: configString: " + arConfigString); + + homematic("Interface.putParamset",{'interface': self.chn["interface"], 'address' : self.chn["address"], 'paramsetKey' : 'VALUES', 'set': + [ + {name:'PROGRAM', type: 'string', value: arConfigString[0]}, + {name:'ACT_BRIGHTNESS', type: 'string', value: arConfigString[1]}, + {name:'RAMP_TIME', type: 'string', value: arConfigString[2]}, + {name:'ON_TIME', type: 'string', value: arConfigString[3]}, + {name:'ACT_MIN_BOARDER', type: 'string', value: arConfigString[4]}, + {name:'ACT_MAX_BOARDER', type: 'string', value: arConfigString[5]} + ] + }, function(result){jQuery("#"+ self.chnId).text( arConfigString[0] );}); + } + }, "html"); + }); + + req.fail(function() { + alert("Error while loading " + url); + }); + }); + } + +}; + + + +// This class is responsible for the handling of the CONTROL +iseVIR_LGRGBColorControl = Class.create(); + +iseVIR_LGRGBColorControl.prototype = { + + initialize: function (chnId, opts) { + + this.chnId = chnId; + + this.rgbType = opts.Type; + this.rgbID = opts.rgbID; + this.rgbVal = opts.rgbVal; + //this.defaultRGBW = opts.rgbDefault; + this.defaultRGBW = "rgb(255,255,255,255)"; + + this.rgbwID = "RGBW"; + + + this.bindEvents(); + + if (this.rgbType == this.rgbwID) { + // this.initSlider(); + } + }, + + bindEvents: function() { + var self = this; + jQuery(".sp-container #rgbwBtnColor" +this.chnId).bind("click", function() { + var color = jQuery("#colorPicker"+self.chnId).val(); + if (!color) {color = self.defaultRGBW;} + self.rgbVal = color; + setDpState(self.rgbID,self.getColorString()); + }); + }, + + getColorString: function() { + var colorString = "", + arParamVal = this.rgbVal.split(","); + + if (this.rgbType == this.rgbwID) { + if (arParamVal.size() > 3) { + colorString = arParamVal[0] +","+arParamVal[1]+","+arParamVal[2]+",255)"; + } else { + colorString = this.rgbVal.slice(0, -1) + ",255)"; + } + } else { + // This is a RGB device + colorString = this.rgbVal; + } + + return colorString; + } + +}; + +iseVIR_LGWhiteLevelControl = Class.create(); + +iseVIR_LGWhiteLevelControl.prototype = { + + initialize: function (chnId, opts) { + var self = this; + conInfo("iseVIR_LGWhiteLevelControl"); + + this.chnId = chnId; + this.whiteLevelId = opts.whiteLevelID; + this.whiteLevel = parseInt(opts.whiteLevelValue); + this.whiteLevelMin = parseInt(opts.whiteLevelMin); + this.whiteLevelMax = parseInt(opts.whiteLevelMax); + + this.whiteLevelStep = parseInt(opts.whiteLevelStep); + + window.setTimeout(function() { + self.sliderInfoElm = jQuery("#infoSliderPos" + self.chnId); + self.sliderElm = jQuery("#slider" + self.chnId); + self.initSlider(); + },100); + }, + + initSlider: function () { + + if (this.whiteLevel == "-1") {this.whiteLevel = this.whiteLevelMin;} + this.sliderInfoElm.val(this.whiteLevel); + + var self = this; + this.sliderElm.slider({ + animate: "fast", + value: this.whiteLevel, + min: this.whiteLevelMin, + max: this.whiteLevelMax, + step: this.whiteLevelStep, + orientation: "horizontal", + slide: function (event, ui) {}, + stop: function( event, ui ) {} + }); + this.sliderElm.on("slide", function (event, ui) { + self.onSliderChange(ui.value); + }); + + this.sliderElm.on("slidestop", function(event, ui){ + self.onSliderStop(ui.value); + }); + }, + + onSliderChange: function (val) { + this.sliderInfoElm.val(val); + this.whiteLevel = val; + }, + + onSliderStop: function(val) { + setDpState(this.whiteLevelId,this.whiteLevel); + } + +}; + + +/** + * ise/iseButtonsSwitch.js + **/ + +/** + * @fileOverview ? + * @author ise + **/ + +/** + * @class + **/ +iseSmokeDetectorHmIP = Class.create(); + +iseSmokeDetectorHmIP.prototype = { + + initialize: function(id, controlID, dangerState) { + + this.id = id; + this.state = parseInt(dangerState); + this.divOn = $(this.id + "On"); + this.divOff = $(this.id + "Off"); + this.idDpState = controlID; + + if (this.state == 2) { ControlBtn.on(this.divOn); } + else { ControlBtn.on(this.divOff); } + + // Add event handlers + this.clickOff = this.onClickOff.bindAsEventListener(this); + Event.observe(this.divOff, 'mousedown', this.clickOff); + + this.clickOn = this.onClickOn.bindAsEventListener(this); + Event.observe(this.divOn, 'mousedown', this.clickOn); + + + }, + + onClickOff: function() { + ControlBtn.pushed(this.divOff); + setDpState(this.idDpState, 1, false); + var t = this; + new PeriodicalExecuter(function(pe) { + t.refresh(); + pe.stop(); + }, 1); + }, + + onClickOn: function() { + ControlBtn.pushed(this.divOn); + setDpState(this.idDpState, 2, false); + var t = this; + new PeriodicalExecuter(function(pe) { + t.refresh(); + pe.stop(); + }, 1); + }, + + + refresh: function() { + if (this.state == 2) { + ControlBtn.on(this.divOn); + ControlBtn.off(this.divOff); + } + else { + ControlBtn.off(this.divOn); + ControlBtn.on(this.divOff); + } + } +}; + +/** + * @class + **/ +iseArmAlarmSiren = Class.create(); + +iseArmAlarmSiren.prototype = { + + initialize: function(id, initState, idDpState) { + conInfo("iseArmAlarmSiren - id: " + id + " - initState: " + initState + " - idDpState: " + idDpState); + this.id = id; + this.state = initState; + this.divOff = $(this.id + "Off"); + this.divExtern = $(this.id + "Extern"); // all sensors + this.divIntern = $(this.id + "Intern"); // only the outside sensors + this.divBlocked = $(this.id + "Blocked"); + this.idDpState = idDpState; + + this.initAllElements(); + + // Add event handlers + this.clickOff = this.onClickOff.bindAsEventListener(this); + Event.observe(this.divOff, 'mousedown', this.clickOff); + + this.clickExtern = this.onClickExtern.bindAsEventListener(this); + Event.observe(this.divExtern, 'mousedown', this.clickExtern); + + this.clickIntern = this.onClickIntern.bindAsEventListener(this); + Event.observe(this.divIntern, 'mousedown', this.clickIntern); + + }, + + initAllElements: function() { + ControlBtn.off(this.divOff); + ControlBtn.off(this.divExtern); + ControlBtn.off(this.divIntern); + ControlBtn.off(this.divBlocked); + switch(this.state) { + case 0: + ControlBtn.on(this.divOff); + break; + case 1: + ControlBtn.on(this.divIntern); // outside sensors + break; + case 2: + ControlBtn.on(this.divExtern); // all sensors + break; + case 3: + ControlBtn.on(this.divBlocked); + } + }, + + onClickOff: function() { + ControlBtn.pushed(this.divOff); + setDpState(this.idDpState, 0, false); + var t = this; + new PeriodicalExecuter(function(pe) { + t.refresh(); + pe.stop(); + }, 1); + }, + + // all sensors + onClickExtern: function() { + ControlBtn.pushed(this.divExtern); + setDpState(this.idDpState, 2, false); + var t = this; + new PeriodicalExecuter(function(pe) { + t.refresh(); + pe.stop(); + }, 1); + }, + + // outside sensors + onClickIntern: function() { + ControlBtn.pushed(this.divIntern); + setDpState(this.idDpState, 1, false); + var t = this; + new PeriodicalExecuter(function(pe) { + t.refresh(); + pe.stop(); + }, 1); + }, + + refresh: function() { + this.initAllElements(); + } +};/** + * @class + **/ +iseAlarmSirenHMIP = Class.create(); + +iseAlarmSirenHMIP.prototype = { + + initialize: function(opts) { + conInfo(opts); + this.opts = opts; + this.chnId = this.opts.chID; + this.iface = this.opts.chInterface; + this.chAddress = this.opts.chAddress; + + this.startAlarmElm = jQuery("#"+this.chnId+"startAlarm"); + + this.initAllElements(); + + // Add event handlers + + }, + + initAllElements: function() { + var self = this; + /* Not in use currently + if (self.opts.ZoneActive[1]) { + var zoneActive, + zoneAlarmElm, + dataPointID, + elemID, + elemIsChecked, + arZoneActive, + arZoneAlarm; + + for (var loop = 1; loop < 8; loop++) { + arZoneActive = self.opts.ZoneActive[loop].split(","); + arZoneAlarm = self.opts.ZoneAlarm[loop].split(","); + dataPointID = arZoneActive[0]; + elemID = arZoneAlarm[0]; + elemIsChecked = (arZoneActive[1] == "true") ? true : false; + zoneAlarmElm = jQuery("#ZoneAlarm_" + loop + "_" + elemID); + + zoneAlarmElm.prop("checked", elemIsChecked); + zoneAlarmElm.val(loop); // we use this in the method setAlarmZone >> elm.val() + + zoneAlarmElm.change(function () { + self.setAlarmZone(this.id); + }); + } + } + */ + this.startAlarmElm.click(function() { + self.activateAlarm(); + }); + + }, + + /* + setAlarmZone: function(elmID) { + var elm = jQuery("#" + elmID); + setDpState(this.opts.ZoneActive[parseInt(elm.val())].split(",")[0], elm.prop("checked"), true); + }, + */ + + // Here we have to use putParamset for the whole bunch of parameters + activateAlarm: function() { + var self = this; + var url = "/pages/msg/asir_setAlarm.htm"; + + var req = jQuery.ajax({ + url : url +"?sid=" + SessionId, + cache: false, + dataType: "html" + }); + + req.done(function(htmlContent) { + + setAlarmDialog = new ASIR_SetAlarmDialog(translateKey("setAlarmDialogTitle"), htmlContent, function(result) { + + var oUnit = {}; + var acousticSignal = this.selectedAcousticSignalElm.val(), + opticalSignal = this.selectedOpticalSignalElm.val(), + durationUnit = this.durationUnitElm.val(), + durationValue = this.durationValueElm.val(); + + oUnit.S = 0; oUnit.M = 1; oUnit.H = 2; oUnit.D = 3; + + if (result == 1) { + conInfo("SET ALARM"); + homematic("Interface.putParamset",{'interface': self.iface, 'address' : self.chAddress, 'paramsetKey' : 'VALUES', 'set': + [ + {name:'DURATION_UNIT', type: 'int', value: oUnit[durationUnit]}, + {name:'DURATION_VALUE', type: 'int', value: durationValue}, + {name:'ACOUSTIC_ALARM_SELECTION', type: 'int', value: acousticSignal}, + {name:'OPTICAL_ALARM_SELECTION', type: 'int', value: opticalSignal} + ] + },function(result){conInfo(result);}); + } + }, "html"); + }); + + req.fail(function() { + alert("Error while loading " + url); + }); + } + + +}; + +/** + * Created by grobelnik on 01.08.2016. + */ + + +iseDigitalState = Class.create(); + +iseDigitalState.prototype = { + initialize: function (id, initState) { + + var elmOn, elmOff; + var currentState = parseInt(initState); + currentState = currentState.toString(2).reverse(); + + for (var loop = 0; loop <= 7; loop++) { + elmOn = jQuery('#bit' + loop + '1'); + elmOff = jQuery('#bit' + loop + '0'); + + if (parseInt(currentState[loop]) == 1) { + elmOn.prop('checked', true); + } else { + elmOff.prop('checked', true); + } + } + } +}; +/* * * * * * * * * * * * * * * * * * * * * * * * + * iseButtonsShutter * + * * * * * * * * * * * * * * * * * * * * * * * */ + +/** + * @class + **/ +iseButtonsShutter = Class.create(); + +iseButtonsShutter.prototype = { + /* + * id = datapoint-ID of switch + * initState = Creation State (0 or 1) + */ + initialize: function(id, initState, dpLevel, dpStop, iViewOnly, opts) { + this.id = id; + this.state = initState; + this.dpLevel = dpLevel; + this.dpStop = dpStop; + this.Perc = $(this.id + "Perc"); + this.divPercUp = $(this.id + "PercUp"); + this.divPercDown = $(this.id + "PercDown"); + this.divStop = $(this.id + "Stop"); + this.divUp = $(this.id + "Up"); + this.divDown = $(this.id + "Down"); + + this.shutter = new shutterControl(id, initState); + + this.Perc.value = initState; + this.shutter.setValue(initState); + this.opts = opts; + + this.pressedUpDown = ""; + + if (typeof blindLevelDestination == "undefined") { + blindLevelDestination = []; + } + + blindLevelDestination[id] = (blindLevelDestination[id] != null) ? blindLevelDestination[id] : null; + + // Add event handlers + if (iViewOnly === 0) + { + this.clickCtrl = this.onClickShutter.bindAsEventListener(this); + Event.observe(this.shutter.divShutterBg, 'mousedown', this.clickCtrl); + this.clickPercUp = this.onClickPercUp.bindAsEventListener(this); + Event.observe(this.divPercUp, 'click', this.clickPercUp); + this.clickPercDown = this.onClickPercDown.bindAsEventListener(this); + Event.observe(this.divPercDown, 'click', this.clickPercDown); + this.changePerc = this.onChangePerc.bindAsEventListener(this); + Event.observe(this.Perc, 'change', this.changePerc); + + this.clickUp = this.onClickUp.bindAsEventListener(this); + Event.observe(this.divUp, 'mousedown', this.clickUp); + this.clickDown = this.onClickDown.bindAsEventListener(this); + Event.observe(this.divDown, 'mousedown', this.clickDown); + + this.clickStop = this.onClickStop.bindAsEventListener(this); + Event.observe(this.divStop, 'mousedown', this.clickStop); + } + this.initJalousie(); + this.initHmIPJalousieShutter(); + + }, + + initJalousie: function() {}, + initHmIPJalousieShutter: function() {}, + + onClickShutter: function(ev) { + var pos = Position.page(this.shutter.divShutterBg); + var offset = ev.clientY - pos[1]; + var val = 100 - (( offset * 100 ) / this.shutter.MAX_HEIGHT); + var setVal = 0; + if ( (val > 0) && ( val <= 20) ) setVal = 0; + if ( (val > 20) && ( val <= 40) ) setVal = 25; + if ( (val > 40) && ( val <= 60) ) setVal = 50; + if ( (val > 60) && ( val <= 80) ) setVal = 75; + if ( (val > 80) && ( val <= 100) ) setVal = 100; + this.pressedUpDown = ""; + this.state = setVal; + this.Perc.value = this.state; + this.shutter.setValue(this.state); + this.saveValue(); + }, + + onClickPercUp: function() { + if ((this.state % 10) != 0) { + this.state = Math.round(Math.ceil(this.state / 10) * 10); + } else { + this.state += 10; + } + this.pressedUpDown = ""; + if (this.state > 100) + this.state = 100; + this.Perc.value = this.state; + this.shutter.setValue(this.state); + this.saveValue(); + }, + + onClickPercDown: function() { + if ((this.state % 10 ) != 0) { + this.state = Math.round(Math.floor(this.state / 10) * 10); + } else { + this.state -= 10; + } + + this.pressedUpDown = ""; + if (this.state < 0) + this.state = 0; + this.Perc.value = this.state; + this.shutter.setValue(this.state); + this.saveValue(); + }, + + onChangePerc: function() { + var min = 0, max = 100, + value = this.Perc.value; + + this.pressedUpDown = ""; + + if ((value < min) || (isNaN(value))) {value = min;} + if (value > max) {value = max;} + + this.Perc.value = value; + this.state = parseInt(value); + this.shutter.setValue(this.state); + this.saveValue(); + }, + + onClickUp: function() { + //jQuery("#" +this.id + "Stop").text(translateKey("actionStatusControlStop")); + this.state = 100; + this.Perc.value = this.state; + ControlBtn.pushed(this.divUp); + this.shutter.setValue(this.state); + this.pressedUpDown = "UP"; + this.saveValue(); + var t = this; + new PeriodicalExecuter(function(pe) { + ControlBtn.off(t.divUp); + pe.stop(); + }, 1); + }, + + onClickDown: function() { + //jQuery("#" +this.id + "Stop").text(translateKey("actionStatusControlStop")); + this.state = 0; + this.Perc.value = this.state; + this.shutter.setValue(this.state); + this.pressedUpDown = "DOWN"; + this.saveValue(); + var t = this; + ControlBtn.pushed(this.divDown); + new PeriodicalExecuter(function(pe) { + ControlBtn.off(t.divDown); + pe.stop(); + }, 1); + }, + + onClickStop: function() { + ControlBtn.pushed(this.divStop); + this.pressedUpDown = ""; + setDpState(this.dpStop, 1); + var t = this; + new PeriodicalExecuter(function(pe) { + ControlBtn.off(t.divStop); + pe.stop(); + }, 1); + blindLevelDestination[this.id] = null; + }, + + saveValue: function() { + setDpState(this.dpLevel, this.state / 100); + } +}; + +iseButtonsJalousie = Class.create(iseButtonsShutter, { + initJalousie: function () { + conInfo("initJalousie"); + this.sliderInfoElm = jQuery("#infoSliderPos" + this.id); + this.sliderElm = jQuery("#slider" + this.id); + this.btnSendData = jQuery("#btnSendValues" + this.id); + + this.levelSlats = this.opts.levelSlatsValue; + this.dpLevelCombined = this.opts.levelCombinedID; + this.initSliderInfoElm(); + this.initSendBtn(); + this.initSlider(); + this.sliderElm.slider('value', this.opts.levelSlatsValue); + this.sliderInfoElm.val(this.opts.levelSlatsValue); + + }, + + + + initSliderInfoElm: function() { + var self = this; + this.sliderInfoElm.change(function() { + self.levelSlats = jQuery(this).val(); + self.sliderElm.slider("value", self.levelSlats); + }); + }, + + initSendBtn: function () { + var self = this; + + this.btnSendData.click(function () { + self.saveValue(); + JControlBtn.pushed(self.btnSendData); + + new PeriodicalExecuter(function (pe) { + JControlBtn.off(self.btnSendData); + pe.stop(); + }, 1); + }); + }, + + initSlider: function () { + var self = this; + this.sliderElm.slider({ + animate: "fast", + min: 0, + max: 100, + step: 5, + orientation: "horizontal", + slide: function (event, ui) {}, + stop: function( event, ui ) {} + }); + this.sliderElm.on("slide", function (event, ui) { + self.onSliderChange(ui.value); + }); + + this.sliderElm.on("slidestop", function(event, ui){ + self.onSliderStop(); + }); + }, + + onSliderChange: function (val) { + this.levelSlats = val; //this.sliderElm.slider("value"); + this.sliderInfoElm.val(this.levelSlats); + //this.saveValue(); + }, + + onSliderStop: function() { + this.pressedUpDown = ""; + }, + + onClickShutter: function (ev) { + var pos = Position.page(this.shutter.divShutterBg); + var offset = ev.clientY - pos[1]; + var val = 100 - (( offset * 100 ) / this.shutter.MAX_HEIGHT); + var setVal = 0; + if ((val > 0) && ( val <= 20)) setVal = 0; + if ((val > 20) && ( val <= 40)) setVal = 25; + if ((val > 40) && ( val <= 60)) setVal = 50; + if ((val > 60) && ( val <= 80)) setVal = 75; + if ((val > 80) && ( val <= 100)) setVal = 100; + this.state = setVal; + this.Perc.value = this.state; + this.shutter.setValue(this.state); + //this.saveValue(); + }, + + + + onChangePerc: function() { + if (isNaN(this.Perc.value)) { return; } + this.pressedUpDown = ""; + this.state = parseInt(this.Perc.value); + //this.shutter.setValue(this.state); + //this.saveValue(); + }, + + + saveValue: function() { + var level = parseInt(this.state) * 2, + levelHex = level.toString(16), + levelSlat = parseInt(this.levelSlats) * 2, + levelSlatHex = levelSlat.toString(16), + dpValue; + + dpValue = (levelHex.length < 2) ? "0X0" + levelHex : "0X" + levelHex; + dpValue += ","; + dpValue += (levelSlatHex.length < 2) ? "0X0" + levelSlatHex : "0X" + levelSlatHex; + setDpState(this.dpLevelCombined, dpValue); + } + +}); + +iseHmIPJalousieShutter = Class.create(iseButtonsShutter, { + initHmIPJalousieShutter: function() { + + this.Interface = this.opts.chnInterface; + this.levelStatus = parseInt(this.opts.levelStatusRealChannel); + this.levelSlatsStatus = parseInt(this.opts.levelStatusRealChannelSlatsValue); + + jQuery("#hintVirtualChannelChanged" + this.id).click(function() { + MessageBox.show(translateKey("hintVirtualChannelChanged"), translateKey("hintVirtualChannelChangedMsg"), "", 500, 150); + }); + + + // TWIST-1873 + // When the expert mode is active the visual shutter element will be displayed on the transmitter channel (real channel) + // Then this element shouldn't be visible with the virtual channels. + if (! this.opts.easyLinkMode) { + this.shutterAnchor = jQuery("#shutter"+this.id ); + this.shutterAnchor.hide(); + } + + // When the user is no expert the first virtual channel displays the value of the hidden real channel + this.initState = (this.opts.easyLinkMode) ? parseInt(this.opts.levelRealChannel * 100) : this.opts.levelValue; + this.initState = (parseInt(this.initState) == -100) ? -1 : this.initState; + + this.state = this.initState; + + this.Perc.value = (this.levelStatus > 0 || this.initState == -1) ? "??" : this.initState; + + if (this.initState == -1) { + this.shutter.setValue(0); + } else { + this.shutter.setValue(this.initState); + } + + this.hasSlats = (this.opts.levelSlatsID) ? true : false; + if (this.hasSlats) { + this.sliderInfoElm = jQuery("#infoSliderPos" + this.id); + this.sliderElm = jQuery("#slider" + this.id); + + // When the user is no expert the first virtual channel displays the value of the hidden real channel + this.levelSlats = (this.opts.easyLinkMode) ? parseInt(this.opts.levelRealChannelSlatsValue * 100) : this.opts.levelSlatsValue; + this.levelSlats = (parseInt(this.levelSlats) == -100) ? 0 : this.levelSlats; + + this.levelReal = this.opts.levelRealChannel; + this.initSliderInfoElm(); + this.initSlider(); + this.sliderElm.slider('value', this.levelSlats); + this.sliderInfoElm.val((this.levelSlatsStatus > 0) ? "??" : this.levelSlats); + } + this.blockElements(); + }, + + // Prevent certain elements to work when the levelStatus or levelSlatsStatus != 0 (NORMAL) + blockElements: function() { + var controlOperableNone = "none", + controlOperableAuto = "auto", + activityState = parseInt(this.opts.activityStateRealChannel); + + if (this.levelStatus > 0) { + jQuery("#shutter" + this.id).css("pointer-events", controlOperableNone); // visual blind element + jQuery("#" + this.Perc.id).css("pointer-events", controlOperableNone); // text value in % + $(this.divPercUp).stopObserving('click'); // up button + $(this.divPercDown).stopObserving('click'); // down button + + // Only when the ACTIVITY_STATE of the device = 0 (UNKNOWN) or 3 (STABLE) -- the other values ara 1/2 = UP/DOWN + //if ((activityState == 0) || (activityState == 3)) { + // jQuery("#" + this.id + "Stop").text("Refresh"); // Refresh + //} + } + + if (! isNaN(this.levelSlatsStatus) && this.levelSlatsStatus > 0) { + jQuery("#tdSlider" + this.id).css("pointer-events", controlOperableNone); + } + }, + + initSliderInfoElm: function() { + var self = this; + this.sliderInfoElm.change(function() { + var value = jQuery(this).val(), + min = 0, max = 100; + + if ((value < min) || (isNaN(value))) {value = min;} + if (value > max) {value = max;} + this.value = value; + self.levelSlats = value; + self.sliderElm.slider("value", self.levelSlats); + self.saveSliderValue(); + }); + }, + + initSlider: function () { + var self = this; + this.sliderElm.slider({ + animate: "fast", + min: 0, + max: 100, + step: 5, + orientation: "horizontal", + slide: function (event, ui) {}, + stop: function( event, ui ) {} + }); + this.sliderElm.on("slide", function (event, ui) { + self.onSliderChange(ui.value); + }); + + this.sliderElm.on("slidestop", function(event, ui){ + self.onSliderStop(); + }); + }, + + onSliderChange: function (val) { + this.levelSlats = val; //this.sliderElm.slider("value"); + this.sliderInfoElm.val(this.levelSlats); + }, + + onSliderStop: function() { + this.saveSliderValue(); + }, + + saveSliderValue: function() { + //var levelValue = (blindLevelDestination[this.id] != null) ? blindLevelDestination[this.id] : this.levelReal; + homematic("Interface.putParamset",{'interface': this.Interface, 'address' : this.opts.chnAddress, 'paramsetKey' : 'VALUES', 'set': + [ + //{name:'LEVEL', type: 'double', value: 1.005}, + // {name:'LEVEL', type: 'double', value: levelValue}, LEVEL wird intern vom Realkanal durch den crRFD ermittelt. + {name:'LEVEL_2', type: 'double', value: this.levelSlats / 100} + ] + },function(result){conInfo(result);}); + }, + + // See SPHM-1301 - this was the previous version + _saveValue: function() { + var level2Value; + + this.state = (this.state != -1) ? this.state : 0; + + if (this.hasSlats) { + blindLevelDestination[this.id] = this.state; + + if (this.pressedUpDown == "DOWN") { + level2Value = 0; + } else if (this.pressedUpDown == "UP") { + level2Value = 1; + } + + // twist-1551 + if ((this.pressedUpDown != "") && (typeof level2Value != "undefined") ) { + homematic("Interface.putParamset", { + 'interface': this.Interface, 'address': this.opts.chnAddress, 'paramsetKey': 'VALUES', 'set': [ + {name: 'LEVEL', type: 'double', value: this.state / 100}, + {name: 'LEVEL_2', type: 'double', value: level2Value} + ] + }, function (result) { + conInfo(result); + }); + } else { + + setDpState(this.dpLevel, this.state / 100); + + } + } else { + setDpState(this.dpLevel, this.state / 100); + } + }, + + // See SPHM-1301 + saveValue: function() { + var self=this, level2Value; + this.state = (this.state != -1) ? this.state : 0; + blindLevelDestination[this.id] = this.state; + if (this.pressedUpDown == "DOWN") { + level2Value = 0; + } else if (this.pressedUpDown == "UP") { + level2Value = 1; + } + level2Value = (typeof level2Value == "undefined") ? 0 : level2Value; + homematic("Interface.putParamset", { + 'interface': this.Interface, 'address': this.opts.chnAddress, 'paramsetKey': 'VALUES', 'set': [ + {name: 'LEVEL', type: 'double', value: this.state / 100}, + {name: 'LEVEL_2', type: 'double', value: level2Value} + ] + }, function (result) { + conInfo("1st try: " + result); + if (result == null) { + homematic("Interface.putParamset", { + 'interface': self.Interface, 'address': self.opts.chnAddress, 'paramsetKey': 'VALUES', 'set': [ + {name: 'LEVEL', type: 'double', value: self.state / 100} + ] + }, function (result) { + conInfo("2nd try: " + result); + }); + } + }); + } +}); +iseDualWhiteColorController = Class.create(); + +iseDualWhiteColorController.prototype = { + initialize: function (opts) { + var self = this; + this.iFace = "BidCos-RF"; + this.id = opts.chnId; + this.chnAddress = opts.chnAddress; + this.devAddress = this.chnAddress.split(":")[0]; + this.val = parseInt(opts.value * 100); + this.minVal = 0; + this.maxVal = 100; + this.sliderStep = 5; + this.colorPlusMinusTimeoutObject; + this.colorPlusMinusTimeout = 1000; + + + this.sliderInfoElm = jQuery("#infoSliderPos" + this.id); + this.sliderElm = jQuery("#slider" + this.id); + this.colorPlusElm = jQuery("#colorPlus" + this.id); + this.colorMinusElm = jQuery("#colorMinus" + this.id); + + this.loadImg = "/ise/img/loading.gif"; + this.currentDiagram; + + this.diagramURLs = {} ; + + if (opts.isVirtualChannel == "false") { + if (typeof hm_lc_dw_diagram == "undefined") { + jQuery("[name='imgDualWhiteController']").attr("src", this.loadImg); + hm_lc_dw_diagram = {}; + this.initDiagramURLs(); + this.getConfigAndSetDiagram(); + } else { + // Here we have a hm_lc_dw_diagram object from another device + if (typeof hm_lc_dw_diagram[this.devAddress] == "undefined") { + jQuery("[name='imgDualWhiteController']").attr("src", this.loadImg); + delete hm_lc_dw_diagram; + hm_lc_dw_diagram = {}; + this.initDiagramURLs(); + this.getConfigAndSetDiagram(); + } else { + this.currentDiagram = hm_lc_dw_diagram[this.devAddress]; + jQuery("[name='imgDualWhiteController']").attr("src", self.currentDiagram); + this.initBigDiagram(); + } + } + } else { + if (typeof hm_lc_dw_diagram == "undefined") { + hm_lc_dw_diagram = {}; + var elem = jQuery("[name='imgDualWhiteController']")[0]; + hm_lc_dw_diagram[this.devAddress] = jQuery(elem).attr("src"); + this.currentDiagram = hm_lc_dw_diagram[this.devAddress]; + jQuery("[name='imgDualWhiteController']").attr("src", this.currentDiagram); + this.initBigDiagram(); + } else { + this.currentDiagram = hm_lc_dw_diagram[this.devAddress]; + jQuery("[name='imgDualWhiteController']").attr("src", self.currentDiagram); + this.initBigDiagram(); + } + } + + this.sliderVal; + this.initSlider(); + this.sliderElm.slider('value', this.val); + this.sliderInfoElm.val(this.val); + + if (typeof clearCachedPath != "undefined") { + clearTimeout(clearCachedPath); + } + + clearCachedPath = setTimeout(function() {delete hm_lc_dw_diagram;}, 15000); + this.bindEvents(); + }, + + bindEvents: function () { + + var self = this; + this.sliderInfoElm.on('change',function() { + thisElm = jQuery(this); + var value = parseInt(thisElm.val()); + + if (isNaN(value)) { + value = self.minVal; + thisElm.val(value); + } else if (value < self.minVal) { + value = this.minVal; + thisElm.val(value); + } else if (value > self.maxVal) { + value = self.maxVal; + thisElm.val(value); + } + self.sliderVal = value; + self.sliderElm.slider("value", value); + self.setValue(); + }); + + this.sliderInfoElm.on('keypress', function (e) { + if(e.which === 13){ + jQuery(this).change(); + } + }); + + this.colorPlusElm.on('click', function() { + clearTimeout(self.colorPlusMinusTimeoutObject); + var val = parseInt(self.sliderInfoElm.val()); + if (val < self.maxVal) { + val++; + } + + self.sliderInfoElm.val(val); + self.colorPlusMinusTimeoutObject = setTimeout(function() { + self.sliderInfoElm.change(); + }, self.colorPlusMinusTimeout); + }); + + this.colorMinusElm.on('click', function() { + clearTimeout(self.colorPlusMinusTimeoutObject); + var val = parseInt(self.sliderInfoElm.val()); + if (val > self.minVal) { + val--; + } + self.sliderInfoElm.val(val); + self.colorPlusMinusTimeoutObject = setTimeout(function(){ + self.sliderInfoElm.change(); + },self.colorPlusMinusTimeout); + }); + + }, + + + + initDiagramURLs: function() { + getDualWhiteControllerDiagramURLs(); + this.diagramURLs = dualWhiteControllerDiagramURL; + }, + + getConfigAndSetDiagram: function () { + var self = this; + var address = this.chnAddress; + var iFace = this.iFace; + var config = ""; + + homematic("Interface.getParamset", {"interface": iFace, "address": address, "paramsetKey": "MASTER"}, function(result) { + config += result.CHARACTERISTIC_BASETYPE; + config += result.CHARACTERISTIC_LINSQUARETYPE; + config += result.CHARACTERISTIC_LEVELLIMIT; + config += result.CHARACTERISTIC_COLOURASSIGNMENT; + + self.showCurrentDiagram(config); + }); + }, + + showCurrentDiagram: function (config) { + this.currentDiagram = this.diagramURLs[config]; + + hm_lc_dw_diagram[this.devAddress] = this.currentDiagram; + + // All channels (real and virtual) are using the same picture + jQuery("[name='imgDualWhiteController']").attr("src", this.currentDiagram); + this.initBigDiagram(); + }, + + initBigDiagram: function() { + var srcDiagram = hm_lc_dw_diagram[this.devAddress]; + var tooltip = ""; + jQuery("[name='imgDualWhiteController']").data('powertip', tooltip); + jQuery("[name='imgDualWhiteController']").powerTip({smartPlacement: true, followMouse: false}); + }, + + initSlider: function () { + var self = this; + this.sliderElm.slider({ + animate: "fast", + min: self.minVal, + max: self.maxVal, + step: self.sliderStep, + orientation: "horizontal", + slide: function (event, ui) {}, + stop: function( event, ui ) {} + }); + this.sliderElm.on("slide", function (event, ui) { + self.onSliderChange(ui.value); + }); + + this.sliderElm.on("slidestop", function(event, ui){ + self.onSliderStop(); + }); + }, + + onSliderChange: function (val) { + this.sliderVal = val; + this.sliderInfoElm.val(this.sliderVal); + }, + + onSliderStop: function() { + this.setValue(); + }, + + setValue: function() { + if (this.sliderVal >= this.minVal || this.sliderVal <= this.maxVal) { + setDpState(this.id, (this.sliderVal / 100)); + } + } + +};/** + * Created by grobelnik on 01.08.2016. + */ + + +iseHmIPWeeklyProgram = Class.create(); + +iseHmIPWeeklyProgram.prototype = { + initialize: function (id, opts, callback) { + var self = this; + conInfo("opts", opts); + virtChnCounterWP = 0; + //conInfo(opts); + this.callback = callback; + this.opts = opts; + this.id = id; + + this.fwMajor = opts.fwMajor; + this.fwMinor = opts.fwMinor; + this.fwPatch = opts.fwPatch; + + this.devLabel = opts.deviceLabel; + this.iface = this.opts.chInterface; + this.chAddress = this.opts.chnAddress; + + this.wiegandInterface = (this.isDeviceType("HmIP-FWI")) ? true : false; + this.deviceIsHmIPWKP = this.isDeviceType("HmIP-WKP"); + this.deviceIsHmIP_MOD_WD_VK = this.isDeviceType("HmIP-MOD-WD-VK"); + this.deviceIsHmIP_RGBW = this.isDeviceType("HmIP-RGBW"); + this.deviceIsHmIP_DALI = this.isDeviceType("HmIP-DRG-DALI"); + this.deviceIsHmIP_FLC = (this.isDeviceType("HmIP-FLC") || (this.isDeviceType("HmIP-FDC"))); + + this.expert = (! this.opts.userEasyLinkMode || this.deviceIsHmIP_FLC) ? true : false; + + this.device = this.getDevice(this.opts.deviceID); + this.relevantChn = this.getRelevantChannels(); + + // The HmIP-BSL consists of SWITCH and DIMMER channels. For the weekly program we are currently using only the SWITCH channels. + /* + if (this.isDeviceType("HmIP-BSL")) { + this.relevantChn = (this.expert) ? [4, 5, 6] : [4]; + } + */ + + if (this.isDeviceType("HmIP-BSL")) { + if (this.fwMajor < 2) { + this.relevantChn = (this.expert) ? [4, 5, 6] : [4]; + } else { + this.relevantChn = (this.expert) ? [4, 5, 6, 8, 9, 10, 12, 13, 14] : [4, 8, 12]; + } + } + + if (this.deviceIsHmIPWKP) { + this.relevantChn = [1, 3, 5, 7, 9, 11, 13, 15]; + } + + if (this.deviceIsHmIP_MOD_WD_VK) { + this.relevantChn = [2]; + } + + if ((this.isDeviceType("HmIP-SMO230")) || (this.isDeviceType("HmIP-SMO230-A")) || (this.isDeviceType("HmIPW-SMO230")) || (this.isDeviceType("HmIPW-SMO230-A"))) { + this.relevantChn = [10, 11, 12]; + } + + if (this.deviceIsHmIP_RGBW) { + var oChannel = DeviceList.getChannelByAddress(this.chAddress), + oMaintChannel = DeviceList.getChannelByAddress(this.chAddress.split(":")[0] + ":0"), // The maintenance channel stores the deviceMode + deviceMode = parseInt(homematic("Interface.getMetadata", {"objectId": oMaintChannel.id, "dataId": "deviceMode"})); + + if (oChannel.channelType == "UNIVERSAL_LIGHT_WEEK_PROFILE") { + switch (deviceMode) { + case 0: + case 1: + // RGB/RGBW Mode + this.relevantChn = [1]; + break; + case 2: + // Tunable White Mode + this.relevantChn = [1, 2]; + break; + default: + // PWM Mode - all channels visible + this.relevantChn = [1, 2, 3, 4]; + } + } + } + + if (this.deviceIsHmIP_DALI) { + + /* + Das erste angeschlossene DAlI Gerät belegt Kanal 1, das nächste DALI Gerät bekommt Kanal 2 usw. + Es können 32 DAlI Geräte angeschlossen werden, d. h. Kanal 1 - 32 + Angezeigt werden nur die Kanäle, welche auch benutzt werden. Damit kein XML-RPC Aufruf für ungenutzte Kanäle gemacht wird, + wird die Variable lastUsedDaliChn eingesetzt. + Die Kanäle 33 - 48 sind Gruppenkanäle und werden immer angezeigt. + + The first DAlI device connected occupies channel 1, the next DALI device gets channel 2, etc. + 32 DAlI devices can be connected, i.e. channel 1 - 32. + Only those channels are displayed which are actually used. So that no XML-RPC call is made for unused channels, + the variable lastUsedDaliChn is used. + Channels 33 - 48 are group channels and are always displayed. + */ + + var self = this, + oDevice = DeviceList.getDeviceByAddress(this.chAddress.split(":")[0]), + lastUsedDaliChn = false, + maxCap; + + this.relevantChn = []; + + jQuery.each(oDevice.channels, function(index, chn) { + + if (chn.channelType == "UNIVERSAL_LIGHT_RECEIVER") { + if (index < 33) { + if (! lastUsedDaliChn) { + maxCap = parseInt(homematic("Interface.getMetadata", {"objectId": chn.id, "dataId": "maxCap"})); + } + if ((!isNaN(maxCap)) && (maxCap < 5)) { + self.relevantChn.push(index); + } else { + lastUsedDaliChn = true; + } + } else { + self.relevantChn.push(index); + } + } + }); + } + + this.anchor = jQuery("#anchor_"+this.id); + this.anchor.html(this.getMainHtml()); + + this.initChannelState(); + + jQuery("#weekprg_"+this.id).show(); + window.setTimeout(function() {delete virtChnCounterWP;},5000); + this.initBtnEvents(); + }, + + initBtnEvents: function() { + var that = this; + jQuery("#setChannelMode_"+this.id).click(function(){ + var self = this; + jQuery(this).toggleClass("ControlBtnOn"); + window.setTimeout(function(){jQuery(self).toggleClass("ControlBtnOn");},500); + that.getModeDialog(); + window.setTimeout(function(){ + that.modeElm = jQuery("#wpChannelMode_" + that.id); + that.chnElems = jQuery("[name='wpChannelSel_"+that.id+"']"); + },500); + + }); + }, + + getModeDialog: function() { + var that = this; + var sOutput = this.getDialogHtml(); + var dlg = new YesNoDialog(translateKey("dialogSetWPModeTitle"), sOutput, function(result) { + var selectedMode = that.modeElm.val(), + selectedCh = 0; + if (result == YesNoDialog.RESULT_YES) { + jQuery.each(that.chnElems, function(index,elm){ + if (jQuery(elm).is(":checked")) { + selectedCh += parseInt(jQuery(elm).val()); + } + }); + that.selectedCh = selectedCh; + conInfo("iface: " + that.iface + " - address: " + that.chAddress); + conInfo("selectedMode: " + selectedMode + " - selectedCh: " + selectedCh); + + if (typeof that.callback == "undefined" ) { + homematic("Interface.putParamset", { + 'interface': that.iface, + 'address': that.chAddress, + 'paramsetKey': 'VALUES', + 'set': + [ + {name: 'WEEK_PROGRAM_TARGET_CHANNEL_LOCK', type: 'string', value: selectedMode}, + {name: 'WEEK_PROGRAM_TARGET_CHANNEL_LOCKS', type: 'int', value: selectedCh} + ] + }, function (result) { + conInfo(result); + }); + } + } + + if (that.callback) {that.callback(result);} + },"html"); + + if(that.deviceIsHmIP_DALI) { + dlg.setWidth(700); + } + + }, + + + initChannelState: function() { + var self = this, + binChannelState = this.getBinChannelState(), + chState, + relevantChn = []; + + if (! this.expert) { + relevantChn = (!this.wiegandInterface) ? this.relevantChn : [1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12]; + } else { + relevantChn = this.relevantChn; + } + jQuery.each(relevantChn, function (index, value) { + //debugger; + chState = (binChannelState[index]) ? binChannelState[index] : "1"; + if (! self.deviceIsHmIP_DALI) { + if (chState == "0") { + jQuery("#" + self.id + "_bit" + index + "0").attr("checked", true); // Auto + } else { + jQuery("#" + self.id + "_bit" + index + "1").attr("checked", true); // Manu + } + } else { + if (chState == "0") { + jQuery("#" + self.id + "_bit" + (value - 1) + "0").attr("checked", true); // Auto + } else { + jQuery("#" + self.id + "_bit" + (value - 1) + "1").attr("checked", true); // Manu + } + } + }); + }, + + getMainHtml: function() { + var self = this, + html = ""; + + var valCheckBox, + tmpVal; + + function getHTML(selectedChannels) { + var html = "", relevantChn; + + if (selectedChannels) { + relevantChn = selectedChannels; + html += "

"; + } else { + relevantChn = self.relevantChn; + } + + html += ""; + html += ""; + + // channel number + html += ""; + if (!self.deviceIsHmIPWKP) { + html += ""; + } else { + html += ""; + } + + if (!self.deviceIsHmIP_MOD_WD_VK) { + jQuery.each(relevantChn, function (index, val) { + if (!self.deviceIsHmIPWKP) { + html += ""; + } else { + html += ""; + } + }); + } + html += ""; + html += ""; + + html += ""; + // row auto + html += ""; + html += ""; + var _tmpIndex; + jQuery.each(relevantChn, function (index, val) { + + if (self.wiegandInterface) { + // index 0 - 7 = 3 - 10 - index 9 - 10 = 0 - 2 + if (index <= 7) { + _tmpIndex = index + 3; + } else { + _tmpIndex = index - 8; + } + html += ""; + } else if (self.deviceIsHmIP_DALI) { + html += ""; + } else { + html += ""; + } + + }); + html += ""; + + // row manu + html += ""; + html += ""; + jQuery.each(relevantChn, function (index, val) { + if (self.wiegandInterface) { + //****************** + if (self.expert) { + // index 0 - 7 = 3 - 10 - index 9 - 10 = 0 - 2 + if (index <= 7) { + _tmpIndex = index + 3; + } else { + _tmpIndex = index - 8; + } + valCheckBox = Math.pow(2, _tmpIndex); + } else { + if (index <= 7) { + _tmpIndex = index + 3; + valCheckBox = Math.pow(2, _tmpIndex); + } else { + _tmpIndex = index - 8; + valCheckBox = 1; + } + } + html += ""; + //****************** + } else if (self.deviceIsHmIP_DALI) { + valCheckBox = Math.pow(2, (val-1)); + html += ""; + } else { + if (self.expert) { + valCheckBox = Math.pow(2, index); + } else { + if (index == 0) { + valCheckBox = 1; + tmpVal = 1; + } else { + valCheckBox = tmpVal << 3; + tmpVal = valCheckBox; + } + } + html += ""; + } + }); + html += ""; + html += ""; + html += "
" + translateKey('lblUser') + "" + val + "" + (index + 1) + "
" + translateKey("stringTableClimateControlRTTransceiverAutoMode") + ""; + html += ""; + html += ""; + html += ""; + html += ""; + html += ""; + html += "
" + translateKey("stringTableClimateControlRTTransceiverManuMode") + ""; + html += ""; + html += ""; + html += ""; + html += ""; + html += ""; + html += "
"; + + return html; + + }; + + if (! this.deviceIsHmIP_DALI) { + html += getHTML(); + } else { + // DALI - Create one row for the normal channels and one row for the group channels. + var self = this, + oDevice = DeviceList.getDeviceByAddress(this.chAddress.split(":")[0]), + lastUsedDaliChn = false, + maxCap; + + var chnInUse = []; + + jQuery.each(oDevice.channels, function(index, chn) { + + if (chn.channelType == "UNIVERSAL_LIGHT_RECEIVER") { + if (index < 33) { + if (! lastUsedDaliChn) { + maxCap = parseInt(homematic("Interface.getMetadata", {"objectId": chn.id, "dataId": "maxCap"})); + } + if ((!isNaN(maxCap)) && (maxCap < 5)) { + chnInUse.push(index); + } else { + lastUsedDaliChn = true; + } + } + } + }); + + html += getHTML(chnInUse); + // DALI group channels + chnInUse = []; + for (var i = 33; i <= 48; i++) { + chnInUse.push(i); + } + html += getHTML(chnInUse); + } + return html; + }, + + getDialogHtml: function() { + var self = this, + newTR = false, + html = ""; + + var valCheckBox, + tmpVal; + + html += ""; + html += ""; + html += ""; + html += ""; + html += ""; + + if (! self.deviceIsHmIP_MOD_WD_VK) { + html += ""; + } else { + html += ""; + } + if (! this.deviceIsHmIPWKP) { + html += ""; + } else { + html += ""; + } + html += ""; + html += ""; + html += ""; + html += ""; + + html += "
"+translateKey("lblMode")+": "; + html += ""; + html+= "
"+translateKey('btnSettingsGroups')+""; + newTR = true; + } + } + }); + + html += "
"; + return html; + }, + + getDevice: function(id) { + var device = DeviceList.getDevice(this.opts.deviceID); + if (typeof device != "object") { + device = homematic("Device.get", {"id": id}); + } + return device; + }, + + getRelevantChannels: function() { + var self = this, + result = [], + virtualChID = "_VIRTUAL_RECEIVER", + AccessReceiverID = "ACCESS_RECEIVER", // HmIP-DLD + AccessTransceiverID = "ACCESS_TRANSCEIVER", // HmIP-FWI (Wiegand Iface) + DoorLockTransmitterID = "DOOR_LOCK_STATE_TRANSMITTER", // HmIP-DLD + OpticalSignalID = "OPTICAL_SIGNAL_RECEIVER", // HmIPW-WRC6 + UniversalLightReceiver = "UNIVERSAL_LIGHT_RECEIVER", // HmIP-RGBW + PermissionTranseiverID = "PERMISSION_TRANSCEIVER", // HmIP-FLC/FLD + SwitchTranseiverID = "SWITCH_TRANSCEIVER", // HmIP-FLC/FLD + expertChn; + + jQuery.each(this.device.channels, function(index,chn) { + if ( + (chn.channelType.indexOf(virtualChID) !== -1) + || (chn.channelType.indexOf(AccessReceiverID) !== -1) + || (chn.channelType.indexOf(AccessTransceiverID) !== -1) + || (chn.channelType.indexOf(DoorLockTransmitterID) !== -1) + || (chn.channelType.indexOf(OpticalSignalID) !== -1) + || (chn.channelType.indexOf(UniversalLightReceiver) !== -1) + || (chn.channelType.indexOf(PermissionTranseiverID) !== -1) + || (chn.channelType.indexOf(SwitchTranseiverID) !== -1) + ) { + if (self.expert) { + result.push(index); + } else { + expertChn = self.getOnlyExpertChannels(chn.channelType, index); + if (expertChn) { + result.push(expertChn); + } + } + } + }); + return result; + }, + + getOnlyExpertChannels: function(channelType, channelNr) { + var result = null, self=this; + + if ( + channelType == "DIMMER_VIRTUAL_RECEIVER" || + channelType == "SWITCH_VIRTUAL_RECEIVER" || + channelType == "BLIND_VIRTUAL_RECEIVER" || + channelType == "SHUTTER_VIRTUAL_RECEIVER" || + channelType == "ACOUSTIC_SIGNAL_VIRTUAL_RECEIVER" || + channelType == "SERVO_VIRTUAL_RECEIVER" + ) { + virtChnCounterWP = (virtChnCounterWP >= 3) ? 0 : virtChnCounterWP; + virtChnCounterWP++; + if (virtChnCounterWP == 1) { + return channelNr; + } else { + return null; + } + } else if ( + channelType == "ACCESS_RECEIVER" + || channelType == "ACCESS_TRANSCEIVER" + || channelType == "DOOR_LOCK_STATE_TRANSMITTER" + || channelType == "OPTICAL_SIGNAL_RECEIVER" + || channelType == "UNIVERSAL_LIGHT_RECEIVER" + || channelType == "PERMISSION_TRANSCEIVER" + || channelType == "SWITCH_TRANSCEIVER") + { + return channelNr; + } + + return result; + }, + + // Checks if the device type is of a particular kind + // This is useful for the treatment of special cases (e.g. the HmIP-BSL which is a DIMMER_WEEKLY_PROFILE but must be treated as a SWITCH_WEEKLY_PROFILE + isDeviceType: function(devType) { + return (this.devLabel == devType) ? true : false; + }, + + getBinChannelState: function() { + var missingZero = "", + tmp = "", + bVal = this.opts.channelLocks.toString(2); + + jQuery.each(this.relevantChn, function(index, value) { + missingZero += "0"; + }); + + bVal = missingZero.substr(bVal.length)+bVal; + bVal = this.reverseString(bVal); + if (! this.expert) { + + if (! this.wiegandInterface) { + for (var x = 0; x < bVal.length; x += 3) { + tmp += bVal[x]; + } + bVal = tmp; + } else { + // 3 virtual switch actor channels _ Bit 1, 2, 3 + // 8 access control channels - Bit 4 - 11 + for (var loop = 0; loop <= 10; loop++) { + tmp += (bVal.charAt(loop) != "") ? bVal.charAt(loop) : "0"; + } + bVal = tmp; + } + } + return bVal; + }, + + reverseString: function (str) { + return str.split("").reverse().join(""); + }, + + getConfigString: function() { + var arMode = ["MANU_MODE", "AUTO_MODE_WITH_RESET", "AUTO_MODE_WITHOUT_RESET"]; + return "WPTCLS="+this.selectedCh+",WPTCL="+arMode.indexOf(this.modeElm.val()); + } +}; +/** + * Created by grobelnik on 04.12.2020. + */ + + +iseHmIPWeeklyProgramAccessReceiver = Class.create(); + +iseHmIPWeeklyProgramAccessReceiver.prototype = { + initialize: function (id, opts, callback) { + var self = this; + + virtChnCounterWP = 0; + //conInfo(opts); + this.callback = callback; + this.opts = opts; + this.id = id; + this.devLabel = opts.deviceLabel; + this.iface = this.opts.chInterface; + + this.doorLockStateTransmitterID = "DOOR_LOCK_STATE_TRANSMITTER"; + this.accessReceiverID = "ACCESS_RECEIVER"; + + this.expert = (! this.opts.userEasyLinkMode) ? true : false; + + this.chAddress = this.opts.chnAddress; + + this.device = this.getDevice(this.opts.deviceID); + this.relevantChn = this.getRelevantChannels(); + + // This can be used for later devices that require special treatment. + /*if (this.isDeviceType("HmIP-XXX")) { + this.relevantChn = (this.expert) ? [4, 5, 6] : [4]; + }*/ + + this.anchor = jQuery("#anchor_"+this.id); + this.anchor.html(this.getMainHtml(this.doorLockStateTransmitterID) + this.getMainHtml(this.accessReceiverID)); + + this.initChannelState(); + + jQuery("#weekprg_"+this.id).show(); + window.setTimeout(function() {delete virtChnCounterWP;},5000); + this.initBtnEvents(); + }, + + initBtnEvents: function() { + var that = this; + jQuery("#setChannelMode_"+this.id).click(function(){ + var self = this; + jQuery(this).toggleClass("ControlBtnOn"); + window.setTimeout(function(){jQuery(self).toggleClass("ControlBtnOn");},500); + that.getModeDialog(); + window.setTimeout(function(){ + that.modeElm = jQuery("#wpChannelMode_" + that.id); + that.chnElems = jQuery("[name='wpChannelSel_"+that.id+"']"); + },500); + + }); + }, + + getModeDialog: function() { + var that = this; + var sOutput = this.getDialogHtml(this.doorLockStateTransmitterID) + this.getDialogHtml(this.accessReceiverID); + + var dlg = new YesNoDialog(translateKey("dialogSetWPModeTitle"), sOutput, function(result) { + var selectedMode = that.modeElm.val(), + selectedCh = 0; + if (result == YesNoDialog.RESULT_YES) { + jQuery.each(that.chnElems, function(index,elm){ + if (jQuery(elm).is(":checked")) { + selectedCh += parseInt(jQuery(elm).val()); + } + }); + that.selectedCh = selectedCh; + conInfo("iface: " + that.iface + " - address: " + that.chAddress); + conInfo("selectedMode: " + selectedMode + " - selectedCh: " + selectedCh); + + if (typeof that.callback == "undefined" ) { + homematic("Interface.putParamset", { + 'interface': that.iface, + 'address': that.chAddress, + 'paramsetKey': 'VALUES', + 'set': + [ + {name: 'WEEK_PROGRAM_TARGET_CHANNEL_LOCK', type: 'string', value: selectedMode}, + {name: 'WEEK_PROGRAM_TARGET_CHANNEL_LOCKS', type: 'int', value: selectedCh} + ] + }, function (result) { + conInfo(result); + }); + } + } + + if (that.callback) {that.callback(result);} + },"html"); + + dlg.btnTextNo(translateKey("btnCancel")); + dlg.btnTextYes(translateKey("btnOk")); + }, + + + initChannelState: function() { + var self = this, + binChannelState = this.getBinChannelState(), + chState; + + jQuery.each(this.relevantChn, function(index, value){ + chState = (binChannelState[index]) ? binChannelState[index] : "0"; + + if (chState == "1") { + jQuery("#"+self.id+"_bit"+(index+1)+"1").attr("checked",true); + } else { + jQuery("#"+self.id+"_bit"+(index+1)+"0").attr("checked",true); + } + }); + }, + + getMainHtml: function(chnType) { + var self = this, + html = "", + valCheckBox, + tmpVal; + + var chType = this.getChannelOfType(chnType); + + if (chnType == this.accessReceiverID) { + html += "
"; + html += "
"+translateKey('optionDoorLockUser')+"
"; + } else if (chnType == this.doorLockStateTransmitterID) { + html += "
"+translateKey('optionDoorLockAction')+"
"; + } + + html += ""; + html += ""; + // channel number + html += ""; + if (chnType == this.accessReceiverID) { + html += ""; + jQuery.each(chType, function (index, val) { + html += ""; + }); + } + html += ""; + html += ""; + + html += ""; + // row auto + html += ""; + html += ""; + jQuery.each(chType, function(index,val){ + html += ""; + }); + html += ""; + + // row manu + html += ""; + html += ""; + // This works if only one doorLockStateTransmitter channel is available. + // For new devices with more of this channels this must be reworked. + jQuery.each(chType, function(index,val){ + if (chnType == self.doorLockStateTransmitterID) { + valCheckBox = 1; // + } else if (chnType == self.accessReceiverID) { + valCheckBox = Math.pow(2, (index + 1)); + } + html += ""; + }); + html += ""; + html += ""; + html += "
"+translateKey('lblUser')+"" + (parseInt(val) - 1) + "
"+translateKey("stringTableClimateControlRTTransceiverAutoMode")+""; + html += ""; + html += "
"+translateKey("stringTableClimateControlRTTransceiverManuMode")+""; + html += ""; + html += "
"; + return html; + }, + + getDialogHtml: function(chnType) { + + var self = this, + html = ""; + + var valCheckBox, + tmpVal; + + if (chnType == this.doorLockStateTransmitterID) { + html += ""; + html += ""; + html += ""; + html += ""; + html += ""; + } + + html += ""; + if (chnType == this.doorLockStateTransmitterID) { + html += ""; + } else if (chnType == this.accessReceiverID) { + html += ""; + } + html += ""; + html += ""; + + if (chnType == this.accessReceiverID) { + html += "
" + translateKey("lblMode") + ": "; + html += ""; + html += ""; + html += "
" + translateKey("lblDoorLock") + ": " + translateKey("lblUser") + ": "; + if (chnType == this.doorLockStateTransmitterID) { + html += ""; + } else { + jQuery.each(this.relevantChn, function (index, val) { + if (index > 0) { + valCheckBox = Math.pow(2, index); + html += ""; + html += ""; + } + }); + } + + html += "
"; + } + + return html; + }, + + getDevice: function(id) { + var device = DeviceList.getDevice(this.opts.deviceID); + if (typeof device != "object") { + device = homematic("Device.get", {"id": id}); + } + return device; + }, + + getRelevantChannels: function() { + var self = this, + result = [], + AccessReceiverID = "ACCESS_RECEIVER", // HmIP-DLD :2 - :9 = User access + DoorLockTransmitterID = "DOOR_LOCK_STATE_TRANSMITTER"; // HmIP-DLD :1 = Device behaviour + + jQuery.each(this.device.channels, function(index,chn) { + if ( + (chn.channelType.indexOf(AccessReceiverID) !== -1) + || (chn.channelType.indexOf(DoorLockTransmitterID) !== -1) + ) { + result.push(index); + } + }); + return result; + }, + + // The chType should be ACCESS_RECEIVER or DOOR_LOCK_STATE_TRANSMITTER + getChannelOfType: function(chType) { + var result = []; + jQuery.each(this.device.channels, function(index,chn) { + if (chn.channelType.indexOf(chType) != -1) { + result.push(index); + } + }); + return result; + }, + + // Checks if the device type is of a particular kind + // This is useful for the treatment of special cases (e.g. the HmIP-BSL which is a DIMMER_WEEKLY_PROFILE but must be treated as a SWITCH_WEEKLY_PROFILE + isDeviceType: function(devType) { + return (this.devLabel == devType) ? true : false; + }, + + getBinChannelState: function() { + var missingZero = "", + tmp = "", + bVal = this.opts.channelLocks.toString(2); + + jQuery.each(this.relevantChn, function(index, value) { + missingZero += "0"; + }); + + bVal = missingZero.substr(bVal.length)+bVal; + bVal = this.reverseString(bVal); + return bVal; + }, + + reverseString: function (str) { + return str.split("").reverse().join(""); + }, + + getConfigString: function() { + var arMode = ["MANU_MODE", "AUTO_MODE_WITH_RESET", "AUTO_MODE_WITHOUT_RESET"]; + return "WPTCLS="+this.selectedCh+",WPTCL="+arMode.indexOf(this.modeElm.val()); + } + +}; +iseHmIPPassageDetector = Class.create(); +iseHmIPPassageDetector.prototype = { + + + initialize: function(opts) { + conInfo(opts); + this.opts = opts; + this.chn3Elm = jQuery("#"+this.opts.devId + this.opts.chnId); + }, + + show: function() { + this.chn3Elm.show(); + }, + + hide: function() { + this.chn3Elm.hide(); + } +}; + + +iseMOD_RC8 = Class.create(); +iseMOD_RC8.prototype = { + + initialize: function(chId, chAddress) + { + var self = this; + this.channelId = chId; + this.channelAddress = chAddress; + this.noFunctionElm = jQuery("#"+self.channelId+"noFunction"); + this.TFKElm = jQuery("#"+self.channelId+"scControl"); + this.WaitElm = jQuery("#"+self.channelId+"resultWaitAnim"); + + var tmp = homematic("Interface.getMasterValue", {"interface": "HmIP-RF", "address": this.channelAddress, "valueKey": "CHANNEL_OPERATION_MODE"},function(result) { + + var optionTFK = 3; + + self.WaitElm.hide(); + + if (result == optionTFK) { + self.noFunctionElm.hide(); + self.TFKElm.show(); + } else { + self.noFunctionElm.show(); + self.TFKElm.hide(); + } + }); + + } +};iseAccelerationTransceiver = Class.create(); +iseAccelerationTransceiver.prototype = { + initialize: function (chnId, valMotion, chnAddress, tiltAngle, tiltAngleUnit) { + var self = this; + this.chnId = chnId; + this.valMotion = valMotion; + this.chnAddress = chnAddress; + this.tiltAngle = tiltAngle; + this.tiltAngleUnit = tiltAngleUnit; + + var tmp = homematic("Interface.getMasterValue", {"interface": "HmIP-RF", "address": this.chnAddress, "valueKey": "CHANNEL_OPERATION_MODE"},function(result) { + var outputElm = jQuery("#accelerationState" + chnId); + var arMessage = ["",translateKey("lblVibration"),translateKey("lblPosition"), translateKey("lblTilt")], + arMotion = [translateKey("lblNo"), translateKey("lblYes")], + arPosition = [translateKey("lblHorizontal"), translateKey("lblNonHorizontal")], + res = "--"; + + switch (parseInt(result)) { + case 1: + res = (self.valMotion == "false") ? arMotion[0] : arMotion[1]; + break; + case 2: + res = (self.valMotion == "false") ? arPosition[0] : arPosition[1]; + break; + case 3: + res = self.tiltAngle + self.tiltAngleUnit; + break; + } + outputElm.html(arMessage[result] + ":
"+ res ); + }); + } +}; + +iseAccelerationTransceiverTaco = Class.create(); +iseAccelerationTransceiverTaco.prototype = { + initialize: function (chnId, valMotion, chnAddress, tiltAngle, tiltAngleUnit, position) { + var self = this; + this.chnId = chnId; + this.valMotion = valMotion; + this.chnAddress = chnAddress; + this.position = position; // 0 waagerecht, 1 geneigt, 2 senkrecht + this.tiltAngle = tiltAngle; + this.tiltAngleUnit = tiltAngleUnit; + + var tmp = homematic("Interface.getMasterValue", {"interface": "HmIP-RF", "address": this.chnAddress, "valueKey": "CHANNEL_OPERATION_MODE"},function(result) { + var firstElm = jQuery("#firstElm" + chnId), + secondElm = jQuery("#secondElm" + chnId), + angleElm = jQuery("#angleElm" + chnId), + arMessage = ["",translateKey("lblVibration"),translateKey("lblPosition"), translateKey("lblPositionA")], + arMotion = [translateKey("lblNo"), translateKey("lblYes")], + arPosition = ["waagerecht","geneigt" ,"senkrecht"], + arPositionA = ["waagerecht","geneigt" ,"geneigt"], + lblAngle = translateKey("lblAngle") + ":
", + motion = (self.valMotion == "false") ? arMotion[0] : arMotion[1]; + + + + switch (parseInt(result)) { + case 1: + firstElm.html(arMessage[result] + "
" + motion ); + break; + case 2: + firstElm.html(arMessage[result] + ":
" + arPositionA[position]); + break; + case 3: + firstElm.html(arMessage[result] + ":
" + arPosition[position]); + break; + } + angleElm.html(lblAngle + self.tiltAngle + self.tiltAngleUnit); + + }); + } +}; +iseHmIPServo = Class.create(); +iseHmIPServo.prototype = { + + initialize: function(chId, opts) + { + var self = this, + metaRampTime; + conInfo("iseHmIPServo"); + this.id = chId; + this.opts = opts; + + this.minServoPos = 0; + this.maxServoPos = 100; + this.stepServoPos = 0.5; + + this.minRampTime = 0; + this.maxRampTime = 50; + this.stepRampTime = 1; + + this.sliderPosInfoElm = jQuery("#infoSliderPos" + this.id); + this.sliderPosElm = jQuery("#sliderPos" + this.id); + this.levelServoPos = this.opts.levelServoPos; + + this.sliderRampInfoElm = jQuery("#infoSliderRamp" + this.id); + this.sliderRampElm = jQuery("#sliderRamp" + this.id); + + this.levelServoRampTime = 0; + + // This is to store the ramp time value which is only writable (RAMP_TIME = operations 2) + // This remembers the last setting. Otherwise the value would always be set to 0 after a status message. + if (typeof tmpRampTime == "undefined") { + tmpRampTime = []; + metaRampTime = homematic("Interface.getMetadata", {"objectId": this.id, "dataId": "rampTime"}); + this.levelServoRampTime = (metaRampTime != "null") ? metaRampTime : 0; + tmpRampTime['a_' + this.id] = this.levelServoRampTime; + } else if (typeof tmpRampTime['a_' + this.id] != "undefined") { + this.levelServoRampTime = tmpRampTime['a_' + this.id]; + } + + this.initSliderPosInfoElm(); + this.initSliderPos(); + this.initSliderRampInfoElm(); + this.initSliderRamp(); + this.sliderPosElm.slider('value', this.opts.levelServoPos * 100); + this.sliderPosInfoElm.val(parseFloat(this.opts.levelServoPos * 100).toFixed(1)); + this.sliderRampElm.slider('value', this.levelServoRampTime); + this.sliderRampInfoElm.val(parseInt(this.levelServoRampTime)); + }, + + initSliderPos: function () { + var self = this; + this.sliderPosElm.slider({ + animate: "fast", + min: self.minServoPos, + max: self.maxServoPos, + step: self.stepServoPos, + orientation: "horizontal", + slide: function (event, ui) {}, + stop: function( event, ui ) {} + }); + this.sliderPosElm.on("slide", function (event, ui) { + self.onSliderPosChange(parseFloat(ui.value.toString().replace(",", ".")).toFixed(1)); + }); + + this.sliderPosElm.on("slidestop", function(event, ui){ + self.onSliderPosStop(ui.value); + }); + }, + + initSliderRamp: function () { + var self = this; + this.sliderRampElm.slider({ + animate: "fast", + min: self.minRampTime, + max: self.maxRampTime, + step: self.stepRampTime, + orientation: "horizontal", + slide: function (event, ui) {}, + stop: function( event, ui ) {} + }); + this.sliderRampElm.on("slide", function (event, ui) { + self.onSliderRampChange(ui.value); + }); + + this.sliderRampElm.on("slidestop", function(event, ui){ + self.onSliderRampStop(ui.value); + }); + }, + + + initSliderPosInfoElm: function() { + var self = this; + this.sliderPosInfoElm.change(function() { + var value = jQuery(this).val().replace(",", "."), + min = 0, max = 100; + + if ((value < min) || (isNaN(value))) {value = min;} + if (value > max) {value = max;} + self.levelServoPos = roundValue05(parseFloat(value).toFixed(1)); + self.sliderPosElm.slider("value", self.levelServoPos); + self.sliderPosInfoElm.val(self.levelServoPos); + self.saveSliderPosValue(); + }); + }, + + initSliderRampInfoElm: function() { + var self = this; + this.sliderRampInfoElm.change(function() { + var value = jQuery(this).val(), + min = self.minRampTime, max = self.maxRampTime; + + if ((value < min) || (isNaN(value))) {value = min;} + if (value > max) {value = max;} + self.levelServoRampTime = value; + + if ((value < self.minRampTime) || (value > self.minRampTime)) { + self.sliderRampElm.slider("value", self.levelServoRampTime); + self.sliderRampInfoElm.val(self.levelServoRampTime); + } + + tmpRampTime['a_'+ self.id] = self.levelServoRampTime; + + }); + }, + + onSliderPosChange: function (val) { + this.levelServoPos = val; + this.sliderPosInfoElm.val(parseFloat(this.levelServoPos).toFixed(1)); + }, + + onSliderPosStop: function(val) { + this.levelServoPos = val; + this.sliderPosInfoElm.val(this.levelServoPos).change(); + }, + + onSliderRampChange: function (val) { + this.levelServoRampTime = val; + this.sliderRampInfoElm.val(parseInt(this.levelServoRampTime)); + }, + + onSliderRampStop: function(val) { + this.levelServoRampTime = val; + this.sliderRampInfoElm.val(this.levelServoRampTime).change(); + homematic("Interface.setMetadata", {"objectId": this.id, "dataId": "rampTime", "value": this.levelServoRampTime}); + }, + + + saveSliderPosValue: function() { + this.levelServoRampTime = (this.levelServoRampTime == "") ? this.minRampTime : this.levelServoRampTime; + homematic("Interface.putParamset",{'interface': this.opts.chnInterface, 'address' : this.opts.chnAddress, 'paramsetKey' : 'VALUES', 'set': + [ + {name:'LEVEL', type: 'double', value: this.levelServoPos / 100}, + {name:'RAMP_TIME', type: 'double', value: this.levelServoRampTime} + ] + },function(result){conInfo(result);}); + } + +};iseHmIPWiegandIface = Class.create(); +iseHmIPWiegandIface.prototype = { + + initialize: function (opts) { + conInfo("iseHmIPWiegandIface"); + + this.opts = opts; + + this.iface = this.opts.chInterface; + this.chAddress = this.opts.chnAddress; + this.deviceType = this.opts.deviceType; + + this.chnid = this.opts.chnID; + + this.idCodeID = this.opts.idCodeID; + this.anchorCodeCommandElm = jQuery("#anchorCodeCommand_" + this.chnid); + this.anchorClearErrorElm = jQuery("#anchorClearError_" + this.chnid); + + this.selectedCodeIDElm; + this.selectedCodeID = 0; + this.selectedCommandMode = 1; + + this.selectedClearError; + + this.initBtnElms(); + }, + + initBtnElms: function () { + var self = this; + this.anchorCodeCommandElm.click(function() {self._setCodeCommand();}); + this.anchorClearErrorElm.click(function() {self._clearError();}); + }, + + _setCodeCommand: function() { + // open Dialog for setting one of the following code commands + // ERASE, START_OF_LEARN, STOP_OF_LEARN + var self = this; + dlg = new YesNoDialog(translateKey("dialogCodeCommandTitle"), this._getHTMLSetCodeCommand(), function(result) { + if (result == YesNoDialog.RESULT_YES) { + + var codeCommand = parseInt(self.selectedCommandMode), + codeID = parseInt(self.selectedCodeID); + + + // Transmit the code command incl. codeID - putPutparamset + console.log("interface: " + self.iface, "chAddress: " + self.chAddress); + console.log("codeID: " + codeID, "codeCommand: " + codeCommand); + + homematic("Interface.putParamset",{'interface': self.iface, 'address' : self.chAddress, 'paramsetKey' : 'VALUES', 'set': + [ + {name:'CODE_COMMAND', type: 'int', value: codeCommand}, + {name:'CODE_ID', type: 'int', value: codeID} + ] + },function(result){console.log(result);}); + + } + }, "html"); + dlg.btnTextNo(translateKey("btnCancel")); + dlg.btnTextYes(translateKey("btnOk")); + }, + _getHTMLSetCodeCommand: function () { + // ERASE, START_OF_LEARN, STOP_OF_LEARN + var self = this; + + getCodeID = function(elm) { + jQuery("[name='codeID']").prop("checked", false); + self.selectedCodeIDElm = jQuery(elm); + self.selectedCodeIDElm.prop("checked",true); + self.selectedCodeID = parseInt(self.selectedCodeIDElm.val()); + //console.log("selected val: " + self.selectedCodeID); + }; + + setCommandMode = function(val) { + self.selectedCommandMode = parseInt(val); + //console.log("selected command: " + self.selectedCommandMode); + }; + + var result = ""; + + result = "
"; + + result += "
"+translateKey('helpFWICodeCommand')+"
"; + result += "
"; + + result += ""; + result += ""; + for (var loop = 1; loop < 21; loop++) { + result += ""; + } + result += ""; + + result += ""; + for (var loop = 1; loop < 21; loop++) { + result += ""; + } + result += ""; + result += "
"+loop+"
"; + + result += "
"; + + result += ""; + result += ""; + result += ""; + result += ""; + result += ""; + result += "
"+translateKey('lblFWISetCodeCommand')+""; + result += ""; + result += "
"; + result += "
"; + + + return result; + }, + + _clearError: function() { + var self = this; + // open Dialog with a selection option for + // SABOTAGE_STICKY, BLOCKED_TEMPORARY, BLOCKED_PERMANENT, ALL + dlg = new YesNoDialog(translateKey("dialogClearErrorTitle"), this._getHTMLClearError(), function(result) { + if (result == YesNoDialog.RESULT_YES) { + var clearError = parseInt(self.selectedClearError); + conInfo("Send Clear error: " + clearError); + homematic("Interface.putParamset",{'interface': self.iface, 'address' : self.chAddress, 'paramsetKey' : 'VALUES', 'set': + [ + {name:'CLEAR_ERROR', type: 'int', value: clearError} + ] + },function(result){self.selectedClearError = 4;}); + } else { + //self.selectedClearError = 4; Is this necessary? + } + }, "html"); + dlg.btnTextNo(translateKey("btnCancel")); + dlg.btnTextYes(translateKey("btnOk")); + }, + + _getHTMLClearError: function() { + var self = this; + clearError = function (val) { + self.selectedClearError = parseInt(val); + //console.log("selected command: " + self.selectedCommandMode); + }; + + // SABOTAGE_STICKY, BLOCKED_TEMPORARY, BLOCKED_PERMANENT, ALL + var result = ""; + if (this.deviceType == "HmIP-FWI") { + result += "
" + translateKey('helpFWIClearError') + "
"; + } else { + // e. g. HmIP-WKP + result += "
" + translateKey('helpClearError') + "
"; + } + result += "
"; + + result += ""; + result += ""; + result += ""; + result += ""; + result += ""; + result += "
"+translateKey('lblFWIClearError')+""; + result += ""; + result += "
"; + return result; + + } +};iseUniversalLightReceiver = Class.create(); +iseUniversalLightReceiver.prototype = { + + initialize: function(chnId, opts) { + conInfo("opts", opts); + var self = this; + this.oDimmerElm = opts.oDimmerSlider; + this.colorPicker; + selectedColor = "not set"; + this.chnId = chnId; + this.iface = opts.iface; + this.chAddress = opts.chAddress; + this.HUE = opts.hue; + this.SATURATION = opts.saturation; + this.LEVEL = opts.level; + this.EFFECT = opts.effect; + this.DURATION_VALUE = 31; + this.DURATION_UNIT = 2; // hour + + this.hueStatus = opts.hueStatus; + + this.colorPickerInit = { + hue : parseInt(opts.hue), + saturation : parseInt((opts.saturation*100)), + level : parseInt((opts.level * 100) ) + }; + + this.percLevelElm = jQuery("#"+this.chnId+"Perc"); + + this.hueElm = jQuery("#hueElmId_"+ this.chnId); + this.satElm = jQuery("#satElmId_"+ this.chnId); + this.bckGndElm = jQuery("#bckGndlmId_"+ this.chnId); + this.setActiveElm(); + this.setKeyHandler(); + this.getColorPicker(); + }, + + setActiveElm: function() { + if (this.EFFECT > 0) { + jQuery(".j_ControlBtnInfo").first().removeClass("ControlBtnInfoActive").addClass("ControlBtnInfo"); + + // set the active effect button blue + var btnEffect = jQuery("#ulrEffect_"+(parseInt(parseInt(this.EFFECT + (this.EFFECT % 2)) / 2))+"_" + this.chnId); + jQuery("[name='urlEffect_"+this.chnId+"']").switchClass("ControlBtnOn","ControlBtnOff", 0); // deactivate all effect buttons + btnEffect.switchClass('ControlBtnOff', 'ControlBtnOn', 0); // activate the active effect button + + } else { + jQuery(".j_ControlBtnInfo").first().removeClass("ControlBtnInfo").addClass("ControlBtnInfoActive"); + } + }, + + + setKeyHandler: function() { + var self = this; + + this.bckGndElm.click(function(event) { + self.activateColorPicker(); + jQuery(this).change(); + self.saveColor(); + }); + + this.hueElm.keyup(function(event) { + var val; + if (event.keyCode == 13) { + val = parseInt(jQuery(this).val()); + if (val < 0 || isNaN(val)) {self.HUE = 0;} else if (val > 360) {self.HUE = 360;} else {self.HUE = val;}; + jQuery(this).val(self.HUE); + self.saveColor(); + } + }); + + this.hueElm.blur(function(event) { + self.activateColorPicker(); + var val; + val = parseInt(jQuery(this).val()); + if (val < 0 || isNaN(val)) {self.HUE = 0;} else if (val > 360) {self.HUE = 360;} else {self.HUE = val;}; + jQuery(this).val(self.HUE); + self.saveColor(); + }); + + this.satElm.keyup(function(event) { + var val; + if (event.keyCode == 13) { + val = (parseInt(jQuery(this).val()) / 100); + if (val < 0 || isNaN(val)) {self.SATURATION = 0;} else if (val > 1) {self.SATURATION = 1;} else {self.SATURATION = val;}; + jQuery(this).val(parseInt((self.SATURATION * 100))); + self.saveColor(); + } + }); + + this.satElm.blur(function(event) { + self.activateColorPicker(); + var val; + val = (parseInt(jQuery(this).val()) / 100); + if (val < 0 || isNaN(val)) {self.SATURATION = 0;} else if (val > 1) {self.SATURATION = 1;} else {self.SATURATION = val;}; + jQuery(this).val(parseInt((self.SATURATION * 100))); + self.saveColor(); + }); + + }, + + onPercChange: function() { + conInfo("***** onPercChange *****"); + }, + + onHandleClick: function() { + this.LEVEL = (parseInt(this.percLevelElm.val()) / 100); + //this.saveColor(); + //this.btnOkElm.click(); + }, + + getColorPicker: function() { + var self = this, + lastHueSat; + + if (this.hueStatus == 0) { + this.hueElm.val(this.colorPickerInit.hue); + this.satElm.val(this.colorPickerInit.saturation); + + homematic("Interface.setMetadata", { + "objectId": self.chnId, + "dataId": "lastValHueSat", + "value": "HUE:" + self.HUE + ",SAT:" + self.SATURATION * 100 + }, function (result) { + conInfo("iseUniversalLightReceiver getColorPicker - Metadata set: " + result); + }); + + } else { + lastHueSat = homematic("Interface.getMetadata", { + "objectId": this.chnId, + "dataId": "lastValHueSat" + }); + + // get the meta data HUE and SAT + var arHueSat = [], + valHUE = 0, + valSATPercent = 0, + valSAT = 0; + + if (lastHueSat != "null") { + arHueSat = lastHueSat.split(","); + valHUE = arHueSat[0].split(":")[1]; + valSATPercent = parseInt(arHueSat[1].split(":")[1]); + valSAT = valSATPercent / 100; + } + + this.HUE = valHUE; + this.SATURATION = valSAT; + this.hueElm.val(this.HUE); + this.satElm.val(valSATPercent); + + this.colorPickerInit.hue = this.HUE; + this.colorPickerInit.saturation = valSATPercent; + } + + + this.oDimmerElm.percChange = this.onPercChange.bindAsEventListener(this); + Event.observe($(this.chnId + "Perc"), 'change', this.oDimmerElm.percChange); + + this.oDimmerElm.handleClick = this.onHandleClick.bindAsEventListener(this); + Event.observe($("slidCtrl" + this.chnId), 'mouseup', this.oDimmerElm.handleClick); + + this.colorPicker = new iro.ColorPicker("#colorPicker_" + this.chnId, { + // Set the size of the color picker + width: 90, + color: {h: self.colorPickerInit.hue, s: self.colorPickerInit.saturation, v: self.colorPickerInit.level}, + wheelLightness: false, // If set to false, the color wheel will not fade to black when the lightness decreases. + layout: [{component: iro.ui.Wheel}], // don't show the V slider below the wheel - this value comes from the dimmer slider + handleRadius: 4 + } + ); + + this.colorPicker.on("mount", function(color) { + //var rgbVal = hsvToRgb(self.colorPickerInit.hue, self.colorPickerInit.saturation, self.colorPickerInit.level); + var rgbVal = hsvToRgb(self.colorPickerInit.hue, self.colorPickerInit.saturation, 100); + self.bckGndElm.css("background-color", "rgb("+rgbVal.r+","+rgbVal.g+","+rgbVal.b+")"); + }); + + this.colorPicker.on("input:end", function(color) { + var hsv_H = color.hsv.h, + hsv_S, + hsv_S_Percent = parseInt(color.hsv.s), + rgbVal; + + hsv_S = (parseInt(color.hsv.s) / 100); + + self.hueElm.val(hsv_H).change(); + self.HUE = hsv_H; + + self.satElm.val(hsv_S_Percent).change(); + self.SATURATION = hsv_S; + + rgbVal = hsvToRgb(color.hsv.h, color.hsv.s, 100); + self.bckGndElm.css("background-color", "rgb("+rgbVal.r+","+rgbVal.g+","+rgbVal.b+")"); + + self.saveColor(); + }); + }, + + activateColorPicker: function() { + jQuery("[name='urlEffect_"+this.chnId+"']").switchClass("ControlBtnOn","ControlBtnOff", 0); // deactivate all effect buttons + jQuery(".j_ControlBtnInfo").first().removeClass("ControlBtnInfoNotActive").addClass("ControlBtnInfoActive"); + }, + + saveColor: function() { + var self = this; + conInfo( + "saveColor - HUE: " + self.HUE + + " - SAT: " + self.SATURATION + + " - LEVEL: " + this.LEVEL + ); + + homematic("Interface.putParamset", { + 'interface': self.iface, + 'address': self.chAddress, + 'paramsetKey': 'VALUES', + 'set': + [ + {name: 'LEVEL', type: 'double', value: self.LEVEL}, + {name: 'HUE', type: 'int', value: self.HUE}, + {name: 'SATURATION', type: 'double', value: self.SATURATION}, + {name: 'DURATION_VALUE', type: 'int', value: self.DURATION_VALUE}, + {name: 'DURATION_UNIT', type: 'int', value: self.DURATION_UNIT} + + ] + }, function (result) { + if (result) { + conInfo("storeHueSat as MetaData"); + homematic("Interface.setMetadata", { + "objectId" : self.chnId, + "dataId" : "lastValHueSat", + "value" : "HUE:" + self.HUE + ",SAT:" + self.SATURATION * 100 + }, function(result) { + conInfo("iseUniversalLightReceiver saveColor - Metadata set: " + result); + }); + } + }); + } +}; + +function setULREffectToolTips (chnId) { + jQuery("#ulrEffect_0_"+chnId).powerTip({placement: "ne"}).data("powertip", "Effekt Beenden"); + for (var loop = 1; loop <= 10; loop++) { + jQuery("#ulrEffect_"+loop+"_"+chnId).powerTip({placement: "ne"}).data("powertip", "Effekt Nr: "+loop+""); + } +} + +function setURLEffectBtnActive (chnId, devAddress) { + // 01_EFFECT_01_COLOR_HUE_SATURATION_COLOR_TEMPERATURE_TYPE + var paramSet = homematic("Interface.getParamset", {"interface": "HmIP-RF", "address" : devAddress, "paramsetKey" :"MASTER"}), + effect, subEffect, btnEffect, + effectActive = false, cntSubEffect; + + for (var effect = 1; effect <= 10; effect++) { + btnEffect = jQuery("#ulrEffect_" + effect + "_" + chnId); + cntSubEffect = 0; + + for (var subEffect = 1; subEffect <= 8; subEffect++) { + if (parseInt(paramSet[addLeadingZero(effect) + "_EFFECT_" + addLeadingZero(subEffect) + "_COLOR_HUE_SATURATION_COLOR_TEMPERATURE_TYPE"]) == 0) { + cntSubEffect++; + } + } + if (cntSubEffect == 8) { // No subEffect active + btnEffect.css("color", "grey"); + btnEffect.removeAttr("onclick"); + btnEffect.click(function() { + alert(translateKey("lblEffectNotActive")); + }); + } + } +} + + +// Not in use - the effect name will be set by ReGa +function setULREffectName (chnId, devId) { + var effectName, effectNo; + for (effectNo = 1; effectNo <= 10; effectNo++) { + effectName = homematic("Interface.getMetadata", {"objectId": devId, "dataId": "effectName_" + effectNo}); + if ((effectName == "") || (effectName == "null")) {effectName = translateKey("lblEffect") + " " + effectNo;} + jQuery("#ulrEffect_"+effectNo+"_"+chnId).text(effectName); + } +} + +// This determines if the old status will be restored after the effect has come to its end. +// true = Restore the old status - false = the light will be switched off. +function setULReffectMode(chkBox, chnId) { + var mode = (jQuery(chkBox).is(":checked")) ? true : false; + homematic("Interface.setMetadata", {"objectId": chnId, "dataId": "effectMode", "value": mode}); +} + +function setULREffect (elm, effectNr, chnAddress, level) { + var effectLevel = level, + chnId = elm.id.split("_")[2], + saveOldStatus = homematic("Interface.getMetadata", {"objectId": chnId, "dataId": "effectMode"}); + jQuery(".j_Button_"+chnId).switchClass("ControlBtnOn","ControlBtnOff", 0); // deactivate the color temp slider and the buttons HCL / Dim2Warm + jQuery(".ControlBtnInfoActive").switchClass("ControlBtnInfoActive","ControlBtnInfoNotActive", 0); // deactivate the colorpicker panel for the H and S value + + jQuery("[name='urlEffect_"+chnId+"']").switchClass("ControlBtnOn","ControlBtnOff", 0); // deactivate all effect buttons + jQuery(elm).switchClass('ControlBtnOff', 'ControlBtnOn', 0); // activate the selected button. + + // saveOldStatus 'true' will determine if the old status will be restored. Otherwise the light will be switched off. + if (saveOldStatus == "true") {effectNr++;} + + homematic("Interface.putParamset", { + 'interface': "HmIP-RF", + 'address': chnAddress, + 'paramsetKey': 'VALUES', + 'set': + [ + {name: 'LEVEL', type: 'double', value: effectLevel}, + {name: 'EFFECT', type: 'int', value: effectNr} + ] + }, function (result) { + conInfo("setULREffect: ",result); + }); +} + + +iseHmIPUniversalLightRGBWSlider = Class.create(); +iseHmIPUniversalLightRGBWSlider.prototype = { + + + initialize: function (chnId, opts) { + var self = this; + conInfo("opts", opts); + + this.iface = opts.iface; + this.chAddress = opts.chAddress; + this.chnId = chnId; + this.defaultColorTmpMin = 2000; + this.defaultColorTmpMax = 6500; + + this.colorTempID = opts.colorTempID; + this.colorTempMin = (!isNaN(opts.colorTempMin)) ? opts.colorTempMin : this.defaultColorTmpMin; + this.colorTempMax = (!isNaN(opts.colorTempMax)) ? opts.colorTempMax : this.defaultColorTmpMax; + + this.colorTemp = parseInt(opts.colorTemp); + this.colorTempUnknown = (this.colorTemp < this.colorTempMin) ? true : false; + + this.valHCLVal = 10200; + this.valDim2WarmVal = 10150; + + this.hueStatus = opts.hueStatus; + + this.valHCL = (opts.hcl == 'true') ? true : false; + this.valDim2Warm = (opts.dim2Warm == 'true') ? true : false; + + this.hideSliderPanel = (this.valHCL || this.valDim2Warm) ? true : false; + + this.colorTemp = (this.colorTemp < this.colorTempMin) ? this.colorTempMin : this.colorTemp; + + this.devIsDali = (opts.devLabel == "HmIP-DRG-DALI") ? true : false; + + this.effect = opts.effect; + + window.setTimeout(function() { + self.btnColorTemp = jQuery("#btnColorTemp" + self.chnId); + self.trBtnColorTemp = jQuery("#trBtnColorTemp" + self.chnId); + self.btnHCL = jQuery("#btnHCL" + self.chnId); + self.btnDim2Warm = jQuery("#btnDim2Warm" + self.chnId); + self.sliderPanel = jQuery("#sliderPanel" + self.chnId); + self.trSliderPanel = jQuery("#trSliderPanel" + self.chnId); + self.sliderInfoElm = jQuery("#infoSliderPos" + self.chnId); + self.sliderElm = opts.oSlider; + self.colorSetElm = jQuery(".j_ControlBtnInfo")[0]; + self.hueElm = jQuery("#hueElmId_" + self.chnId); + self.satElm = jQuery("#satElmId_" + self.chnId); + self.bckGndElm = jQuery("#bckGndlmId_"+ self.chnId); + + homematic("Interface.setMetadata", { + "objectId": this.chnId, + "dataId": "lastValColorTemp", + "value": this.colorTemp + }, function (result) { + conInfo("iseUniversalLightReceiver setColorTemp - Metadata set: " + result); + }); + + self.initButtons(); + self.initSlider(); + },20); + }, + + showHideSliderPanel: function () { + if (this.hideSliderPanel) { + this.trSliderPanel.hide(); + this.trBtnColorTemp.show(); + } else { + this.trBtnColorTemp.hide(); + this.trSliderPanel.show(); + } + }, + + initButtons: function() { + var self = this; + + if (this.effect == 0) { + if (self.valHCL) { + self.setElmColorActive("hcl"); + } else if (self.valDim2Warm) { + self.setElmColorActive("dim2Warm"); + } else { + self.setElmColorActive("sliderPanel"); + } + } else { + // set the active effect button blue + var btnEffect = jQuery("#ulrEffect_"+(parseInt(parseInt(self.effect + (self.effect % 2)) / 2))+"_" + self.chnId); + jQuery("[name='urlEffect_"+self.chnId+"']").switchClass("ControlBtnOn","ControlBtnOff", 0); // deactivate all effect buttons + btnEffect.switchClass('ControlBtnOff', 'ControlBtnOn', 0); // activate the active effect button + } + + self.showHideSliderPanel(); + + this.hueElm.change(function() { + self.setAll2Off(); + jQuery(self.colorSetElm).removeClass("ControlBtnInfo").addClass("ControlBtnInfoActive"); + }); + + this.satElm.change(function() { + self.setAll2Off(); + jQuery(self.colorSetElm).removeClass("ControlBtnInfo").addClass("ControlBtnInfoActive"); + }); + + this.bckGndElm.change(function() { + self.setAll2Off(); + jQuery(self.colorSetElm).removeClass("ControlBtnInfo").addClass("ControlBtnInfoActive"); + }); + + this.bckGndElm.click(function() { + self.setAll2Off(); + jQuery(self.colorSetElm).removeClass("ControlBtnInfo").addClass("ControlBtnInfoActive"); + }); + + this.btnColorTemp.click(function() { + self.hideSliderPanel = false; + self.hueStatus == 1; + setDpState(self.colorTempID,self.colorTemp); + self.sliderElm.slider('value', self.colorTemp); + self.sliderInfoElm.val(self.colorTemp); + self.setElmColorActive("sliderPanel"); + self.showHideSliderPanel(); + }); + + this.btnHCL.click(function() { + self.hideSliderPanel = true; + self.hueStatus == 1; + setDpState(self.colorTempID,self.valHCLVal); + self.setElmColorActive("hcl"); + self.showHideSliderPanel(); + }); + + this.btnDim2Warm.click(function() { + self.hideSliderPanel = true; + self.hueStatus == 1; + setDpState(self.colorTempID,self.valDim2WarmVal); + self.setElmColorActive("dim2Warm"); + self.showHideSliderPanel(); + }); + }, + + setAll2Off: function() { + jQuery(this.colorSetElm).removeClass("ControlBtnInfoActive").addClass("ControlBtnInfo"); + jQuery(this.btnHCL).removeClass("ControlBtnOn").addClass("ControlBtnOff"); + jQuery(this.btnDim2Warm).removeClass("ControlBtnOn").addClass("ControlBtnOff"); + jQuery(this.sliderPanel).removeClass("ControlBtnOn").addClass("ControlBtnOff"); + jQuery("[name='urlEffect_"+this.chnId+"']").switchClass("ControlBtnOn","ControlBtnOff", 0); // deactivate all effect buttons + }, + + setElmColorActive: function (activeElm) { + this.setAll2Off(); + + if (this.hueStatus == 0) { + jQuery(this.colorSetElm).removeClass("ControlBtnInfo").addClass("ControlBtnInfoActive"); + } else { + switch (activeElm) { + case "hcl" : + this.btnHCL.removeClass("ControlBtnOff").addClass("ControlBtnOn"); + break; + case "dim2Warm" : + this.btnDim2Warm.removeClass("ControlBtnOff").addClass("ControlBtnOn"); + break; + case "sliderPanel" : + this.sliderPanel.removeClass("ControlBtnOff").addClass("ControlBtnOn"); + break; + } + } + }, + + initSlider: function () { + + var metaColorTemp = homematic("Interface.getMetadata", { + "objectId": this.chnId, + "dataId": "lastValColorTemp" + }); + + if ((metaColorTemp == "-1") || (metaColorTemp== "null") || (metaColorTemp == null) || (isNaN(metaColorTemp))) {this.colorTemp = this.colorTempMin;} + + var self = this; + + if (! self.devIsDali) { + this.sliderInfoElm.val(this.colorTemp); + this.sliderElm.slider('value', this.colorTemp); + + } else { + if (this.colorTempUnknown) { + this.sliderInfoElm.val("--"); + } else { + this.sliderInfoElm.val(this.colorTemp); + } + } + this.sliderElm.on("slide", function (event, ui) { + self.onSliderChange(ui.value); + }); + + this.sliderElm.on("slidestop", function(event, ui){ + self.onSliderStop(ui.value); + }); + }, + + onSliderChange: function (val) { + this.sliderInfoElm.val(val); + this.colorTemp = val; + }, + + onSliderStop: function(val) { + this.hueStatus = 1; + this.setAll2Off(); + this.setElmColorActive("sliderPanel"); + setDpState(this.colorTempID,this.colorTemp); + + homematic("Interface.setMetadata", { + "objectId": this.chnId, + "dataId": "lastValColorTemp", + "value": this.colorTemp + }, function (result) { + conInfo("iseUniversalLightReceiver setColorTemp - Metadata set: " + result); + }); + + } + +}; +/** + * ic_gd.js + **/ + +//Defines +BORDER_COLOR = WebUI.getColor("channelBorder"); //Border +HL_COLOR = WebUI.getColor("channelHighlight"); //Highlight +BG_COLOR = 'inherit'; //Background +HL_STROKE = 4;//Background +//----- + +InitGD = function(jg, size) +{ + //alert(jg); + + ClearCanvas(jg, size); + jg.setColor(HL_COLOR); + jg.setStroke(parseInt(HL_STROKE)); +}; + +ClearCanvas = function(jg, size) +{ + jg.clear(); + jg.setColor(BG_COLOR); + jg.fillRect(parseInt(0), parseInt(0), parseInt(size), parseInt(size)); + jg.paint(); + jg.setColor(HL_COLOR); +}; + +Draw = function(jg, devtype, size, formname) +{ + //if (! DEV_TypeExists(devtype)) return; + var path = DEV_getImagePath (devtype, size); + + if (path == "#") return; + + // SPHM - 487 + if ((formname && formname != "-1") && devtype == "HmIP-WRCR") { + switch (parseInt(formname)) { + case 2 : + path = path.replace(".png", "_right.png"); + break; + case 3 : + path = path.replace(".png", "_left.png"); + break; + } + } + + jg.drawImage2(path, 0, 0, size, size); + if (formname && formname != "-1") DrawForm(jg, formname, devtype, size); + jg.paint(); +}; + +DrawForm = function(jg, formname, devtype, size, x_offset, y_offset) +{ + var form = DEV_getImageHighlight(devtype, formname); + + if (!form) return; + + if (!x_offset) x_offset = 0.032; // workaround css offsets + if (!y_offset) y_offset = -0.005; // workaround css offsets + + switch (form[gd_type]) + { + case GD_TYPE["CIRCLE"]: + jg.fillArc(Math.round( (form[gd_xx]+x_offset) * size), Math.round((form[gd_yy]+y_offset)*size), Math.round(form[gd_rr]*2*size), Math.round(form[gd_rr]*2*size), parseInt(0.0), parseInt(360.0)); + break; + case GD_TYPE["RECTANGLE"]: + jg.fillRect(Math.round((form[gd_xx]+x_offset)*size), Math.round((form[gd_yy]+y_offset)*size), Math.round(form[gd_dx]*size), Math.round(form[gd_dy]*size)); + break; + case GD_TYPE["STRING"]: + jg.setFont(form[gd_fontfamily], Math.round(form[gd_fontsize]*size)+"px", form[gd_fontstyle]); + jg.drawString(form[gd_string], Math.round((form[gd_xx]+x_offset)*size), Math.round((form[gd_yy]+y_offset)*size)); + break; + case GD_TYPE["ELLIPSE"]: + jg.fillArc(Math.round((form[gd_xx]+x_offset)*size), Math.round((form[gd_yy]+y_offset)*size), Math.round(form[gd_dx]*size), Math.round(form[gd_dy]*size), parseInt(0.0), parseInt(360.0)); + break; + case GD_TYPE["LINE"]: + jg.setStroke(Math.round(form[gd_stroke]*size)); + jg.drawLine(Math.round((form[gd_x1]+x_offset)*size), Math.round((form[gd_y1]+y_offset)*size), Math.round((form[gd_x2]+x_offset)*size), Math.round((form[gd_y2]+y_offset)*size)); + jg.setStroke(parseInt(HL_STROKE)); + break; + case GD_TYPE["FORMSET"]: + for (var i=gd_type+1; i winuy-30) y = winuy - 30 - size; + + $('picDiv').style.top = y + "px"; + //----- + + //x-Position----- + winrx = dim.width + off.xOffset; + x = pagePosition[0] + dim_div.width + 30; //etwas rechts + x_rechts = x + size; + + if (x_rechts > winrx) x = pagePosition[0] - size - 30; + + $('picDiv').style.left = x + "px"; + //----- + + ShowElement('picDiv'); + if (typeof previewPicTimer == "undefined") { + previewPicTimer = window.setTimeout(function () { + HideElement('picDiv'); + delete previewPicTimer; + }, 3000); + } +}; + +picDivHide = function(jg) +{ + if (typeof previewPicTimer != "undefined") { + window.clearTimeout(previewPicTimer); + delete previewPicTimer; + } + + if (! jg) return; + + HideElement('picDiv'); + jg.drawImage("/ise/img/loading.gif", 0, 0, 250, 250); +}; +/** + * ic_common.js + **/ + +poststr = ""; +UI_PATH = "/config/"; + +Get_UI_CONTENTBOX_ID = function() +{ + //Muss als Funktion abgefragt werden, weil zur Zeit des Ladens + //die Boxen noch nicht vollständig existieren. + return ( document.getElementById('infobox') ? 'infobox' : 'centerbox' ); +}; + +ResetPostString = function() +{ + poststr = ""; +}; + +AddProfileValues = function(prefix) +{ + var i = 1; + + while (document.getElementById(prefix + i)) + { + AddParam(document.getElementById(prefix + i)); + i++; + } +}; + +AddSeparateSettings = function(prefix, pnr) +{ + var i = 1; + + while (document.getElementById(prefix + pnr + '_' + i)) + { + AddParam(document.getElementById(prefix + pnr + '_' + i)); + i++; + } +}; + +SubmitProfile = function(pnr, pname) +{ + ShowLoadingBox('Bitte warten, das Profil \"' +pname+ '\" wird gespeichert...'); + ResetPostString(); + document.getElementById('profile').value = pnr; + AddParam(document.getElementById('profile')); + AddProfileValues('global_'); + AddSeparateSettings('separate_', pnr); + AddSeparateSettings('subset_', pnr); + SendRequest('ic_paramset.cgi'); +}; + +AddParam = function(elem) +{ + if (elem !== null) + { + if (elem.name !== "") + { + if (poststr !== "") poststr += "&"; + + if (elem.type == "checkbox") + { + if (elem.checked) { elem.value = "true"; } + else { elem.value = "false"; } + } + + var arrId = elem.id.split("_"); + var type = arrId[1]; + + // falls es sich um Kanalparameter handelt (die ID ist länger) + if (arrId.length == 6) { + type = arrId[1] + "_" + arrId[2] + "_" + arrId[3]; + } + + if (elem.value == "99999999" ) + { + var sec = document.getElementById("sec_" + prefix[elem.name + type]); + var min = document.getElementById("min_" + prefix[elem.name + type]); + var hour = document.getElementById("hour_" + prefix[elem.name + type]); + + free_options = (hour.value * 3600) + (min.value * 60) + (sec.value * 1); + // elem.name = "SHORT_ON_TIME|LONG_ON_TIME" usw + poststr += elem.name + "=" + parseFloat(free_options); + } + else if (elem.value == "99999998" ) + { + var percent = document.getElementById("percent_" + prefix[elem.name + type]); + + free_options = percent.value / 100 ; + poststr += elem.name + "=" + parseFloat(free_options); + } + else if (elem.value == "99999997" ) + { + var temp = document.getElementById("temp_" + prefix[elem.name + type]); + + // falls Fahrenheit eingestellt, dann Wert umrechnen + if ( temp.value >= 31 ) free_options = ((temp.value - 32) / 9 * 5); + else free_options = temp.value ; + + poststr += elem.name + "=" + parseFloat(free_options); + } + else if (elem.value == "99999996" ) // Expertenmodus HM-Sen-EP + { + // Kanal aus poststr herausfiltern + type = poststr.split("="); + ad = type[3]; + type = ad.split(":"); + ad = type[1]; + type = ad.split("&"); + ch = type[0]; + // Der Kanal steht jetzt in ch zur Verfuegung + poststr += "SEQUENCE_PULSE_1=" + $F('free_CHANNEL_' + ch + '_1') ; + poststr += "&SEQUENCE_PULSE_2=" + $F('free_CHANNEL_' + ch + '_2') ; + poststr += "&SEQUENCE_PULSE_3=" + $F('free_CHANNEL_' + ch + '_3') ; + poststr += "&SEQUENCE_PULSE_4=" + $F('free_CHANNEL_' + ch + '_4') ; + poststr += "&SEQUENCE_PULSE_5=" + $F('free_CHANNEL_' + ch + '_5') ; + poststr += "&SEQUENCE_TOLERANCE=" + $F('free_CHANNEL_' + ch + '_6') ; + } + else if (elem.value == "99999995" ) + { + poststr += "SEQUENCE_PULSE_1=0.496" ; + poststr += "&SEQUENCE_PULSE_2=0.496" ; + poststr += "&SEQUENCE_PULSE_3=0.496" ; + poststr += "&SEQUENCE_PULSE_4=0.496" ; + poststr += "&SEQUENCE_PULSE_5=0.496" ; + poststr += "&SEQUENCE_TOLERANCE=0.496" ; + } + else if (elem.value == "99999994" ) + { + poststr += "SEQUENCE_PULSE_1=0.496" ; + poststr += "&SEQUENCE_PULSE_2=0.496" ; + poststr += "&SEQUENCE_PULSE_3=0.496" ; + poststr += "&SEQUENCE_PULSE_4=0" ; + poststr += "&SEQUENCE_PULSE_5=0" ; + poststr += "&SEQUENCE_TOLERANCE=0.496" ; + } + else if (elem.value == "99999993" ) + { + poststr += "SEQUENCE_PULSE_1=0.496" ; + poststr += "&SEQUENCE_PULSE_2=0" ; + poststr += "&SEQUENCE_PULSE_3=0" ; + poststr += "&SEQUENCE_PULSE_4=0" ; + poststr += "&SEQUENCE_PULSE_5=0" ; + poststr += "&SEQUENCE_TOLERANCE=0.496" ; + } + else if (elem.value == "99999992" ) + { + poststr += "SEQUENCE_PULSE_1=0" ; + poststr += "&SEQUENCE_PULSE_2=0" ; + poststr += "&SEQUENCE_PULSE_3=0" ; + poststr += "&SEQUENCE_PULSE_4=0" ; + poststr += "&SEQUENCE_PULSE_5=0" ; + poststr += "&SEQUENCE_TOLERANCE=0.496" ; + } + else if (elem.value == "99999990" ) + { + var freeVal = document.getElementById("val_" + prefix[elem.name + type]); + free_options = freeVal.value; + poststr += elem.name + "=" + parseFloat(free_options); + } + + //else poststr += elem.name + "=" + elem.value; + else poststr += elem.name + "=" + encodeURIComponent(elem.value); + } + } +}; + +Get_ReGa_Path = function(path) +{ + //WebUI läuft von ise aus (Session-Parameter ist "sid") + //der Pfad fängt nicht mit dem vom ise WebUI aus nötigen Prefix an + if ( ($('global_sid').name == "sid") && (path.substr(0, UI_PATH.length ) != UI_PATH)) + { + //Prefix anfügen: + path = UI_PATH + path; + } + + return path; +}; + +SendRequest = function(scriptname, html_container_id, callback) +{ + scriptname = Get_ReGa_Path(scriptname); + var params = poststr; + + if ((html_container_id) && (html_container_id !== "")) { id = html_container_id; } + else { id = Get_UI_CONTENTBOX_ID(); } + + var _callback_ = callback; + + var opt = + { + method:'get', + parameters:params, + evalScripts:true, + onComplete: function() { if (_callback_) { _callback_(); } } + }; + + new Ajax.Updater(id, scriptname, opt); +}; + +SendPOSTRequest = function(scriptname, html_container_id, callback) +{ + scriptname = Get_ReGa_Path(scriptname); + var params = poststr; + + if ((html_container_id) && (html_container_id !== "")) { id = html_container_id; } + else { id = Get_UI_CONTENTBOX_ID(); } + + var _callback_ = callback; + + var opt = + { + method:'post', + parameters:params, + evalScripts:true, + onComplete: function() { if (_callback_) { _callback_(); } } + }; + + new Ajax.Updater(id, scriptname + '?sid=' + document.getElementById('global_sid').value, opt); +}; + +ShowLoadingBox = function(msg) +{ + + $(Get_UI_CONTENTBOX_ID()).innerHTML = "" + + "
"+msg.escapeHTML()+"
"; + + ShowElement(Get_UI_CONTENTBOX_ID()); +}; + +ShowLoadingBoxTimeout = function(msg, msec) +{ + ShowLoadingBox(msg); + window.setTimeout("HideLoadingBox()",msec); +}; + +ShowInfoMsgBox = function(msg) +{ + $(Get_UI_CONTENTBOX_ID()).innerHTML = "
" + msg + "
"; + ShowElement(Get_UI_CONTENTBOX_ID()); +}; + +ShowInfoMsgBoxTimeout = function(msg, msec) +{ + ShowInfoMsgBox(msg); + window.setTimeout("HideLoadingBox()",msec); +}; + +HideLoadingBox = function() +{ + HideElement(Get_UI_CONTENTBOX_ID()); +}; + +ShowElement = function(id) +{ + $(id).style.visibility = "visible"; + $(id).show(); +}; + +HideElement = function(id) +{ + $(id).style.visibility = "hidden"; + $(id).hide(); +}; + +ToggleVisibility = function(id) +{ + if ($(id).visible()) HideElement(id); + else ShowElement(id); +}; + +EnableComponent = function(id, b) +{ + $(id).enabled = b; +}; + +EnableAllSeparateComponents = function(pcount) +{ + var elem; + var i, j; + + for (i=0; i<=pcount; i++) + { + j = 1; + elem = document.getElementById('separate_' + i + '_' + j); + + while (elem) + { + elem.enabled = true; + ++j; + elem = document.getElementById('separate_' + i + '_' + j); + } + } +}; + +initComponents = function(pcount) +{ + var elem; + var i, j; + + for (i=0; i<=pcount; i++) + { + j = 1; + elem = document.getElementById('use_separate_' + i + '_' + j); + + while (elem) + { + elem.checked = elem.defaultChecked; + EnableComponent(elem.id.substr(4), elem.defaultChecked); + + ++j; + elem = document.getElementById('use_separate_' + i + '_' + j); + } + } +}; + +SwitchActiveProfile = function(pnr) +{ + var i = 0; + var elem = document.getElementById('caption_profile' + i); + + while (elem) + { + elem.innerHTML = elem.innerHTML.replace(/ \(aktiv\)/, ''); + elem.style.backgroundColor = WebUI.getColor("profile"); + + if (i == pnr) + { + elem.innerHTML += ' (aktiv)'; + elem.style.backgroundColor = WebUI.getColor("profileActive"); + } + + ++i; + elem = document.getElementById('caption_profile' + i); + } + + ShowElement('profile'+pnr); +}; + +ShowDeviceDetails = function() +{ + var select = $('linkabledevices'); + var otext = select.options[select.selectedIndex].text; + var len = select.length - 1; + var idx = otext.search(/\=\=/); + var devname = otext.substr(idx+2); + + if (idx == -1) return; + + var elemId = ""; + var i; + + //Opera + try { elemId = $('radio_channels_'+devname).id; } + catch (e) { elemId = ""; } + + for (i = 0; i<=len; i++) + { + HideElement('radio_channels_' + i); + + //Internet Explorer: + /* + try { + if (elemId == "" && document.getElementById) + { + var elem = document.getElementById('radio_channels_' + i); + if (elem.name && elem.name == 'radio_channels_' + devname) elemId = 'radio_channels_' + i; + } + } + catch (e) { elemId = ""; } + */ + } + + //Firefox: + try + { + if ((elemId === "") && (document.getElementsByName)) { elemId = document.getElementsByName('radio_channels_'+devname)[0].id; } + } + catch (e) { elemId = ""; } + + try + { + if ((elemId === "") && (document.getElementsByTagName)) + { + var divtags = document.getElementsByTagName("div"); + len = divtags.length - 1; + + for (i = 0; i <= len; i++) + { + var elem = divtags[i]; + if (((elem.name) && (elem.name == 'radio_channels_' + devname)) || ((elem.className) && (elem.className == 'radio_channels_' + devname))) + { + elemId = elem.id; + break; + } + } + } + } + catch (e) { elemId = ""; } + + ShowElement(elemId); + + /* Beim Firefox gibt es kein elem.name und beim Internet Explorer gibt es kein elem.id */ + /* Opera kann weder document.getElementsByName, noch document.getElementById. Stattdessen geht $(name). */ +}; + +AddPeer2Channel = function(iface, device, radioid) +{ + var elem = document.getElementsByName(radioid); + var inputelem = null; + + for (var i=0; i 255 )) { return false; } + } + + return true ; +}; + +SimulateShortKeyPress = function() +{ + SimulateKeyPress(false); +}; + +SimulateLongKeyPress = function() +{ + SimulateKeyPress(true); +}; + +SimulateKeyPress = function(longpress) +{ + ShowLoadingBox('Bitte warten, der Tastendruck wird ausgelöst...'); + ResetPostString(); + AddParam(document.getElementById('global_1'));//sid + AddParam(document.getElementById('global_2'));//peer + AddParam(document.getElementById('global_3'));//peer + AddParam(document.getElementById('global_5'));//iface + AddParam(document.getElementById('global_6'));//device + poststr += "&longpress" + "=" +longpress; + poststr += "&cmd" + "=" +"simulate"; + SendRequest('ic_paramset.cgi'); +}; + +SetExpertMode = function(b) +{ + ShowLoadingBox('Bitte warten, der Expertenmodus wird gesetzt...'); + ResetPostString(); + + AddParam(document.getElementById('global_sid')); + + if (b) document.getElementById('expert').value = 'true'; + else document.getElementById('expert').value = 'false'; + + AddParam(document.getElementById('expert')); + + SendRequest('ic_start.cgi'); +}; + +SetCurrentTime = function() +{ + var jetzt = new Date(); + + var hh = jetzt.getHours(); + var mm = jetzt.getMinutes(); + var DD = jetzt.getDate(); + var MM = jetzt.getMonth()+1; + var YY = jetzt.getFullYear(); + + if (hh < 10) hh = "0" + hh; + if (mm < 10) mm = "0" + mm; + if (DD < 10) DD = "0" + DD; + if (MM < 10) MM = "0" + MM; + if (YY < 10) YY = "0" + YY; + + document.getElementById('separate_3_1').value = hh; + document.getElementById('separate_3_2').value = mm; + document.getElementById('separate_3_3').value = DD; + document.getElementById('separate_3_4').value = MM; + document.getElementById('separate_3_5').value = YY; +}; + +RebootCentral = function() +{ + if (confirm("Möchten Sie die Zentrale wirklich neu starten?")) + { + ShowLoadingBox('Bitte warten, Zentrale startet neu...'); + ResetPostString(); + AddProfileValues('global_'); + poststr += "&cmd=reboot"; + SendRequest('ic_central.cgi'); + } +}; + +set_value = function(input_id, id, type) +{ + var elem = document.getElementById(input_id); + + ShowLoadingBox('Bitte warten, Wert \''+id+'\' wird gesetzt'); + ResetPostString(); + document.getElementById('profile').value = "9999"; + AddParam(document.getElementById('profile')); + AddProfileValues('global_');//sid + if (elem.type == "checkbox") + { + if (elem.checked) elem.value = "true"; + else elem.value = "false"; + } + poststr += "&CH_VAL_VALUE=" +elem.value+ "&CH_VAL_ID=" +id+ "&CH_VAL_TYPE=" +type; + SendRequest('ic_paramset.cgi'); +}; + +RemoveLink = function(iface, sender_address, receiver_address, sender_type, redirect_url) +{ + var questionRemoveLink = ((iface == "HmIP-RF") && (sender_type != "HmIP-SMI55") && (sender_type != "HmIP-SMI55-A") && (sender_address.split(":")[0] == receiver_address.split(":")[0])) ? translateKey('dialogQuestionRemoveInternalLink') : translateKey('dialogQuestionRemoveLink'); + + new YesNoDialog(translateKey('dialogSafetyCheck'), questionRemoveLink.replace('%s', sender_address+' - '+receiver_address), function(result) { + if (result == YesNoDialog.RESULT_YES) + { + ResetPostString(); + + AddParam(document.getElementById('global_sid')); + + poststr += "&cmd=removeLink"; + poststr += "&iface=" +iface; + poststr += "&sender_address=" +sender_address; + poststr += "&receiver_address=" +receiver_address; + + if ((redirect_url) && (redirect_url !== "")) { poststr += "&redirect_url=" + redirect_url; } + else { poststr += "&redirect_url=IC_LINKPEERLIST"; } + + SendPOSTRequest('ic_ifacecmd.cgi'); + } + }, "html"); +}; + +getInnerDimensions = function() +{ + var x, y; + + if (self.innerHeight) // all except Explorer + { + x = self.innerWidth; + y = self.innerHeight; + } + else if (document.documentElement && document.documentElement.clientHeight) + // Explorer 6 Strict Mode + { + x = document.documentElement.clientWidth; + y = document.documentElement.clientHeight; + } + else if (document.body) // other Explorers + { + x = document.body.clientWidth; + y = document.body.clientHeight; + } + + return {width: x, height: y}; +}; + +getPageOffsets = function() +{ + var x,y; + + if (self.pageYOffset) // all except Explorer + { + x = self.pageXOffset; + y = self.pageYOffset; + } + else if (document.documentElement && document.documentElement.scrollTop) + // Explorer 6 Strict + { + x = document.documentElement.scrollLeft; + y = document.documentElement.scrollTop; + } + else if (document.body) // all other Explorers + { + x = document.body.scrollLeft; + y = document.body.scrollTop; + } + + return {xOffset: x, yOffset: y}; +}; + +/* +Wenn nur ein Gerät angezeigt werden soll, kann man sender_address, oder receiver_address leer lassen ( '' ) +*/ +CheckConfigPending = function(iface, sender_address, receiver_address, redirect_url, goBack) +{ + ResetPostString(); + + AddParam($('global_sid')); + + poststr += "&go_back=" + goBack; + poststr += "&redirect_url=" +redirect_url; + poststr += "&iface=" +iface; + poststr += "&sender_address=" +sender_address; + poststr += "&receiver_address=" +receiver_address; + poststr += "&cmd=ShowConfigPendingMsg"; + + SendPOSTRequest('ic_ifacecmd.cgi'); +}; + + +OpenSetProfiles = function(iface, sender_address, receiver_address) +{ + exists_timearr = ""; + exists_percarr = ""; + exists_tmparr = ""; + time_tmp = ""; + perc_tmp = ""; + temp_tmp = ""; + + ResetPostString(); + + poststr += "&iface=" +iface; + poststr += "&sender_address=" +sender_address; + poststr += "&receiver_address=" +receiver_address; + + updateContent(UI_PATH + 'ic_setprofiles.cgi', poststr); +}; + + +IsDirty = function(inputelem) +{ + + var result; + + if (inputelem === null) return false; + + if (inputelem.type == "select-one") + { + result = inputelem.options[inputelem.selectedIndex].defaultSelected != inputelem.options[inputelem.selectedIndex].selected; + if (result) {conInfo("IsDirty - type: " + inputelem.type + " - " + inputelem.id + " - " + inputelem.name + " - isDirty: " + result);} + return result; + } + else if (inputelem.type == "checkbox" || inputelem.type == "radio") + { + result = inputelem.checked != inputelem.defaultChecked; + if (result) {conInfo("IsDirty - type: " + inputelem.type + " - " + inputelem.id + " - " + inputelem.name + " - isDirty: " + result);} + return result; + } + else if (inputelem.type == "text" || inputelem.type == "textarea" || inputelem.type == "password") + { + result = inputelem.defaultValue != inputelem.value; + if (result) {conInfo("IsDirty - type: " + inputelem.type + " - " + inputelem.id + " - " + inputelem.name + " - isDirty: " + result);} + return result; + } + else if (inputelem.type == "hidden") + { + return false; + } + else + { + conInfo("IsDirty - default" + " - " + inputelem.id + " - " + inputelem.name + " - isDirty: fix true"); + return true; + } +}; + +ConvTime = function(u_value) +{ + //wird in SetInputValue für User-Profilvorlagen benötigt + var Userwert = ""; + var hour = parseInt(u_value / 3600); + var min = parseInt((u_value % 3600) / 60); + var sec = parseInt((u_value % 3600) % 60); + var msec = u_value - parseInt(u_value); + + if (hour > 0) { + Userwert = hour + "h "; + if (min > 0) Userwert = Userwert.concat(min + "min "); + if (sec > 0) Userwert = Userwert.concat(sec + "s"); + } + else if (min > 0) { + Userwert = min + "min "; + if (sec > 0) Userwert = Userwert.concat(sec + "s"); + } + else if (sec > 0) { + Userwert = sec + "s "; + if (msec > 0) Userwert = sec + msec + "s"; + } + else if (msec > 0) { + Userwert = msec + "s"; + } + else Userwert = "0s"; + + + return Userwert ; +}; + +sort_num = function(a,b) { + return a - b; +}; + +sort_opt = function(elem) { + + arrVal = new Array(); + arrTexts = new Array(); + arrTexts[0] = new Object(); + + for(i = 0; i < elem.length; i++) { + arrVal[i] = parseFloat(elem.options[i].value); + arrTexts[0][arrVal[i].toString(10)] = elem.options[i].text; + } + + arrVal.sort(sort_num); + + for(i = 0; i < elem.length; i++) { + elem.options[i].value = arrVal[i]; + elem.options[i].text = arrTexts[0][arrVal[i].toString(10)]; + } +}; + +SetInputValue = function(html_inputelem_id, value) +{ + var inputelem = $(html_inputelem_id); + var Userwert; + var i; + + if (inputelem === null) return; + + if (inputelem.type == "select-one") + { + var selectelem = inputelem; + var no_entry = true; + + //AG + + for (i = 0; i < selectelem.options.length; i++) + { + if (selectelem.options[i].value == value) { + no_entry = false; + } + } + + // falls in der Profilvorlage kein entsprechender Wert vorhanden ist, + // weil eine beutzerdef. Wert eingegeben wurde, der nicht als Auswahl vorhanden ist, + // wird hier ein neuer Eintrag mit dem entsprechenden Wert erzeugt. + // Die Werte müssen entsprechend konvertiert werden, 90 Sek. werden z. B. zu 1min 30sec usw. + + if (no_entry === true) + { + perc = selectelem.options[1].text.search(/%/); + h = selectelem.options[1].text.search(/min/); + m = selectelem.options[1].text.search(/s/); + s = selectelem.options[1].text.search(/h/); + + if (h != -1 || m != -1 || s != -1) Userwert = ConvTime(value); //es handelt sich um einen Zeitwert + if (perc != -1) {Userwert = parseInt(value * 100) + "%";} //es handelt sich um einen Prozentwert + + new_option = new Option(Userwert,value,true,true); //Userwert = angezeigter Wert, value = zu übertragener Wert + selectelem.options[selectelem.length] = new_option; // hier wird der neue Eintrag hinzugefügt + + // Optionen neu sortieren , die beiden nächsten Zeilen sortieren jeweils wunderbar in Firefox. Im IE gehts mal wieder nicht + // $A(selectelem.options).sort(function(a,b) {return (parseFloat(a.value) < parseFloat(b.value)) ? -1 : 1;}).each(function(o,i){selectelem.options[i] = o}); + // Array.prototype.sort.call(selectelem.options,function(a,b){return parseFloat(a.value) < parseFloat(b.value) ? -1 : parseFloat(a.value) > parseFloat(b.value) ? 1 : 0;}); + + // Dieser Aufwand ist wegen IE noetig + sort_opt(selectelem); + } + //End AG + + for (i = 0; i < selectelem.options.length; i++) + { + + selectelem.options[i].selected = (value == selectelem.options[i].value); + selectelem.options[i].defaultSelected = (value == selectelem.options[i].value); + } + } + else if (inputelem.type == "checkbox" || inputelem.type == "radio") + { + inputelem.checked = value; + inputelem.defaultChecked = value; + } + else if (inputelem.type == "text" || inputelem.type == "textarea" || inputelem.type == "password" || inputelem.type == "hidden") + { + inputelem.value = value; + inputelem.defaultValue = value; + } +}; + +DetermineParameterValue = function(iface, address, ps_id, param_id, html_inputelem_id) +{ + ResetPostString(); + + AddParam(document.getElementById('global_sid')); + poststr += "&cmd=determineParameter"; + poststr += "&iface=" + iface; + poststr += "&address=" + address; + poststr += "&ps_id=" + ps_id; + poststr += "¶m_id=" + param_id; + poststr += "&html_inputelem_id=" + html_inputelem_id; + + SendPOSTRequest('ic_ifacecmd.cgi'); + + //ProgressBar = new ProgressBarMsgBox("Parameter wird festgesetzt...", 1); + ProgressBar = new ProgressBarMsgBox(translateKey("dialogDetermineParameterTitle"), 1); + ProgressBar.show(); + ProgressBar.StartKnightRiderLight(); +}; + +ProofAndSetValue = function(srcid, dstid, min, max, dstValueFactor, convInt2Float, event) +{ + var srcElm = $(srcid); + var dstElm = $(dstid); + + // Falls das Tasten-Event nicht mit übergeben wurde .... + /* + var keyCode = 0, + finalVal; + + if (event) { + keyCode = event.keyCode; + } + */ + + var ok = true; + + if (! min) min = 0; + if (! max) max = 100; + if (! dstValueFactor) dstValueFactor = 0.01;//dstValue = value/100 + + if (convInt2Float) {min = parseFloat(min).toFixed(2); max = parseFloat(max).toFixed(2);} + + var value = $F(srcid); + + //replace , by . + if (value.indexOf(',') >= 0) + { + var tokens = value.split(","); + + value = ""; + if (tokens[0]) value += tokens[0]; + value += '.'; + if (tokens[1]) value += tokens[1]; + srcElm.value = value; + } + + var parsedValue; + var parsedMin = parseFloat(min); + var parsedMax = parseFloat(max); + + var minSplit = min.toString().split("."); + var maxSplit = max.toString().split("."); + var digits = 0; + + if(minSplit.length === 2) { + digits = Math.max(digits, minSplit[1].length); + } + if(maxSplit.length === 2) { + digits = Math.max(digits, maxSplit[1].length); + } + + // Check if float is allowed + try { + if (min.toString().indexOf(".") == -1 && max.toString().indexOf(".") == -1) { + min = parseInt(min); + max = parseInt(max); + value = Math.round(parseFloat(value)); + } else { + min = parseFloat(parseFloat(min).toFixed(digits)); + max = parseFloat(parseFloat(max).toFixed(digits)); + var roundFactor = Math.pow(10, digits); + value = Math.round(parseFloat(value) * roundFactor) / roundFactor; + if (value < min || isNaN(min)) {value = min;} else if (value > max) {value = max;} + } + parsedValue = parseFloat(value); + } catch(e) {conInfo(e);} + + if (typeof value == "undefined") + { + finalVal = parsedMin; + ok = false; + } + else if (isNaN(value)) + { + finalVal = parsedMin; + ok = false; + } + else if (parsedValue < parsedMin) + { + finalVal = parsedMin; + ok = false; + } + else if (parsedValue > parsedMax) + { + finalVal = parsedMax; + ok = false; + } + + if (ok) + { + srcElm.style.backgroundColor = "#fffffe"; + dstElm.value = (parsedValue.toFixed(digits) * dstValueFactor); + if ((typeof _iface == "undefined") || (_iface != "BidCos-RF")) { + srcElm.value = parsedValue.toFixed(digits); + } + srcElm.setAttribute("valvalid", "true"); + } + else + { + srcElm.setAttribute("valvalid", "false"); + srcElm.style.backgroundColor = "red"; + dstElm.value = (finalVal.toFixed(digits) * dstValueFactor); + if ((typeof _iface == "undefined") || (_iface != "BidCos-RF")) { + srcElm.value = finalVal.toFixed(digits); + } + window.setTimeout(function(){srcElm.style.backgroundColor = "white";},1000); + } +}; + +elv_toQueryString = function(s) +{ + s = s.replace(/%/g, "%25"); + s = s.replace(/\+/g,"%2b"); + s = s.replace(/ /g, "%20"); + s = s.replace(/"/g, "%22"); + s = s.replace(/\?/g,"%3f"); + + //Weicht von der tcl 'cgi_quote_url'-Funktion (cgi.tcl) ab: + s = s.replace(/\&/g,"%26"); + + return s; +}; + +/** + * Convert a key string of HmIP devices with custom 32 digits to a Base16 string + * @param valueString + */ +convertHmIPKeyBase32ToBase16 = function(valueString) { + + var HMIP_KEY_CHARS = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', + 'B', 'C', 'E', 'F', 'G', 'H', 'J', 'K', 'L', 'M', 'N', 'P', 'Q', 'R', 'S', 'T', 'U', 'W', 'X', 'Y', 'Z' ]; + + var buffer = new ArrayBuffer(16), + keyValue = new Uint8Array(buffer), + value = 0, + counter = valueString.length - 1 , + bits = 0, + byteCounter = keyValue.length - 1, + keyString = ""; + + while (counter >= 0) { + for(var i= 0; i < HMIP_KEY_CHARS.length; i++) { + if(HMIP_KEY_CHARS[i] == valueString.charAt(counter)) { + value |= i << bits; + //console.log(value +" - break"); + break; + } + } + + bits += 5; + counter--; + while (bits > 8 && byteCounter >= 0) { + keyValue[byteCounter] = value & 0xff; + value >>= 8; + bits -= 8; + byteCounter--; + } + } + + for(var i = 0; i < keyValue.length; i++) + { + if (keyValue[i] < 16) { + keyString += "0"; + } + keyString += keyValue[i].toString(16); + } + + return keyString.toUpperCase(); +}; + +/** + * ic_msgbox.js + **/ + +MsgBox = Class.create(); + +MsgBox.prototype = +{ + initialize: function(width, height, container_id) + { + if (width && height) this.init(width, height, container_id); + }, + init: function(width, height, container_id) + { + if (width || height) + { + this.setWidth(width); + this.setHeight(height); + } + else + { + this.stretchToMax(); + } + + if (container_id && container_id !== "") { this.container_id = container_id; } + else { this.container_id = "centerbox"; } + + this.setTopMargin(6); + this.setLeftMargin(6); + + this.createMessagebox(); + }, + setWidth: function(width) + { + this.width = width; + }, + setHeight: function(height) + { + this.height = height; + }, + setLeftMargin: function(left) + { + this.LeftMargin = left; + }, + setTopMargin: function(top) + { + this.TopMargin = top; + }, + stretchToMax: function() { + var maxHeight = 0; + if (window.innerHeight) { + maxHeight = window.innerHeight; + } + else { + if (window.document.documentElement && window.document.documentElement.clientHeight) + maxHeight = window.document.documentElement.clientHeight; + else + maxHeight = window.document.body.offsetHeight; + + this.setHeight(maxHeight - 50); + } + var maxWidth = screen.availWidth; + this.setWidth(maxWidth - 50); + }, + createMessagebox: function() + { + if ( !$('messagebox') ) + { + var newDiv = document.createElement("div"); + var newDivId = document.createAttribute("id"); + newDivId.nodeValue = "messagebox"; + newDiv.setAttributeNode(newDivId); + var newDivStyle = document.createAttribute("style"); + newDivStyle.nodeValue = "width:"+this.width+"px;height:"+this.height+"px;padding: 0px;position:absolute;left: 50%;margin-left: -"+(this.width/2)+"px;margin-top: -"+(this.height/2)+"px;"; + if( typeof( newDiv.style.cssText ) == "string" ) + newDiv.style.cssText = newDivStyle.nodeValue; + else + newDiv.setAttributeNode(newDivStyle); + + $(this.container_id).appendChild(newDiv); + jQuery("#messagebox").draggable(); + } + }, + removeMessagebox: function() + { + if ( $('messagebox') ) + { + $('messagebox').remove(); + } + }, + setMessageText: function(text) + { + $(this.messagediv).innerHTML = text; + }, + readaptSize: function() + { + if ( $('messagebox') ) + { + /* + $('messagebox').style.marginLeft = ($('messagebox').style.width.replace(/px$/,"")/2)*(-1)+"px"; + $('messagebox').style.marginTop = ($('messagebox').style.height.replace(/px$/,"")/2)*(-1)+"px"; + */ + //var h = $("messagebox").getHeight(); + var h = parseInt(jQuery("#messagebox").css("height")); + $('messagebox').style.marginLeft = ($('messagebox').style.width.replace(/px$/,"")/2)*(-1)+"px"; + $('messagebox').style.marginTop = (h/4)*(-1)+"px"; + } + }, + + addMessage: function(id,message) + { + var newDiv; + var newDivId; + var newDivStyle; + + this.messagediv = id; + newDiv = document.createElement("div"); + newDivId = document.createAttribute("id"); + newDivId.nodeValue = id; + newDiv.setAttributeNode(newDivId); + newDiv.className = "CLASS10102"; + var newTextNode = document.createTextNode(message); + newDiv.appendChild(newTextNode); + $('messagebox').appendChild(newDiv); + newDiv = document.createElement("div"); + newDivId = document.createAttribute("id"); + newDivId.nodeValue = id+"_ctrls"; + newDiv.setAttributeNode(newDivId); + newDiv.className = "CLASS10103"; + $('messagebox').appendChild(newDiv); + }, + addButton: function(id,text,func) + { + var newInput = document.createElement("input"); + newInput.id = id; + newInput.type = "button"; + newInput.value= text; + newInput.onclick = func; + Element.addClassName(newInput, "CLASS10100"); +// var newBR = document.createElement("
"); +// $(this.messagediv).appendChild(newBR); + $(this.messagediv+"_ctrls").appendChild(newInput); + }, + show: function() + { + //$('messagebox').style.visibility = "visible"; + + this.readaptSize(); + $('trlayer').show(); + $(this.container_id).show(); + }, + hide: function(do_not_remove) + { + //$('messagebox').style.visibility = "hidden"; + //$('messagebox').hide(); + + $(this.container_id).hide(); + if (! do_not_remove) this.remove(); + $('trlayer').hide(); + }, + removeAndReload: function() + { + this.hide(); +// this.remove(); + reloadPage(); + //location.reload(); + }, + remove: function() + { + this.removeMessagebox(); + //this.removeModalbox(); + }, + LoadFromFile: function(url) + { + url = Get_ReGa_Path(url); +/* + new Ajax.Updater('messagebox',url,{method:'get', evalScripts: true, onFailure:function(){alert('LoadFromFile-Error');} }); + try { this.OnFileLoaded(); } catch (e) {} +*/ + + //var url = fn+'?sid='+SessionId; + //var t = this; + var opt = + { + method: 'get', + evalScripts: true, + onComplete: function(trans) { + centerMessageBox(); + }, + onFailure: function() { + alert('LoadFromFile-Error'); + } + }; + + new Ajax.Updater('messagebox', url, opt); + }, + + CreateButton: function(text) + { + var newInputDiv = document.createElement("span"); + Element.addClassName(newInputDiv, "CLASS10101 colorGradient borderRadius2px"); + + var newInputDivText = document.createTextNode(text); + newInputDiv.appendChild(newInputDivText); + + return newInputDiv; + }, + + AddDivWrapper: function(divid, parentnodeid) { + + var newDiv = document.createElement("div"); + newDiv.setAttribute("id", divid); + + if (parentnodeid) $(parentnodeid).appendChild(newDiv); + else $('messagebox').appendChild(newDiv); + } +}; +/** + * ic_infomsgbox.js + **/ + +ShowInfoMsg = function(msg) +{ + InfoMsg = new InfoMessageBox("INFO", msg); + InfoMsg.show(); +}; + +ShowWarningMsg = function(msg) +{ + InfoMsg = new InfoMessageBox("WARNING", msg); + InfoMsg.show(); +}; + +ShowErrorMsg = function(msg) +{ + InfoMsg = new InfoMessageBox("ERROR", msg); + InfoMsg.show(); +}; + +InfoMessageBox = Class.create(); + +InfoMessageBox.prototype = Object.extend(new MsgBox(), { + + initialize: function(type, msg) { + + this.init(320, 240); + + this.AddDivWrapper("id_messagebox"); + this.AddDivWrapper("id_messagebox_wrapper", "id_messagebox"); + this.AddDivWrapper("id_messagebox_head", "id_messagebox_wrapper"); + this.AddDivWrapper("id_messagebox_body", "id_messagebox_wrapper"); + this.AddDivWrapper("id_messagebox_foot", "id_messagebox_wrapper"); + + var img = document.createElement("img"); + img.style.margin = "4px"; + + if (type == "INFO") img.src = "/ise/img/dialog-information.png"; + else if (type == "WARNING") img.src = "/ise/img/dialog-warning.png"; + else img.src = "/ise/img/dialog-error.png"; + + $("id_messagebox_head").style.verticalAlign = "top"; + $("id_messagebox_head").appendChild(img); + + var textnode; + + //if (type == "INFO") textnode = document.createTextNode("HomeMatic Information"); + if (type == "INFO") textnode = document.createTextNode(translateKey("dialogTitleHomeMaticInfo")); + //else if (type == "WARNING") textnode = document.createTextNode("HomeMatic Warnung"); + else if (type == "WARNING") textnode = document.createTextNode(translateKey("dialogTitleHomeMaticWarn")); + //else textnode = document.createTextNode("HomeMatic Fehler"); + else textnode = document.createTextNode(translateKey("dialogTitleHomeMaticError")); + + $("id_messagebox_head").appendChild(textnode); + + div = document.createElement("div"); + Element.addClassName(div, "CLASS10300"); + + if (type == "ERROR") + { + Element.addClassName("CLASS10301"); + } + div.innerHTML = msg; + + $('id_messagebox_body').appendChild(div); + + //var newInputDiv = this.CreateButton("OK"); + var newInputDiv = this.CreateButton(translateKey("btnOk")); + newInputDiv.onclick = function() { InfoMsg.OnOK(); }; + newInputDiv.style.paddingRight = "20px"; + newInputDiv.style.paddingLeft = "20px"; + $('id_messagebox_foot').appendChild(newInputDiv); + $('id_messagebox_foot').style.textAlign = "center"; + + //$('id_messagebox_wrapper').style.marginBottom = "5px"; + $('id_messagebox_wrapper').addClassName("CLASS10302"); + }, + + OnOK: function () + { + //InfoMsg.remove(); + InfoMsg.hide(); + } +}); +/** + * ic_progressbar.js + **/ + +//Defines +PROGRESSBAR_HL_COLOR = WebUI.getColor("progressbarHighlight"); //Highlight +PROGRESSBAR_BG_COLOR = WebUI.getColor("progressbarBackground"); //Background +PROGRESSBAR_TX_COLOR = WebUI.getColor("progressbarText"); //Text-Color +PROGRESSBAR_HL_STROKE = 4;//Strichstärke +PROGRESSBAR_WIDTH = 300;//Breite des Balkens +PROGRESSBAR_HEIGHT = 20;//Höhe des Balkens +PROGRESSBAR_KNIGHTRIDER_WIDTH = parseInt(PROGRESSBAR_WIDTH/5); +PROGRESSBAR_KNIGHTRIDER_STEP = 61; +//----- + +ProgressBarMsgBox = Class.create(); + +ProgressBarMsgBox.prototype = Object.extend(new MsgBox(), { + + initialize: function(caption, endcounter) { + + this.init(335, 240, 'progressbox'); + this.index = 0; + this.endcounter = endcounter; + + this.knightrider_position = 0; + this.knightrider_running = false; + + if (!endcounter || endcounter < 0) + { + this.stepwidth = PROGRESSBAR_WIDTH; + this.steppercent = 100; + } + else + { + this.stepwidth = Math.round(PROGRESSBAR_WIDTH / endcounter); + this.steppercent = Math.round( 100 / endcounter ); + } + + this.AddDivWrapper("id_progressbar_wrapper"); + $('id_progressbar_wrapper').style.border = "3px solid " +PROGRESSBAR_HL_COLOR; + + this.AddDivWrapper("id_progressbar_head", "id_progressbar_wrapper"); + this.AddDivWrapper("id_progressbar_body", "id_progressbar_wrapper"); + this.AddDivWrapper("id_progressbar_foot", "id_progressbar_wrapper"); + + $('id_progressbar_foot').style.height = "50px"; + $('id_progressbar_foot').style.marginTop = "10px"; + $('id_progressbar_foot').style.textAlign = "center"; + $('id_progressbar_foot').style.fontSize = "smaller"; + + $('id_progressbar_head').classname = "popupTitle"; + $('id_progressbar_head').style.fontWeight = "bold"; + $('id_progressbar_head').style.padding = "4px"; + $('id_progressbar_head').style.textAlign = "center"; + var textnode = document.createTextNode(unescape(translateKey(caption))); + $('id_progressbar_head').appendChild(textnode); + + var newDiv = document.createElement("div"); + newDiv.id = "id_progressbar_bar"; + newDiv.style.width = PROGRESSBAR_WIDTH + "px"; + newDiv.style.height = PROGRESSBAR_HEIGHT + "px"; + newDiv.style.position = "relative"; + newDiv.style.margin = "10px 0 0 10px"; + $('id_progressbar_body').style.padding = "7px"; + $('id_progressbar_body').appendChild(newDiv); + + this.jg_progressbar = new jsGraphics("id_progressbar_bar"); + this.InitGD(); + this.ClearCanvas(); + + //this.SetMessage("Bitte warten..."); + this.SetMessage(translateKey("progressBarLblPleaseWait")); + }, + + StartKnightRiderLight: function () + { + this.knightrider_position = 0; + if (PROGRESSBAR_KNIGHTRIDER_STEP < 0) PROGRESSBAR_KNIGHTRIDER_STEP = -PROGRESSBAR_KNIGHTRIDER_STEP; //rechts lang! + + this.ClearCanvas(); + this.jg_progressbar.fillRect(parseInt(0), parseInt(0), parseInt(PROGRESSBAR_KNIGHTRIDER_WIDTH), parseInt(PROGRESSBAR_HEIGHT)); + this.jg_progressbar.paint(); + + this.knightrider_running = true; + window.setTimeout("ProgressBar.StepKnightRiderLight();", 250); + }, + + StopKnightRiderLight: function () + { + this.knightrider_running = false; + }, + + StepKnightRiderLight: function () + { + if (! this.knightrider_running) return; + + if (this.knightrider_position + PROGRESSBAR_KNIGHTRIDER_STEP + PROGRESSBAR_KNIGHTRIDER_WIDTH > PROGRESSBAR_WIDTH) + { + this.knightrider_position = PROGRESSBAR_WIDTH - PROGRESSBAR_KNIGHTRIDER_WIDTH; //Letzte mögliche Position + PROGRESSBAR_KNIGHTRIDER_STEP = -PROGRESSBAR_KNIGHTRIDER_STEP; //anders herum + } + else if (this.knightrider_position + PROGRESSBAR_KNIGHTRIDER_STEP < 0) + { + this.knightrider_position = 0; + PROGRESSBAR_KNIGHTRIDER_STEP = -PROGRESSBAR_KNIGHTRIDER_STEP; //anders herum + } + else + { + this.knightrider_position += PROGRESSBAR_KNIGHTRIDER_STEP; + } + + this.ClearCanvas(); + this.jg_progressbar.fillRect(parseInt(this.knightrider_position), parseInt(0), parseInt(PROGRESSBAR_KNIGHTRIDER_WIDTH), parseInt(PROGRESSBAR_HEIGHT)); + this.jg_progressbar.paint(); + + window.setTimeout("ProgressBar.StepKnightRiderLight();", 250); + }, + + ClearCanvas: function () + { + this.jg_progressbar.clear(); + this.jg_progressbar.setColor(PROGRESSBAR_BG_COLOR); + this.jg_progressbar.fillRect(parseInt(0), parseInt(0), parseInt(PROGRESSBAR_WIDTH), parseInt(PROGRESSBAR_HEIGHT)); + this.jg_progressbar.paint(); + this.jg_progressbar.setColor(PROGRESSBAR_HL_COLOR); + }, + + InitGD: function () { + this.jg_progressbar.setColor(PROGRESSBAR_HL_COLOR); + this.jg_progressbar.setStroke(parseInt(PROGRESSBAR_HL_STROKE)); + }, + + SetMessage: function(msg) { + + if (! $('id_progressbar_foot')) return; + + $('id_progressbar_foot').innerHTML = ""; + var textnode = document.createTextNode(msg); + $('id_progressbar_foot').appendChild(textnode); + }, + + OnFinish: function() { + return; + }, + + IncCounter: function(msg) { + + this.index++; + + this.SetMessage(msg); + + if (! this.knightrider_running) + { + //Prozentangabe anschreiben + + percent = this.steppercent * this.index; + + var w = this.index * this.stepwidth; + if (w > PROGRESSBAR_WIDTH) w = PROGRESSBAR_WIDTH; + + this.ClearCanvas(); + this.jg_progressbar.fillRect(parseInt(0), parseInt(0), w, parseInt(PROGRESSBAR_HEIGHT)); + + this.jg_progressbar.setColor(PROGRESSBAR_TX_COLOR); + this.jg_progressbar.drawString(percent + "%", parseInt(PROGRESSBAR_WIDTH/2), 2); + this.jg_progressbar.setColor(PROGRESSBAR_HL_COLOR); + + this.jg_progressbar.paint(); + } + + if (this.index == this.endcounter) + { + this.StopKnightRiderLight();//wenn vorhanden + this.OnFinish(); + this.hide(); + } + } +}); +/** + * ic_configpendingmsg.js + **/ + +ConfigPendingMsgBox = Class.create(); + +ConfigPendingMsgBox.prototype = Object.extend(new MsgBox(), { + + initialize: function(w, h, extraParam) + { + this.extraParm = extraParam; + this.init(w, h); + this.configpendingcount = 0; + this.iface = ""; + this.url = ""; //s. setReturnURL + this.sid = ""; //s. setReturnURL + this.sidname = ""; //s. setReturnURL + + this.returnurl = ""; + this.returnurl_params = ""; + this.go_back = false; + + this.addr = new Array(2); + this.addr.clear(); + + //defines + this.CONFIGPENDING_SENDER = 0; + this.CONFIGPENDING_RECEIVER = 1; + //--- + + this.AddDivWrapper("id_configpending_head"); + $("id_configpending_head").className = "popupTitle"; + $("id_configpending_head").style.fontWeight = "bold"; + //this.AddTextNode("id_configpending_head", "Verknüpfungs- und Programmstatus"); + this.AddTextNode("id_configpending_head", translateKey("dialogCreateLinkTitle")); + + this.AddDivWrapper("id_configpending_overflow"); + $("id_configpending_overflow").style.overflow = "auto"; + $("id_configpending_overflow").style.width = "100%"; + $("id_configpending_overflow").style.height = "100%"; + + this.AddDivWrapper("id_configpending_body", "id_configpending_overflow"); + this.AddDivWrapper("id_configpending_foot", "id_configpending_overflow"); + $("id_configpending_foot").addClassName("CLASS10200"); + + this.AddTableHead(); + this.ResetTable(); + }, + + m_return: function() + { + switch (this.url) + { + case "IC_LINKPEERLIST": + WebUI.enter(LinkListPage); + break; + case "IC_SETPROFILES": + WebUI.enter(LinkEditProfilePage, { + iface: this.iface, + sender: (this.addr)[this.CONFIGPENDING_SENDER], + receiver: (this.addr)[this.CONFIGPENDING_RECEIVER] + }); + break; + case "GO_BACK": + WebUI.goBack(); + break; + default: + break; + } + }, + + setReturnURL: function(sidname, sid, url, goBack) + { + this.go_back = goBack; + this.url = url; + this.sid = sid; + this.sidname = sidname; + + if (goBack === true) { this.url = "GO_BACK"; } + +/* + if (url == "IC_LINKPEERLIST") + { + this.returnurl = UI_PATH + "ic_linkpeerlist.cgi"; + if (LINKLISTSORTBY) this.returnurl_params = "&LINKLISTSORTBY=" + LINKLISTSORTBY; + } + else if (url == "IC_SETPROFILES" ) + { + this.returnurl = UI_PATH + "ic_setprofiles.cgi"; + this.returnurl_params = "&iface=" + this.iface + + "&sender_address=" + (this.addr)[this.CONFIGPENDING_SENDER] + + "&receiver_address=" + (this.addr)[this.CONFIGPENDING_RECEIVER]; + } + else if (url == "GO_BACK" ) + { + this.returnurl = sPreviousPage; + this.returnurl_params = sPreviousPageArgs; + } + else + { + this.returnurl = ""; + } +*/ + }, + + ClearTable: function() + { + if($('id_configpending_table_tbody')) $('id_configpending_table_tbody').innerHTML = ""; + }, + + AddTextNode: function (id, text) + { + var textnode = document.createTextNode(text); + $(id).appendChild(textnode); + }, + + SetNavigationBar: function () + { + + $('id_configpending_foot').innerHTML = ""; + + if (this.configpendingcount === 0) + { + var newInputDiv = this.CreateButton("OK"); + newInputDiv.onclick = function() + { + ConfigPendingFrm.hide(); + if (typeof goBack != "undefined" && goBack == true ) { + WebUI.reload(); + delete goBack; + } else { + ConfigPendingFrm.m_return(); + } + }; + $('id_configpending_foot').appendChild(newInputDiv); + } + else + { + //var newInputDiv1 = this.CreateButton("Erneut prüfen"); + var newInputDiv1 = this.CreateButton(translateKey("btnDirectDeviceLinkCheckAgain")); + newInputDiv1.onclick = function() + { + ConfigPendingFrm.hide(); + CheckConfigPending(ConfigPendingFrm.iface, (ConfigPendingFrm.addr)[ConfigPendingFrm.CONFIGPENDING_SENDER], (ConfigPendingFrm.addr)[ConfigPendingFrm.CONFIGPENDING_RECEIVER], ConfigPendingFrm.url, ConfigPendingFrm.go_back); + }; + $('id_configpending_foot').appendChild(newInputDiv1); + + //var newInputDiv2 = this.CreateButton("Ignorieren"); + var newInputDiv2 = this.CreateButton(translateKey("lblIgnore")); + newInputDiv2.onclick = function() + { + ConfigPendingFrm.hide(); + if (typeof goBack != "undefined" && goBack == true ) { + WebUI.reload(); + delete goBack; + } else { + ConfigPendingFrm.m_return(); + } + }; + $('id_configpending_foot').appendChild(newInputDiv2); + } + }, + + AddTableHead: function () + { + var table = document.createElement("table"); + table.id = 'id_configpending_table'; + table.className = "popupTable"; + table.border = "1"; + + var thead = document.createElement("thead"); + table.appendChild(thead); + + var tr = document.createElement("tr"); + tr.className = "popupTableHeaderRow"; + + var td = new Array(4); + + //var textnode = document.createTextNode("Name"); + var textnode = document.createTextNode(translateKey("thName")); + td[0] = document.createElement("th"); + td[0].appendChild(textnode); + tr.appendChild(td[0]); + + //textnode = document.createTextNode("Typenbezeichnung"); + textnode = document.createTextNode(translateKey("thTypeDescriptorWOLineBreak")); + td[1] = document.createElement("th"); + td[1].appendChild(textnode); + tr.appendChild(td[1]); + + //textnode = document.createTextNode("Bild"); + textnode = document.createTextNode(translateKey("thPicture")); + td[2] = document.createElement("th"); + td[2].appendChild(textnode); + tr.appendChild(td[2]); + + //textnode = document.createTextNode("Hinweis"); + textnode = document.createTextNode(translateKey("thHint")); + td[3] = document.createElement("th"); + td[3].appendChild(textnode); + tr.appendChild(td[3]); + + thead.appendChild(tr); + + $('id_configpending_body').appendChild(table); + }, + + ResetTable: function() + { + + this.configpendingcount = 0; + + try + { + Element.remove($('id_configpending_table_tbody')); + } + catch (e) {} + + var tbody = document.createElement("tbody"); + tbody.id = "id_configpending_table_tbody"; + $('id_configpending_table').appendChild(tbody); + + var tr = document.createElement("tr"); + tr.id = "id_configpending_tr_NODATA"; + tr.style.height = "50px"; + tr.className = "popupTableRowGray"; + + //var textnode = document.createTextNode("Die Übertragung ist erfolgreich verlaufen."); + var textnode = document.createTextNode(translateKey('dialogCreateLinkSuccessContent')); + var td = document.createElement("td"); + td.colSpan = 4; + td.appendChild(textnode); + tr.appendChild(td); + + tbody.appendChild(tr); + }, + + SetDevice: function(iface, address, direction) + { + if (direction == this.CONFIGPENDING_SENDER) (this.addr)[this.CONFIGPENDING_SENDER] = address; + else (this.addr)[this.CONFIGPENDING_RECEIVER] = address; + + this.iface = iface; + + this.SetNavigationBar(); + }, + + ShowConfigPending: function(iface, address, name, type, configpending, index, direction) + { + if (direction == this.CONFIGPENDING_SENDER) (this.addr)[this.CONFIGPENDING_SENDER] = address; + else (this.addr)[this.CONFIGPENDING_RECEIVER] = address; + + this.iface = iface; + + var tbody = $('id_configpending_table_tbody'); + var devicecount = tbody.getElementsByTagName('tr').length; + + var tr = document.createElement("tr"); + tr.id = "id_configpending_tr_" + this.configpendingcount; + tr.className = "popupTableRowGray"; + + var td = new Array(4); + +// var textnode = document.createTextNode(name.unescapeHTML()); + td[0] = document.createElement("td"); +// td[0].appendChild(textnode); + td[0].innerHTML = name; + tr.appendChild(td[0]); + + textnode = document.createTextNode(type); + td[1] = document.createElement("td"); + td[1].appendChild(textnode); + tr.appendChild(td[1]); + + var img = document.createElement("img"); + img.setAttribute("src", DEV_getImagePath(type, 50)); + img.setAttribute("title", name); + img.setAttribute("alt", address); + + var div = document.createElement("div"); + div.setAttribute('id', 'id_configpending_picDiv_' + this.configpendingcount); + div.onmouseover = function () { picDivShow(jg_250, type, 250, -1, this); }; + div.onmouseout = function () { picDivHide(jg_250); }; + div.style.position = "relative"; + div.appendChild(img); + + td[2] = document.createElement("td"); + td[2].style.backgroundColor = WebUI.getColor("white"); + td[2].appendChild(div); + tr.appendChild(td[2]); + + var linecount = $('id_configpending_table_tbody').getElementsByTagName("tr").length; + + if (((linecount > 1) && (this.configpendingcount === 1) && (configpending === 1)) || + ((linecount > 1) && (this.configpendingcount === 0) && (configpending === 0))) /*linecount > 1 weil die erste Zeile unsichtbar ist.*/ + { + //Die letzte Meldung soll für dieses Gerät mitgelten. Meldungen zusammenfassen: + + var msg_td = $('id_configpending_tr_0').getElementsByTagName("td")[3]; + var rs = msg_td.getAttribute("rowspan"); + + if ( !rs || rs === "") { msg_td.rowSpan = 2; } //Attribut neu anlegen + else { msg_td.rowSpan = parseInt(rs) + 1; } //Attributwert hochzählen + } + else if (configpending == 1) + { + td[3] = document.createElement("td"); + td[3].style.padding = "5px"; + + //textnode = document.createTextNode("Die Übertragung der Daten zum Gerät konnte nicht ordnungsgemäß durchgeführt werden. Wählen Sie:"); + textnode = document.createTextNode(translateKey("dialogCreateLinkErrorContent1")); + td[3].appendChild(textnode); + + var ul = document.createElement("ul"); + + var li_text = new Array(2); + //li_text[0] = document.createTextNode("\"Erneut prüfen\", wenn Sie die Übertragung zum Gerät jetzt abschließen möchten. Sorgen Sie dazu bitte dafür, dass sich"); + li_text[0] = document.createTextNode(translateKey("dialogCreateLinkErrorContent2")); + + var ul2 = document.createElement("ul"); + var li_text2 = new Array(2); + //li_text2[0] = document.createTextNode("das Gerät innerhalb der Funkreichweite befindet und aktiv ist,"); + li_text2[0] = document.createTextNode(translateKey("dialogCreateLinkErrorContent3")); + //li_text2[1] = document.createTextNode("das Gerät im Anlernmodus befindet."); + li_text2[1] = document.createTextNode(translateKey("dialogCreateLinkErrorContent4")); + var li2 = new Array(2); + li2[0] = document.createElement("li"); + li2[0].appendChild(li_text2[0]); + li2[1] = document.createElement("li"); + li2[1].appendChild(li_text2[1]); + ul2.appendChild(li2[0]); + ul2.appendChild(li2[1]); + + //li_text[1] = document.createTextNode("\"Ignorieren\", wenn die Zentrale die Übertragung zum Gerät bei nächster Gelegenheit selbstständig durchführen soll. Bis dahin ist dieser Konfigurationsvorgang als offene Servicemeldung sichtbar."); + li_text[1] = document.createTextNode(translateKey("dialogCreateLinkErrorContent5")); + + var li = new Array(2); + li[0] = document.createElement("li"); + li[0].appendChild(li_text[0]); + li[0].appendChild(ul2); + li[1] = document.createElement("li"); + li[1].appendChild(li_text[1]); + + ul.appendChild(li[0]); + ul.appendChild(li[1]); + + td[3].appendChild(ul); + + if (this.extraParm == "ADD_LINK") { + var hintAddLink = document.createElement("div"); + hintAddLink.innerHTML = translateKey("dialogCreateLinkErrorContent6"); + td[3].appendChild(hintAddLink); + } + + td[3].align = "left"; + td[3].style.color = WebUI.getColor("red"); + td[3].style.fontWeight = "bold"; + + tr.appendChild(td[3]); + + this.configpendingcount++; + } + else if (configpending === 0) + { + //textnode = document.createTextNode("Die Übertragung der Daten zum Gerät wurde erfolgreich abgeschlossen."); + textnode = document.createTextNode(translateKey("dialogCreateLinkSuccessContent")); + td[3] = document.createElement("td"); + td[3].appendChild(textnode); + td[3].align = "left"; + tr.appendChild(td[3]); + } + else + { + //textnode = document.createTextNode("Übertragung nicht erfolgt, weil das Gerät unbekannt ist."); + textnode = document.createTextNode(translateKey("dialogCreateLinkErrorUnknownDevice")); + td[3] = document.createElement("td"); + td[3].appendChild(textnode); + td[3].align = "left"; + td[3].style.color = WebUI.getColor("red"); + td[3].style.fontWeight = "bold"; + tr.appendChild(td[3]); + } + + tbody.appendChild(tr); + this.SetNavigationBar(); + + $("id_configpending_tr_NODATA").style.display = "none"; + $("id_configpending_tr_NODATA").style.visibility = "hidden"; + } +}); +/** + * ic_selchannel.js + **/ + +//====================================================================== +// Globale Variablen für diese Datei +SORT_DESC = false; +IGNORE_CASE = true; +SORTED_COL = -1; +SORT_ASC_SRC = "/ise/img/arrow_up.gif"; +SORT_DESC_SRC = "/ise/img/arrow_down.gif"; +//====================================================================== + +//------------------------------------------------------------------------ +//Klasse SelChannelBox für das PopUp Kanalauswahl: +/* +SelChannelBox = Class.create(); + +SelChannelBox.prototype = Object.extend(new MsgBox(), { + initialize: function(w, h) { + + this.init(w, h); + } +}); +*/ +//------------------------------------------------------------------------ + +CloseSelChannel = function() +{ + updateContent(UI_PATH + "ic_linkpeerlist.cgi"); +}; + +Sort = function(tableid, colNr) +{ + HideFilterControls(); + + if (($F('global_realchannels') === 0) && ($F('global_virtualchannels') === 0)) return; + + try + { + SORTED_COL = document.getElementsByClassName('sorted')[0].cellIndex; + } + catch (e) { + //alle unsorted: einen auf sorted stellen + $('tr_caption_colnames').getElementsByTagName("td")[colNr ].className = "sorted"; + } + + if (SORTED_COL != colNr && SORTED_COL != -1) + { + //Highlighting ändern + $('tr_caption_colnames').getElementsByTagName("td")[SORTED_COL].className = "unsorted"; + $('tr_caption_colnames').getElementsByTagName("td")[colNr ].className = "sorted"; + } + + SetSortingOrder(colNr); + + //Sortierungssymbol zuordnen: + var img = $('tr_caption_colnames').getElementsByTagName("td")[colNr].getElementsByTagName("img")[0]; + SORT_DESC ? img.src=SORT_DESC_SRC : img.src=SORT_ASC_SRC; + //----- + + SortTable(tableid, colNr); + + SORTED_COL = colNr; +}; + +//Wenn b_order_desc nicht gesetzt, dann wird die Sortierreihenfolge gewechselt, +//es sei denn, die Spalte wird zum ersten mal sortiert. Bei der ersten Sortierung +//wird standardmäßig aufsteigend sortiert. +SetSortingOrder = function(colNr, b_order_desc) +{ + if (b_order_desc) + { + SORT_DESC = b_order_desc; + } + else + { + if (SORTED_COL == -1 || SORTED_COL != colNr) SORT_DESC = false; //init und default bei Spaltenwechsel + else SORT_DESC = !SORT_DESC; //Wechsel der Sortierreihenfolge + } +}; + +SortTable = function(tableid, colNr) +{ + var tr_list = $('chnListBody').getElementsByTagName("tr"); + + var valueList = new Array(); + var valueMap = new Object(); + var value; + var i; + + for (i = 0; i < tr_list.length; i++) + { + value = tr_list[i].cells[colNr].innerHTML.replace(/<[^>]+>/g,""); + + if (typeof(valueMap[value]) == "undefined") + { + valueMap[value] = new Array(); //Liste nimmt Tabellenzeile gleichen values auf. + valueList.push(value); //In dieser Liste ist value nur einmal drin. + } + + valueMap[value].push(tr_list[i]); //Liste gleicher values nimmt Zeile auf + } + + // ColNr 4 = Sort by serial number + if (colNr == 4) { + valueList.sort(function (a, b) { + var ar1 = a.split(":"), + ar2 = b.split(":"); + if (ar1[0] == ar2[0]) { + return (!SORT_DESC) ? (parseInt(ar1[1]) - parseInt(ar2[1])) : (parseInt(ar2[1]) - parseInt(ar1[1])); + } + }); + } else { + valueList.sort(compareStrings_globalsettings); //Sort list + } + + var rowList; + var headerlen = tr_list[0].rowIndex; + var k = 0; + + for (i = 0; i yy) return higherindex; + else return equalindex; +}; + +swapRows = function(tableid, i, j) +{ + var table = document.getElementById(tableid); + var minNode = table.rows[Math.min(i, j)]; + var maxNode = table.rows[Math.max(i, j)]; + var parentNode = minNode.parentNode; + + if ((i - j) * (i - j) == 1) + { + parentNode.removeChild(maxNode); + parentNode.insertBefore(maxNode, minNode); + } + else + { + var nextNode = minNode.nextSibling; + + parentNode.removeChild(minNode); + parentNode.replaceChild(minNode, maxNode); + parentNode.insertBefore(maxNode, nextNode); + } +}; + +AddFilter = function(colNr) +{ + HideElement('id_filtercontrol_' + colNr); + + if (($F('global_realchannels') == 0) && ($F('global_virtualchannels') == 0)) { return; } + + var input = document.getElementsByName('input_filtercontrol_' +colNr); + var patternlist = ""; + var i; + + if ((input == null) || (input[0] == null)) { return; } + + if (input[0].type == "text") + { + patternlist = input[0].value; + } + else if (input[0].type == "checkbox") + { + for (i = 0; i < input.length; i++) + { + if (input[i].checked) patternlist += input[i].value + '|'; + } + + if (patternlist.length !== "") { patternlist = patternlist.substring(0, patternlist.length-1); } + } + else if (input[0].type== "radio") + { + for (i = 0; i < input.length; i++) + { + if (input[i].checked) + { + patternlist = input[i].value; + break; + } + } + } + + addFilterColumn($('chnListBody').getElementsByTagName("tr"), colNr, patternlist); + + if (patternlist !== "") { $('id_filtertd_'+ colNr).className = "filtered"; } + else { $('id_filtertd_'+ colNr).className = "unfiltered"; } +}; + +ResetFilter = function() +{ + //var table = document.getElementById('ChnListTbl'); + //var len = table.getElementsByTagName("tbody")[0].getElementsByTagName("tr")[0].getElementsByTagName("td").length; + var i=0; + + while ($('id_filtercontrol_'+i) !== null) + { + HideElement('id_filtercontrol_' + i); + + var input = document.getElementsByName('input_filtercontrol_' +i); + + if ((input !== null) && (input[0] !== null) && typeof (input[0]) != "undefined") + { + if (input[0].type == "text") + { + input[0].value = ""; + } + else if ((input[0].type == "checkbox") || (input[0].type == "radio")) + { + for (var j=0; j 1)) + { + tr_list[i].cells[2].childNodes[0].style.display = ''; //um die Bilder wieder einzublenden + } + } +}; + +ResetFilterAndTable = function() +{ + ResetFilter(); + ResetTable(); +}; + +HideFilterControls = function() +{ + var i=0; + + while ( $('id_filtercontrol_'+i) !== null) + { + HideElement('id_filtercontrol_' + i); + i++; + } +}; + +ShowFilterControl = function(colNr) +{ + var visible = $('id_filtercontrol_' +colNr).style.visibility == "visible"; + + HideFilterControls(); + + if (! visible) + { + ShowElement('id_filtercontrol_' + colNr); + jQuery('#id_filtercontrol_' +colNr).draggable(); + + var input = document.getElementsByName('input_filtercontrol_' +colNr)[0]; + if ((input !== null) && (input.type == "text")) + { + input.focus(); + input.select(); + } + } +}; + +filterTable = function() +{ + var i=0; + + ResetTable();//Zeige alle Zeilen + + while ( $('id_filtercontrol_'+i) != null) + { + AddFilter(i); //Filter setzen in Zeile i + jQuery('#id_filtercontrol_' + i).css({"left": 0, "top" : 0 }); + i++; + } + SizeTable(); + +}; + +filterCheckEnterEsc = function(keyCode, filterNr) +{ + switch (keyCode) { + case 13: + // Set the filter -- press ok + filterTable(); + break; + case 27: + jQuery("#inputTextFilter_" + filterNr).val(""); + filterTable(); + break; + } +}; + +//Filtert eine Tabelle und lässt nur die Zeilen sichtbar, +// die mit einem Muster (Liste) übereinstimmen. Die +// Tabelle muss ein
"; + msg += ""; + msg += ""; + //msg += ""; + msg += ""; + msg += ""; + msg += ""; + msg += ""; + msg += "
Temperaturprofil " +TOM_DAY[dayidx] +":" + translateKey('lblProgramTemperatureProfile') + " " + this.TOM_DAY[dayidx] + ": "; + if (dayidx == 0) msg += "
"; + //msg += "wie am Vortag"; + msg += "" + translateKey('lblProgramPreviousDay'); + if (dayidx == 0) msg += "
"; + msg += "
"; + + msg += ""; + msg += ""; + //msg += ""; + msg += ""; + msg += ""; + msg += ""; + + for (var i = 0; i < timeouts.length; i++) { + if (i == 0) endtime = tom_mintimeout; + else endtime = timeouts[i - 1][tom_endtime]; + + msg += ""; + msg += ""; + msg += ""; + msg += ""; + //msg += ""; + msg += ""; + msg += ""; + msg += ""; + // im naechsten Input-Feld stehen versteckt die zum Aktor zu uebertragenden Werte. Da der Aktor Werte im Grad Celsius erwartet, + // muss der im Kanalparameter evtl. in F angezeigte Wert immer in Celsius umgerechntet und zwischengespeichert werden. + msg += ""; + msg += ""; + } + msg += ""; + msg += "
   StartzeitEndzeitTemperatur
   " + translateKey('lblProgramTimeStart') + "" + translateKey('lblProgramTimeEnd') + "" + translateKey('lblProgramTemperature') + "
\"Zeitabschnitt\"Zeitabschnitt" + (i + 1) + ". " + translateKey('lblProgramPeriod') + "Uhr" + translateKey('lblProgramTimeExtension') + "" + translateKey('lblProgramTimeExtension') + " °C
"; + $(this.divname[dayidx]).innerHTML = msg; + + if (this.isOldDevGeneration) { + CC_setUnit(); + } + } + +}); + +TimeoutManagerHmIPOnOff = Class.create(); + +TimeoutManagerHmIPOnOff.prototype = Object.extend(new TimeoutManager(), { + + setMaxTimouts: function() { + this.maxTimeOuts = 11; + }, + + setValue: function (day, endtime, temperature) { + this.setTemp(day, endtime, temperature); + }, + + tom_setDirty: function (day, inputelem, timeoutIdx) { + + var tmp = inputelem.id.split("_"); + + if (this.prg) { + var id = this.prg + tmp[1] + "_" + tmp[2] + "_" + tmp[3]; + } + + var temperature = $F(id); + var dayidx = TOM_DAYIDX[day]; + var timeouts = this.week[dayidx]; + + inputelem.style.backgroundColor = WebUI.getColor("transparent"); + + if (this.tom_isTemperature(temperature) + && temperature >= 0 + && temperature <= 1) timeouts[timeoutIdx][tom_temperature] = parseFloat(temperature); + else inputelem.style.backgroundColor = WebUI.getColor("red"); + + this.weekdirty[dayidx] = true; + + }, + + tom_getPostStr: function () { + + var postStr = ""; + + for (var dayidx = 0; dayidx < 7; dayidx++) { + //Welcher Tag enthält die relevanten Daten: "wie am Vortag"-Funktion? + var prev_day = $(this.prg + 'prevday_' + dayidx); + var p = dayidx; + while (prev_day.checked) { + p--; + prev_day = $(this.prg+ 'prevday_' + p); + } + //----- + + if (this.weekdirty[dayidx] || this.weekdirty[p]) //Dieser Tag oder der Vortag "dirty"? + { + var timeouts = this.week[p]; + var hour, minute, level; + + if (timeouts && timeouts.length > 0) { + for (var i = 0; i < timeouts.length; i++) { + + hour = parseInt(timeouts[i][tom_endtime] / 60); + minute = parseInt(timeouts[i][tom_endtime] % 60); + + postStr += "&" + this.prg + "LEVEL_" + TOM_DAY_ENG[dayidx] + "_" + (i + 1) + "=" + timeouts[i][tom_level]; + postStr += "&" + this.prg + "HOUR_" + TOM_DAY_ENG[dayidx] + "_" + (i + 1) + "=" + hour; + postStr += "&" + this.prg + "MINUTE_" + TOM_DAY_ENG[dayidx] + "_" + (i + 1) + "=" + minute; + } + } + } + } + + return postStr; + }, + + tom_isTime: function (time) { + return time.match(/^[0-2]?[0-9]:[0-5][0-9]$/) != null; + }, + + tom_checkAndSetTime: function (day, inputel, timeoutIdx) { + var dayidx = TOM_DAYIDX[day]; + var timeouts = this.week[dayidx]; + var elem = inputel.id.split("_"); + var count = -1; + var inputelem; + var endtime; + var prev_endtime; + var next_endtime; + var time; + var appendix = '_temp'; + + while ($(this.prg + elem[1] + '_' + elem[2] + '_' + (count + 1) + appendix)) { + count++; + timeouts[count][tom_endtime] = this.tom_toTimeout($(this.prg + elem[1] + '_' + elem[2] + '_' + count + appendix).value); + } + + for (var loop = 0; loop <= (count - 1); loop++) { + timeoutIdx = loop; + + inputelem = this.prg + elem[1] + "_" + elem[2] + "_" + loop + appendix; + + var arTime = $(inputelem).value.split(":"), + hour = parseInt(arTime[0]), + min = parseInt(arTime[1]); + + if (min <= 9) {min = "0" + min;} + if (min == 60) {min = "00"; hour++;} + if (hour <= 9) {hour = "0" + hour;} + if (hour == 24) {hour = "23"; min = "55";} + + $(inputelem).value = time = hour + ":" + min; + + endtime = this.tom_toTimeout(time); + prev_endtime = -1; + next_endtime = -1; + + + if (timeoutIdx != 0) prev_endtime = timeouts[timeoutIdx - 1][tom_endtime]; + if (timeoutIdx != timeouts.length - 1) next_endtime = timeouts[timeoutIdx + 1][tom_endtime]; + + $(inputelem).style.backgroundColor = WebUI.getColor("transparent"); + + if (endtime > 0 + && endtime <= 1440 + && (prev_endtime < 0 || prev_endtime < endtime) + && (next_endtime < 0 || next_endtime > endtime)) timeouts[timeoutIdx][tom_endtime] = parseInt(endtime); + else $(inputelem).style.backgroundColor = WebUI.getColor("red"); + + this.weekdirty[dayidx] = true; + } + }, + + + setHmIPData: function(elmID, time) { + // elmID = e.g. P1_endtimeHr_0_0 - first value on Saturday + var prgNr = this.prg, + arId = elmID.split("_"), + arTime = time.split(":"), + dayIdx = arId[2], + index = arId[3], + hour = arTime[0], + minute = arTime[1]; + + // This is the visible time field + jQuery("#"+elmID).val(time); + + // This are the invisible time fields with the values to transmit + jQuery("#" + prgNr + "endtimeHr_"+dayIdx+"_"+ (parseInt(index) - 1)).val(hour); + jQuery("#" + prgNr + "endtimeMin_"+dayIdx+"_"+ (parseInt(index) - 1)).val(minute); + jQuery("#" + prgNr + "starttimeHr_"+dayIdx+"_"+ index).val(hour); + jQuery("#" + prgNr + "starttimeMin_"+dayIdx+"_"+ index).val(minute); + }, + + writeDayHmIPWeekProgramOnOff: function (day) { + var prgNr = this.prg; + var dayidx = TOM_DAYIDX[day]; + var timeouts = this.week[dayidx]; + var endtime; + var startTimeHour, startTimeMin, endTimeHour, endTimeMin; + + if (!timeouts) return; + + var equals_prevday = this.tom_equals_prevday(day); + + msg = "
"; + msg += ""; + msg += ""; + msg += ""; + msg += ""; + msg += ""; + msg += ""; + msg += ""; + msg += "
" + translateKey('lblProgramProfile') + " " + this.TOM_DAY[dayidx] + ": "; + if (dayidx == 0) msg += "
"; + msg += "" + translateKey('lblProgramPreviousDay'); + if (dayidx == 0) msg += "
"; + msg += "
"; + + msg += ""; + msg += ""; + //msg += ""; + msg += ""; + msg += ""; + msg += ""; + + for (var i = 0; i < timeouts.length; i++) { + if (i == 0) endtime = tom_mintimeout; + else endtime = timeouts[i - 1][tom_endtime]; + + startTimeHour = parseInt(endtime / 60); + startTimeMin = endtime % 60; + endTimeHour = parseInt(timeouts[i][tom_endtime] / 60); + endTimeMin = timeouts[i][tom_endtime] % 60; + + msg += ""; + msg += ""; + msg += ""; + msg += ""; + + msg += ""; + // msg += ""; + + + msg += ""; + +/* + msg += ""; + +*/ + // Todo Implement a option box with 2 entries: On Off + //msg += ""; + + var value = parseInt(timeouts[i][tom_level]); + var sel0 = "", sel1 = ""; + if (value == 0) { + sel0 = "selected"; + } else { + sel1 = "selected"; + } + + msg += ""; + + msg += ""; + } + msg += ""; + msg += "
   StartzeitEndzeitTemperatur
   " + translateKey('lblProgramTimeStart') + "" + translateKey('lblProgramTimeEnd') + "" + translateKey('lblProgramState') + "
\"Zeitabschnitt\"Zeitabschnitt" + (i + 1) + ". " + translateKey('lblProgramPeriod') + "" + translateKey('lblProgramTimeExtension') + "" + translateKey('lblProgramTimeExtension') + "" + translateKey('lblProgramTimeExtension') + ""; + // Start Hour + msg += ""; + // Start Min + msg += ""; + + // End Hour + msg += ""; + // End Min + msg += ""; + + msg+= "" + + "" + + "
"; + $(this.divname[dayidx]).innerHTML = msg; + + if (this.isOldDevGeneration) { + CC_setUnit(); + } + } +});/** + * ic_partyendtime.js + **/ + +//pet = Party End Time Module + +PartyEndTimeManager = Class.create(); + +PartyEndTimeManager.prototype = Object.extend(new MsgBox(), { + + initialize: function (iface, address, htmlcontainer, name, id) { + + this.iface = iface; + this.address = address; + this.htmlcont = htmlcontainer; + this.name = name; + this.id = id; + }, + + pet_Update: function () { + + var d = $F('pet_d'); + if (isNaN(d)) d = 0; + + var h = parseInt($F('pet_h')); + var m = parseFloat($F('pet_m')); + + var endtime = d * 24 + h + m; + + if (endtime >= 24) + { + $('pet_m').disabled = true; + $('pet_m').value = 0; + + $('pet_h').disabled = true; + $('pet_h').value = 0; + + endtime = d * 24; + } + else + { + $('pet_m').disabled = false; + $('pet_h').disabled = false; + } + + if (endtime > 3048) {endtime = 3048;} + + $(this.id).value = endtime; + }, + + writeControl: function (endtime) { + + var msg = ""; + var d, h, m; + + d = Math.floor(endtime / 24); + + tmp = endtime - (d * 24); + h = Math.floor(tmp); + + m = tmp-h; + + + msg += "d  "; + + msg += "h "; + + msg += "m
"; + //msg += "max. 127 Tage"; + msg += translateKey("partyMaxDays127"); + + //Sammelobjekt für richtigen Datenwert: + msg += ""; + + $(this.htmlcont).innerHTML = msg; + + this.pet_Update(); + } +}); +/** + * cp_functions.js + **/ + +showAddDeviceCP = function(activate_install_mode) +{ + var path = "/config/"; + if (PLATFORM != "Central") {path = "/configapp/";} + + if(activate_install_mode)CreateCPPopup(path + "cp_add_device.cgi", "call_js=rf_install_mode(true);"); + else CreateCPPopup(path + "cp_add_device.cgi"); + dlgPopup.setWidth("925"); +}; + +showDisplayCP = function() + { + CreateCPPopup("/config/cp_display.cgi"); +}; + +showSecurityCP = function() + { + CreateCPPopup("/config/cp_security.cgi"); +}; + +showNetworkSecurityCP = function() + { + CreateCPPopup("/config/cp_cert.cgi"); +}; + +showNetworkCP = function() + { + CreateCPPopup("/config/cp_network.cgi"); +}; +showGeneralSettingsCP = function() + { + CreateCPPopup("/pages/jpages/system/StorageSettings/show"); +}; + +showCouplingCP = function() +{ + CreateCPPopup("/pages/jpages/system/Coupling/show"); +}; + +showTimeCP = function() { + CreateCPPopup("/config/cp_time.cgi"); +}; + +showSoftwareCP = function() +{ + CreateCPPopup("/config/cp_software.cgi"); +}; + +showMaintenanceCP = function() +{ + CreateCPPopup("/config/cp_maintenance.cgi"); +}; + +showAdvancedSettingsCP = function() +{ + CreateCPPopup("/config/cp_advancedsettings.cgi"); +}; + +showNewFirmwareDownload = function() { + CreateCPPopup("/config/cp_maintenance.cgi", "downloadOnly=1"); +}; + +CreateCPPopup = function(src, pb, errorLbl) { + dlgPopup = new cpMessageBox(src, pb, errorLbl); + + PopupClose = function() { + dlgPopup.close(); + if (typeof addOnUninstall != "undefined") { + reloadPage(); + delete addOnUninstall; + } + }; + + PopupReload = function() { + dlgPopup.reload(); + dlgPopup.ShowPopup(); + }; + + dlgPopup.ShowPopup(); +}; + +CreateCPPopup2 = function(src, pb) { + dlgPopup2 = new cpMessageBox2(src, pb); + + Popup2Close = function() { + dlgPopup2.close(); + }; + + Popup2Reload = function() { + dlgPopup2.reload(); + dlgPopup2.ShowPopup(); + }; + + dlgPopup2.ShowPopup(); + //new Draggable("messagebox"); +}; + +cp_adddev_updater=null; + +cpMessageBox = Class.create(); + +cpMessageBox.prototype = +{ + initialize: function(src, pb, errorLbl) + { + if ( $('messagebox') ){ + $("messagebox").hide(); + } + + this.setTopMargin(6); + this.setLeftMargin(6); + + this.setWidth(800); + + this.createMessagebox(); + this.LoadFromFile(src, pb, errorLbl); + }, + + getViewPortDim : function() + { + var win = jQuery(window); + return {"height":win.height(), "width": win.width()}; + }, + + setWidth: function(width) + { + this.width = width; + if( $('messagebox') ){ + $('messagebox').style.width=this.width+"px"; + } + }, + + setHeight: function(height) + { + this.height = height; + }, + + setLeftMargin: function(left) + { + this.LeftMargin = left; + }, + + setTopMargin: function(top) + { + this.TopMargin = top; + }, + + createMessagebox: function() + { + if ( !$('messagebox') ) + { + var newDiv = document.createElement("div"); + var newDivId = document.createAttribute("id"); + newDivId.nodeValue = "messagebox"; + newDiv.setAttributeNode(newDivId); + var newDivStyle = document.createAttribute("style"); + //newDivStyle.nodeValue = "width:"+this.width+"px;height:"+this.height+"px;padding: 0px;position:absolute;left: 50%;margin-left: -"+(this.width/2)+"px;margin-top: -"+(this.height/2)+"px;"; + newDivStyle.nodeValue = "width:"+this.width+"px;height:"+this.height+"px;padding: 0px;position:absolute;left: 50%;margin-left: -"+(this.width/2)+"px;margin-top: -"+"0px;"; + if( typeof( newDiv.style.cssText ) == "string" ) { + newDiv.style.cssText = newDivStyle.nodeValue; + } else { + newDiv.setAttributeNode(newDivStyle); + } + $('centerbox').appendChild(newDiv); + jQuery("#messagebox").draggable(); + } else { + $('messagebox').style.width=this.width+"px"; + } + jQuery("#messagebox").addClass("j_translate"); + }, + + removeMessagebox: function() + { + if ( $('messagebox') ) + { + $('messagebox').remove(); + } + }, + + // TODO Es wird zur Zeit nur die Höhe ausgewertet und angepasst, die Breite ist noch nicht implementiert. + /** + * Adds a scrollbar and adjusts the position when the height of the message + * box is > than those of the viewport + * @param boxHeight + */ + setCSS: function(boxHeight) { + var centerBoxSel = jQuery("#centerbox"), + messageBoxSel = jQuery("#messagebox"), + oViewPortDim = this.getViewPortDim(); + + if (parseInt(oViewPortDim.height) < boxHeight ) + { + centerBoxSel.css({ + "overflow":"scroll", + "height":"95%", + "top":"-0px" + }); + messageBoxSel.css("margin-top", "-0px"); + } else { + centerBoxSel.css({"overflow":"", "top":"50%"}); + } + }, + + readaptSize: function() + { + var messageBox = $("messagebox"); + if ( messageBox ) + { + var h = messageBox.getHeight(); + messageBox.style.marginLeft = (messageBox.style.width.replace(/px$/,"")/2)*(-1)+"px"; + messageBox.style.marginTop = (h/2)*(-1)+"px"; + this.setCSS(h); + } + }, + + show: function() + { + this.readaptSize(); + $('trlayer').show(); + $('centerbox').show(); + }, + + close: function(o) + { + $('centerbox').hide(); + this.remove(); + $('trlayer').hide(); + }, + + hide: function(o) + { + $('messagebox').style.display="none"; + }, + + remove: function() + { + this.removeMessagebox(); + }, + + LoadFromFile: function(src, pb, errorLbl) { + var url = src; + if(url.indexOf('?sid=') === -1) + { + url = url+'?sid='+SessionId; + } + var t = this; + var opt = + { + method: 'post', + evalScripts: true, + postBody: pb, + sendXML: false, + onComplete: function(trans) { + centerMessageBox(); + $('messagebox').style.display=""; + }, + onFailure: function(response) { + $('centerbox').hide(); + $('trlayer').hide(); + if(typeof errorLbl != 'undefined') { + MessageBox.show(translateKey('lblError'), translateKey(errorLbl), '', 480,120); + } else { + Ajax_failure(url, response.statusText); + } + } + }; + new Ajax.Updater('messagebox',url,opt); + }, + + ShowPopup: function() { + this.show(); + setTimeout(function() { + eQ3.HomeMatic.Event.fire({type:'ContentLoaded'}); + }, 100); + } +}; + +cpMessageBox2 = Class.create(); + +cpMessageBox2.prototype = +{ + initialize: function(src, pb) + { + this.setTopMargin(6); + this.setLeftMargin(6); + + this.setWidth(400); + + this.createMessagebox(); + this.LoadFromFile(src, pb); + }, + + setWidth: function(width) + { + this.width = width; + if( $('messagebox2') ){ + $('messagebox2').style.width=this.width+"px"; + } + }, + + setHeight: function(height) + { + this.height = height; + }, + + setLeftMargin: function(left) + { + this.LeftMargin = left; + }, + + setTopMargin: function(top) + { + this.TopMargin = top; + }, + + createMessagebox: function() + { + if ( !$('messagebox2') ) + { + var newDiv = document.createElement("div"); + var newDivId = document.createAttribute("id"); + newDivId.nodeValue = "messagebox2"; + newDiv.setAttributeNode(newDivId); + var newDivStyle = document.createAttribute("style"); + newDivStyle.nodeValue = "width:"+this.width+"px;height:"+this.height+"px;padding: 0px;position:absolute;left: 50%;margin-left: -"+(this.width/2)+"px;margin-top: -"+(this.height/2)+"px;"; + + if( typeof( newDiv.style.cssText ) == "string" ) + newDiv.style.cssText = newDivStyle.nodeValue; + else + newDiv.setAttributeNode(newDivStyle); + + $('centerbox2').appendChild(newDiv); + jQuery("#messagebox2").draggable(); + } else { + $('messagebox2').style.width=this.width+"px"; + } + }, + + removeMessagebox: function() + { + if ( $('messagebox2') ) + { + $('messagebox2').remove(); + } + }, + + readaptSize: function() + { + if ( $('messagebox2') ) + { + var h = $("messagebox2").getHeight(); + $('messagebox2').style.marginLeft = ($('messagebox2').style.width.replace(/px$/,"")/2)*(-1)+"px"; + $('messagebox2').style.marginTop = (h/2)*(-1)+"px"; + } + }, + + show: function() + { + this.readaptSize(); + $('trlayer2').show(); + $('centerbox2').show(); + }, + + close: function(o) + { + $('centerbox2').hide(); + this.remove(); + $('trlayer2').hide(); + }, + + hide: function(o) + { + $('messagebox2').style.display="none"; + }, + + remove: function() + { + this.removeMessagebox(); + }, + + LoadFromFile: function(src, pb) + { + var url = src; + if(url.indexOf('?sid=') === -1) + { + url = url+'?sid='+SessionId; + } + var t = this; + var opt = + { + method: 'post', + evalScripts: true, + postBody: pb, + sendXML: false, + onComplete: function(trans) { + centerMessageBox(); + $('messagebox2').style.display=""; + } + }; + new Ajax.Updater('messagebox2',url,opt); + }, + + ShowPopup: function() + { + this.show(); + setTimeout(function() { + eQ3.HomeMatic.Event.fire({type:'ContentLoaded'}); + }, 100); + } +}; +/** + * ic_functions.js + **/ + +prefix = []; +switch_dir = 1; +switch_on_off = false; +free_time = 0; +free_perc = 0; +free_temp = 0; +exists_timearr = ""; +exists_percarr = ""; +exists_temparr = ""; +time_textcolor = 0; +perc_textcolor = 0; +temp_textcolor = 0; +_textcolor = 0; +time_tmp = ""; +perc_tmp = ""; +temp_tmp = ""; +exists_bib = [] ; +arChnHasLinks = []; + +getInternalKeySpecialInputId = function(arrId) +{ + var id = ""; + var arrIdLength = arrId.length - 1; + + for (var loop = 0; loop < arrIdLength; loop++) { + id += arrId[loop]; + + if ((loop + 1) < arrIdLength) { + id += "_"; + } + } + return id; +}; + +ActivateFreeTime4InternalKey = function(selectelem, pref) +{ + ActivateFreeTime(selectelem, pref, true); +}; + +ActivateFreeTime = function(selectelem, pref, internalKey) +{ + //alert($('selectelem').id + " pref= " + pref); + var pnr = selectelem.options[selectelem.selectedIndex].value; + var upnr = pnr.split(".")[1]; + var intkey = selectelem.id.split("_")[0].slice(8); + + if (isNaN(upnr) == true) { + var arrSpecialInputId = selectelem.id.split("_"); + var special_input_id = arrSpecialInputId[0]; + + if (internalKey) { + special_input_id = getInternalKeySpecialInputId(arrSpecialInputId); + } + + var selectedvalue = document.getElementById("separate_" + special_input_id + "_" + pnr + "_" + pref).value; //4 + var parameter = document.getElementById("separate_" + special_input_id + "_" + pnr + "_" + pref).name; //5 + var sec = document.getElementById("vis_sec_" + pnr + "_" + pref + "_" + special_input_id); + var min = document.getElementById("vis_min_" + pnr + "_" + pref + "_" + special_input_id); + var hour = document.getElementById("vis_hour_" + pnr + "_" + pref + "_" + special_input_id); + var x_max = selectelem.length + 1; + //6 + if (pnr > x_max) {x_max = parseInt(pnr) + 1;} + var y_max = 15; + + //7 + if (exists_timearr != "ok" || time_tmp != x_max) + { + //8 + time2d = []; + for (var i = 0; i < x_max; ++i) + time2d[i] = []; + exists_timearr = "ok"; + time_tmp = x_max; //9 + } + + time2d[pnr][pref] = 0; + prefix[parameter + special_input_id] = pnr + "_" + pref + "_" + special_input_id; + + if (selectedvalue == "99999999") + { + if (intkey == "" && !internalKey) { + document.getElementById("NewProfileTemplate_receiver").style.visibility = "hidden"; + document.getElementById(special_input_id + "_profiles").options[selectelem.selectedIndex].style.color = "gray"; + if (CheckGroup()) document.getElementById("NewProfileTemplate_receivergroup").style.visibility = "hidden"; + } + time2d[pnr][pref] = 1; //10 + hour.style.display = "inline"; + min.style.display = "inline"; + sec.style.display = "inline"; + } + else + { + if (free_time != 1 && free_perc != 1 && free_temp != 1) { + if (intkey == "" && !internalKey) { + document.getElementById("NewProfileTemplate_receiver").style.visibility = "visible"; + if (CheckGroup()) document.getElementById("NewProfileTemplate_receivergroup").style.visibility = "visible"; + } + } else document.getElementById(special_input_id + "_profiles").options[selectelem.selectedIndex].style.color = TextColor(_textcolor); + + time2d[pnr][pref] = 0; //11 + + hour.style.display = "none"; + min.style.display = "none"; + sec.style.display = "none"; + } + free_time = 0; //12 + for (var loopx = 0; loopx < x_max; loopx++){ + for (var loopy = 0; loopy < y_max; loopy++){ + if (time2d[loopx][loopy] == 1) {free_time = 1; break;} + } + } + + for (loopy = 0; loopy <= y_max; loopy++) { + if (time2d[pnr][loopy] == 1) {time_textcolor = 1; break;} + else time_textcolor = 0; + } + + if (time_textcolor == 0 && perc_textcolor == 0 && temp_textcolor == 0) _textcolor = 0; + else _textcolor = 1; + document.getElementById(special_input_id + "_profiles").options[selectelem.selectedIndex].style.color = TextColor(_textcolor); + + if (free_time == 0 && free_perc == 0 && free_temp == 0) { + if (intkey == "" && !internalKey) { + document.getElementById("NewProfileTemplate_receiver").style.visibility = "visible"; + if (CheckGroup()) document.getElementById("NewProfileTemplate_receivergroup").style.visibility = "visible"; + } + } + } +}; + +// Ausgelagert nach www_source/ise/js/function.js +// Kann hier entfernt werden. +_encodeString = function(elem) +{ + //wird nur für die Übersetzung der Parameter des HM-PB-4Dis-WM genutzt, + //da dort einige Zeichen an anderer Stelle liegen. + + var inString = $F("_" + elem); + var outString = inString.replace(/Ä/g, "["); + outString = outString.replace(/Ö/g, "#"); + outString = outString.replace(/Ü/g, "$"); + outString = outString.replace(/ä/g, "{"); + outString = outString.replace(/ö/g, "|"); + outString = outString.replace(/ü/g, "}"); + outString = outString.replace(/ß/g, "~"); + outString = outString.replace(/&/g, "]"); + outString = outString.replace(/=/g, "'"); + + $(elem).value = outString; +}; + + + +ActivateFreeValue = function(selectelem, pref, internalKey) +{ + var pnr = selectelem.options[selectelem.selectedIndex].value; //1 + var upnr = pnr.split(".")[1]; + var intkey = selectelem.id.split("_")[0].slice(8); + var val2d, val_tmp, exists_valarr, free_val; + + + //2 + if (isNaN(upnr) == true) { + // var special_input_id = selectelem.id.split("_")[0]; //3 + var arrSpecialInputId = selectelem.id.split("_"); + var special_input_id = arrSpecialInputId[0]; + + if (internalKey) { + special_input_id = getInternalKeySpecialInputId(arrSpecialInputId); + } + + var selectedvalue = document.getElementById("separate_" + special_input_id + "_" + pnr + "_" + pref).value; //4 + var parameter = document.getElementById("separate_" + special_input_id + "_" + pnr + "_" + pref).name; //5 + var val = document.getElementById("vis_val_" + pnr + "_" + pref + "_" + special_input_id); + var x_max = selectelem.length + 1; + //6 + if (pnr > x_max) {x_max = parseInt(pnr) + 1;} + var y_max = 15; + + //7 + if (exists_valarr != "ok" || val_tmp != x_max) + { + //8 + val2d = []; + for (i = 0; i < x_max; ++i) + val2d[i] = []; + exists_valarr = "ok"; + val_tmp = x_max; //9 + } + val2d[pnr][pref] = 0; + + prefix[parameter + special_input_id] = pnr + "_" + pref + "_" + special_input_id; + + if (selectedvalue == "99999990" ) + { + if (intkey == "" && !internalKey) { + document.getElementById("NewProfileTemplate_receiver").style.visibility = "hidden"; + document.getElementById(special_input_id + "_profiles").options[selectelem.selectedIndex].style.color = "gray"; + if (CheckGroup()) document.getElementById("NewProfileTemplate_receivergroup").style.visibility = "hidden"; + } + val2d[pnr][pref] = 1; //10 + val.style.display = "inline"; + + } else { + if (free_time != 1 && free_val != 1 && free_temp != 1) { + if (intkey == "" && !internalKey) { + document.getElementById("NewProfileTemplate_receiver").style.visibility = "visible"; + if (CheckGroup()) document.getElementById("NewProfileTemplate_receivergroup").style.visibility = "visible"; + } + } else document.getElementById(special_input_id + "_profiles").options[selectelem.selectedIndex].style.color = TextColor(_textcolor); + + val2d[pnr][pref] = 0; //11 + val.style.display = "none"; + } + + free_val = 0; //12 + for (var loopx = 0; loopx < x_max; loopx++){ + for (var loopy = 0; loopy < y_max; loopy++){ + if (val2d[loopx][loopy] == 1) {free_val = 1; break;} + } + } + for (loopy = 0; loopy <= y_max; loopy++) { + if (val2d[pnr][loopy] == 1) {perc_textcolor = 1; break;} + else perc_textcolor = 0; + } + + if (time_textcolor == 0 && perc_textcolor == 0 && temp_textcolor == 0) _textcolor = 0; + else _textcolor = 1; + document.getElementById(special_input_id + "_profiles").options[selectelem.selectedIndex].style.color = TextColor(_textcolor); + + if (free_time == 0 && free_val == 0 && free_temp == 0) { + if (intkey == "" && !internalKey) { + document.getElementById("NewProfileTemplate_receiver").style.visibility = "visible"; + if (CheckGroup()) document.getElementById("NewProfileTemplate_receivergroup").style.visibility = "visible"; + } + } + } +}; + + + + + + + + + + + + + + + + + + + + + + +ActivateFreePercent4InternalKey = function(selectelem, pref) +{ + ActivateFreePercent(selectelem, pref, true); +}; + +ActivateFreePercent = function(selectelem, pref, internalKey) +{ + var pnr = selectelem.options[selectelem.selectedIndex].value; //1 + var upnr = pnr.split(".")[1]; + var intkey = selectelem.id.split("_")[0].slice(8); + + //2 + if (isNaN(upnr) == true) { + // var special_input_id = selectelem.id.split("_")[0]; //3 + var arrSpecialInputId = selectelem.id.split("_"); + var special_input_id = arrSpecialInputId[0]; + + if (internalKey) { + special_input_id = getInternalKeySpecialInputId(arrSpecialInputId); + } + + var selectedvalue = document.getElementById("separate_" + special_input_id + "_" + pnr + "_" + pref).value; //4 + var parameter = document.getElementById("separate_" + special_input_id + "_" + pnr + "_" + pref).name; //5 + var percent = document.getElementById("vis_percent_" + pnr + "_" + pref + "_" + special_input_id); + var x_max = selectelem.length + 1; + //6 + if (pnr > x_max) {x_max = parseInt(pnr) + 1;} + var y_max = 15; + + //7 + if (exists_percarr != "ok" || perc_tmp != x_max) + { + //8 + perc2d = []; + for (i = 0; i < x_max; ++i) + perc2d[i] = []; + exists_percarr = "ok"; + perc_tmp = x_max; //9 + } + perc2d[pnr][pref] = 0; + + prefix[parameter + special_input_id] = pnr + "_" + pref + "_" + special_input_id; + + if (selectedvalue == "99999998" ) + { + if (intkey == "" && !internalKey) { + document.getElementById("NewProfileTemplate_receiver").style.visibility = "hidden"; + document.getElementById(special_input_id + "_profiles").options[selectelem.selectedIndex].style.color = "gray"; + if (CheckGroup()) document.getElementById("NewProfileTemplate_receivergroup").style.visibility = "hidden"; + } + perc2d[pnr][pref] = 1; //10 + percent.style.display = "inline"; + + } else { + if (free_time != 1 && free_perc != 1 && free_temp != 1) { + if (intkey == "" && !internalKey) { + document.getElementById("NewProfileTemplate_receiver").style.visibility = "visible"; + if (CheckGroup()) document.getElementById("NewProfileTemplate_receivergroup").style.visibility = "visible"; + } + } else document.getElementById(special_input_id + "_profiles").options[selectelem.selectedIndex].style.color = TextColor(_textcolor); + + perc2d[pnr][pref] = 0; //11 + percent.style.display = "none"; + } + + free_perc = 0; //12 + for (var loopx = 0; loopx < x_max; loopx++){ + for (var loopy = 0; loopy < y_max; loopy++){ + if (perc2d[loopx][loopy] == 1) {free_perc = 1; break;} + } + } + for (loopy = 0; loopy <= y_max; loopy++) { + if (perc2d[pnr][loopy] == 1) {perc_textcolor = 1; break;} + else perc_textcolor = 0; + } + + if (time_textcolor == 0 && perc_textcolor == 0 && temp_textcolor == 0) _textcolor = 0; + else _textcolor = 1; + document.getElementById(special_input_id + "_profiles").options[selectelem.selectedIndex].style.color = TextColor(_textcolor); + + if (free_time == 0 && free_perc == 0 && free_temp == 0) { + if (intkey == "" && !internalKey) { + document.getElementById("NewProfileTemplate_receiver").style.visibility = "visible"; + if (CheckGroup()) document.getElementById("NewProfileTemplate_receivergroup").style.visibility = "visible"; + } + } + } +}; + + + +ActivateFreeTemp = function(selectelem, pref) +{ + var pnr = selectelem.options[selectelem.selectedIndex].value; //1 + var upnr = pnr.split(".")[1]; + var intkey = selectelem.id.split("_")[0].slice(8); + + //2 + if (isNaN(upnr) == true) { + var special_input_id = selectelem.id.split("_")[0]; //3 + var selectedvalue = document.getElementById("separate_" + special_input_id + "_" + pnr + "_" + pref).value; //4 + var parameter = document.getElementById("separate_" + special_input_id + "_" + pnr + "_" + pref).name; //5 + var temperatur = document.getElementById("vis_temp_" + pnr + "_" + pref + "_" + special_input_id); + var x_max = selectelem.length + 1; + //6 + if (pnr > x_max) {x_max = parseInt(pnr) + 1;} + var y_max = 15; + //7 + if (exists_temparr != "ok" || temp_tmp != x_max) + { + //8 + temp2d = []; + for (var i = 0; i < x_max; ++i) + temp2d[i] = []; + exists_temparr = "ok"; + temp_tmp = x_max; //9 + } + temp2d[pnr][pref] = 0; + + prefix[parameter + special_input_id] = pnr + "_" + pref + "_" + special_input_id; + + if (selectedvalue == "99999997" ) + { + if (intkey == "") { + document.getElementById("NewProfileTemplate_receiver").style.visibility = "hidden"; + document.getElementById(special_input_id + "_profiles").options[selectelem.selectedIndex].style.color = "gray"; + if (CheckGroup()) document.getElementById("NewProfileTemplate_receivergroup").style.visibility = "hidden"; + } + temp2d[pnr][pref] = 1; //10 + temperatur.style.display = "inline"; + + } else { + if (free_time != 1 && free_perc != 1 && free_temp != 1) { + if (intkey == "") { + document.getElementById("NewProfileTemplate_receiver").style.visibility = "visible"; + if (CheckGroup()) document.getElementById("NewProfileTemplate_receivergroup").style.visibility = "visible"; + } + } else document.getElementById(special_input_id + "_profiles").options[selectelem.selectedIndex].style.color = TextColor(_textcolor); + + temp2d[pnr][pref] = 0; //11 + temperatur.style.display = "none"; + } + + free_temp = 0; //12 + for (var loopx = 0; loopx < x_max; loopx++){ + for (var loopy = 0; loopy < y_max; loopy++){ + if (temp2d[loopx][loopy] == 1) {free_temp = 1; break;} + } + } + + for (loopy = 0; loopy <= y_max; loopy++) { + if (temp2d[pnr][loopy] == 1) {temp_textcolor = 1; break;} + else temp_textcolor = 0; + } + + if ((time_textcolor == 0) && (perc_textcolor == 0) && (temp_textcolor == 0)) { _textcolor = 0; } + else _textcolor = 1; + document.getElementById(special_input_id + "_profiles").options[selectelem.selectedIndex].style.color = TextColor(_textcolor); + + if ((free_time == 0) && (free_perc == 0) && (free_temp == 0)) + { + if (intkey == "") { + document.getElementById("NewProfileTemplate_receiver").style.visibility = "visible"; + if (CheckGroup()) document.getElementById("NewProfileTemplate_receivergroup").style.visibility = "visible"; + } + } + } +}; + +BLIND_fetchType = function(id) { + var arrID = id.split("_"); + var type = ""; + + for (var loop = 1; loop < arrID.length; loop++) { + type += arrID[loop]; + + if ((loop + 1) < arrID.length) { + type += "_"; + } + } + return type; +}; + +BLIND_setPosition = function(id) +{ + var type = BLIND_fetchType(id); + var index = $(id).selectedIndex; + var v_up = "visible"; + var v_down = "hidden"; + var d_up = ""; + var d_down = "none"; + + if (index == 1) {v_up = "hidden"; v_down = "visible"; d_up = "none"; d_down = "";} + else if (index == 2) {v_up = "visible"; v_down = "visible"; d_up = ""; d_down = "";} + + + $("upLevel_" + type).style.visibility = v_up; + $("downLevel_" + type).style.visibility = v_down; + $("upTime_" + type).style.visibility = v_up; + $("downTime_" + type).style.visibility = v_down; + $("upDelayTime_" + type).style.visibility = v_up; + $("downDelayTime_" + type).style.visibility = v_down; + + $("upLevel_" + type).style.display = d_up; + $("downLevel_" + type).style.display = d_down; + $("upTime_" + type).style.display = d_up; + $("downTime_" + type).style.display = d_down; + $("upDelayTime_" + type).style.display = d_up; + $("downDelayTime_" + type).style.display = d_down; + +}; + +jalousieShowSlatInputElem = function(id, chn) { + var selValue = jQuery("#"+id).val(), + jalousieSlatPosOffElm = jQuery("#jalousieSlatPosOff_" + chn), + jalousieSlatPosOnElm = jQuery("#jalousieSlatPosOn_" + chn); + + switch (selValue) { + case "1": + jalousieSlatPosOffElm.hide(); + jalousieSlatPosOnElm.show(); + break; + case "2": + jalousieSlatPosOnElm.hide(); + jalousieSlatPosOffElm.show(); + break; + case "3": + jalousieSlatPosOnElm.show(); + jalousieSlatPosOffElm.show(); + break; + } +}; + +Disable_SimKey = function(ch, prn, specialInputId) +{ + var arrSpecialInputId = specialInputId.split("_"), + pref_dirty = false, + i = 1, + jBtnSim = $("SimKey_" + arrSpecialInputId[1] + "_" + arrSpecialInputId[2] + "_" + prn), + jBtnLongSim = $("SimLongKey_" + arrSpecialInputId[1] + "_" + arrSpecialInputId[2] + "_" + prn), + jHintSim = $("SimKeyHint_" + arrSpecialInputId[1] + "_" + arrSpecialInputId[2] + "_" + prn); + + if (jBtnSim) { + + while ($('separate_' + specialInputId + '_' + prn + '_' + i)) + { + if (IsDirty($('separate_' + specialInputId + '_' + prn + '_' + i))) + { + pref_dirty = true; + } + i++; + } + + if ( (pref_dirty == true ) || ( IsDirty($(specialInputId + '_profiles')) ) ) + { + jBtnSim.disabled = true; + if (jBtnLongSim) jBtnLongSim.disabled = true; + //jBtnSim.value = "Simulation nicht möglich!"; + jBtnSim.value = translateKey("simulateKeyPressBtnTxtNotPossible"); + if (jBtnLongSim) jBtnLongSim.value = translateKey("simulateKeyPressBtnTxtNotPossible"); + jHintSim.style.display = "inline"; + } + else + { + jBtnSim.disabled = false; + if (jBtnLongSim) jBtnLongSim.disabled = false; + //jBtnSim.value = "Simuliere Tastendruck"; + jBtnSim.value = translateKey("btnSimKeyPress"); + if (jBtnLongSim) jBtnLongSim.value = translateKey("btnSimLongKeyPress"); + jHintSim.style.display = "none"; + } + } +}; + + +MD_catchBrightness = function(url, sender_address, receiver_address, brightness, convertValue, paramType, set_value, id, commando, parameter) +{ + // knownBrightness is used to prevent unnecessary calls for the converting of the current brightness while building the page. + // Each profile of the easymode needs the brightness, so we store the value for 500 ms in the var knownBrightness + if (typeof knownBrightness == "undefined") { + var curBrightness = homematic("Interface.getValue", {"interface": "HmIP-RF", "address": sender_address, "valueKey": paramType}); + brightness = (curBrightness) ? parseFloat(curBrightness).toFixed(2) : parseFloat(brightness).toFixed(2); + + conInfo("sender_address: " + sender_address +" - paramType: " + paramType + " - current brightness via getValue: " + curBrightness + " - calculated brightness: " + brightness); + + arID = id.split("_"); + jQuery("#brightDescr_"+arID[2]).css("display", "inline"); + jQuery("#okButton_"+arID[2]).css("display", "inline"); + + if (! commando.includes("help_active_")) { + //jQuery("#usrDefBrightness_" + arID[2]).val(brightness); + jQuery("#usrDefBrightness_" + arID[2]+ "_" + arID[3]).val(brightness); + } + + if (convertValue == 1) { + var oSender = DeviceList.getDeviceByAddress(sender_address.split(":")[0]), + devDescr = homematic("Interface.getDeviceDescription", { + "interface": oSender.interfaceName, + "address": oSender.address + }); + + if ((oSender.typeName.indexOf("HmIPW-") != -1) || ((oSender.typeName.indexOf("HmIP-") != -1) && (devDescr.firmware.split(".")[0] >= 2))) { + brightness = MD_convertIlluminationToDecisionValue_V2(brightness); + } else { + // Old calculation method + brightness = MD_convertIlluminationToDecisionValue(brightness, oSender.typeName, devDescr.firmware); + } + } + knownBrightness = brightness; + window.setTimeout(function() {delete knownBrightness;}, 500); + } else { + brightness = knownBrightness; + } + + if (brightness < 0) {brightness = 0.0;} + + ResetPostString(); + poststr += "&url=" +url; + poststr += "&sender_address=" +sender_address; + poststr += "&receiver_address=" +receiver_address; + poststr += "&set_value=" +set_value; + poststr += "&id=" +id; + poststr += "&commando=" +commando; + poststr += "¶meter=" +parameter; + poststr += "&active_bright=" + $F(id); + poststr += "&brightness=" + brightness; + SendRequest('ic_md.cgi'); +}; + +MD_channel_help = function() +{ + var contentElm = jQuery("#content"), + helpContentElm = jQuery("#md_ch_help"), + helpBtnElm = jQuery("#md_help_button"); + + if (helpBtnElm.val() == translateKey("genericBtnTxtHelp")) + { + helpContentElm.css("display","inline"); + helpBtnElm.val(translateKey("genericBtnTxtHelpOff")); + contentElm.animate({scrollTop: contentElm.height()},1000); + } else { + contentElm.animate({scrollTop: parseInt(0)},1000, function() { + helpContentElm.fadeOut(800); + helpBtnElm.val(translateKey("genericBtnTxtHelp")); + }); + + } +}; + +MD_checkMaxValue = function(id_on_time, channel, id_on_time_mode) +{ + // mode 0 = absolut, mode 1 = minimal + var prn = id_on_time.split("_")[2]; + var pref = id_on_time.split("_")[3]; + var val = $F(id_on_time); + + // mode 0 = absolut, mode 1 = minimal + var mode = $F(id_on_time_mode); + + if (mode == 0) $('hint_'+ prn + '_' + pref).firstChild.data = " "; + + + if ((val > 120 || mode == 1 ) && channel == 1 ) + { + if (val > 120) { + $(id_on_time).options[$(id_on_time).length -1].style.color = WebUI.getColor('red'); + $(id_on_time).options[$(id_on_time).length -1].style.textDecoration = 'blink'; + $(id_on_time).options[$(id_on_time).length -1].style.fontStyle = 'italic'; + } + + switch (mode) { + + case("0"): $('hint_'+ prn + '_' + pref).style.color = WebUI.getColor('red'); + $('hint_'+ prn + '_' + pref).firstChild.data = unescape(localized[0]['hint_ontime_0']); + break; + + case("1"): $('hint_'+ prn + '_' + pref).style.color = WebUI.getColor('red'); + $('hint_'+ prn + '_' + pref).firstChild.data = unescape(localized[0]['hint_ontime_0']); + $('hint_'+ prn + '_' + pref).firstChild.data += unescape(localized[0]['hint_ontime_1']); + break; + } + } +}; + + + +MD_checkPNAME = function(id, param, id_on_time) +{ + if ($(id).selectedIndex == 0) {$(param).firstChild.data = unescape(localized[0]['md_on_time']);} + else {$(param).firstChild.data = unescape(localized[0]['md_min_on_time']);} + + var prn = id.split("_")[2]; + var pref = id.split("_")[3]; + var md_min_interval = "md_min_interval_" + prn + "_" + pref; + + var min_interval = $F(md_min_interval).split(",")[0]; // enthaelt den Wert des Kanalparameters 'Mindestsendeabstand'. Moegl. Werte 0, 1, 2, 3, 4 + $(md_min_interval).value = min_interval + "," + $(id).selectedIndex; + + + var min_value = [15, 30, 60, 120, 240]; + var h = "hour_" + id_on_time.split("_")[2] + "_" + id_on_time.split("_")[3] + "_" + id_on_time.split("_")[1]; + var m = h.replace('hour_', 'min_'); + var s = h.replace('hour_', 'sec_'); + + var t = (parseFloat($F(h)) * 3600) + (parseFloat($F(m)) * 60) + parseFloat($F(s)); + + if (t < min_value[min_interval] && $(id).selectedIndex !== 0 ) + { + $(s).value = min_value[min_interval]; + MD_set_h_m_s(h, m, s); + } + + + if ($F(id_on_time) < min_value[min_interval] && $(id).selectedIndex == 0) + { + jQuery('#'+id_on_time + '_hint0:first-child').html(unescape(localized[0]['hint0a']) + min_value[min_interval] + unescape(localized[0]['hint0b'])); + jQuery('#'+id_on_time + '_hint1:first-child').html(unescape(localized[0]['hint1a']) + min_value[min_interval] + unescape(localized[0]['hint1b'])); + } else { + $(id_on_time + '_hint0').firstChild.data = " "; + $(id_on_time + '_hint1').firstChild.data = " "; + } +}; + +MD_init = function(id, min, max) +{ + var input = document.getElementById(id); + var ausdr_int = /\d+/; + if (ausdr_int.test(input.value)) {var wert_int = ausdr_int.exec(input.value); wert_int = wert_int[0];} + var wert = min; + var channel = id.split("_")[2]; + var txtIndex = (parseInt(id.split("_")[3]) + 1); + + if (! wert_int) {wert = min;} //1 + if (! isNaN(wert_int)) {wert = wert_int;} + + if (wert < min) {wert = min;} + if (wert > max) {wert = max;} + + input.value = wert; + + if (input.name == "EVENT_FILTER_NUMBER") + { + var efn = document.getElementsByClassName('event_filter_number_' + channel); + if (wert == 1) + { + //input.options[0].text = "jedem"; + input.options[0].text = translateKey("motionDetectorEventFilterNumberA"); + //efn[0].firstChild.data = " Sensor-Impuls"; + efn[0].firstChild.data = translateKey("motionDetectorEventFilterNumberB"); + efn[1].firstChild.data = " "; + + $('separate_CHANNEL_' + channel + '_' + txtIndex).style.display = "none"; + } else + { + input.options[0].text = "1"; + //efn[0].firstChild.data = " Sensor-Impulsen innerhalb "; + efn[0].firstChild.data = translateKey("motionDetectorEventFilterNumberC"); + //efn[1].firstChild.data = " Sekunden"; + efn[1].firstChild.data = translateKey("motionDetectorEventFilterNumberD"); + $('separate_CHANNEL_' + channel + '_'+ txtIndex).style.display = "inline"; + } + } + + if (input.name == "BRIGHTNESS_FILTER") + { + // var brightness = document.getElementsByClassName('brightness')[0]; + var brightness = document.getElementsByClassName('brightness_' + channel)[0]; + //if (wert == 0) brightness.firstChild.data = "der zuletzt ermittelte Wert"; + if (wert == 0) brightness.firstChild.data = translateKey("motionDetectorMinumumOfLastValuesB0"); + //else brightness.firstChild.data = "das Minimum der letzten " + (parseInt(input.value) + 1) + " Werte"; + else brightness.firstChild.data = translateKey("motionDetectorMinumumOfLastValuesB1") + (parseInt(input.value) + 1) + translateKey("motionDetectorMinumumOfLastValuesC"); + } +}; + +MD_getHelp = function(min, max, brightness, activeBright, ready, isHmIP) +{ + // liest die Hilfedatei für den MotionSensor ein +// var language = $F('language') ; + var language = getLang(), + font_bold = "\"font-style:normal; font-weight:bold\"", + font_underline = "\"font-style:normal; text-decoration:underline\"", + active = localized[0]['active_' + ready], + fileName0 = (isHmIP) ? 'MOTION_DETECTOR_HMIP_0.txt' : 'MOTION_DETECTOR_0.txt', + fileName1 = (isHmIP) ? 'MOTION_DETECTOR_HMIP_1.txt' : 'MOTION_DETECTOR_1.txt'; + + //Je nachdem, ob die aktuelle Helligkeit zur Verfügung steht, oder nicht, werden verschiedene Hilfstexte generiert. + if (brightness != -1) { + var path = '/config/easymodes/etc/localization/' + language + '/' + fileName1; + } else { + var path = '/config/easymodes/etc/localization/' + language + '/' + fileName0; + } + + // die entsprechende Uebersetzungstabellen der Easymodes einlesen + new Ajax.Request(path , + { + method: 'get', + asynchronous: false, + onSuccess: function(success) { + help_txt = eval(success.responseText); + }, + + onFailure: function(failure) { + Ajax_failure(path, failure.statusText); + } + }); + return help_txt; +}; + +MD_link_help = function() +{ + // Hilfetext für die Art der Verweildauer des Motion-Detectors + var help_txt = MD_getHelp(); + + MessageBox.show(help_txt[0]['title_kind_of'], help_txt[0]['help_kind_of'] ,"" ,450 , 260); +}; + +MD_catchBright_help = function(min, max, brightness, activeBright, ready, condition, sensorAddress) { + var isHmIP = (sensorAddress.split(":")[0].length > 10) ? true : false; + //Hilfetext für die Helligkeitsschwelle des Motion-Detectors + var help_txt = MD_getHelp(min, max, brightness, activeBright, ready, isHmIP); + + if (condition == "LT_LO") { + MessageBox.show(help_txt[0]['title_brightness'], help_txt[0]['help_brightness_active_LT_LO'], "", 475, (isHmIP) ? 350 : 185); + } else { + MessageBox.show(help_txt[0]['title_brightness'], help_txt[0]['help_brightness_active_GE_LO'], "", 475, (isHmIP) ? 350 : 185); + } +}; + +MD_minInterval = function(id) +{ + var modus = $(id).selectedIndex; // 0 = klassisch, 1 = dynamisch + var min_interval_txt = $('min_interval'); + + var arId = id.split("_"); + var min_interval = $(arId[0] + "_" + arId[1] + "_" + arId[2] + "_" + (parseInt(arId[3]) + 1)); + + //var txt = "Mindestsendeabstand"; + var txt = translateKey("motionDetectorMinimumOnAirInterval"); + + if (modus == 0) + { + //txt = "Sendeabstand"; + txt = translateKey("motionDetectorOnAirInterval"); + var newEntry = new Option("240s", "4", false, true); + min_interval.options[min_interval.length] = newEntry ; + + min_interval.disabled = true; + } else + { + //txt = "Mindestsendeabstand"; + txt = translateKey("motionDetectorMinimumOnAirInterval"); + // Mehr als 5 Eintraege vorhanden? + // min_interval.options[0].selected = true; + if (min_interval.length == 6) + { + min_interval.options[min_interval.length -1] = null; + min_interval.options[min_interval.length -1] = null; + } + + if (min_interval.length == 5) + { + min_interval.options[min_interval.length -1] = null; + } + + min_interval.disabled = false; + } + + // folgende Zeile bewirkt einen Wechsel des Textes PROFILE_PNAME(C) + min_interval_txt.firstChild.data = txt; +}; + +MD_proofClassic = function(id) +{ + // die hardcodierten id's muessen noch dynamisiert werden + var arId = id.split("_"); + + var min_interval = $(arId[0] + "_" + arId[1] + "_" + arId[2] + "_" + (parseInt(arId[3]) + 1)); + + if (min_interval.value == min_interval.length - 1) + { + $(id).options[0].selected = true; + + } else + { + $(id).options[1].selected = true; + } + + MD_minInterval(id); +}; + +MD_set_h_m_s = function(id_h, id_m, id_s) +{ + var h, m, s; + switch ($F(id_s)) { + + case "15": + h = '00'; m = '00'; s = '15'; + break; + case "30": + h = '00'; m = '00'; s = '30'; + break; + case "60": + h = '00'; m = '01'; s = '00'; + break; + case "120": + h = '00'; m = '02'; s = '00'; + break; + case "240": + h = '00'; m = '05'; s = '00'; //klassich minimum 5 Minuten (4 Min + Toleranz) + break; + } + + $(id_h).value = h; + $(id_m).value = m; + $(id_s).value = s; +}; + +MD_setMode = function(id_on_time_mode, channel, id_on_time) +{ + MD_checkMaxValue(id_on_time, channel, (id_on_time_mode)); +}; + +// Converts the value of the parameter ILLUMINATION of e. g. a HmIP-MotionDetector (very high values possible) +// to a valid decision value (0 - 255) for the use of direct links (CONDITION_LO/HI) +MD_convertIlluminationToDecisionValue = function(value, typeTransmitter, devFwVersion) { + conInfo("Here we work with the brightness value calculated with the old method"); + var result = 0, + linearLimit = 80, + resultDivider = 20, + msb = "0x80000", + exp = 19, + val = parseInt(value); + + var arFw = devFwVersion.split("."), + fwMajor = parseInt(arFw[0]), + fwMinor = parseInt(arFw[1]), + fwPatch = parseInt(arFw[2]); + + var idHmIP = "HmIP-"; + + // TWIST-1746 + if ( + typeTransmitter == idHmIP + "SPI" + || typeTransmitter == idHmIP + "SMI55" + || ((typeTransmitter == idHmIP + "SMI") && (((fwMajor == 1) && (fwMinor >= 5)) || ((fwMajor == 1) && (fwMinor == 4) && (fwPatch >= 10)))) + || ((typeTransmitter == idHmIP + "SMO") && (((fwMajor == 1) && (fwMinor >= 3)) || ((fwMajor == 1) && (fwMinor == 2) && (fwPatch >= 10)))) + ) { + linearLimit = 75; + resultDivider = 21; + msb = "0x800000"; + exp = 23; + conInfo("Calculation lux -> condition value for SPI / SMI55 / SMI fw >= 1.4.10 / SMO fw >= 1.2.10"); + } else { + conInfo("Calculation lux -> condition value for SMI fw < 1.4.10 / SMO fw < 1.2.10"); + } + + val *= 10; + + if (val < linearLimit) {return val;} // Linear-Grenze + + while ((val & msb) == 0) { + msb >>= 1; + exp--; + } + + var result = (((val^msb) << 8) / msb) | (exp << 8); + result /= resultDivider; + + if (result > 255) { + result = 255; + } + + return parseInt(result); +}; + +// SPHM-301 +MD_convertIlluminationToDecisionValue_V2 = function(value) { + conInfo("Here we work with the brightness value calculated with the new method"); + var brightness = (isNaN(value)) ? 0 : parseInt(Math.abs(value) * 100), + convBrightness, + offset_x, + value_a0, + value_a1, + valueValid = true; + + switch (true) { + case (brightness <= Math.pow(10,1)): + offset_x = 0; + value_a0 = 0; + value_a1 = 1; + break; + case (brightness <= Math.pow(10,2)): + offset_x = 10; + value_a0 = 10; + value_a1 = 0.2; + break; + case (brightness <= Math.pow(10,3)): + offset_x = 100; + value_a0 = 28; + value_a1 = 0.05; + break; + case (brightness <= Math.pow(10,4)): + offset_x = 1000; + value_a0 = 73; + value_a1 = 0.005; + break; + case (brightness <= Math.pow(10,5)): + offset_x = 10000; + value_a0 = 118; + value_a1 = 0.0005; + break; + case (brightness <= Math.pow(10,6)): + offset_x = 100000; + value_a0 = 163; + value_a1 = 0.00005; + break; + case (brightness <= Math.pow(10,7)): + offset_x = 1000000; + value_a0 = 208; + value_a1 = 0.000005; + break; + default: valueValid = false; + + } + if (valueValid) { + convBrightness = brightness - offset_x; + convBrightness = convBrightness * value_a1; + convBrightness = convBrightness + value_a0; + convBrightness = convBrightness + 0.5; + return parseInt(convBrightness); + } + return 253; +}; + +SetSensitivityOfMotionDetection = function(sensElmID) { + var sensElm = jQuery("#" + sensElmID ), + sensElmFirstOption = jQuery("#" + sensElmID + " > option:first-child"), + lblSensorImpulsElm = jQuery("#lblSensorImpuls"), + extendedOptions = jQuery("#extendedOptions"); + + if (parseInt(sensElm.val()) > 1) { + sensElmFirstOption.text("1"); + lblSensorImpulsElm.text(translateKey("motionDetectorEventFilterNumberC")); // Sensor-Impulsen innerhalb + extendedOptions.show(); + } else { + sensElmFirstOption.text("jedem"); + lblSensorImpulsElm.text(translateKey("motionDetectorEventFilterNumberB")); // Sensor-Impuls + extendedOptions.hide(); + } +}; + +ProofFreeTime = function(id, min, max) +{ + var input = $(id); + input.value = input.value.replace(/,/g,"."); + //1 + var ausdr_float = /\d+.\d+/; + var ausdr_int = /\d+/; + if (ausdr_float.test(input.value)) {var wert_float = ausdr_float.exec(input.value); wert_float = wert_float[0];} + if (ausdr_int.test(input.value)) {var wert_int = ausdr_int.exec(input.value); wert_int = wert_int[0];} +// if (min == 0) {min = '00'}; + var wert = '00'; + + if (! wert_int) {wert = '00';} //2 + if (! isNaN(wert_int)) {wert = wert_int;} + if (! isNaN(wert_float)) {wert = wert_float;} + + + if (id.indexOf('hour_') != -1) + { + + if (wert < min) {wert = min;} + if ((wert * 3600) > max) + { + input.value = (max / 3600); + + min_id = id.replace('hour_', 'min_'); + input = $(min_id); + input.value = '00'; + + sec_id = id.replace ('hour_', 'sec_'); + input = $(sec_id); + input.value = '00'; + } else {input.value = wert;} + + } + else + { + if (id.indexOf('min_') != -1) + { + if (wert < min) {wert = min;} + hour_id = id.replace('min_', 'hour_'); + hour_input = $(hour_id); + if (hour_input.value >= (max / 3600)) {input.value = '00';} else {input.value = wert;} + } + else + { + if(id.indexOf('sec_') != -1) + { + if (wert < min) {wert = min;} + hour_id = id.replace('sec_', 'hour_'); + hour_input = $(hour_id); + if (hour_input.value >= (max / 3600)) { input.value = '00';} else {input.value = wert;} + } + } + } + + //3 + var prn = id.split("_")[1]; + var pref = 1; + + try + { + x = $F("md_min_interval_" + prn + "_" + pref); + if (x) throw "true"; + else throw "false"; + } + catch (ergebniss) + { + if (ergebniss == "true") + { + var hit = 1; + } else hit = 0; + } + + if ($F('dev_descr_sender_tmp').split("-")[0] == "MOTION_DETECTOR" && hit == 1) + { + var prn = id.split("_")[1]; + var pref = 1; + var md_verweild = "md_verweildauer_" + prn + "_" + pref; + var md_min_interval = "md_min_interval_" + prn + "_" + pref; + + // enthaelt den Wert des Geraeteparameters 'SHORT_ON_TIME_MODE'. Moegl. Werte 0 und 1 + var absolute_minimal = $F(md_min_interval).split(",")[1]; + + try + { + if ($(md_verweild).data) throw true; + else throw false; + } + catch (ergebniss) + { + if (ergebniss == true) md_verweildauer = true; + else md_verweildauer = false; + } + + //if (md_verweildauer == true) {$('md_verweildauer').data = "Verweildauer";} + if (md_verweildauer == true) {$('md_verweildauer').data = translateKey("motionDetectorRetentionTime");} + + if (absolute_minimal == 1) //wenn Modus 'minimal' + { + var profile = $(id).name.split("_"); + //4 + var param_tmp = $('separate_receiver_' + profile[1] + "_" + profile[2]).name.split("|"); + param_tmp = param_tmp[0].split("_"); + var param = param_tmp[1] + "_" + param_tmp[2]; + + if (param == "ON_TIME" || param == "OFF_TIME") + { + var min_interval = $F(md_min_interval).split(",")[0]; // enthaelt den Wert des Kanalparameters 'Mindestsendeabstand'. Moegl. Werte 0, 1, 2, 3, 4 + var min_value = [15, 30, 60, 120, 240]; + var h = "hour_" + id.split("_")[1] + "_" + id.split("_")[2] + "_" + id.split("_")[3]; + var m = h.replace('hour_', 'min_'); + var s = h.replace('hour_', 'sec_'); + var t = (parseFloat($F(h)) * 3600) + (parseFloat($F(m)) * 60) + parseFloat($F(s)); + + if (t < (min_value[min_interval] + 1) && $(id).selectedIndex !== 0 ) + { + $(s).value = min_value[min_interval]; + MD_set_h_m_s(h, m, s); + } + } + //if (md_verweildauer == true) {$('md_verweildauer').data = "Mindestverweildauer";} + if (md_verweildauer == true) {$('md_verweildauer').data = translateKey("motionDetectorMinimumRetentionTime");} + } + } +}; + +ProofFreePercent = function(id, min, max) +{ + var input = document.getElementById(id); + + var ausdr_float = /\d+.\d+/; + var ausdr_int = /\d+/; + if (ausdr_float.test(input.value)) + { + var wert_float = ausdr_float.exec(input.value); + wert_float = wert_float[0]; + } + if (ausdr_int.test(input.value)) + { + var wert_int = ausdr_int.exec(input.value); + wert_int = wert_int[0]; + } + if (min == 0) { min = '00'; } + var wert = '00'; + + if (!(wert_int)) { wert = '00'; } //1 + if (!(isNaN(wert_int))) { wert = wert_int; } + if (!(isNaN(wert_float))) { wert = wert_float; } + + if (wert < (min * 100)) { wert = (min * 100); } + if (wert > (max * 100)) { wert = (max * 100); } + + input.value = wert; +}; + +ProofFreeTemp = function(id, min, max, unit) +{ + var input = document.getElementById(id); + var ausdr_float = /\d+.\d+/; + var ausdr_int = /\d+/; + if (ausdr_float.test(input.value)) + { + var wert_float = ausdr_float.exec(input.value); + wert_float = wert_float[0]; + } + if (ausdr_int.test(input.value)) + { + var wert_int = ausdr_int.exec(input.value); + wert_int = wert_int[0]; + } + var wert = min; + + if (unit) //1 + { + min = ((min * 9) / 5) + 32 ; + max = ((max * 9) / 5) + 32 ; + } + + if (!(wert_int)) {wert = min; } //2 + if (!(isNaN(wert_int))) {wert = wert_int; } + if (!(isNaN(wert_float))) {wert = wert_float; } + + if (wert < min) { wert = min; } + if (wert > max) { wert = max; } + + input.value = wert; +}; + +ProofFreeValue = function(id, min, max) +{ + var input = document.getElementById(id); + var ausdr_float = /\d+.\d+/; + var ausdr_int = /\d+/; + if (ausdr_float.test(input.value)) + { + var wert_float = ausdr_float.exec(input.value); + wert_float = wert_float[0]; + } + if (ausdr_int.test(input.value)) + { + var wert_int = ausdr_int.exec(input.value); + wert_int = wert_int[0]; + } + var wert = min; + + if (!(wert_int)) { wert = min; } //1 + if (!(isNaN(wert_int))) { wert = wert_int; } + if (!(isNaN(wert_float))) { wert = wert_float; } + + + if (wert < min) {wert = min; } + if (wert > max) {wert = max; } + + input.value = wert; +}; + +proofMinMax4Voltage_X = function(param) { + var voltage0 = "VOLTAGE_0", + voltage100= "VOLTAGE_100", + voltage0Elm = jQuery("[name='"+voltage0+"']")[0], + voltage100Elm = jQuery("[name='"+voltage100+"']")[0], + val0 = roundValue05(parseFloat(jQuery(voltage0Elm).val())), + val100 = roundValue05(parseFloat(jQuery(voltage100Elm).val())); + + if (param == voltage0) { + jQuery(voltage0Elm).val((val0 >= val100) ? val100 - 0.5 : val0); + } + if (param == voltage100) { + jQuery(voltage100Elm).val((val100 <= val0) ? val0 +0.5 : val100); + } +}; + +add_HMW_onchange_ = function(ch_type) +{ + switch (ch_type) { + + case "INPUT_OUTPUT": + + var inputType = document.getElementsByName("INPUT_TYPE"); + var behaviour = document.getElementsByName("BEHAVIOUR"); + + for (var loop=0;loop < inputType.length;loop++) + { + var onchange = document.createAttribute("onchange"); + onchange.nodeValue= "alert('A')"; + inputType[loop].setAttributeNode(onchange); + } + + for (loop=0;loop < behaviour.length;loop++) + { + var onchange = document.createAttribute("onchange"); + onchange.nodeValue= "alert('B')"; + behaviour[loop].setAttributeNode(onchange); + } + break; + + case "KEY" : + + var inputType = document.getElementsByName("INPUT_TYPE"); + + for (var loop=0;loop < inputType.length;loop++) + { + var onchange = document.createAttribute("onchange"); + onchange.nodeValue= "alert('C')"; + inputType[loop].setAttributeNode(onchange); + } + break; + + default: + break; + } + +}; + +HMW_setIOType = function(elem) +{ + // Zeigt die einstellbaren Parameter des Kanals entsprechend der gewählten Einstellung an. + // Es wird zwischen Schalter und Taster unterschieden. + + // gewählte Einstellung + var sel = elem.selectedIndex; + + // Schalter (0) oder Taster (1) + var type = elem.options[sel].value; + + var tr = elem.parentNode.parentNode.nextSibling.nextSibling; + + switch (type) { + + case "0": + tr.style.visibility = "hidden"; + tr.style.display = "none"; + break; + + case "1": + tr.style.visibility = "visible"; + tr.style.display = ""; + break; + + default: + break; + } +}; + +HMW_setBehaviour = function(id) +{ + // Zeigt die einstellbaren Parameter des Kanals entsprechend der gewählten Einstellung an. + // Es wird zwischen Ein- und Ausgang unterschieden. + + // wird von tcl erledigt, da bei Ein- u. Ausgang verschiedene Parameter verwendet werden, + // muß die Änderung zuerst an den Aktor gesendet werden. +}; + +HMW_WebUIsetChannel = function(id, ch_type) +{ + id = id.split("=")[1]; + id = id.substring(1, id.length -1); + + var elem = document.getElementById(id); + + switch (ch_type) { + + case "INPUT_OUTPUT": + + switch (elem.name) { + case "INPUT_TYPE": + HMW_setIOType(elem); + $(id).observe('change', function(event) {HMW_setIOType(elem);}); + break; + case "BEHAVIOUR": + $(id).observe('change', function(event) {HMW_setBehaviour(elem);}); + break; + default: + break; + } + + break; + + case "KEY": + + switch (elem.name) { + case "INPUT_TYPE": + HMW_setIOType(elem); + $(id).observe('change', function(event) {HMW_setIOType(elem);}); + break; + default: + break; + } + + break; + } +}; + + +showHintPrgLink = function(channel, prgExists) { + var channel = parseInt(channel), + classMultiMode = jQuery(".j_multiMode_" + channel)[0], + tableElm = jQuery(".ProfileTbl tbody").parent().parent()[channel], + elm = jQuery(".j_multiMode_" + channel). find("[name='CHANNEL_OPERATION_MODE']")[0]; + + jQuery(elm).prop("disabled", true); + + if (typeof classMultiMode == "object") { + if (prgExists) { + jQuery(classMultiMode).after("
" + translateKey("hintPrgExists") + "
"); + } else { + arChnHasLinks[channel] = true; + jQuery(classMultiMode).after("
" + translateKey("hintLinkExists") + "
"); + } + } else { + if (prgExists) { + jQuery(tableElm).append("
" + translateKey("hintPrgExists") + "
"); + } else { + arChnHasLinks[channel] = true; + jQuery(tableElm).append("
" + translateKey("hintLinkExists") + "
"); + } + } +}; + +showHintInternalLink = function(channel) { + var channel = parseInt(channel), + classMultiMode = jQuery(".j_multiMode_" + channel)[0], + txtHint = "
" + translateKey("hintInternalLinkExists") + "
"; + + if (typeof classMultiMode == "object") { + jQuery(classMultiMode).after(txtHint); + } else { + var tableElm = jQuery(".ProfileTbl tbody").parent().parent()[channel]; + jQuery(tableElm).append(txtHint); + } +}; + +ShowHintIfProgramExists = function(id, ch) { + homematic("Channel.hasProgramIds", {id: id}, function(result, error) { + if (result) { + showHintPrgLink(ch, true); + } else { + if(arChnHasLinks[parseInt(ch)] != true) { + var elm = jQuery(".j_multiMode_" + ch). find("[name='CHANNEL_OPERATION_MODE']")[0]; + jQuery(elm).prop("disabled", false); + } + } + }); +}; + +RF_existsLink = function(deviceType, ch, ch_type, internalLinkOnly) { + var arDevMultiModeException = []; + + // The ch_type of a HM-MOD-EM-8 is KEY which is very generic. Therefore, for this device we have to check the device type. + switch(deviceType) { + case "HM-MOD-EM-8": + showHintPrgLink(ch, false); + break; + default: + break; + } + + switch(ch_type) { + case "MULTI_MODE_INPUT_TRANSMITTER": + arDevMultiModeException = ["HmIP-FSI16", "HmIP-DRDI3", "HmIP-BDT-I"]; + if ((arDevMultiModeException.indexOf(deviceType) == -1) || (internalLinkOnly == 0)) { + showHintPrgLink(ch, false); + } else { + showHintInternalLink(ch); + } + break; + default: + break; + } +}; + +HMW_existsLink = function(channel, ch_type) +{ + //var hint = document.createTextNode("Es besteht mindestens eine Verknüpfung. Daher sind einige Funktionen gesperrt."); + var hint = document.createTextNode(translateKey("hintLinkExists")); + var new_tr = document.createElement("tr"); + var new_td = document.createElement("td"); + var colspan = document.createAttribute("colspan"); + var class_attention = document.createAttribute("class"); + colspan.nodeValue = "5"; + class_attention.nodeValue = "attention ch_" + channel; + + if ($$('.ch_' + channel).length == 0) + { + switch (ch_type) { + + case "INPUT_OUTPUT": + var elem1 = $('separate_CHANNEL_' + channel + '_3'); // Eingangsbeschaltung + var elem2 = $('separate_CHANNEL_' + channel + '_6'); // Funktion Eingang + var elem3 = $('separate_CHANNEL_' + channel + '_4'); // Funktion Ausgang + + if (elem1.name == 'INPUT_TYPE') + { + elem1.disabled = true; + elem2.disabled = true; + + var td = elem1.parentNode.parentNode.parentNode.appendChild(new_tr).appendChild(new_td); + td.setAttributeNode(colspan); + td.setAttributeNode(class_attention); + td.appendChild(hint); + } + else + { + elem3.disabled = "true"; + + var td = elem3.parentNode.parentNode.parentNode.appendChild(new_tr).appendChild(new_td); + td.setAttributeNode(colspan); + td.setAttributeNode(class_attention); + td.appendChild(hint); + } + break; + + case "KEY": + var elem1 = $('separate_CHANNEL_' + channel + '_3'); // Eingangsbeschaltung + elem1.disabled = true; + + var td = elem1.parentNode.parentNode.parentNode.appendChild(new_tr).appendChild(new_td); + td.setAttributeNode(colspan); + td.setAttributeNode(class_attention); + td.appendChild(hint); + break; + + default: + break; + } + } +}; + + + +TextColor = function(c) +{ + if (!c) { return WebUI.getColor("windowText"); } + else { return WebUI.getColor("gray"); } +}; + +VirtualChannel_help = function(ch, lc) +{ + var virtualChHelpElm = jQuery("#virtual_ch_help_" + ch), + virtualChHelpElm2 = jQuery("#virtual_ch_help2_" + ch), + virtualHelpButtonElm = jQuery("#virtual_help_button_" + ch), + virtualHelpButtonElm2 = jQuery("#virtual_help_button2_" + ch); + + if (lc != "lc2") { + if (virtualHelpButtonElm.val() == translateKey("genericBtnTxtHelp")) { + virtualChHelpElm2.hide(); + virtualChHelpElm.show(); + virtualHelpButtonElm.val(translateKey("genericBtnTxtHelpOff")); + virtualHelpButtonElm2.val(translateKey("genericBtnTxtHelp")); + } else { + virtualChHelpElm.hide(); + virtualHelpButtonElm.val(translateKey("genericBtnTxtHelp")); + } + } else { + if (virtualHelpButtonElm2.val() == translateKey("genericBtnTxtHelp")) { + virtualChHelpElm.hide(); + virtualChHelpElm2.show(); + virtualHelpButtonElm.val(translateKey("genericBtnTxtHelp")); + virtualHelpButtonElm2.val(translateKey("genericBtnTxtHelpOff")); + } else { + virtualChHelpElm2.hide(); + virtualHelpButtonElm2.val(translateKey("genericBtnTxtHelp")); + } + } +}; + + +WDS_DisableOnTime = function(selectelem) +{ + // Schaltet beim WATERDETECTIONSENSOR die Einschaltdauer + // im Profil Änderungsignal / Subset Aus bei .... + // unsichtbar + + if (selectelem.selectedIndex >= 5) + { + $('on_time').style.visibility = 'hidden'; + } + else + { + $('on_time').style.visibility = 'visible'; + } +}; + +WEATHER_change_thres = function(id) +{ + //1 + switch_dir = $('separate_receiver_' + id).selectedIndex; //2 + WEATHER_check_dir(); +}; + +WEATHER_check_dir = function() +{ + var newSensor = "HM-WDS100-C6-O-2"; + var sensorTypeDesc = jQuery("#weatherSensor").val(); + var selectedWindDirection = jQuery("[name=\"subset_1_1\"]").prop("selectedIndex"); + + var ein; + var aus; + //1 + + if (sensorTypeDesc != newSensor) { + if (switch_dir) { + //ein = document.createTextNode("Einschaltschwelle"); + ein = document.createTextNode(translateKey("upperStormThreshold")); + //aus = document.createTextNode("Ausschaltschwelle"); + aus = document.createTextNode(translateKey("lowerStormThreshold")); + } + else { + //ein = document.createTextNode("Ausschaltschwelle"); + ein = document.createTextNode(translateKey("lowerStormThreshold")); + //aus = document.createTextNode("Einschaltschwelle"); + aus = document.createTextNode(translateKey("upperStormThreshold")); + } + } else { + // new Sensor + var ctON = jQuery("[name=\"SHORT_CT_ON\"]").prop("selectedIndex"); + var ctOFF = jQuery("[name=\"SHORT_CT_OFF\"]").prop("selectedIndex"); + + if (switch_dir == 1) { + //ein = document.createTextNode("Einschaltschwelle"); + ein = document.createTextNode(translateKey("upperStormThreshold")); + //aus = document.createTextNode("Ausschaltschwelle"); + aus = document.createTextNode(translateKey("lowerStormThreshold")); + $('ein').replaceChild(ein, $('ein').firstChild); + $('aus').replaceChild(aus, $('aus').firstChild); + return; + } + else if (switch_dir == 0) { + //ein = document.createTextNode("Ausschaltschwelle"); + ein = document.createTextNode(translateKey("lowerStormThreshold")); + //aus = document.createTextNode("Einschaltschwelle"); + aus = document.createTextNode(translateKey("upperStormThreshold")); + $('ein').replaceChild(ein, $('ein').firstChild); + $('aus').replaceChild(aus, $('aus').firstChild); + return; + } + + // X GE LO = 0 + // X GE HI = 1 + // X LT LO = 2 + // X LT HI = 3 + // Starker Wind EIN, schwacher Wind AUS / oder EIN nur bei starkem Wind, nicht aus (2. Profil) + if ((ctON == 2 && ctOFF == 1) || (ctON == 1 && ctOFF == 1)) { + //ein = document.createTextNode("Einschaltschwelle"); + ein = document.createTextNode(translateKey("upperStormThreshold")); + //aus = document.createTextNode("Ausschaltschwelle"); + aus = document.createTextNode(translateKey("lowerStormThreshold")); + } + // Starker Wind AUS, schwacher Wind EIN + if (ctON == 1 && ctOFF == 2) { + //ein = document.createTextNode("Ausschaltschwelle"); + ein = document.createTextNode(translateKey("lowerStormThreshold")); + //aus = document.createTextNode("Einschaltschwelle"); + aus = document.createTextNode(translateKey("upperStormThreshold")); + } + + + + } + try { + $('ein').replaceChild(ein, $('ein').firstChild); + $('aus').replaceChild(aus, $('aus').firstChild); + } catch (e) {} +}; + +WEATHER_check_expert = function() +{ + //1 + + try //2 + { + high = $F('separate_sender_0_3'); + if (high) { throw "true"; } + else { throw "false"; } + } + catch (ergebniss) + { + if (ergebniss == "true") + { + high = $F('separate_sender_0_3'); + low = $F('separate_sender_0_4'); + if (parseInt(low) > parseInt(high)) return true; //3 + else return false; + } else return "noExpert"; + } +}; + +WEATHER_check_profile_switch = function(selectelem) +{ + var actor = $F('dev_descr_receiver_tmp'); + + if (actor != "SWITCH") {switch_on_off = false; return 0;} + + if ((((selectelem.options[selectelem.selectedIndex].value) == "1") && ($('sender_profiles').options[$('sender_profiles').selectedIndex].value == "1")) || + (((selectelem.options[selectelem.selectedIndex].value) == "1") && ($('receiver_profiles').options[$('receiver_profiles').selectedIndex].value == "1")) || + (((selectelem.options[selectelem.selectedIndex].value) == "0") && ($('sender_profiles').options[$('sender_profiles').selectedIndex].value == "1") && ($('receiver_profiles').options[1].value == "1")) || + (((selectelem.options[selectelem.selectedIndex].value) == "1") && ($('receiver_profiles').options[$('receiver_profiles').selectedIndex].value == "0") && ($('receiver_profiles').options[1].value == "1"))) + { + switch_on_off = true; //1 + return 1; + } + else + { + switch_on_off = false; //2 + return 0; + } +}; + +WEATHER_check_weather = function() +{ + //1 + var link = "", linkPeer = ""; + try { + link = $('dev_descr_sender_tmp').value.split("-"); + linkPeer = $('dev_descr_receiver_tmp').value.split("-"); + if (link) { throw true; } + } catch (e) { + if ( e == true) { + if (((link[0] == "WEATHER") || (link[0] == "WEATHER_2")) && (linkPeer[0] != "WEATHER_RECEIVER")) return true; + else return false; + } else return false; + } +}; + +WEATHER_put_desc = function(id,x) +{ + //1 + + if ((WEATHER_check_expert()) && (x == 0)) //2 + { +// $('sender_profiles').options[0].selected = true; +// $('separate_sender_1_1').options[4].selected = true; +// $('separate_sender_1_2').options[2].selected = true; + } + else if (WEATHER_check_expert() != "noExpert" && x == 1) //3 + { + $('separate_sender_0_3_temp').value = $('separate_sender_1_1').options[$('separate_sender_1_1').selectedIndex].value; + $('separate_sender_0_4_temp').value = $('separate_sender_1_2').options[$('separate_sender_1_2').selectedIndex].value; + } + + var upper_index = $('separate_sender_1_1').selectedIndex; //4 + var lower_index = $('separate_sender_1_2').selectedIndex; //5 + + var desc = []; + var upper_desc = document.getElementById('upper_desc'); + var lower_desc = document.getElementById('lower_desc'); + var elem = id.split("_"); + + //6 + $('separate_sender_1_1').options[0].disabled = true; + $('separate_sender_1_1').options[0].style.color = WebUI.getColor("grayText"); + if ($('separate_sender_1_1').selectedIndex == 0) { $('separate_sender_1_1').options[1].selected = true; } + + for (var loop = 1; loop <= 12; loop++) + { + $('separate_sender_1_1').options[loop].style.color = WebUI.getColor("windowText"); //7 + $('separate_sender_1_1').options[loop].disabled = false; + } + + if ($('lower_tab').style.display == "block") + { + for (loop = 1; loop <= lower_index; loop++) + { + $('separate_sender_1_1').options[loop].style.color = WebUI.getColor("grayText"); //8 + $('separate_sender_1_1').options[loop].disabled = true; + } + } + + if ((lower_index >= upper_index) && ($('lower_tab').style.display == "block") && (switch_on_off == true)) + { + if (lower_index <= 11) + { + $('separate_sender_1_1').selectedIndex = lower_index + 1; + if (WEATHER_check_expert() != "noExpert") + $('separate_sender_0_3_temp').value = $('separate_sender_1_1').options[$('separate_sender_1_1').selectedIndex].value; + } + else $('separate_sender_1_1').selectedIndex = 12; + } + + for (loop = 0; loop <= 12; loop++) { + desc[loop] = document.createTextNode(unescape(translateKey("windDesc"+loop))); + } + + switch (elem[3]) { + case ("1"): + upper_desc.replaceChild(desc[$(id).selectedIndex], upper_desc.firstChild); + break; + case ("2"): + lower_desc.replaceChild(desc[$(id).selectedIndex], lower_desc.firstChild); + break; + default: + break; + } + + window.setTimeout("WEATHER_translate();",500) ; +}; + +WEATHER_translate= function() { + jQuery('#upper_desc').text(translateKey(jQuery('#upper_desc').text())); + jQuery('#lower_desc').text(translateKey(jQuery('#lower_desc').text())); + jQuery('#ein').text(translateKey(jQuery('#ein').text())); + jQuery('#aus').text(translateKey(jQuery('#aus').text())); +}; + +WEATHER = function(selectelem) +{ + var loop; + + if (WEATHER_check_weather()) //1 + { + if ((((selectelem.options[selectelem.selectedIndex].value) == "2") && ($('sender_profiles').options[$('sender_profiles').selectedIndex].value == "1")) || + (((selectelem.options[selectelem.selectedIndex].value) == "1") && ($('receiver_profiles').options[$('receiver_profiles').selectedIndex].value == "2"))) + + { + //2 + switch_on_off = false; + + if ($('lower_tab')) { + $('lower_tab').style.display = "none"; + } + $('separate_sender_1_2').options[0].selected = true; // Ausschaltschwelle auf 0 setzten + + //var ein = document.createTextNode("Einschaltschwelle"); + var ein = document.createTextNode(translateKey("upperStormThreshold")); + $('ein').replaceChild(ein, $('ein').firstChild); //3 + + $('separate_sender_1_1').options[0].disabled = true; //4 + $('separate_sender_1_1').options[0].style.color = WebUI.getColor("grayText"); //5 + + for (loop = 1; loop <= 12; loop++) + { + $('separate_sender_1_1').options[loop].style.color = WebUI.getColor("windowText"); //6 + $('separate_sender_1_1').options[loop].disabled = false; //7 + } + } + else + { + try + { + + if (WEATHER_check_profile_switch(selectelem) == 1) //8 + { + throw "block"; + } else throw "none"; + } + catch (ergebniss) + { + if (ergebniss == "none") //9 + { + switch_on_off = false; + $('lower_tab').style.display = "none"; + $('separate_sender_1_2').options[0].selected = true; // Ausschaltschwelle auf 0 setzten + + $('separate_sender_1_1').options[0].disabled = true; //10 + $('separate_sender_1_1').options[0].style.color = WebUI.getColor("grayText") ; //11 + + for (loop = 1; loop <= 12; loop++) + { + $('separate_sender_1_1').options[loop].disabled = false; + $('separate_sender_1_1').options[loop].style.color = WebUI.getColor("windowText"); //12 + } + WEATHER_check_dir(); //13 + } + else if (ergebniss == "block") //14 + { + + $('lower_tab').style.display = "block"; //15 + + var selected_high = $('separate_sender_1_1').selectedIndex; + var selected_low = $('separate_sender_1_2').selectedIndex; + + if (selected_low >= selected_high) //16 + { + $('separate_sender_1_2').options[0].selected = true; + + $('separate_sender_1_1').options[0].style.color = WebUI.getColor("grayText") ; //17 + $('separate_sender_1_1').options[0].disabled = true; + + //var desc = document.createTextNode(unescape("Keine Luftbewegung, Rauch steigt senkrecht empor.")); + //var desc = document.createTextNode(unescape(translateKey("hintNoAirFlow"))); + var desc = document.createTextNode(unescape(translateKey("windDesc0"))); + lower_desc.replaceChild(desc, lower_desc.firstChild); + } + else //18 + { + for (loop = 0; loop <= $('separate_sender_1_2').selectedIndex; loop++) + { + $('separate_sender_1_1').options[loop].disabled = true; + $('separate_sender_1_1').options[loop].style.color = WebUI.getColor("grayText"); //19 + } + } + + prn = selectelem.options[selectelem.selectedIndex].value; //20 + + switch_dir = $('separate_receiver_' + prn + '_1').selectedIndex; //21 + WEATHER_check_dir(); //22 + } + } + } + } +}; + +isJSFunc_active = function(fbib) { + //prueft, ob die Funktionsbibl. schon geladen ist + if (exists_bib[fbib] == true) return true; //schon aktiv + else return false; // nicht aktiv +}; + +load_JSFunc = function(fbib) { + //fbib gibt die gewuenschte Funktionsbibliothek incl. Pfad an + + if (isJSFunc_active(fbib) == false) // falls die Bibliothek noch nicht geladen wurde + { +// alert('Bib wird geladen'); + new Ajax.Request(fbib, + { + method: 'get', + + asynchronous: false, + + onSuccess: function(success) { + eval(success.responseText); + exists_bib[fbib] = true; //Bibliothek geladen + }, + + onFailure: function(failure) { + alert(fbib + ': ' + failure.statusText); + } + } + ); + } +}; + +showParamHelp = function(topic, x , y) { + var width = (! isNaN(x)) ? x : 450; + var height = (! isNaN(y)) ? y : 260; + MessageBox.show(translateKey("HelpTitle"), translateKey(topic), "", width, height); +}; + +selectWGDIcon = function(chn, elmId, activeIcon) { + var dlg = new WGDSelectIconDialog(translateKey("lblBaseImage"), "
", function(btnPress) { + if (btnPress == this.RESULT_YES) { + jQuery("#" + elmId).val(this.getSelectedIconNo()); + jQuery("#image_" + chn ).attr("src", this.getSelectedIcon()); + } + }, "html"); + dlg.btnTextNo(translateKey("btnCancel")); + dlg.btnTextYes(translateKey("btnOk")); + dlg.chn = chn; + dlg.activeIcon = parseInt(activeIcon); +}; + + +// Test +rfd_test = function() { + homematic('Interface.isPresent', {"interface": "BidCos-RF"}, function(result, error) { + if (result === true) + { + alert("rfd läuft"); + } + else + { + alert(Object.toJSON(error) + " Achtung: rfd läuft nicht!"); + } + }); +}; + +preventOnOffNonActive= function(elm) { + var receiverType = jQuery("#receiver_paramid").val(); + + if (receiverType && (receiverType != "linkHmIP_HEATING_KEY_RECEIVER")) { + var arFooterElems = jQuery(".FooterButton"), + arOnOffElems = jQuery("[name='" + elm.name + "']"), + onOffNotActive = 0, + chn = elm.name.split("_")[1], + counter; + + if (arOnOffElems.length == 2) { + counter = 1; + jQuery.each(arOnOffElems, function (index, elem) { + if (jQuery(elem).val() == 0) { + onOffNotActive++; + } + }); + } else if (arOnOffElems.length == 4) { + counter = 0; + if ( + ((jQuery(arOnOffElems[0]).val() == 0) && (jQuery(arOnOffElems[1]).val() == 0)) || + ((jQuery(arOnOffElems[2]).val() == 0) && (jQuery(arOnOffElems[3]).val() == 0)) + ) { + onOffNotActive++; + } + } + + if (onOffNotActive > counter) { + arFooterElems[1].hide(); + arFooterElems[2].hide(); + jQuery(".j_hint").remove(); + jQuery("#receiver_param_" + chn).append("

" + translateKey('hintLinkParamOnOffNotActive') + "

"); + + } else { + jQuery(".j_hint").remove(); + arFooterElems[1].show(); + arFooterElems[2].show(); + } + } +}; + +addAbortEventSendingChannels = function(chn, prn, devAddress, value) { + var hookElm_1 = jQuery("#hookAbortEventSendingChannels_1_"+ chn), + hookElm_2 = jQuery("#hookAbortEventSendingChannels_2_"+ chn), + device = DeviceList.getDeviceByAddress(devAddress), + counter = 0, + html, html_1, html_2; + + setAbortEventSendingChannels = function(chn, prn) { + var valElm = jQuery("#separate_CHANNEL_" + chn+ "_" + prn), + arChkBoxes = jQuery("[name='abortEventSendingCh_"+chn+"']"), + val = 0; + + jQuery.each(arChkBoxes, function(index, chkBox) { + if(chkBox.checked) { + val += parseInt(chkBox.value); + } + }); + + valElm.val(val); + }; + if (typeof device != "undefined") { + jQuery.each(device.channels, function (index, channel) { + + if ( + channel.channelType == "KEY_TRANSCEIVER" + || channel.channelType == "MULTI_MODE_INPUT_TRANSMITTER" + || channel.channelType == "ACCESS_TRANSCEIVER" + ) { + + html = (counter == 0 || counter == 16) ? "" : html; + + html += "
"; + html += ""; + if (isBitSet(value, counter)) { + html += ""; + } else { + html += ""; + } + html += ""; + html += ""; + if (isBitSet(value, counter)) { + html += ""; + } else { + html += ""; + } + html += "${name}<\/th>\n + + + + + {else}\n + + + + \n + + + ${name} \n + + {if sortDescend}\n + + \n + + {else}\n + + \n + + {\/if}\n + <\/th>\n + {\/if}\n +{\/macro}\n +
\n +
Kanalauswahl<\/div>\n +
\n + \n + \n + \n + \n + \n + \n + \n + \n + <\/colgroup>\n + \n + \n + ${printHead(\"Name\", \"NAME\", \"thName\")}\n + \n + ${nameFilter.getHTML()}\n + \n + {eval}actualDeviceAddress = \"\";{\/eval}\n +\n + {for channel in channels}\n + {if ((channel.device.inInbox != true) && (channel.address != \"BidCoS-RF:0\")) }\n + {var virtualChannel = \"\"}\n + {var classExpertOnly = \"hidden j_expertChannel\"}\n + {var channelTypeID = channel.deviceType.id.toUpperCase()}\n +\n + {if channel.channelType == \"VIRTUAL_DIMMER\"} {var virtualChannel = \"hidden j_expertChannel\"} {\/if}\n + {if (channel.channelType == \"VIRTUAL_DUAL_WHITE_BRIGHTNESS\") || (channel.channelType == \"VIRTUAL_DUAL_WHITE_COLOR\")} {var virtualChannel = \"hidden j_expertChannel\"} {\/if}\n +\n + {if (channelTypeID != \"HMIP-MIOB\") && (channelTypeID != \"HMIP-WHS2\")}\n + {if (channel.channelType == \"DIMMER_TRANSMITTER\")\n + || (channel.channelType == \"SWITCH_TRANSMITTER\")\n + || (channel.channelType == \"BLIND_TRANSMITTER\")\n + || (channel.channelType == \"SHUTTER_TRANSMITTER\")\n + || (channel.channelType == \"ACOUSTIC_SIGNAL_TRANSMITTER\")}\n + {var virtualChannel = classExpertOnly;}\n + {\/if}\n + {if (channel.channelType == \"DIMMER_VIRTUAL_RECEIVER\")\n + || (channel.channelType == \"SWITCH_VIRTUAL_RECEIVER\")\n + || (channel.channelType == \"BLIND_VIRTUAL_RECEIVER\")\n + || (channel.channelType == \"SHUTTER_VIRTUAL_RECEIVER\")\n + || (channel.channelType == \"ACOUSTIC_SIGNAL_VIRTUAL_RECEIVER\")\n + || (channel.channelType == \"SERVO_VIRTUAL_RECEIVER\")}\n + {if actualDeviceAddress != channel.device.address}\n + {eval}\n + actualDeviceAddress = channel.device.address;\n + if (userIsNoExpert) {\n + if ((typeof channel.virtChCounter != \"undefined\") && (channel.virtChCounter != 1)) {\n + virtualChannel = classExpertOnly;\n + }\n + }\n + {\/eval}\n + {\/if}\n + {eval}if ((typeof channel.virtChCounter != \"undefined\") && (channel.virtChCounter != 1)) {virtualChannel = classExpertOnly;}{\/eval}\n + {\/if}\n + {\/if}\n +\n + {if (channelTypeID == \"HMIP-MIOB\") && ((channel.channelType == \"SWITCH_TRANSMITTER\") || ((channel.channelType == \"SWITCH_VIRTUAL_RECEIVER\") && ((channel.index != 3) && (channel.index != 7))))} {var virtualChannel = classExpertOnly} {\/if}\n +\n + {if ((channelTypeID == \"HMIP-WHS2\") && ((channel.channelType == \"SWITCH_TRANSMITTER\") || ((channel.channelType == \"SWITCH_VIRTUAL_RECEIVER\") &&\n + ((channel.index == 2) || (channel.index == 4) || (channel.index == 6) || (channel.index == 8))\n + )))} {var virtualChannel = classExpertOnly} {\/if}\n +\n + {if channel.channelType == \"VIR-OL-GTW-CH\"} {var virtualChannel = \"hidden\"} {\/if}\n + {if channel.channelType == \"VIR-HUE-GTW-CH\"} {var virtualChannel = \"hidden\"} {\/if}\n +\n + {if (channel.index == 0)} {var virtualChannel = classExpertOnly} {\/if}\n + \n + {if channel.channelType != \"_MAINTENANCE\"}\n + \n + \n +
Bild<\/th>\n + ${printHead(\"Beschreibung\", \"DESCRIPTION\", \"thDescription\")}\n + ${printHead(\"Seriennummer\", \"ADDRESS\", \"thSerialNumber\")}\n + ${printHead(\"Gewerke\", \"FUNC_NAMES\", \"thFuncs\")}\n + ${printHead(\"Räume\", \"ROOM_NAMES\", \"thRooms\")}\n + <\/tr>\n +
 <\/th>\n +  <\/th>\n + \n + ${addressFilter.getHTML()}\n + ${funcFilter.getHTML()}\n + ${roomFilter.getHTML()}\n + <\/tr> \n + <\/thead>\n +
${channel.name}${channel.typeDescription}_${channel.address}<\/span><\/td>\n +
${channel.thumbnailHTML}<\/div><\/td>\n +
${channel.typeDescription}${channel.device.name}<\/td>\n + ${channel.address}<\/td>\n + \n + {for subsection in channel.subsections}\n + ${subsection.name}
\n + {forelse}\n +  \n + {\/for}\n + <\/td>\n +
\n + {for room in channel.rooms}\n + ${room.name}
\n + {forelse}\n +  \n + {\/for}\n + <\/td>\n + <\/tr>\n + {forelse}\n +
Keine Kanäle verfügbar<\/td>\n + <\/tr>\n + {\/if}\n + {\/if}\n + {\/for}\n + <\/tbody>\n + <\/table>\n +<\/div>\n +
\n +
Abbrechen<\/div>\n +
Filter zurücksetzen<\/div>\n + {if false === showVirtual}\n +
virtuelle Kanäle anzeigen<\/div>\n + {else}\n +
virtuelle Kanäle ausblenden<\/div>\n + {\/if}\n +<\/div>\n +<\/div>\n +"; +CHANNEL_CONFIG_DIALOG_JST = "
\n +
Allgemeine Kanaleinstellungen:<\/span> ${channel.address}<\/div>\n +
\n +\n +
\n +
\n +
\n +
${channel.imageHTML}<\/div>\n + <\/div>\n +
${channel.typeName}<\/div>\n + <\/div>\n + \n + {if channel.supportsComTest()}\n +
\n +
Funktionstest<\/div>\n +
\n +
\n + \n + \n +
Test starten<\/div><\/td>\n +
--:--:--<\/div><\/td>\n + <\/tr>\n + <\/table>\n +
\n +

\n + Im Rahmen des Funktionstests wird geprüft, ob die Kommunikation mit dem Kanal fehlerfrei funktioniert.\n + <\/p>\n + {if channel.category == Channel.CATEGORY.SENDER}

Bei Sensoren wartet die HomeMatic Zentrale, bis diese sich melden. Eine Fernbedienung meldet sich z.B. erst dann, wenn sie manuell betätigt wird.<\/p>{\/if}\n + {if channel.category == Channel.CATEGORY.RECEIVER}

Bei Aktoren wird dazu in der Regel ein Schaltbefehl ausgelöst.<\/p>{\/if}\n + <\/div>\n + <\/div>\n + <\/div>\n + {\/if}\n + {if channel.channelType == \"KEY_TRANSCEIVER\" || channel.channelType == \"KEY\" || channel.channelType == \"MULTI_MODE_INPUT_TRANSMITTER\"}\n +

\n +
Taster-/Schaltevent an Zentrale <\/div>\n +
\n +
\n + \n + \n +
Aktivieren<\/div><\/td>\n +
Deaktivieren<\/div><\/td>\n + <\/tr>\n + <\/table>\n +
\n + \n + {\/if}\n + <\/div>\n +\n +
\n +
\n + \n +
Name:<\/td><\/td><\/tr>\n +
Typenbezeichnung:<\/td><\/td><\/tr>\n +
Seriennummer:<\/td><\/td><\/tr>\n +
Kategorie:<\/td>\n + <\/td><\/tr>\n +
Übertragungsmodus:<\/td>\n + \n +
Bedienbar:<\/td><\/td><\/tr>\n +
Sichtbar:<\/td><\/td><\/tr>\n +
Protokolliert:<\/td><\/td><\/tr>\n + <\/table>\n + <\/div>\n + \n +
\n + \n +
Räume<\/div>\n +
\n + \n + \n + {for room in rooms}\n + \n +
<\/td>${room.name}<\/td>\n + <\/tr>\n + {\/for}\n + <\/table>\n + <\/form>\n + <\/div>\n + \n +
\n + \n +
Gewerke<\/div>\n +
\n + \n + \n + {for func in funcs}\n + \n +
<\/td>${func.name}<\/td>\n + <\/tr>\n + {\/for}\n + <\/table>\n + <\/form>\n + <\/div>\n + \n + <\/div>\n +<\/div>\n +
\n +
Abbrechen<\/div>\n +
OK<\/div>\n +<\/div>\n +<\/div>\n +"; +DEVICE_CONFIG_DIALOG_JST = "
\n +
Allgemeine Geräteeinstellungen:<\/span> ${device.address}<\/div>\n +
\n +\n +
\n +
\n +
\n +
${device.imageHTML}<\/div>\n + <\/div>\n +
${device.typeName}<\/div>\n + <\/div>\n + <\/div>\n +\n +
\n +
\n + \n +
Name:<\/td><\/td><\/tr>\n +
Typenbezeichnung:<\/td><\/td><\/tr>\n +
Seriennummer:<\/td><\/td><\/tr>\n +
Bedienbar:<\/td><\/td><\/tr>\n + \n +
Protokolliert:<\/td><\/td><\/tr>\n +\n +
Alle Kan%E4le sichtbar:<\/td><\/td><\/tr>\n +
Servicemeldungen:<\/td><\/td><\/tr>\n + <\/table>\n + <\/div>\n + \n +
\n +
Funktionstest<\/div>\n +
\n +
\n + \n + \n +
Test starten<\/div><\/td>\n +
--:--:--<\/div><\/td>\n +\n +
<\/div><\/td>\n +\n + <\/tr>\n + <\/table>\n + <\/div>\n + <\/div>\n + \n +
\n +
Funktionstest<\/div>\n +
\n +
\n + \n + \n + \n + \n +\n +
Kanäle umbenennen<\/div><\/td>\n +\n +
<\/td>\n +\n +
<\/div><\/td>\n +\n + <\/tr>\n +\n +
Trennzeichen:<\/td><\/td>\n + <\/tr>\n +\n +
inkl. eigener Namen:<\/td><\/td>\n +\n +
<\/div><\/td>\n +\n + <\/tr>\n +\n + <\/table>\n + <\/div>\n + <\/div>\n +\n + <\/div>\n +<\/div>\n +
\n +
Abbrechen<\/div>\n +
Ok<\/div>\n +<\/div>\n +<\/div>\n +"; +DEVICELIST_FLAT_JST = "{macro printHead(name, id)}\n + {if id != sortId}\n +
${name}<\/th>\n + {else}\n + \n + ${name} \n + {if sortDescend}\n + \n + {else}\n + \n + {\/if}\n + <\/th>\n + {\/if}\n +{\/macro}\n +\n + \n + \n + \n + \n + \n + \n + \n + \n + \n + \n + \n + \n + \n + \n + <\/colgroup>\n + \n + \n + ${printHead(\"thName\", \"NAME\")}\n + ${printHead(\"thTypeDescriptor\", \"TYPE_NAME\")}\n + \n + ${nameFilter.getHTML()}\n + ${typeNameFilter.getHTML()}\n + \n + {for channel in channels}\n + \n + \n + "; + + if (counter <= 15) { + html_1 = html; + } else if (counter <= 31) { + html_2 = html; + } + counter++; + } + }); + } else { + // SPHM-884 + var mainElm = jQuery("[name='abortEventSendingChannels']"); + mainElm.children(":first-child").text(translateKey("hintSetReadyNotComplete")); + mainElm.next().hide(); + } + html_1 += ""; + hookElm_1.html(html_1); + + if (html_2) { + hookElm_2.html(html_2); + } +}; + +addAbortEventSendingChannels4WGD = function(chn, prn, devAddress, value) { + var hookElm_1 = jQuery("#hookAbortEventSendingChannels_1_"+ chn), + hookElm_2 = jQuery("#hookAbortEventSendingChannels_2_"+ chn), + device = DeviceList.getDeviceByAddress(devAddress), + chnIsOdd = (parseInt(chn) % 2 != 0) ? true : false, + counter = (chnIsOdd) ? 0 : 1, // determine the odd and even channels + html; + + + + setAbortEventSendingChannels = function(chn, prn) { + var valElm = jQuery("#separate_CHANNEL_" + chn+ "_" + prn), + arChkBoxes = jQuery("[name='abortEventSendingCh_"+chn+"']"), + val = 0; + + jQuery.each(arChkBoxes, function(index, chkBox) { + if(chkBox.checked) { + val += parseInt(chkBox.value); + } + }); + + valElm.val(val); + }; + if (typeof device != "undefined") { + jQuery.each(device.channels, function (index, channel) { + + if (((channel.channelType == "DISPLAY_INPUT_TRANSMITTER") && (chnIsOdd)) || ((channel.channelType == "DISPLAY_LEVEL_INPUT_TRANSMITTER") && (! chnIsOdd))) { + html += ""; + counter+=2; + } + }); + } else { + // SPHM-884 + var mainElm = jQuery("[name='abortEventSendingChannels']"); + mainElm.children(":first-child").text(translateKey("hintSetReadyNotComplete")); + mainElm.next().hide(); + } + html += ""; + hookElm_1.html(html); +}; + +addHintHeatingGroupDevice = function (address) { + if (typeof DeviceList.getDeviceByAddress() != "undefined") { + var devId = DeviceList.getDeviceByAddress(address.split(":")[0]).id, + inHeatingGroup = homematic("Interface.getMetadata", {"objectId": devId, "dataId": "inHeatingGroup"}), + hint = "
" + translateKey('hintGroupDevice') + "
"; + + if (inHeatingGroup != "null") { // MetaData available? + conInfo("MetaData available", "inHeatingGroup: " + inHeatingGroup); + if (inHeatingGroup == "true") { + jQuery("#content").prepend(hint); + jQuery("#ic_deviceparameters").animate({"margin-top": "50px"}); + } + } else { // Read /etc/congig/groups.gson (fallback if no meta data available (migration)) + conInfo("MetaData not available"); + var allowedGroupMembers = [ + "RADIATOR_THERMOSTAT", + "WALLMOUNTED_THERMOSTAT", + "HM-CC-RT-DN", + "HM-TC-IT-WM-W-EU" + ], + showHint = false, + devId = DeviceList.getDeviceByAddress(address.split(":")[0]).id, + groupList = JSON.parse(homematic("CCU.getHeatingGroupList", {})); + + if (groupList != -1 && typeof groupList == "object") { + jQuery.each(groupList, function (index, groups) { + jQuery.each(groups, function (index, group) { + jQuery.each(group.groupMembers, function (index, groupMember) { + if ((groupMember.id == address) && (jQuery.inArray(groupMember.memberType.id, allowedGroupMembers) != -1)) { + showHint = true; + homematic("Interface.setMetadata", {"objectId": devId, "dataId": "inHeatingGroup", "value": "true"}); + } + }); + }); + }); + } + if (showHint) { + jQuery("#content").prepend(hint); + jQuery("#ic_deviceparameters").animate({"margin-top": "50px"}); + } + } + } +}; + + +daliRefreshDevices = function(address) { + var device = DeviceList.getDeviceByAddress(address); + + MessageBox.show(translateKey('titleSearchDaliDevices'),'' +'


','','320','60','msgBckID', 'msgBoxBarGraph'); + + homematic("Interface.searchDaliDevices", {"interface": "HmIP-RF", "address": address, "valueKey": "DALI_ADDRESS", "type": "string", "value": "refreshDaliDevices"}, function (result) { + if (result) { + MessageBox.setText(translateKey("lblPleaseWaitAMoment")); + MessageBox.centerText(); + + // Store the UNIVERSAL_LIGHT_MAX_CAPABILITIES of the DALI channels as meta data + window.setTimeout(function() { + var devAddress = address, + daliChannel; + + for (var loop = 1; loop <= 48; loop++) { + var maxCap = homematic("Interface.getMasterValue", { + "interface": "HmIP-RF", + "address": devAddress + ":" + loop, + "valueKey": "UNIVERSAL_LIGHT_MAX_CAPABILITIES" + }); + daliChannel = DeviceList.getChannelByAddress(devAddress + ":" + loop); + daliChannel.daliMaxCapabilities = maxCap; + homematic("Interface.setMetadata", {"objectId": daliChannel.id , "dataId" : "maxCap", "value": maxCap}); + } + MessageBox.close(); + reloadPage(); + },500); + + } else { + MessageBox.close(); + alert(translateKey("dialogSettingsSecuritySSHMsgBoxErrorTitle")); // An error occurred + } + }); +}; + +// Resets the history data of a specific channel +resetChnMetaEnergyCounter = function(chn, opMode) { + /* + initialVal + Values for the last 30 days. The first 0 is yesterday...... + This is being used to store the values of the last 30 days. + */ + var arDataID = ["","","startValA","startValB","startValC"]; + + var initialVal = "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"; + homematic("Interface.setMetadata", { + "objectId": chn.id, + "dataId": "energyCounter30Days", + "value": initialVal + }); + homematic("Interface.setMetadata", {"objectId": chn.id, "dataId": "energy0", "value": 0}); // Today + homematic("Interface.setMetadata", {"objectId": chn.id, "dataId": "energy1", "value": 0}); // Yesterday + homematic("Interface.setMetadata", {"objectId": chn.id, "dataId": "energy7", "value": 0}); // 1 Week + homematic("Interface.setMetadata", {"objectId": chn.id, "dataId": "energy30", "value": 0}); // 1 Month +}; + +// Resets the history data and the start value of all relevant channels +resetAllMetaEnergyCounter = function(dev, opMode) { + var arStartDataID = ["","","startValA","startValB","startValC"], + arTimeDataID = ["","","startTimeA","startTimeB","startTimeC"]; + + jQuery.each(dev.channels,function(index,chn) { + if (chn.index > 1) { + /* + initialVal + Values for the last 30 days. The first 0 is yesterday...... + This is being used to store the values of the last 30 days. + */ + var initialVal = "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"; + homematic("Interface.setMetadata", { + "objectId": chn.id, + "dataId": "energyCounter30Days", + "value": initialVal + }); + homematic("Interface.setMetadata", {"objectId": chn.id, "dataId": "energy0", "value": 0}); // Today + homematic("Interface.setMetadata", {"objectId": chn.id, "dataId": "energy1", "value": 0}); // Yesterday + homematic("Interface.setMetadata", {"objectId": chn.id, "dataId": "energy7", "value": 0}); // 1 Week + homematic("Interface.setMetadata", {"objectId": chn.id, "dataId": "energy30", "value": 0}); // 1 Month + homematic("Interface.setMetadata", {"objectId": chn.id, "dataId": "iecPrgFirstStart","value": 1}); + + if (opMode < 3) { + homematic('Interface.setMetadata', {'objectId': chn.id, 'dataId': arStartDataID[chn.index], 'value': 0}); // Reset start value + homematic('SysVar.setFloat', {'name': 'svEnergyCounter_' + chn.id + '_' + chn.address, 'value': 0}); + homematic('SysVar.setFloat', {'name': 'svEnergyCounterOldVal_' + chn.id, 'value': 0}); + homematic('Interface.setMetadata', {'objectId': chn.id, 'dataId': arTimeDataID[chn.index], 'value': getEsiStartTime()}); // Reset time stamp + + } else { + var devCounter = homematic("Interface.getValue", {'interface': 'HmIP-RF', 'address' : chn.address, 'valueKey': 'ENERGY_COUNTER'}); + + //if (devCounter == "") {devCounter = "0.000";} + + homematic('Interface.setMetadata', {'objectId': chn.id, 'dataId': arStartDataID[chn.index], 'value': devCounter}); // Reset start value + homematic('SysVar.setFloat', {'name': 'svEnergyCounter_' + chn.id + '_' + chn.address, 'value': devCounter}); + homematic('SysVar.setFloat', {'name': 'svEnergyCounterOldVal_' + chn.id, 'value': devCounter}); + homematic('Interface.setMetadata', {'objectId': chn.id, 'dataId': arTimeDataID[chn.index], 'value': getEsiStartTime()}); // Reset time stamp + homematic('Interface.setMetadata', {'objectId': chn.id, 'dataId': 'firstStart', 'value' : 1}); + } + } + }); +}; + +powerIdentSensor = function(address) { + var device = DeviceList.getDeviceByAddress(address.split(":")[0]); + + var dlgYesNo = new YesNoDialog(translateKey("btnSensorDetection"), translateKey("dialogEsiSearchButtonContent"), function(result) { + if (result == YesNoDialog.RESULT_YES) { + var opMode = -1, counter = 0, cntNoSensorFound = 0, + intervalId = setInterval(getOperationMode, 1000); + + homematic("Interface.putParamset", { + 'interface': "HmIP-RF", + 'address': address, + 'paramsetKey': 'MASTER', + 'set': + [ + {name: 'CHANNEL_OPERATION_MODE', type: 'int', value: 0} + ] + }); + + DeviceListPage.showConfiguration(false, 'DEVICE', device.id); + + function getOperationMode() { + var chnPS = homematic("Interface.getParamset", { + "interface": "HmIP-RF", + "address": address, + "paramsetKey": "MASTER" + }); + opMode = chnPS.CHANNEL_OPERATION_MODE; + if (typeof opMode != "undefined") { + if ((opMode != -1) && (opMode != 0)) { + clearInterval(intervalId); + DeviceListPage.showConfiguration(false, 'DEVICE', device.id); + resetAllMetaEnergyCounter(device, opMode); + } else { + conInfo("ESI - searching sensor: " + counter); + counter++; + if (counter > 120) { + // If on the config page of this device, after 2 minutes stop the search and show a message that the system button of the device has to be pressed. + // After the message has been confirmed start the search again. + // Do this 3 times (6 minutes). After that, stop the search. There is probably no sensor connected. + if ((jQuery("#btnSensorIdent").length == 1) && (cntNoSensorFound < 3)) { + alert("Please press the system button of the device\n\n" + device.name + "."); // ToDo - translate + counter = 0; + cntNoSensorFound++; + } else { + // If not on the config page, stop the search. + clearInterval(intervalId); + if (cntNoSensorFound > 2) { + alert("No sensor found."); // ToDo translate + } + } + } + } + } else { + clearInterval(intervalId); + console.log("Problem: CHANNEL_OPERATION_MODE not found!"); + } + } + } + },"html"); + dlgYesNo.btnTextNo(translateKey("dialogBack")); + dlgYesNo.btnTextYes(translateKey("btnNext")); + dlgYesNo.setContentClass("YesNoDialogContentNoBold"); + dlgYesNo.resetHeight(); +}; + +getEsiStartTime = function() { + var d = new Date(), + dateString = ("0" + d.getDate()).slice(-2) + "." + ("0"+(d.getMonth()+1)).slice(-2) + "." + + d.getFullYear() + " " + ("0" + d.getHours()).slice(-2) + ":" + ("0" + d.getMinutes()).slice(-2); + + return dateString; +};// language = getLang();//"de"; + +setLanguage = function(lang) +{ + //Funktion wird zur Zeit nicht genutzt + + //Sprache dokumentenübergreifend speichern + $('language').value = lang; + // language 0 = de , 1 = en +}; + +Ajax_failure = function(file, failure) +{ + var msg = '
'; + msg += '

Error while loading the following file:

'; + msg += file + '

'; + msg += '' + failure + '
'; + + MessageBox.show('File request failed!', msg, '', 480,120); +}; + +getPathPNAME = function(actor, language) { + var result = '/config/easymodes/etc/localization/' + language + '/PNAME.txt'; + if (actor == "ACTOR_SECURITY" || actor == "ACTOR_WINDOW") { + result = '/config/easymodes/etc/localization/' + language + '/PNAME_TipTronic.txt'; + } + return result; +}; + +getLangInfo = function(sender, actor) +{ + var language = getLang(); + + var path_1 = '/config/easymodes/' + actor + '/localization/' + language + '/' + sender + '.txt'; + //var path_2 = '/config/easymodes/etc/localization/' + language + '/PNAME.txt'; + var path_2 = getPathPNAME(actor, language); + var local_generic = '/config/easymodes/' + actor + '/localization/' + language + '/GENERIC.txt'; + var global_generic = '/config/easymodes/etc/localization/' + language + '/GENERIC.txt'; + + l_generic = false; + + // die entsprechenden Uebersetzungstabellen der Easymodes einlesen + new Ajax.Request(path_1, + { + method: 'get', + asynchronous: false, + onSuccess: function(success) { + set_description = "[{".concat(success.responseText); + + }, + + onFailure: function(failure) { + Ajax_failure(path_1, failure.statusText); + } + }); + + new Ajax.Request(path_2, + { + method: 'get', + asynchronous: false, + onSuccess: function(success) { + set_pname = success.responseText; + }, + + onFailure: function(failure) { + Ajax_failure(path_2, failure.statusText); + } + }); + + new Ajax.Request(local_generic, + { + method: 'get', + asynchronous: false, + onSuccess: function(success) { + l_generic = success.responseText; + }, + + onFailure: function(failure) { + Ajax_failure(local_generic, failure.statusText); + } + + }); + + new Ajax.Request(global_generic, + { + method: 'get', + asynchronous: false, + onSuccess: function(success) { + g_generic = success.responseText; + if (l_generic != false) {generic = l_generic.concat(g_generic);} else generic = g_generic; + }, + + onFailure: function(failure) { + Ajax_failure(global_generic, failure.statusText); + } + }); + + var dummy = "\"dummy\" : \"dummy\"}]" ; + localized = eval(set_description.concat(set_pname).concat(generic).concat(dummy)); +}; + +getLangInfo_Special = function(file) +{ + var language = getLang(); + + if (!langJSON[language][file.split('.')[0]] ) { + var path = '/config/easymodes/etc/localization/' + language + '/' + file; + + localized = (typeof localized === "undefined") ? {} : localized; + + new Ajax.Request(path, + { + method: 'get', + asynchronous: false, + onSuccess: function (success) { + set_Special = success.responseText; + }, + + onFailure: function (failure) { + Ajax_failure(path, failure.statusText); + + } + }); + + //localized = eval(set_Special); + jQuery.extend(true, localized, eval(set_Special)); + } +}; + + + +translate_newProfile = function() +{ + var language = getLang(); + var path = '/config/easymodes/etc/localization/' + language + '/NEWPROFILE.txt'; + + // die entsprechenden Optionen einlesen + new Ajax.Request(path, + { + method: 'get', + asynchronous: false, + onSuccess: function(success) { + set_newprofile = eval(success.responseText); + }, + + onFailure: function(failure) { + Ajax_failure(path, failure.statusText); + } + }); + + set_newprofile[0] = Object.extend(set_newprofile[0], localized[0]); + + $('id_header').innerHTML = TrimPath.processDOMTemplate('title_SaveNewProfile', set_newprofile[0]); + $('id_body').innerHTML = TrimPath.processDOMTemplate('id_body_textarea', set_newprofile[0]); + $('id_footer').innerHTML = TrimPath.processDOMTemplate('id_footer_textarea', set_newprofile[0]); +}; + + +translate_map = function(div, textarea) +{ + if ( isNaN(localized)) { + $(div).innerHTML = TrimPath.processDOMTemplate(textarea, localized[0]); + } +}; + +translate = function(id, group) +{ + var isUser = id.split('.')[1]; + if (isNaN(localized)) { + if (isNaN(isUser)) { // wenn kein Userprofil + $('param_' + id).id = group + '_param_' + id; + $('profile_' + id).id = group + '_profile_' + id; + // hier werden die Platzhalter der EasyModes durch die übersetzten Texte ersetzt. + $(group + '_param_' + id).innerHTML = TrimPath.processDOMTemplate(group + '_profile_' + id, localized[0]); + } else translate_usrprofile(id, group); + } +}; + +translate_usrprofile = function(userid, group) +{ + // wenn es sich um ein Userprofil handelt, müssen die IDs angepasst werden. + // ansonsten kann nicht korrekt uebersetzt werden + + var loop ; + var x = []; + var span = document.getElementsByTagName("span"); + var txtarea = document.getElementsByTagName("textarea"); + + var pruefling = "descrTemplate_" + group + "_" + userid; + + // Anpassung der IDs + for (loop = 0; loop < span.length; loop++) { + if ( span[loop].className == pruefling ) { + span[loop].nextSibling.id = group + "_param_" + userid; + txtarea[0].id = group + "_profile_" + userid; + + // hier werden die Platzhalter durch die übersetzten Texte ersetzt. + // $('param_' + userid).innerHTML = TrimPath.processDOMTemplate('profile_' + userid, localized[0]); + $(group + '_param_' + userid).innerHTML = TrimPath.processDOMTemplate(group + '_profile_' + userid, localized[0]); + break; + } + } +}; +Groups = Singleton.create({ + + /** + * Konstruktor + **/ + initialize: function() + { + this.devices = {}; + }, + + _getAllSerialNumbers: function(arDevices) { + var arSN = []; + jQuery.each(arDevices, function(index, dev){ + arSN.push(dev.serialNumber); + }); + return arSN; + }, + + _getRegaID: function (devSN) { + var result = ""; + jQuery.each(this.devices, function(index, device) { + if (device.serialNumber == devSN) { + result = device.regaID; + return false; // leave each loop + } + }); + return result; + }, + + _getGroupAssignment: function(url, arDevList, type, callback) { + ShowWaitAnim(); + // In case of an unanswered call the animation will be switched off after 60 seconds. + // Otherwise the animation would be visible as long as the WebUI is reloaded. + HideWaitAnimAutomatically(60); + var request = jQuery.ajax({ + url: url, + type: (type == "POST") ? type : "GET", + async: true, + cache: false, + data: JSON.stringify({ serialNumbers : arDevList }), + dataType: "json" + }); + + request.done(function( result ) { + HideWaitAnim(); + callback(result); + }); + + request.fail(function( jqXHR, textStatus ) { + HideWaitAnim(); + conInfo(url + ".failed: " + jqXHR.statusText); + callback(textStatus); + }); + }, + + _addCreateGroupBtn: function(sn) { + var tbl = jQuery("#"+sn), + objId = this._getRegaID(sn), + devFailure = false, + hiddenVisible = ""; + + if (sessionStorage) { + if (sessionStorage.getItem("teachInFailure_" + objId) == "true") { + devFailure = true; + } + } + + hiddenVisible = (bCheckForAllChannels || devFailure) ? "hidden" : ""; + + tr = Builder.node('tr', {id: 'btnCreateNewGroup' + objId, className: hiddenVisible}); + td = Builder.node('td'); + div = Builder.node('div', {className: 'StdButton CLASS04308 width160px border1px', onclick: 'Groups.createNewGroup("'+sn+'","'+objId+'");'}, translateKey('btnCreateNewGroup')); + td.appendChild(div); + tr.appendChild(td); + tbl.append(tr); + }, + + _addDevToGroupBtn: function(sn) { + var tbl = jQuery("#"+sn), + objId = this._getRegaID(sn), + devFailure = false, + hiddenVisible = ""; + + if (sessionStorage) { + if (sessionStorage.getItem("teachInFailure_" + objId) == "true") { + devFailure = true; + } + } + + hiddenVisible = (bCheckForAllChannels || devFailure) ? "hidden" : ""; + + tr = Builder.node('tr', {id: 'btnAddToGroup' + objId, name: 'btnGroup', className: hiddenVisible}); + td = Builder.node('td'); + div = Builder.node('div', {className: 'StdButton CLASS04308 width160px border1px', onclick: 'Groups.addDevToGroup("'+sn+'","'+objId+'");'}, translateKey('btnAddToGroup')); + td.appendChild(div); + tr.appendChild(td); + tbl.append(tr); + }, + + _isAjaxCallNecessary: function(arDevInBox) { + var result = false; + + if ( GROUPASSIGNMENT == null || (GROUPASSIGNMENT.length < arDevInBox.length) ) { + return true; + } + + jQuery.each(arDevInBox, function(index, dev){ + var ok = false, + devSN = dev.serialNumber; + + jQuery.each(GROUPASSIGNMENT, function(index, val){ + if (val.serialNumber == devSN) { + ok = true; + return false; //leave each loop + } + }); + + if (ok == false) { + result = true; + return false; // leave each loop + } + }); + + return result; + }, + + _addGroupButtons: function(grpAssignment) { + if (grpAssignment.isAssignableToExistingGroup){ + // This will show a button for adding a device to a group within the device inbox + this._addDevToGroupBtn(grpAssignment.serialNumber); + } + + if (grpAssignment.isAssignableToNewGroup) { + // This will show a button for creating an new group within the device inbox + this._addCreateGroupBtn(grpAssignment.serialNumber); + } + }, + + + _getPossibleGroups: function(sn, regaID, callback) { + ShowWaitAnim(); + HideWaitAnimAutomatically(60); + var self = this; + var url = "/pages/jpages/group/listPossibleGroups?sid="+SessionId; + var request = jQuery.ajax({ + url: url, + type: "POST", + async: true, + cache: false, + data: JSON.stringify({serialNumber : sn, regaID: regaID}), + dataType: "html" + }); + + request.done(function( result ) { + HideWaitAnim(); + callback(result); + }); + + request.fail(function( jqXHR, textStatus ) { + HideWaitAnim(); + conInfo(url + ".failed: " + jqXHR.statusText); + callback(textStatus); + }); + }, + + createNewGroup: function(sn, regaID) { + conInfo("createNewGroup"); + ShowWaitAnim(); + HideWaitAnimAutomatically(60); + var url = "/pages/jpages/group/create?sid="+SessionId; + var request = jQuery.ajax({ + url: url, + type: "POST", + async: true, + cache: false, + data: JSON.stringify({serialNumber : sn, regaID: regaID}), + dataType: "html" + }); + request.done(function( result ) { + HideWaitAnim(); + var content = jQuery.parseJSON(result).content; + jQuery("#content").html(content); + }); + + request.fail(function( jqXHR, textStatus ) { + HideWaitAnim(); + conInfo(url + ".failed: " + jqXHR.statusText); + //callback(textStatus); + }); + + }, + + addDevToGroup: function(sn, regaId) { + this._getPossibleGroups(sn, regaId, function(result) { + var patt = /javascript/g; + if (patt.test(result)) { + var data = '{ "serialNumber" : "'+sn+'", "regaID" : "'+regaId+'" }'; + CreateCPPopup("/pages/jpages/group/listPossibleGroups", data); + } else { + conInfo("addDevToGroup : no valid html"); + } + }); + }, + + createGroupButtons: function(arDevInBox) { + this.devices = arDevInBox; + var self = this, + callNecessary = true, //this._isAjaxCallNecessary(this.devices), + url = "/pages/jpages/group/checkGroupAssignment?sid="+SessionId; + + if ((arDevInBox.length > 0) && callNecessary) { + var arSN = this._getAllSerialNumbers(this.devices); + this._getGroupAssignment(url, arSN, "POST", function(result) { + if (result.errorCode == "" && result.isSuccessful) { + var content = jQuery.parseJSON(result.content); + + GROUPASSIGNMENT = content.groupAssignments; + + jQuery.each(GROUPASSIGNMENT, function(index,val) { + self._addGroupButtons(val); + }); + } else { + conInfo(result.errorCode); + } + }); + } else { + jQuery.each(GROUPASSIGNMENT, function(index,val) { + self._addGroupButtons(val); + }); + } + } +});// ##################### +// ### Metadata ### +// ##################### + +configMetadata = new function() +{ + this.save = function(id, name, ctrlId, callStrFunc) { + var url = "/configapp/metadata.cgi"; + var pb = ''; + pb += 'cmd=set_metadata&'; + pb += 'id='+id+'&'; + pb += 'value='+encodeURIComponent(name)+'&'; + if(dbg){alert(pb);} + var opts = { + postBody: pb, + sendXML: false, + onComplete: function(resp) { + if ($(ctrlId)) { + if (callStrFunc) { + if (callStrFunc == CALL_STRCUT) + $(ctrlId).innerHTML = strCut(resp.responseText, true, true); + if (callStrFunc == CALL_SPACECUT) + $(ctrlId).innerHTML = spaceCutHtmlIf(resp.responseText, 1); + } + else + $(ctrlId).innerHTML = resp.responseText; + } + } + }; + new Ajax.Request(url, opts); + }; + + this.saveProfileParam = function(object_id, profile_id, param_id, value) { + var url = "/configapp/metadata.cgi"; + var pb = ''; + pb += 'cmd=set_parameter&'; + pb += 'id='+object_id+';'+profile_id+';'+param_id+'&'; + pb += 'value='+encodeURIComponent(value)+'&'; + if(dbg){alert(pb);} + var opts = { + postBody: pb, + sendXML: false + }; + new Ajax.Request(url, opts); + }; + + this.saveBidcosInterface = function(object_id, iface_id, roaming) { + var url = "/configapp/metadata.cgi"; + var pb = ''; + pb += 'cmd=set_bidcos_interface&'; + pb += 'device='+object_id+'&'; + pb += 'bidcos_iface='+iface_id+'&'; + pb += 'roaming='+roaming+'&'; + if(dbg){alert(pb);} + var opts = { + postBody: pb, + sendXML: false + }; + new Ajax.Request(url, opts); + }; + +}(); + +configRefresher = Class.create(); + +configRefresher.prototype = +{ + initialize: function(iPollingInterval) + { + this.updating = false; + this.ajax = null; + this.pe = new PeriodicalExecuter(this.refresh, iPollingInterval); + this.refresh(); + }, + refresh: function() + { + if( rfr ) + { + if( !this.updating ) + { + this.updating = true; + var t = this; + SwitchOnFlashLight(); + var url = "/configapp/updateui.cgi"; + var pb = ''; + var opts = + { + method: 'post', + postBody: pb, + evalScripts:true, + sendXml: false, + onComplete: function() + { + delete t.ajax; + t.ajax = null; + iseRefrTimer = 0; + t.updating = false; + } + }; + if(dbg)alert(pb); + this.ajax = new Ajax.Updater("dummy", url, opts); + } + } + } +}; + +// nur für das Konfigtool implementiert, Code aus der Datei /www/configapp/js/function.js der Version 1.4 +//ID_BIDCOS_INTERFACE = 1024; + +changeBidcosIface = function(chnId, ctrlId) { + dlgPopup = new iseMessageBox(ID_BIDCOS_INTERFACE, chnId); + PopupClose = function(iface, roaming) { + dlgPopup.hide(); + if( iface != undefined )$(ctrlId).innerHTML = iface + (roaming?"/*":""); + }; + SendRequest('/popupInterfaceEditor.cgi'); + dlgPopup.ShowPopup(); +}; + +setServiceMessage = function() { + var service_count = (homematic("Interface.getServiceMessageCount", {"interface": "default"})); + $("msgServices").firstChild.data = "Servicemeldungen (" + service_count + ")"; + + if (service_count == 0) + { + $("imgServices").src = "/ise/img/dot/green.png"; + } else { + $("imgServices").src = "/ise/img/dot/yellow.png"; + } + + return service_count; +}; +
Bild<\/th>\n + ${printHead(\"thDescriptor\", \"DESCRIPTION\")}\n + ${printHead(\"thSerialNumber\", \"ADDRESS\")}\n + ${printHead(\"thInterfaceCategory\", \"CATEGORY\")}\n + ${printHead(\"thTransmitMode\", \"MODE\")}\n + ${printHead(\"thFuncs\", \"FUNC_NAMES\")}\n + ${printHead(\"thRooms\", \"ROOM_NAMES\")}\n + \"sichtbar\"<\/th>\n + \"bedienbar\"<\/th>\n + \"protokolliert\"<\/th>\n + Flat Aktionen<\/th>\n + <\/tr>\n +
 <\/th>\n + ${descriptionFilter.getHTML()}\n + ${addressFilter.getHTML()}\n + ${categoryFilter.getHTML()}\n + ${modeFilter.getHTML()}\n + ${funcFilter.getHTML()}\n + ${roomFilter.getHTML()}\n +  <\/th>\n +  <\/th>\n +  <\/th>\n +  <\/th>\n + <\/tr>\n + <\/thead>\n +
${channel.name}<\/td>\n + ${channel.typeName}<\/td>\n +
${channel.thumbnailHTML}<\/div><\/td>\n +
${channel.typeDescription}<\/td>\n + ${channel.address}<\/td>\n + ${channel.category}<\/td>\n + ${channel.mode}<\/td>\n + \n + {for subsection in channel.subsections}\n + ${subsection.name}
\n + {forelse}\n +  \n + {\/for}\n + <\/td>\n +
\n + {for room in channel.rooms}\n + ${room.name}
\n + {forelse}\n +  \n + {\/for}\n + <\/td>\n +
<\/td>\n + <\/td>\n + <\/td>\n + \n +
Einstellen<\/div>\n +
Direkte<\/div>\n +
Programme<\/div>\n + <\/td>\n + <\/tr>\n + {forelse}\n +
Keine Kanäle verfügbar<\/td>\n + <\/tr>\n + {\/for}\n + <\/tbody>\n +<\/table>\n +\n +"; +DEVICELIST_TREE_JST = "\n + \n + \n + \n + \n + \n + \n + \n + \n + \n + \n + \n + \n + \n + \n + \n + \n + \n + \n + <\/colgroup>\n + \n + \n + \n + \n + \n + {for device in devices}\n + {if !device.inInbox}\n + \n + \n + \n + \n + {else}\n + \n + {\/if}\n +\n + \n + \n + \n + - Tag haben. +//tableid: html-id des table-Tags +//colNr: Spalte, die nach pattern gefiltert werden soll +//patternlist: pattern1|pattern2|pattern3|...|patternN +addFilterColumn = function(tr_list, colNr, patternlist) +{ + var patterns = patternlist.toLowerCase().split("|"); + + if (patternlist === "") return; + + for (var i=0; i]+>/g,""); + text = text.toLowerCase(); + + for (var j=0; j -1) return; + + //Die Funktion SizeTable hat bei begrenzter Auflösung keinen Sinn. + if (screen.availWidth < 1200) return; + + $('chnListBody').style.overflow = "";//um überhaupt sinnvoll Höhen bestimmen zu können + $('chnListBody').style.height = ""; + + var dim = getInnerDimensions(); + + var adjusted_tbody_height; + + if ( $('previous_step_wrapper') ) adjusted_tbody_height = dim.height -507; //(zusammengefasst aus vorigem Statement) + else adjusted_tbody_height = dim.height -353; //(zusammengefasst aus vorigem Statement) + + if (adjusted_tbody_height < 130) adjusted_tbody_height = 130; + + var cur_tbody_height = Element.getHeight($('chnListBody')); + + if (adjusted_tbody_height < cur_tbody_height) + { + //$('chnListBody').style.height = adjusted_tbody_height +"px"; // causes problems with IE11 + $('chnListBody').style.overflow = ""; + } +}; + +AddLink = function(iface, sender_address, sender_group, receiver_address, name, description, group_name, group_description, redirect_url) +{ + ResetPostString(); + + var dev = DeviceList.getDeviceByAddress(receiver_address.split(":")[0]), + specialVal = ""; + + if (dev.deviceType.id == "HmIP-RGBW") { + // Determine the device mode (RGBW, RGB, TW or PWM) + var maintenanceChannel = DeviceList.getChannelByAddress(receiver_address.split(":")[0] + ":0"); + specialVal = homematic("Interface.getMetadata", {"objectId": maintenanceChannel.id, "dataId": "deviceMode"}); + } + + AddParam($('global_sid')); + + poststr += "&redirect_url=" +redirect_url; + poststr += "&iface=" +iface; + poststr += "&sender_address=" +sender_address; + poststr += "&sender_group=" +sender_group; + poststr += "&receiver_address=" +receiver_address; + poststr += "&name=" +encodeURIComponent(name); + poststr += "&description=" +description; + poststr += "&group_name=" +encodeURIComponent(group_name); + poststr += "&group_description=" +group_description; + poststr += "&actorDeviceTypeId=" +dev.deviceType.id; + poststr += "&specialVal=" +specialVal; + poststr += "&cmd=addLink"; + + //ProgressBar = new ProgressBarMsgBox("Verknüpfung wird erstellt...", 1); + ProgressBar = new ProgressBarMsgBox(translateKey("progressBarCreateLinkTitle"), 1); + ProgressBar.show(); + ProgressBar.StartKnightRiderLight(); + + SendPOSTRequest('ic_ifacecmd.cgi'); +}; + +ShowNewLinkSummary = function(iface, sender_address, receiver_address, name, description, group_name, group_description) +{ + ResetPostString(); + + poststr += "&iface=" +iface; + poststr += "&sender_address=" +sender_address; + poststr += "&receiver_address=" +receiver_address; + + name = name.escapeHTML(); + poststr += "&name=" +name; + + description = description.escapeHTML(); + poststr += "&description=" +description; + + if (group_name) + { + group_name = group_name.escapeHTML(); + poststr += "&group_name=" +group_name; + } + + if (group_description) + { + group_description = group_description.escapeHTML(); + poststr += "&group_description=" +group_description; + } + + updateContent(UI_PATH + "ic_selchannel.cgi", poststr); +}; + +Select2ndLinkPartner = function(iface, address, direction) +{ + ResetPostString(); + + poststr += "&iface=" +iface; + + if (direction == 2) poststr += "&receiver_address=" +address; + else poststr += "&sender_address=" +address; + + updateContent(UI_PATH + "ic_selchannel.cgi", poststr); +}; + +CollectData_AddLink = function(goto_profiles) +{ + var nextPage = (goto_profiles==1 ? 'IC_SETPROFILES' : 'IC_LINKPEERLIST'); + + AddLink( + $F('global_iface'), + $F('global_sender_address'), + $F('global_sender_group'), + $F('global_receiver_address'), + $F('input_name'), + $F('input_description'), + $F('input_group_name'), + $F('input_group_description'), + nextPage); +}; +ReplaceDevice = new function() +{ + var performReplaceDevice = function(iface, oDevices) { + this.oDevices = oDevices; + ProgressBar = new ProgressBarMsgBox("swapDeviceInProgress", 1); + ProgressBar.show(); + ProgressBar.StartKnightRiderLight(); + + var result = homematic("Interface.changeDevice" , { + "interface" : iface, + "addressOldDevice" : oDevices.oldDevAddr, + "addressNewDevice" : oDevices.newDevAddr + }, function() { + window.setTimeout( + function() { + var self = this; + ProgressBar.hide(); + ProgressBar.StopKnightRiderLight(); + ConfigData.destroy(); + ConfigData.isPresent = true; + ConfigData.check(function() { + WebUI.enter(DeviceListPage); + MessageBox.show(translateKey("replaceDeviceHintTitle"), translateKey("replaceDeviceHintContent")); + + // Both devices - old and new - are using the same regaID and the same parameters. + // So we can fetch the the new or the old device to check if one of the channels is of the type POWERMETER or POWERMETER_IGL + var regaID = homematic("Device.getReGaIDByAddress", {"address": oDevices.newDevAddr}), + checkDevice = homematic("Device.get", {"id": regaID}); + + // Check if the channel type is POWERMETER or POWERMETER_IGL + // If so than delete the old system variable and create a new one with the new device address. + // Set the value of the new created system var to the value of the old one. + if (checkDevice) { + jQuery.each(checkDevice.channels, function (index, channel) { + var channelType = GetChannelType(channel); + if (channelType == "POWERMETER" || channelType == "POWERMETER_IGL" ) { + + var sysVarPrefix = (channelType == "POWERMETER") ? "svEnergyCounter_" : "svEnergyCounterGas_"; + + var oldSysVarID = sysVarPrefix + channel.id + "_" + self.oDevices.oldDevAddr + ":" + (parseInt(index) + 1), + newSysVarID = sysVarPrefix + channel.id + "_" + channel.address; + + // Fetch the value of the old system variable + var ok = homematic("SysVar.getValueByName", {"name": oldSysVarID}, function(oldVal) { + conInfo("Value of the old ccu value: " + oldVal); + + // Create a system variable for the new device and set the value to the one of the old system var + homematic("SysVar.createFloat", {"name": newSysVarID, "minValue": 0, "maxValue": (1.7 * Math.pow(10, 308)) - 1, "internal": 1}, function () { + homematic("SysVar.setFloat", {"name": newSysVarID, "value": oldVal}, function () { + conInfo("Set the value of the new sys var to " + oldVal); + }); + }); + // Delete the old system variable + homematic("SysVar.deleteSysVarByName", {"name": oldSysVarID}, function () { + conInfo(oldSysVarID + " deleted"); + homematic("system.saveObjectModel", {}, function () { + conInfo("ObjectModel saved"); + }); + }); + }); + } + }); + } + }); + }, 2000); + }); + }; + + var getDlgContent = function(oDevices) { + var contentHeader = translateKey("replaceDeviceDlgConfirmHeader"); + var contentDevices = oDevices.newDevType + " : " + oDevices.newDevAddr + " " + translateKey("replaceDeviceDlgConfirmContentRow1a") + " " + oDevices.oldDevType + " " + translateKey("replaceDeviceDlgConfirmContentRow1b") + " " + oDevices.oldDevAddr + translateKey("replaceDeviceDlgConfirmContentRow1c"); + contentDevices += (oDevices.oldDevType == oDevices.newDevType) ? translateKey("replaceDeviceDlgConfirmContentRow2a") : translateKey("replaceDeviceDlgConfirmContentRow2b"); + contentDevices += translateKey("replaceDeviceDlgConfirmContentRow3a") + " " + oDevices.oldDevAddr + " " + translateKey("replaceDeviceDlgConfirmContentRow3b"); + var contentFooter = translateKey("replaceDeviceDlgConfirmFooter"); + + return contentHeader + contentDevices + contentFooter; + }; + + /* Public */ + this.perform = function(iface, oDevices ) { + /* + oDevices has to contain the following keys: + oldDevAddr + oldDevType + newDevAddr + newDevType + newDevID + */ + var title = translateKey("replaceDeviceDlgConfirmTitle"); + + new YesNoDialog(title, getDlgContent(oDevices), function(action){ + /* + action can be + 0 - user selected NO + 1 - user selected YES + */ + if (action == 1) { + performReplaceDevice(iface, oDevices); + } + }, "html"); + }; +}(); + +/** + * ic_setprofiles.js + **/ + +prefix = []; + +tmp = 0; + +CloseSetProfiles = function () { + WebUI.goBack(); + //updateContent(UI_PATH + "ic_linkpeerlist.cgi"); +}; + +// User-Profilvorlage für die folgenden Geräte sperren +//var senderNoUserProfile = "MOTION_DETECTOR, WEATHER"; +//var receiverNoUserProfile = "CLIMATECONTROL_VENT_DRIVE, BLIND, WATERDETECTIONSENSOR"; +isUserProfileAvailable = function (deviceType) { + var arForbiddenDevs = ["MOTION_DETECTOR", "WEATHER", "WEATHER_2", "WATERDETECTIONSENSOR", "CLIMATECONTROL_VENT_DRIVE", "BLIND"], + result = true; + + jQuery.each(arForbiddenDevs, function (index, type) { + if (deviceType == type) { + result = false; + return false; // leave each loop + } + }); + + return result; +}; + +ShowEasyMode = function (selectelem, iface) { + var e; + var sender = $('dev_descr_sender_tmp').value.split("-")[0]; + var receiver = $('dev_descr_receiver_tmp').value.split("-")[0]; + + var _iface = (typeof iface == "undefined") ? "" : iface; + + // Special treatment for the UNIVERSAL_LIGHT_RECEIVER, when in TW MODE (SPHM-954) + if (receiver == "UNIVERSAL_LIGHT_RECEIVER_TW") { + var defaultProfile = parseInt(jQuery(selectelem).attr('class')), + choosenProfile = parseInt(jQuery(selectelem).val()), + defaultISchoosen = (defaultProfile == choosenProfile) ? true : false, + profileISColorTemperature = (choosenProfile >= 4 && choosenProfile <= 6) ? true : false; + + if (!defaultISchoosen && profileISColorTemperature) { + var chnDescription = homematic("Interface.getParamset", {"interface":"HmIP-RF", "address": jQuery("#global_receiver_address").val(), "paramsetKey": "MASTER"}); + var sliderTempMin = parseInt(chnDescription.HARDWARE_COLOR_TEMPERATURE_WARM_WHITE), + sliderTempMax = parseInt(chnDescription.HARDWARE_COLOR_TEMPERATURE_COLD_WHITE); + + switch (choosenProfile) { + case 4: + jQuery("#separate_receiver_"+choosenProfile+"_5").val(sliderTempMax).blur(); + break; + case 5: + jQuery("#separate_receiver_"+choosenProfile+"_3").val(sliderTempMin).blur(); + break; + case 6: + jQuery("#separate_receiver_"+choosenProfile+"_5").val(sliderTempMax).blur(); + jQuery("#separate_receiver_"+choosenProfile+"_9").val(sliderTempMin).blur(); + break; + } + } + } + + // Senderseitiges Speichern der Profilevorlage verhindern, Funktion wird noch nicht unterstuetzt + document.getElementById("NewProfileTemplate_sender").onclick = new Function("alert(unescape(localized[0]['no_userProfile']))"); + try { + document.getElementById("NewProfileTemplate_sendergroup").onclick = new Function("alert(unescape(localized[0]['no_userProfile']))"); + } catch (e) { + } + + if ((!isUserProfileAvailable(sender)) || (!isUserProfileAvailable(receiver)) || (_iface == "HmIP-RF")) { + //alert(sender + " " + receiver); + document.getElementById("NewProfileTemplate_receiver").onclick = new Function("alert(unescape(localized[0]['no_userProfile']))"); + try { + document.getElementById("NewProfileTemplate_receivergroup").onclick = new Function("alert(unescape(localized[0]['no_userProfile']))"); + } catch (e) { + } + } + + + if (selectelem.id == "receiver_profiles" || selectelem.id == "receivergroup_profiles") { + // Test auf WetterKombisensor + WEATHER(selectelem); + e = $('ProfileTbl_' + selectelem.id.split('_')[0]); + } else { + e = selectelem.nextSibling; + } + + var pnr = selectelem.options[selectelem.selectedIndex].value; + + while ((e !== null) && (e.tagName != "TABLE") && (e.className != "ProfileTbl")) { + e = e.nextSibling; + } + + if (e.tagName != "TABLE" && e.className != "ProfileTbl") return; + + var table = e; + var elem = table.getElementsByTagName("tr")[0]; + + while (elem !== null) { + //Element.hide(elem); + elem.style.display = "none"; + elem.style.visibility = "hidden"; + + if ((elem.className == "receiver_" + pnr) || (elem.className == "sender_" + pnr)) { + //Element.show(elem); + elem.style.visibility = "visible"; + elem.style.display = ""; + DelBtnEasyMode_Visible(selectelem.id.substr(0, selectelem.id.length - "_profiles".length)); + } + elem = elem.nextSibling; + } + + /* + SPHM-406 + Don't check the On/Off value initial but only when a change of this values happens. + + var arTimeOnOffElms = jQuery("[name='timeOnOff_"+selectelem.value+"']"); + if (arTimeOnOffElms.length > 0) { + preventOnOffNonActive(arTimeOnOffElms[0]); + } + */ +}; + +CheckGroup = function () { + //prüfen, ob es sich um ein Tastenpaar handelt + try { + if (document.getElementById('NewProfileTemplate_receivergroup')) { + throw "true"; + } else throw "false"; + } catch (e) { + + if (e == "true") return true; + else return false; + } +}; + +TextColor = function (c) { + if (!c) { + return WebUI.getColor("windowText"); + } + else { + return WebUI.getColor("gray"); + } +}; + + +ActivateLinkParamset = function (iface, sender_address, receiver_address, hideWarning) { + if (!hideWarning) { + var dirty; + + if (SenderGroupExists()) { + dirty = (IsProfileDirty('sender')) || (IsProfileDirty('receiver')) || + (IsProfileDirty('sendergroup')) || (IsProfileDirty('receivergroup')); + } + else { + dirty = IsProfileDirty('sender') || IsProfileDirty('receiver'); + } + + if (dirty) { + //ShowWarningMsg("Ihre Änderungen wurden noch nicht in die Komponenten übertragen."); + ShowWarningMsg(translateKey("dialogSetProfileMsgProfileNotYetSet")); + InfoMsg.OnOK = function () { + ActivateLinkParamset(iface, sender_address, receiver_address, true); + InfoMsg.hide(); + }; + return; + } + } + + ResetPostString(); + + AddParam($('global_sid')); + + poststr += "&iface=" + iface; + poststr += "&sender_address=" + sender_address; + poststr += "&receiver_address=" + receiver_address; + poststr += "&cmd=activateLinkParamset"; + + SendPOSTRequest('ic_ifacecmd.cgi'); +}; + +SetLinkInfo = function (iface, sender_address, receiver_address, name, description) { + ResetPostString(); + + AddParam($('global_sid')); + + poststr += "&iface=" + iface; + poststr += "&sender_address=" + sender_address; + poststr += "&receiver_address=" + receiver_address; + poststr += "&name=" + elv_toQueryString(name); + poststr += "&description=" + elv_toQueryString(description); + poststr += "&cmd=setLinkInfo"; + + SendPOSTRequest('ic_ifacecmd.cgi'); +}; + + +is_newProfile = function (paramid) { + return $F('dev_descr_receiver_tmp') + "/" + $F('dev_descr_sender_tmp'); +}; + + + +SetEasyMode = function (iface, address, peer, special_input_id, paramid) { + var selectelem = $(special_input_id + '_profiles'); + var pnr = selectelem.options[selectelem.selectedIndex].value; + ResetPostString(); + AddParam($('global_sid')); + poststr += "&iface=" + iface; + poststr += "&address=" + address; + poststr += "&peer=" + peer; + poststr += "&pnr=" + pnr; + poststr += "¶mid=" + paramid; //1 + poststr += "&ps_type=LINK"; + poststr += "&ps_id=LINK"; + poststr += "&cmd=set_profile"; + AddSeparateSettings('separate_' + special_input_id + '_', pnr); + AddSeparateSettings('subset_' + special_input_id + '_', pnr); + if (paramid) { + + // The MULTI_MODE_INPUT_TRANSMITTER has one of three different modes (KEY, SWITCH, SHUTTER_CONTACT) + // The fileExtension adds the appropriate mode to the file. + var fileExtension = ""; + var _sender = $F('dev_descr_sender_tmp').split('-')[0]; + if (_sender == "MULTI_MODE_INPUT_TRANSMITTER") { + var chn = DeviceList.getChannelByAddress(address); + if (chn.typeName == "HmIP-FDC") { + fileExtension = "_" + mode_MULTI_MODE_INPUT_TRANSMITTER + "_FDC"; + } else { + fileExtension = "_" + mode_MULTI_MODE_INPUT_TRANSMITTER; + } + } + poststr += "&new_profilepath=" + is_newProfile(paramid).split('-')[0] + fileExtension; + } + SendPOSTRequest('ic_ifacecmd.cgi'); +}; + +CollectData_SaveProfileSettings = function (reload) { + var redirect = (reload == 1) ? 'IC_SETPROFILES' : 'IC_LINKPEERLIST'; +// var go_back = (reload != 1); + var go_back = false; // (reload != 1); + var actions = 0; + + if ((IsDirty($('sender_linkname'))) || (IsDirty($('sender_linkdescription')))) { + SetLinkInfo($F('global_iface'), $F('global_sender_address'), $F('global_receiver_address'), $F('sender_linkname'), $F('sender_linkdescription')); + actions++; + } + + if (IsProfileDirty('sender')) { + SetEasyMode($F('global_iface'), $F('global_sender_address'), $F('global_receiver_address'), "sender", $F('sender_paramid')); + actions++; + } + + if (IsProfileDirty('receiver')) { + SetEasyMode($F('global_iface'), $F('global_receiver_address'), $F('global_sender_address'), "receiver", $F('receiver_paramid')); + actions++; + } + + if (SenderGroupExists()) { + if ((IsDirty($('sendergroup_linkname'))) || (IsDirty($('sendergroup_linkdescription')))) { + SetLinkInfo($F('global_iface'), $F('global_sender_group'), $F('global_receiver_address'), $F('sendergroup_linkname'), $F('sendergroup_linkdescription')); + actions++; + } + + if (IsProfileDirty('sendergroup')) { + SetEasyMode($F('global_iface'), $F('global_sender_group'), $F('global_receiver_address'), "sendergroup", $F('sender_paramid')); + actions++; + } + + if (IsProfileDirty('receivergroup')) { + SetEasyMode($F('global_iface'), $F('global_receiver_address'), $F('global_sender_group'), "receivergroup", $F('receiver_paramid')); + actions++; + } + } + + if (actions === 0) { + CheckConfigPending($F('global_iface'), $F('global_sender_address'), $F('global_receiver_address'), redirect, go_back); + } + else { + //ProgressBar = new ProgressBarMsgBox("Übertrage Profileinstellungen an Komponenten...", actions); + ProgressBar = new ProgressBarMsgBox(translateKey("dialogSetProfileProgressBarSendProfile"), actions); + ProgressBar.show(); + ProgressBar.StartKnightRiderLight(); + + //1 + if ($('dev_descr_sender_tmp')) var dev_descr_sender_tmp = $F('dev_descr_sender_tmp'); + + ProgressBar.OnFinish = function () { + CheckConfigPending($F('global_iface'), $F('global_sender_address'), $F('global_receiver_address'), redirect, go_back); + }; + } +}; + +SenderGroupExists = function () { + return ($F('global_sender_group') !== ""); +}; + +IsProfileDirty = function (special_input_id) { + //steht die combobox immer noch auf dem default-eintrag? + var selectelem = $(special_input_id + '_profiles'); + + if (IsDirty(selectelem)) return true; + + //Der im Aktor gespeicherte Easy-Mode ist immer noch aktuell. Aber: einzelne Parameter verändert? + //Einzelnen Input-Felder auf Veränderung prüfen: + + var pnr = selectelem.options[selectelem.selectedIndex].value; + + for (var i = 1; $('separate_' + special_input_id + '_' + pnr + '_' + i); i++) { + if ((IsDirty($('separate_' + special_input_id + '_' + pnr + '_' + i))) || + (IsDirty($('separate_' + special_input_id + '_' + pnr + '_' + i + '_temp')))) { + return true; + } + } + + return false; +}; + +RevertProfileSettings = function () { + var name = [ + ['48', '42'], + ['61', '61'], + ['72', '64'], + ['61', '62'], + ['6C', '65'], + ['64', '72'], + ['20', '67'] + ]; + var ques = [ + ['66', '61'], + ['75', '6E'], + ['63', '64'], + ['6B', '64'], + ['6F', '69'], + ['66', '65'], + ['66', '21'] + ]; + var quesstr = "", namestr = "", m = name.length, n = name[0].length; + + for (var i = 0; i < n; i++) { + for (var j = 0; j < m; j++) { + namestr += "%" + name[j][i]; + quesstr += "%" + ques[j][i]; + } + } + if ($F('sender_linkdescription') == unescape(quesstr) && $('sender_linkdescription').defaultValue != $('sender_linkdescription').value) ShowInfoMsg(unescape(namestr)); +}; + +SwitchOption = function (targetelemname, sourceelemname, selectelem, pref, special_input_id) { + var target_optionidx = $(targetelemname).options.length - 2; + var source_optionidx = $(sourceelemname).options.length - 2; + + if (($(targetelemname).selectedIndex != target_optionidx) && ($(sourceelemname).selectedIndex != source_optionidx)) { + var pnr = selectelem.options[selectelem.selectedIndex].value; + + document.getElementById("vis_sec_" + pnr + "_" + pref + "_" + special_input_id).style.display = "none"; + document.getElementById("vis_min_" + pnr + "_" + pref + "_" + special_input_id).style.display = "none"; + document.getElementById("vis_hour_" + pnr + "_" + pref + "_" + special_input_id).style.display = "none"; + + $(targetelemname).selectedIndex = target_optionidx; + } +}; + +EnterDescriptionTemplate = function (special_input_id) { + var selectelem = $(special_input_id + '_profiles'); + + if (!selectelem || selectelem.options.length < 2) { + //Wir haben keine Easy-Mode-Seite angelegt. Es wird nur der Expertenmodus angezeigt. + if (!$('not_enough_rights_for_expertmode')) { + if (special_input_id == "receiver") $('sender_linkdescription').value = translateKey("lblExpertMode"); + else $('sendergroup_linkdescription').value = translateKey("lblExpertMode"); + } + + return; + } + + var pnr = selectelem.options[selectelem.selectedIndex].value; + var profilename = selectelem.options[selectelem.selectedIndex].text; + var templatespan = document.getElementsByClassName('descrTemplate_' + special_input_id + '_' + pnr); + + if (templatespan && templatespan.length == 1) { + var templateStr = templatespan[0].innerHTML; + var description = ""; + var i = 1; + var arr = new Array(); + + while ($('separate_' + special_input_id + '_' + pnr + '_' + i)) { + var input_id; + + //Wenn es ein temporäres Input-Element gibt, muss der Wert daraus kommen (z.B. die Umsetzung von 0..1 auf 0%..100% wird so gehandhabt) + if ($('separate_' + special_input_id + '_' + pnr + '_' + i + '_temp')) input_id = 'separate_' + special_input_id + '_' + pnr + '_' + i + '_temp'; + else input_id = 'separate_' + special_input_id + '_' + pnr + '_' + i; + + var inputelem = $(input_id); + var value = ""; + + if (!inputelem) continue; + + if (inputelem.type == "select-one") value = inputelem.options[inputelem.selectedIndex].text; + else if (inputelem.type == "checkbox") value = inputelem.checked ? 'wahr' : 'falsch'; + else value = $F(input_id); + + var names = $(input_id).name; + var namelist = names.split('|'); + + for (var k = 0; k < namelist.length; k++) arr[ namelist[k] ] = value; + + i++; + } + + var elvTemplate = new Template(templateStr); + description = elvTemplate.evaluate(arr); + + if (special_input_id == "receiver") $('sender_linkdescription').value = profilename + ": " + description; + else $('sendergroup_linkdescription').value = profilename + ": " + description; + } +}; + +RemoveProfile = function (special_input_id, pnr) { + var selectelem = $(special_input_id + '_profiles'); + + //prüfen, ob es sich um ein Kanalpaar handelt + try { + var tmp = selectelem.options[0].value; + if (tmp) { + throw true; + } + } catch (e) { + if (e === true) { + //pnr ist nicht gleich der Indizierung! pnr muss mit den options[].values verglichen werden. + for (var k = 0; k < selectelem.options.length; k++) { + if (selectelem.options[k].value == pnr) { + selectelem.options[k] = null; + break; + } + } + } + } +}; + +SwitchEasyMode = function (special_input_id, pnr) { + var selectelem = $(special_input_id + '_profiles'); + + //pnr ist nicht gleich der Indizierung! pnr muss mit den options[].values verglichen werden. + for (var k = 0; k < selectelem.options.length; k++) { + if (selectelem.options[k].value == pnr) { + selectelem.options[k].selected = true; + break; + } + } + + ShowEasyMode(selectelem); +}; + +ShowNewEasyModeDialog = function (special_input_id) { + var selectelem = $(special_input_id + '_profiles'); + var sensor = $F('dev_descr_sender_tmp').split("-")[0]; + var actor = $F('dev_descr_receiver_tmp'); + var base_pnr = selectelem.options[selectelem.selectedIndex].value; + var ps_id; + var ps_ids; + + if (special_input_id == "sender" || special_input_id == "sendergroup") { + ps_id = $F('sender_paramid'); + ps_ids = $F('sender_paramids'); + } + else { + ps_id = $F('receiver_paramid'); + ps_ids = $F('receiver_paramids'); + } + NewEasyModeDialog = new NewEasyModeForm(450, 200, base_pnr, ps_id, ps_ids, special_input_id); + NewEasyModeDialog.LoadFromFile("ic_neweasymode.cgi?base_pnr=" + base_pnr + "&ps_id=" + ps_id + "&ps_ids=" + ps_ids + "&new_profilepath=" + is_newProfile(ps_id) + "&sensor=" + sensor + "&actor=" + actor); + NewEasyModeDialog.show(); +}; + +DeleteEasyMode = function (special_input_id) { + var selectelem = $(special_input_id + '_profiles'); + var sensor = $F('dev_descr_sender_tmp').split("-")[0]; + var actor = $F('dev_descr_receiver_tmp'); + var pnr = selectelem.options[selectelem.selectedIndex].value; + var ps_id; + var ps_ids; + + if (special_input_id == "sender" || special_input_id == "sendergroup") { + ps_id = $F('sender_paramid'); + ps_ids = $F('sender_paramids'); + } + else { + ps_id = $F('receiver_paramid'); + ps_ids = $F('receiver_paramids'); + } + + ResetPostString(); + poststr += "&cmd=DELETE"; + poststr += "&pnr=" + pnr; + poststr += "&ps_id=" + ps_id; + poststr += "&ps_ids=" + ps_ids; + poststr += "&special_input_id=" + special_input_id; + poststr += "&new_profilepath=" + is_newProfile(ps_id); + poststr += "&sensor=" + sensor; + poststr += "&actor=" + actor; + + SendRequest('ic_neweasymode.cgi'); + + //ProgressBar = new ProgressBarMsgBox("Profilvorlage wird gelöscht...", 1); + ProgressBar = new ProgressBarMsgBox(translateKey("dialogSettingsDeleteProfileTemplateTitle"), 1); + ProgressBar.show(); + ProgressBar.StartKnightRiderLight(); +}; + +DelBtnEasyMode_Visible = function (special_input_id) { + var selectelem = $(special_input_id + '_profiles'); + var pnr = selectelem.options[selectelem.selectedIndex].value; + var is_userprofile = pnr.search(/^[0-9]+\.[0-9]+$/) >= 0; + + if (is_userprofile) $('DelBtnEasyMode_' + special_input_id).style.visibility = "visible"; + else $('DelBtnEasyMode_' + special_input_id).style.visibility = "hidden"; +}; + +UpdateSpecialInputs = function (special_input_id, arr, u_subset) { + var i = 1; + var namelist, name, value, pnr_split, pref, gusr_pnr, base_pnr, usr_pnr, receiver_type; + var inputelem = $(special_input_id + '_' + i); + + while (inputelem) { + namelist = inputelem.name; + name = namelist.split('|')[0]; //1 + receiver_type = inputelem.id.split('_')[1]; //2 + + value = arr[ String(name) ]; + + //3 + pnr_split = inputelem.id.split('_'); + pref = pnr_split[3]; //4 + gusr_pnr = pnr_split[2]; //5 + base_pnr = gusr_pnr.split('.')[0]; //6 + usr_pnr = gusr_pnr.split('.')[1]; //7 + + try { + var vis_hour = document.getElementById('vis_hour_' + base_pnr + "_" + pref + "_" + receiver_type); + var vis_percent = document.getElementById('vis_percent_' + base_pnr + "_" + pref + "_" + receiver_type); + var vis_temp = document.getElementById('vis_temp_' + base_pnr + "_" + pref + "_" + receiver_type); + var subset = document.getElementsByName('subset_' + base_pnr + "_" + pref); + + if (vis_hour) { + throw "time"; + } + else if (vis_percent) { + throw "percent"; + } + else if (vis_temp) { + throw "temp"; + } + else if (subset) { + throw "subset"; + } + else { + throw "null"; + } + } catch (ergebniss) { + + switch (ergebniss) { + + case "time": + vis_hour = document.getElementsByName("vis_hour_" + base_pnr + "_" + pref + "_" + receiver_type); + hour = document.getElementsByName("hour_" + base_pnr + "_" + pref + "_" + receiver_type); + + vis_min = document.getElementsByName("vis_min_" + base_pnr + "_" + pref + "_" + receiver_type); + min = document.getElementsByName("min_" + base_pnr + "_" + pref + "_" + receiver_type); + + vis_sec = document.getElementsByName("vis_sec_" + base_pnr + "_" + pref + "_" + receiver_type); + sec = document.getElementsByName("sec_" + base_pnr + "_" + pref + "_" + receiver_type); + inputelem.options[inputelem.length - 1] = null; // Auswahl "Wert eingeben" entfernen + break; + + case "percent": + vis_percent = document.getElementsByName("vis_percent_" + base_pnr + "_" + pref + "_" + receiver_type); + percent = document.getElementsByName("percent_" + base_pnr + "_" + pref + "_" + receiver_type); + inputelem.options[inputelem.length - 1] = null; // Auswahl "Wert eingeben" entfernen + break; + + case "temp": + vis_temp = document.getElementsByName("vis_temp_" + base_pnr + "_" + pref + "_" + receiver_type); + temp = document.getElementsByName("temp_" + base_pnr + "_" + pref + "_" + receiver_type); + inputelem.options[inputelem.length - 1] = null; // Auswahl "Wert eingeben" entfernen + break; + + case "subset": + //8 + usr_subset = $("separate_" + receiver_type + "_" + gusr_pnr + "_" + pref); + usr_subset.name = "subset_" + gusr_pnr + "_" + pref; + for (loop = 0; loop < usr_subset.length; loop++) { + if (usr_subset.options[loop].value == u_subset) { + usr_subset.selectedIndex = loop; //9 + continue; + } + } + break; + } + } + +//10 + + if (typeof(value) != 'undefined') SetInputValue(inputelem, value); + i++; + inputelem = $(special_input_id + '_' + i); + } +}; +/** + * ic_deviceparameters.js + **/ + +CloseDeviceParameters = function() +{ + WebUI.goBack(); +}; + +ToggleChannelView = function() +{ + var ChannelTable = jQuery("#id_channel_parameters_table"); + var ToggleButton = jQuery("#ToggleButtonChannelView:first-child"); + + if (!ToggleButton.attr("name")){ + ToggleButton.attr("name","btnOpen"); + } + + if(ToggleButton.attr("name") == "btnOpen" ) + { + ChannelTable.css({"display": "none","visibility":"hidden"}); + ToggleButton.attr("name","btnClose"); + ToggleButton.html(translateKey("deviceAndChannelParamsBtnOpenParamList")); + } + else + { + ChannelTable.css({"display": "", "visibility":"visible"}); + ToggleButton.attr("name","btnOpen"); + ToggleButton.html(translateKey("deviceAndChannelParamsBtnCloseParamList")); + } +}; + + +isDutyCycleOK4DevUpdate = function() { + var iface = homematic("Interface.listBidcosInterfaces", {"interface": "BidCos-RF"}); + var dcVal = 0, + dcWarningLevel = 80, + dcOK = true; + + if(iface === null) { + iface = homematic("Interface.listBidcosInterfaces", {"interface": "HmIP-RF"}); + } + + if(iface !== null) { + jQuery.each(iface, function (index, iFace) { + if (iFace.type == "CCU2") { + dcVal = (typeof iFace.dutyCycle != "undefined") ? parseInt(iFace.dutyCycle) : 0; + if (dcVal >= dcWarningLevel) { + dcOK = false; + } + return false; //leave each loop + } + }); + } + return dcOK; +}; + +FirmwareUpdate = function(devType) { + var isHmIPWired = false; + if (devType) { + isHmIPWired = isDevTypeHmIPW(devType); + } + + if ((isHmIPWired) || isDutyCycleOK4DevUpdate()) { + ResetPostString(); + AddParam($('global_sid')); + poststr += "&iface=" + $F('global_iface'); + poststr += "&address=" + $F('global_address'); + poststr += "&cmd=firmware_update"; + SendPOSTRequest('ic_ifacecmd.cgi'); + ProgressBar = new ProgressBarMsgBox(translateKey("performingFirmwareUpdate"), 1); + ProgressBar.show(); + ProgressBar.StartKnightRiderLight(); + } else { + MessageBox.show(translateKey("dialogHint"), translateKey("hintDevFwUpdateDCHigh"), "", 400, 120); + } +}; + + + +isHeatingControl = function() { + if (window.P1_tom || window.P2_tom || window.P3_tom || window.P4_tom || window.P5_tom || window.P6_tom) { + return true; + } + return false; +}; + +isHeatingControlAddress = function(deviceAddress) { + if (P1_tom.address == deviceAddress || P2_tom.address == deviceAddress || P3_tom.address == deviceAddress || P4_tom.address == deviceAddress || P5_tom.address == deviceAddress || P6_tom.address == deviceAddress) { + return true; + } + return false; +}; + +isHeatingControlDirty = function() { + if (P1_tom.tom_isDirty() || P2_tom.tom_isDirty() || P3_tom.tom_isDirty() || P4_tom.tom_isDirty() || P5_tom.tom_isDirty() || P6_tom.tom_isDirty()) { + return true; + } + return false; +}; + +RestoreDeviceParameters = function() +{ + ProgressBar = new ProgressBarMsgBox(translateKey("transferConfigData"), 0); + ProgressBar.show(); + ProgressBar.StartKnightRiderLight(); + + homematic("Interface.restoreConfigToDevice", {"interface": $F('global_iface'), "address": $F('global_address')}, function() { + ProgressBar.hide(); + ProgressBar.StopKnightRiderLight(); + CheckConfigPending($F('global_iface'), $F('global_address'), '', $F('global_redirect_url'), true); + }); +} + +SaveDeviceParameters = function() +{ + var actions = 0, + parentChannelAddress; + + //Geräteparameter speichern + if (AreParametersDirty('DEVICE')) + { + SetParameters ($F('global_iface'), $F('global_address'), 'DEVICE'); + actions++; + } + + //Kanalparameter speichern + var ch_count = $F('global_channel_count'); + var channel_address; + var startChannel = (($F('global_iface')!= "HmIP-RF") && ($F('global_iface')!= "HmIP-Wired") && ($F('global_iface') != "VirtualDevices"))? 1 : 0; + + for (var i=startChannel; i|TIMEOUTMANAGER +SetParameters = function(iface, address, special_input_id) +{ + var command, + tomIsSet = false; + + try { + + if ($('separate_CHANNEL_1_1').name == "TEAM" && special_input_id != "DEVICE") + throw "TEAM"; + else throw "noTEAM"; + } catch (e) { + if (e == "TEAM") { command = "&cmd=set_team"; } + else { command = "&cmd=set_profile"; } + } + + ResetPostString(); + AddParam($('global_sid')); + poststr += "&iface=" + iface; + poststr += "&address=" + address; + poststr += "&peer=MASTER"; + poststr += "&ps_type=MASTER"; + poststr += "¶mid="; + poststr += "&pnr="; + poststr += command; + + + if (typeof oChnMultiModeTransmitter != "undefined") { + var relevantMultiModeTransmitter = oChnMultiModeTransmitter[address.toString()]; + + if (typeof relevantMultiModeTransmitter != "undefined") { + + + homematic("Interface.setMetadata_crRFD", { + 'interface': iface, + 'objectId' : address.toString(), + 'dataId' : relevantMultiModeTransmitter.dataId, + 'value': relevantMultiModeTransmitter.mode}); + + homematic("Interface.setMetadata", { + "objectId": relevantMultiModeTransmitter.channelId, + "dataId": relevantMultiModeTransmitter.dataId, + "value": relevantMultiModeTransmitter.mode + }, function (result) { + var oChannel = DeviceList.getChannelByAddress(address.toString()); + oChannel.setMultiMode(relevantMultiModeTransmitter.mode); + delete oChnMultiModeTransmitter[address.toString()]; + }); + } + } + + // After setting the config parameters of a dali device, we have to store the UNIVERSAL_LIGHT_MAX_CAPABILITIES of each group channel as mata data. + // Otherwise ReGa can't determne the correct value on the page Status/Control, especially when changing a group. + var channel = DeviceList.getChannelByAddress(address); + if ((typeof channel !== "undefined") && (channel.typeName == "HmIP-DRG-DALI") && (typeof MetaDaliGroupHasBeenSet == "undefined")) { + // After 5 seconds we can determine the new UNIVERSAL_LIGHT_MAX_CAPABILITIES of the DALI group channels and store them as meta data + window.setTimeout(function() { + var devAddress = channel.device.address, + grpChannel; + + for (var loop = 33; loop <= 48; loop++) { + var maxCap = homematic("Interface.getMasterValue", { + "interface": "HmIP-RF", + "address": devAddress + ":" + loop, + "valueKey": "UNIVERSAL_LIGHT_MAX_CAPABILITIES" + }); + grpChannel = DeviceList.getChannelByAddress(devAddress + ":" + loop); + homematic("Interface.setMetadata", {"objectId": grpChannel.id , "dataId" : "maxCap", "value": maxCap}); + DeviceList.channels[grpChannel.id].daliMaxCapabilities = maxCap; + } + window.setTimeout(function() {delete MetaDaliGroupHasBeenSet;},5000); + },5000); + MetaDaliGroupHasBeenSet = true; + } + + + + if ((special_input_id == "TIMEOUTMANAGER") && (typeof tom == "object") && (tom.iface == iface) && (tom.address == address) && (tom.tom_isDirty())) + { + poststr += tom.tom_getPostStr(); + tomIsSet = true; + } + + if((special_input_id == "TIMEOUTMANAGER") && (typeof P1_tom == "object") && (P1_tom.iface == iface) && (P1_tom.address == address) && (P1_tom.tom_isDirty())) { + poststr += P1_tom.tom_getPostStr(); + tomIsSet = true; + } + + if((special_input_id == "TIMEOUTMANAGER") && (typeof P2_tom == "object") && (P2_tom.iface == iface) && (P2_tom.address == address) && (P2_tom.tom_isDirty())) { + poststr += P2_tom.tom_getPostStr(); + tomIsSet = true; + } + + if((special_input_id == "TIMEOUTMANAGER") && (typeof P3_tom == "object") && (P3_tom.iface == iface) && (P3_tom.address == address) && (P3_tom.tom_isDirty())) { + poststr += P3_tom.tom_getPostStr(); + tomIsSet = true; + } + + if((special_input_id == "TIMEOUTMANAGER") && (typeof P4_tom == "object") && (P4_tom.iface == iface) && (P4_tom.address == address) && (P4_tom.tom_isDirty())) { + poststr += P4_tom.tom_getPostStr(); + tomIsSet = true; + } + if((special_input_id == "TIMEOUTMANAGER") && (typeof P5_tom == "object") && (P5_tom.iface == iface) && (P5_tom.address == address) && (P5_tom.tom_isDirty())) { + poststr += P5_tom.tom_getPostStr(); + tomIsSet = true; + } + if((special_input_id == "TIMEOUTMANAGER") && (typeof P6_tom == "object") && (P6_tom.iface == iface) && (P6_tom.address == address) && (P6_tom.tom_isDirty())) { + poststr += P6_tom.tom_getPostStr(); + tomIsSet = true; + } + + if((special_input_id == "TIMEOUTMANAGER_HMIP_OnOff") && (typeof P1_tomHmIP == "object") && (P1_tomHmIP.iface == iface) && (P1_tomHmIP.address == address) && (P1_tomHmIP.tom_isDirty())) { + poststr += P1_tomHmIP.tom_getPostStr(); + tomIsSet = true; + } + + if(!tomIsSet) { + AddSeparateSettings('separate_' + special_input_id, ''); + } + + try + { + var device = DeviceList.getDeviceByAddress(address); + if (!device) + { + var channel = DeviceList.getChannelByAddress(address); + if (channel) { device = channel.device; } + } + } catch (e){} + + /* + var device = DeviceList.getDeviceByAddress(address); + if (!device) + { + var channel = DeviceList.getChannelByAddress(address); + if (channel) { device = channel.device; } + } + */ + + // This prevents an non-existing string for MAIN_/SUB_TEXT for e. g. the HmIPW-WGD(-PL) + if ((typeof channel !== "undefined") && ((channel.channelType == "DISPLAY_INPUT_TRANSMITTER") || (channel.channelType == "DISPLAY_THERMOSTAT_INPUT_TRANSMITTER") || (channel.channelType == "ENERGIE_METER_TRANSMITTER"))) { + arPostStr = poststr.split("&"); + jQuery.each(arPostStr, function (index, val) { + if (val == "MAIN_TEXT=" || val == "SUB_TEXT=" || val == "METER_OBIS_SEARCH_STRING=") { + // %24 = $ + poststr = poststr.replace(val, val + "%24%24%24%24%24"); + } + }); + } + + SendPOSTRequest('ic_ifacecmd.cgi', null, function() { + if (device) + { + DeviceList.beginUpdateDevice(device.id); + } + }); + +}; + +SendInternalKeyPress = function(iface, sender, receiver, longKeyPress) +{ + var simLongKeyPress = (longKeyPress) ? 1 : 0; + ResetPostString(); + AddParam($('global_sid')); + poststr += "&iface=" + iface; + poststr += "&sender=" + sender; + poststr += "&receiver=" + receiver; + poststr += "&longKeyPress=" + simLongKeyPress; + poststr += "&cmd=SendInternalKeyPress"; + SendPOSTRequest('ic_ifacecmd.cgi'); +}; + +SetInternalKey = function(iface, address, special_input_id, peerAddress) +{ + var mainChannel = address; + + var ch = address.split(':')[1]; + var selectelem = $(special_input_id + '_profiles'); + var pnr = selectelem.options[selectelem.selectedIndex].value; + var actorType = $('chType_'+ch).innerHTML; + var paramid = $('chParamID_'+ch).innerHTML; + + ResetPostString(); + AddParam($('global_sid')); + poststr += "&iface=" + iface; + poststr += "&address=" + mainChannel; + poststr += "&peer=" + peerAddress; + poststr += "&pnr=" + pnr; + poststr += "¶mid=" + paramid; + poststr += "&ps_type=receiver"; + poststr += "&ps_id=receiver" ; + poststr += "&internalKey=true"; + poststr += "&new_profilepath=" + actorType + "/" + actorType; + poststr += "&cmd=set_profile"; + AddSeparateSettings('separate_' + special_input_id + '_', pnr); + AddSeparateSettings('subset_' + special_input_id + '_', pnr); + + //alert(poststr); + SendPOSTRequest('ic_ifacecmd.cgi'); +}; + +ShowInternalKeyProfile = function(selectelem, channel, counter) +{ + var e; + var pnr = selectelem.options[selectelem.selectedIndex].value; + e = $('internalKey_' + counter + "_" + channel); + + while ((e !== null) && (e.tagName != "TABLE") && (e.className != "ProfileTbl")) + { + e = e.nextSibling; + } + + if (e.tagName != "TABLE" && e.className != "ProfileTbl") return; + + var table = e; + var elem = table.getElementsByTagName("tr")[0]; + + while (elem !== null) + { + //Element.hide(elem); + elem.style.display = "none"; + elem.style.visibility = "hidden"; + if ((elem.className == "receiver_"+counter + "_" + channel + "_" + pnr) ) + { + elem.style.visibility = "visible"; + elem.style.display = ""; + } + elem = elem.nextSibling; + } +}; + + +/** + * ic_neweasymode.js + **/ + +NewEasyModeForm = Class.create(); + +NewEasyModeForm.prototype = Object.extend(new MsgBox(), { + initialize: function(w, h, base_pnr, ps_id, ps_ids, special_input_id) { + + this.init(w, h); + this.w = w; + this.h = h; + this.base_pnr = base_pnr; + this.ps_id = ps_id; + this.ps_ids = ps_ids; + this.special_input_id = special_input_id; + + this.ProfilesMap = new Array(); + }, + AddProfile: function(pnr, pname) { + + this.ProfilesMap[pnr] = pname; + }, + ProfileOverwriteWarning: function() { + + var profileExists = false; + var cur_usertext = $F('EasyModeName'); + for (var Name in this.ProfilesMap) + { + if (this.ProfilesMap[Name] == cur_usertext) + { + profileExists = true; + break; + } + } + + if (profileExists) {$('id_overwrite_warning').style.visibility = 'visible'; $('save_new_profile').style.visibility = 'hidden';} + else {$('id_overwrite_warning').style.visibility = 'hidden'; $('save_new_profile').style.visibility = 'visible';} + }, + StoreNewProfile: function() { + ResetPostString(); + profile = is_newProfile(this.ps_id); + poststr += "&cmd=SAVE"; + poststr += "&base_pnr=" +this.base_pnr; + poststr += "&ps_id=" +profile; + poststr += "&ps_ids=" +profile; + poststr += "&sensor=" +$F('dev_descr_sender_tmp').split("-")[0]; + poststr += "&actor=" +$F('dev_descr_receiver_tmp'); + poststr += "&EasyModeName=" +elv_toQueryString($F('EasyModeName')); + + AddSeparateSettings('separate_' + this.special_input_id + '_', this.base_pnr); + AddSeparateSettings('subset_' + this.special_input_id + '_', this.base_pnr); + SendRequest('ic_neweasymode.cgi'); + + this.hide(); + + //ProgressBar = new ProgressBarMsgBox("Profilvorlage wird erstellt...", 1); + ProgressBar = new ProgressBarMsgBox(translateKey("dialogSettingsCreateProfileTemplateTitle"), 1); + ProgressBar.show(); + ProgressBar.StartKnightRiderLight(); + } +}); +//TOM = TimeOutModule + +//Defines +TOM_DAYIDX = new Array(); +TOM_DAYIDX['SATURDAY'] = 0; +TOM_DAYIDX['SUNDAY'] = 1; +TOM_DAYIDX['MONDAY'] = 2; +TOM_DAYIDX['TUESDAY'] = 3; +TOM_DAYIDX['WEDNESDAY'] = 4; +TOM_DAYIDX['THURSDAY'] = 5; +TOM_DAYIDX['FRIDAY'] = 6; + +TOM_DAY_ENG = new Array('SATURDAY', 'SUNDAY', 'MONDAY', 'TUESDAY', 'WEDNESDAY', 'THURSDAY', 'FRIDAY'); + +tom_endtime = 0; +tom_temperature = 1; +tom_level = 1; + +tom_maxtimeout = 1440; +tom_mintimeout = 0; +//----- + +TimeoutManager = Class.create(); + +TimeoutManager.prototype = Object.extend(new MsgBox(), { + + initialize: function (iface, address, isOldDevGeneration, prgName) { + + this.TOM_DAY = new Array ( + translateKey('timeModuleLblSelSerialPatternSaturday') , + translateKey('timeModuleLblSelSerialPatternSunday') , + translateKey('timeModuleLblSelSerialPatternMonday') , + translateKey('timeModuleLblSelSerialPatternTuesday') , + translateKey('timeModuleLblSelSerialPatternWednesday') , + translateKey('timeModuleLblSelSerialPatternThursday') , + translateKey('timeModuleLblSelSerialPatternFriday') + ); + + this.isOldDevGeneration = isOldDevGeneration; + this.iface = iface; + this.address = address; + + this.prg = (prgName != undefined && prgName != null) ? prgName : ""; + + //Woche anlegen und initialisieren + this.week = new Array(7); + this.divname = new Array(7); //DIV-Container + this.weekdirty = new Array(7); //Sind Änderungen erfolgt? + + this.setMaxTimouts(); + + for (var dayidx = 0; dayidx < 7; dayidx++) { + this.week[dayidx] = new Array(); + this.divname[dayidx] = ''; + this.weekdirty[dayidx] = false; + } + }, + + setMaxTimouts: function() { + this.maxTimeOuts = (this.isOldDevGeneration == true) ? 24 : 13; + }, + + setDivname: function (day, divid) { + var dayidx = TOM_DAYIDX[day]; + this.divname[dayidx] = divid; + }, + + tom_toTime: function (timeout) { + + var h = parseInt(timeout / 60); + var m = timeout - h * 60; + + if (String(m).length == 1) m = "0" + m; + if (String(h).length == 1) h = "0" + h; + + return h + ":" + m; + }, + + tom_toTimeout: function (time) { + + var tokens; + var h, m; + var timeout = -1; + + if (this.tom_isTime(time)) { + tokens = time.split(':'); + h = tokens[0]; + m = tokens[1]; + + timeout = parseInt(h, 10) * 60 + parseInt(m, 10); + } + + return timeout; + }, + + tom_isTime: function (time) { + return time.match(/^[0-2]?[0-9]:[0-5][0,5]$/) != null; + }, + + tom_isTemperature: function (temperature) { + return temperature.match(/^[1-3]?[0-9]\.?[0-9]*$/) != null; + }, + + tom_checkAndSetTime: function (day, inputel, timeoutIdx) { + + var dayidx = TOM_DAYIDX[day]; + var timeouts = this.week[dayidx]; + var elem = inputel.id.split("_"); + var count = -1; + var inputelem; + var endtime; + var prev_endtime; + var next_endtime; + var time; + + if (!this.prg) { + while ($(elem[0] + '_' + elem[1] + '_' + (count + 1))) { + count++; + timeouts[count][tom_endtime] = this.tom_toTimeout($(elem[0] + '_' + elem[1] + '_' + count).value); + } + } else { + while ($(this.prg + elem[1] + '_' + elem[2] + '_' + (count + 1))) { + count++; + timeouts[count][tom_endtime] = this.tom_toTimeout($(this.prg + elem[1] + '_' + elem[2] + '_' + count).value); + } + } + + for (var loop = 0; loop <= (count - 1); loop++) { + timeoutIdx = loop; + if (!this.prg) { + inputelem = elem[0] + "_" + elem[1] + "_" + loop; + } else { + inputelem = this.prg + elem[1] + "_" + elem[2] + "_" + loop; + } + if (this.isOldDevGeneration) { + // Minuten der Zeit auf volle 10 pruefen und ggf. anpassen + $(inputelem).value = time = $(inputelem).value.replace(/[1-9]$/, "0"); + } else { + // Minuten der Zeit auf volle 5 pruefen und ggf. anpassen + var arTime = $(inputelem).value.split(":"), + hour = parseInt(arTime[0]), + min =Math.round(arTime[1] / 5) * 5 ; + if (min <= 9) {min = "0" + min;} + if (min == 60) {min = "00"; hour++;} + if (hour <= 9) {hour = "0" + hour;} + if (hour == 24) {hour = "23"; min = "55";} + + $(inputelem).value = time = hour + ":" + min; + } + endtime = this.tom_toTimeout(time); + prev_endtime = -1; + next_endtime = -1; + + + if (timeoutIdx != 0) prev_endtime = timeouts[timeoutIdx - 1][tom_endtime]; + if (timeoutIdx != timeouts.length - 1) next_endtime = timeouts[timeoutIdx + 1][tom_endtime]; + + + $(inputelem).style.backgroundColor = WebUI.getColor("transparent"); + if (endtime > 0 + && endtime <= 1440 + && (prev_endtime < 0 || prev_endtime < endtime) + && (next_endtime < 0 || next_endtime > endtime)) timeouts[timeoutIdx][tom_endtime] = parseInt(endtime); + else $(inputelem).style.backgroundColor = WebUI.getColor("red"); + + this.weekdirty[dayidx] = true; + } + }, + + tom_checkAndSetTemperature: function (day, inputelem, timeoutIdx) { + + var temperature = inputelem.value; + var dayidx = TOM_DAYIDX[day]; + var timeouts = this.week[dayidx]; + + inputelem.style.backgroundColor = WebUI.getColor("transparent"); + + if (this.tom_isTemperature(temperature) + && temperature >= 0 + && temperature <= 30) timeouts[timeoutIdx][tom_temperature] = parseFloat(temperature); + else inputelem.style.backgroundColor = WebUI.getColor("red"); + + this.weekdirty[dayidx] = true; + }, + + tom_setDirty: function (day, inputelem, timeoutIdx) { + CC_save_Temp(this.prg); + var tmp = inputelem.id.split("_"); + + if (this.prg) { + var id = this.prg + tmp[1] + "_" + tmp[2] + "_" + tmp[3]; + } else { + var id = tmp[0] + "_" + tmp[1] + "_" + tmp[2]; + } + var temperature = $F(id); + var dayidx = TOM_DAYIDX[day]; + var timeouts = this.week[dayidx]; + + inputelem.style.backgroundColor = WebUI.getColor("transparent"); + + if (this.tom_isTemperature(temperature) + && temperature >= 5 + && temperature <= 30) timeouts[timeoutIdx][tom_temperature] = parseFloat(temperature); + else inputelem.style.backgroundColor = WebUI.getColor("red"); + + this.weekdirty[dayidx] = true; + + }, + + tom_getPostStr: function () { + + var postStr = ""; + + for (var dayidx = 0; dayidx < 7; dayidx++) { + //Welcher Tag enthält die relevanten Daten: "wie am Vortag"-Funktion? + var prev_day = $(this.prg + 'prevday_' + dayidx); + var p = dayidx; + while (prev_day.checked) { + p--; + prev_day = $(this.prg+ 'prevday_' + p); + } + //----- + + if (this.weekdirty[dayidx] || this.weekdirty[p]) //Dieser Tag oder der Vortag "dirty"? + { + var timeouts = this.week[p]; + + if (timeouts && timeouts.length > 0) { + for (var i = 0; i < timeouts.length; i++) { + if (this.isOldDevGeneration) { + postStr += "&TEMPERATUR_" + TOM_DAY_ENG[dayidx] +"_" + (i+1) + "=" + timeouts[i][tom_temperature]; + postStr += "&TIMEOUT_" + TOM_DAY_ENG[dayidx] +"_" + (i+1) + "=" + timeouts[i][tom_endtime]; + } else { + postStr += "&" + this.prg + "TEMPERATURE_" + TOM_DAY_ENG[dayidx] + "_" + (i + 1) + "=" + timeouts[i][tom_temperature]; + postStr += "&" + this.prg + "ENDTIME_" + TOM_DAY_ENG[dayidx] + "_" + (i + 1) + "=" + timeouts[i][tom_endtime]; + } + } + } + } + } + + return postStr; + }, + + tom_isDirty: function () { + + for (var dayidx = 0; dayidx < 7; dayidx++) { + if (this.weekdirty[dayidx]) return true; + } + return false; + }, + + //day: MONDAY, TUESDAY, ... + //endtime: 0..1440 + setTemp: function (day, endtime, temperature) { + + var dayidx = TOM_DAYIDX[day]; + var timeouts = this.week[dayidx]; + var i = 0; + if (!timeouts) timeouts = new Array(); + + //Array ist nach Endtime sortiert. + while (i < timeouts.length && endtime >= timeouts[i][tom_endtime]) { + //Timeout schon vorhanden? Dann Temperatur setzen. + if (timeouts[i][tom_endtime] == endtime) { + //timeouts[i][tom_temperature] = temperature; + return; + } + + i++; + } + + if (i < timeouts.length) { + //Es muss einsortiert werden. + //Platz da!!! + for (j = timeouts.length; j > i; j--) { + timeouts[j] = timeouts[j - 1]; + } + } + + timeouts[i] = new Array(2); //Zeitpunkt-Temperatur-Zuordnung anlegen + timeouts[i][tom_endtime] = endtime; + timeouts[i][tom_temperature] = temperature; + }, + + delTemp: function (day, endtime) { + + var dayidx = TOM_DAYIDX[day]; + var timeouts = this.week[dayidx]; + + for (var i = 0; i < timeouts.length; i++) { + if (timeouts[i][tom_endtime] == endtime) { + timeouts.splice(i, 1); + break; + } + } + }, + + delTempByIdx: function (day, timeoutIdx) { + + var dayidx = TOM_DAYIDX[day]; + var timeouts = this.week[dayidx]; + timeouts.splice(timeoutIdx, 1); + + this.weekdirty[dayidx] = true; + }, + + addTempByIdx: function (day, timeoutIdx) { + + var dayidx = TOM_DAYIDX[day]; + var timeouts = this.week[dayidx]; + + if (timeouts.length >= this.maxTimeOuts ) { + //alert('Der Zeitabschnitt kann nicht angelegt werden. Es können nur bis zu '+this.maxTimeOuts+' Zeitabschnitte angelegt werden.'); + alert(translateKey('errorCreateTimePeriod') + translateKey('maxTimePeriodReachedA') + this.maxTimeOuts+translateKey('maxTimePeriodReachedB')); + return; + } + else if (timeouts[timeoutIdx][tom_endtime] - 10 == 0) { + //alert('Der Zeitabschnitt kann nicht angelegt werden. Die Endzeit kann nicht 00:00 Uhr sein.'); + alert(translateKey('errorCreateTimePeriod') + translateKey('endtimeReached')); + return; + } + else if (timeoutIdx > 0 && timeouts[timeoutIdx][tom_endtime] - 10 <= timeouts[timeoutIdx - 1][tom_endtime]) { + //alert('Der Zeitabschnitt kann nicht angelegt werden. Er existiert schon.'); + alert(translateKey('errorCreateTimePeriod') + translateKey('timePeriodAlreadyExists')); + return; + } + this.setTemp(day, timeouts[timeoutIdx][tom_endtime] - 10, timeouts[timeoutIdx][tom_temperature]); + + this.weekdirty[dayidx] = true; + }, + + OnClickPrevDay: function (day) { + var dayidx = TOM_DAYIDX[day]; + var elem = $(this.prg + 'prevday_' + dayidx); + + if (elem.checked) { + $(this.prg+'tempprofile_' + dayidx).style.display = "none"; + $(this.prg+'tempprofile_' + dayidx).style.visibility = "hidden"; + } + else { + $(this.prg+'tempprofile_' + dayidx).style.display = ""; + $(this.prg+'tempprofile_' + dayidx).style.visibility = "visible"; + } + this.tom_setDirty('SATURDAY', $(this.prg + 'temperature_0_0_tmp'), 0); + this.weekdirty[dayidx] = true; + }, + + tom_equals_prevday: function (day) { + + var dayidx = TOM_DAYIDX[day]; + + if (dayidx == 0) return false; //Starttag ist immer ungleich des Vortages + + var this_timeouts = this.week[dayidx ]; + var prev_timeouts = this.week[dayidx - 1]; + + if (!prev_timeouts || !this_timeouts || prev_timeouts.length != this_timeouts.length) return false; + + for (var i = 0; i < this_timeouts.length; i++) { + if (this_timeouts[i][tom_temperature] != prev_timeouts[i][tom_temperature] + || this_timeouts[i][tom_endtime] != prev_timeouts[i][tom_endtime]) return false; + } + return true; + }, + + checkDayTimeouts: function (dayidx) { + var timeouts = this.week[dayidx]; + + for (i = 1; i < timeouts.length; i++) { + if (timeouts[i][tom_endtime] <= timeouts[i - 1][tom_endtime]) { + alert("Der " + i + ". Zeitabschnitt hat eine ungültige Dauer"); + } + } + }, + + checkTimeouts: function () { + + for (i = 0; i < this.week.length; i++) { + checkDayTimeouts(i); + } + }, + + writeDay: function (day) { + + var prgNr = this.prg; + + var dayidx = TOM_DAYIDX[day]; + var timeouts = this.week[dayidx]; + var endtime; + + if (!timeouts) return; + + var equals_prevday = this.tom_equals_prevday(day); + + msg = "
"; + msg += "
 <\/div><\/th>\n +
Name<\/th>\n + Typen- Bezeichnung<\/th>\n + Bild<\/th>\n + Bezeichnung<\/th>\n + Serien- Nummer<\/th>\n + Interface \/ Kategorie<\/th>\n + Übertragungsmodus<\/th>\n + Gewerke<\/th>\n + Räume<\/th>\n + \"RSSI\"<\/th>\n + \"sichtbar\"<\/th>\n + \"bedienbar\"<\/th>\n + \"protokolliert\"<\/th>\n + Aktionen<\/th>\n + <\/tr>\n +
 <\/div><\/th>\n + ${nameFilter.getHTML(3)}\n + ${typeNameFilter.getHTML()}\n +
 <\/th>\n + ${descriptionFilter.getHTML()}\n + ${addressFilter.getHTML()}\n + ${interfaceFilter.getHTML()}\n + ${modeFilter.getHTML()}\n + ${funcFilter.getHTML()}\n + ${roomFilter.getHTML()}\n +  <\/th>\n +  <\/th>\n +  <\/th>\n +  <\/th>\n +  <\/th>\n + <\/tr>\n + <\/thead>\n +
\n + \"Kanäle\n + \"Kanäle\n + <\/td>\n + ${device.name}<\/td>\n + ${device.typeName}<\/td>\n +
${device.getThumbnailHTML()}<\/div><\/td>\n +
${device.typeDescription}<\/td>\n + ${device.address}${device.rfAddress}<\/td>\n + ${device.interfaceDisplayName}<\/td>\n + {for name in device.modes}${name}
{forelse} {\/for}<\/td>\n +
{for subsection in device.subsections}${subsection.name}
{forelse} {\/for}<\/td>\n +
{for room in device.rooms}${room.name}
{forelse} {\/for}<\/td>\n +
<\/td>\n + <\/td>\n + <\/td>\n + <\/td>\n + \n +
Einstellen<\/div>\n + {if device.isDeletable}\n +
Löschen<\/div>\n + {else}\n +
Löschen<\/div>\n + {\/if}\n +
Direkte<\/div>\n +
Programme<\/div>\n + <\/td>\n + <\/tr>\n + {for group in device.groups}\n +
 <\/td>\n + \n + \"Kanäle\n + \"Kanäle\n + <\/td>\n + ${group.name}<\/td>\n + ${group.typeName}<\/td>\n +
${group.thumbnailHTML}<\/div><\/td>\n +
${group.typeDescription}<\/td>\n + ${group.address}<\/td>\n + {for name in group.categories}${name}
{forelse} {\/for}<\/td>\n +
{for name in group.modes}${name}
{forelse} {\/for}<\/td>\n +
{for subsection in group.subsections}${subsection.name}
{forelse} {\/for}<\/td>\n +
{for room in group.rooms}${room.name}
{forelse} {\/for}<\/td>\n +
<\/td>\n + <\/td>\n + <\/td>\n + <\/td>\n + \n +
Einstellen<\/div>\n +
Direkte<\/div>\n +
Programme<\/div>\n + <\/td>\n + <\/tr>\n + {for channel in group.channels}\n +
 <\/td>\n + ${channel.name}${channel.nameExtention}<\/td>\n + ${channel.typeName}<\/td>\n +
${channel.thumbnailHTML}<\/div><\/td>\n +
${channel.typeDescription}<\/td>\n + ${channel.address}<\/td>\n + ${channel.category}<\/td>\n + ${channel.mode}<\/td>\n + {for subsection in channel.subsections}${subsection.name}
{forelse} {\/for}<\/td>\n +
{for room in channel.rooms}${room.name}
{forelse} {\/for}<\/td>\n +
<\/td>\n + <\/td>\n + <\/td>\n + <\/td>\n + \n +
Einstellen<\/div>\n +
Direkte<\/div>\n +
Programme<\/div>\n + <\/td>\n + <\/tr>\n + {\/for}\n + {\/for}\n + {for channel in device.singles}\n +\n + {if channel._isVisible}\n + {if channel.highlightChannel}\n +
 <\/td>\n + ${channel.name}${channel.nameExtention}<\/td>\n + ${channel.typeName}<\/td>\n +
${channel.thumbnailHTML}<\/div><\/td>\n +
${channel.typeDescription}<\/td>\n + ${channel.address}<\/td>\n + ${channel.category}<\/td>\n + ${channel.mode}<\/td>\n + {for subsection in channel.subsections}${subsection.name}
{forelse} {\/for}<\/td>\n +
{for room in channel.rooms}${room.name}
{forelse} {\/for}<\/td>\n +
<\/td>\n + <\/td>\n + <\/td>\n + <\/td>\n + \n +
Einstellen<\/div>\n +
Direkte<\/div>\n +
Programme<\/div>\n + <\/td>\n + <\/tr>\n + {\/if}\n + {\/if}\n + {\/for}\n + {forelse}\n +
 <\/td>\n + Keine Geräte verfügbar<\/td>\n + <\/tr>\n + {\/for}\n + <\/tbody>\n +
<\/td>\n +
<\/td>\n +
<\/td>\n +
<\/td>\n +
<\/td>\n +
<\/td>\n +
<\/td>\n +
<\/td>\n +
<\/td>\n +
<\/td>\n +
<\/td>\n +
<\/td>\n +
<\/td>\n +
<\/td>\n +
<\/td>\n +
<\/td>\n +
<\/td>\n + <\/tr> \n + <\/tfoot>\n +<\/table>\n +"; +LISTFILTER_JST = "
\n +
Filter<\/div>\n +
\n + \n + \n + \n + {for item in list}\n + \n + "; + html += ""; + html += ""; + + html += ""; + html += ""; + html += ""; + + html += ""; + + window.setTimeout(function() { + var carrierSenseProgressElem = jQuery("#carrierSenseProgress_" + index), + carrierSenseProgressBarElm = jQuery("#carrierSenseProgressBar_" + index), + carrierSenseValElm = jQuery("#carrierSenseVal" + index), + width, value; + + + carrierSenseValElm.text(csValue + csUnit); + + width = parseInt(carrierSenseProgressElem.css("width")); + value = (csValue != csValUnknown) ? width - (width / 100 * csValue) : width; + + carrierSenseProgressBarElm.css("width", value + "px"); + + }, 50); + + return html; + }; + + html += "
\n + ${item.name}<\/td>\n + <\/tr>\n + {\/for}\n + <\/tbody>\n + <\/table>\n +
Setzen<\/div>\n +
Schließen<\/div>\n + <\/form>\n + <\/div>\n +<\/th>\n +"; +MULTI_CHANNELCHOOSER_JST = "{macro printHead(name, id, langKey)}\n + {if id != sortId}\n +
${name}<\/th>\n + {else}\n + \n + ${name} \n + {if sortDescend}\n + \n + {else}\n + \n + {\/if}\n + <\/th>\n + {\/if}\n +{\/macro}\n +
\n +
Kanalauswahl<\/span>: ${title}<\/div>\n +
\n + \n + \n + \n + \n + \n + \n + \n + \n + \n + <\/colgroup>\n + \n + \n + \n + \n + {eval}actualDeviceAddress = \"\";{\/eval}\n + {for channel in channels}\n + {if ((channel.device.inInbox != true) && (channel.address != \"BidCoS-RF:0\"))}\n + {var virtualChannel = \"\"}\n + {var classExpertOnly = \"hidden j_expertChannel\"}\n + {var channelTypeID = channel.deviceType.id.toUpperCase()}\n +\n + {if channel.channelType == \"VIRTUAL_DIMMER\"} {var virtualChannel = \"hidden j_expertChannel\"} {\/if}\n + {if (channel.channelType == \"VIRTUAL_DUAL_WHITE_BRIGHTNESS\") || (channel.channelType == \"VIRTUAL_DUAL_WHITE_COLOR\")} {var virtualChannel = \"hidden j_expertChannel\"} {\/if}\n +\n + {if (channelTypeID != \"HMIP-MIOB\") && (channelTypeID != \"HMIP-WHS2\")}\n + {if (channel.channelType == \"DIMMER_TRANSMITTER\")\n + || (channel.channelType == \"SWITCH_TRANSMITTER\")\n + || (channel.channelType == \"BLIND_TRANSMITTER\")\n + || (channel.channelType == \"SHUTTER_TRANSMITTER\")\n + || (channel.channelType == \"ACOUSTIC_SIGNAL_TRANSMITTER\")}\n + {var virtualChannel = classExpertOnly;}\n + {\/if}\n + {if (channel.channelType == \"DIMMER_VIRTUAL_RECEIVER\")\n + || (channel.channelType == \"SWITCH_VIRTUAL_RECEIVER\")\n + || (channel.channelType == \"BLIND_VIRTUAL_RECEIVER\")\n + || (channel.channelType == \"SHUTTER_VIRTUAL_RECEIVER\")\n + || (channel.channelType == \"ACOUSTIC_SIGNAL_VIRTUAL_RECEIVER\")\n + || (channel.channelType == \"SERVO_VIRTUAL_RECEIVER\")}\n + {if actualDeviceAddress != channel.device.address}\n + {eval}\n + actualDeviceAddress = channel.device.address;\n + if (userIsNoExpert) {\n + if ((typeof channel.virtChCounter != \"undefined\") && (channel.virtChCounter != 1)) {\n + virtualChannel = classExpertOnly;\n + }\n + }\n + {\/eval}\n + {\/if}\n + {eval}if ((typeof channel.virtChCounter != \"undefined\") && (channel.virtChCounter != 1)) {virtualChannel = classExpertOnly;}{\/eval}\n + {\/if}\n + {\/if}\n +\n + {if (channelTypeID == \"HMIP-MIOB\") && ((channel.channelType == \"SWITCH_TRANSMITTER\") || ((channel.channelType == \"SWITCH_VIRTUAL_RECEIVER\") && ((channel.index != 3) && (channel.index != 7))))} {var virtualChannel = classExpertOnly} {\/if}\n +\n + {if ((channelTypeID == \"HMIP-WHS2\") && ((channel.channelType == \"SWITCH_TRANSMITTER\") || ((channel.channelType == \"SWITCH_VIRTUAL_RECEIVER\") &&\n + ((channel.index == 2) || (channel.index == 4) || (channel.index == 6) || (channel.index == 8))\n + )))} {var virtualChannel = classExpertOnly} {\/if}\n +\n + {if channel.channelType == \"VIR-OL-GTW-CH\"} {var virtualChannel = \"hidden\"} {\/if}\n + {if channel.channelType == \"VIR-HUE-GTW-CH\"} {var virtualChannel = \"hidden\"} {\/if}\n +\n + {if channel._selected == true} {var virtualChannel = \"\"} {\/if}\n +\n + \n + \n + " + + "" + + "" + + "" + + "" + + "" + + ""; + } + } + self.fetchDeviceList = false; + self.deleteScriptElements(); + if (self.newFwCounter > 0) { + self.showHintForAvailableDeviceFirmware(); + } + conInfo("All devices checked. " + self.newFwCounter + " actualized firmware versions found!"); + } + }, + + showHintForAvailableDeviceFirmware: function() { + var self = this, + rowShowDevFirmware = jQuery("#devFwAvailable"), + btnShowDevFirmware = jQuery("#devFwAvailable .firmwareAvailable"); + btnShowDevFirmware.click(function () { + self.showAvailableDeviceFirmware(); + }); + jQuery("#devFwAvailableCounter").text("(" + self.newFwCounter + ")"); + rowShowDevFirmware.show(); + }, + + deleteScriptElements: function() { + jQuery("#homematic_com_script").remove(); + jQuery("#homematic_com_script_fw").remove(); + }, + + showAvailableDeviceFirmware: function() { + var contentHeight = jQuery("#content").innerHeight(), + maxMessageBoxHeight = (this.newFwCounter + 5) * 20, + msgBoxHeight = (maxMessageBoxHeight < contentHeight) ? maxMessageBoxHeight : contentHeight; + + MessageBox.show(translateKey("dialogShowDeviceFirmwareTitle"), + "
 <\/th>\n + ${printHead(\"Name\", \"NAME\", \"thName\")}\n + Bild<\/th>\n + ${printHead(\"Beschreibung\", \"DESCRIPTION\", \"thDescription\")}\n + ${printHead(\"Seriennummer\", \"ADDRESS\", \"thSerialNumber\")}\n + ${printHead(\"Gewerke\", \"FUNC_NAMES\", \"thFunc\")}\n + ${printHead(\"Räume\", \"ROOM_NAMES\", \"thRooms\")}\n + <\/tr>\n +
 <\/th>\n + ${nameFilter.getHTML()}\n +  <\/th>\n +  <\/th>\n + \n + ${addressFilter.getHTML()}\n + ${funcFilter.getHTML()}\n + ${roomFilter.getHTML()}\n + <\/tr> \n + <\/thead>\n +
<\/td>\n + ${channel.name}${channel.nameExtention}<\/span><\/td>\n +
${channel.thumbnailHTML}<\/div><\/td>\n +
${channel.typeDescription}${channel.device.name}<\/td>\n + ${channel.address}<\/td>\n + \n + {for subsection in channel.subsections}\n + ${subsection.name}
\n + {forelse}\n +  \n + {\/for}\n + <\/td>\n +
\n + {for room in channel.rooms}\n + ${room.name}
\n + {forelse}\n +  \n + {\/for}\n + <\/td>\n + <\/tr>\n + {forelse}\n +
Keine Kanäle verfügbar<\/td>\n + <\/tr>\n + {\/if}\n + {\/for}\n + <\/tbody>\n + <\/table>\n +<\/div>\n +
\n +
Abbrechen<\/div>\n +
OK<\/div>\n +
Filter zurücksetzen<\/div>\n + {if false === showVirtual}\n +
virtuelle Kanäle anzeigen<\/div>\n + {else}\n +
virtuelle Kanäle ausblenden<\/div>\n + {\/if}\n +<\/div>\n +<\/div>"; +RF_CONFIG_JST = "
\n +\n +\n + \n + \n + \n + <\/colgroup>\n + \n + \n + \n + "; + for (var loop = 0; loop <= 5; loop++) { + content += + "" + + ""+ + "" + + //"" + + "" + + "" + + "" + + "" + + ""+ + ""; + } + return content; + }); + }, + + // Creates the options for the text selector + _getTextOptions: function() { + var options = ""; + options += ""; + for (var loop = 0; loop <= 19; loop++) { + options += ""; + } + options += ""; + return options; + }, + + // Creates the options for the color selector + _getColorOptions: function() { + var arColors =[ + translateKey("optionStatusDisplayWhite"), + translateKey("optionStatusDisplayRed"), + translateKey("optionStatusDisplayOrange"), + translateKey("optionStatusDisplayYellow"), + translateKey("optionStatusDisplayGreen"), + translateKey("optionStatusDisplayBlue") + ]; + + var options = ""; + for (var loop = 0; loop < arColors.length; loop++) { + options += ""; + } + return options; + }, + + // Creates the options for the icon selector + _getIconOptions: function() { + var options = "", + arOptionText = [ + translateKey("iconOff"), + translateKey("iconOn"), + translateKey("iconOpen"), + translateKey("iconClosed"), + translateKey("iconError"), + translateKey("iconOK"), + translateKey("iconInfo"), + translateKey("iconNewMessage"), + translateKey("iconServiceMessage"), + translateKey("iconSignalGreen"), + translateKey("iconSignalYellow"), + translateKey("iconSignalRed") + ]; + + options += ""; + for (var loop = 0; loop < 12; loop++) { + // Remark 2: This doesn´t work satisfying -- see Remark 1 + //options += ""; + options += ""; + } + return options; + }, + + // Returns an array of objects with the values of all lines. + // [Object {text="0x80, color="0x81", icon="0x82},.....]} + _getAllValues: function() { + var val = this.channelValue; + var arValues = val.split(","), //replace(/ /g, "").split(","), + arLines = []; // contains the lines 0 - 5 + + // Is a start key and end key available? Otherwise the string isn´t valid. + if (arValues[0] == this.startKey && arValues[arValues.length - 1] == this.endKey) { + var lineIndex = 0, + textEndIndex, + txtLengthCounter = 0, + lineLengthOffset = 0; + + arValues.shift(); // remove the start key 0x02 + arValues.pop(); // remove the end key 0x03 + + for (var loopx = 0; loopx < arValues.length; loopx++) { + var valueSet = {}; + // Is LF? + if (arValues[loopx] == this.lf) { + valueSet.text="notUsed"; + arLines[lineIndex] = valueSet; + lineIndex++; + } + if (arValues[loopx] == this.textKey) { + textEndIndex = jQuery.inArray(this.colorKey, arValues, loopx); + // Fetch text + valueSet.text = ""; + for (var loopy = loopx + 1; loopy < textEndIndex; loopy++) { + valueSet.text += arValues[loopy]; + txtLengthCounter++; + if (loopy < textEndIndex - 1) { + valueSet.text += ","; + } + } + // Fetch color + valueSet.color = arValues[textEndIndex + 1]; + // Fetch icon + if (arValues[textEndIndex + 2] == this.iconKey) { + valueSet.icon = arValues[textEndIndex + 3]; + lineLengthOffset = 5; + } else { + valueSet.icon = -1; + lineLengthOffset = 3; + } + arLines[lineIndex] = valueSet; + lineIndex++; + + // Set loopx counter to the end of the text line + loopx+=txtLengthCounter+lineLengthOffset; + txtLengthCounter = 0; + } + } + } else { + conInfo("Value string invalid"); + } + return arLines; + }, + + // Determines the real value of the HexVal + // For example: 0x80 = 0, 0x81 = 1 and so on + _convertHexVal2Val: function(hexVal) { + if (parseInt(hexVal.split(",")[0],16) < 128 ) { + // User defined text + return 99; + } + return parseInt(hexVal, 16) - 128; + }, + + // Converts a value to the necessary hex format + // For example: 0 = 0x80, 1 = 0x81 and so on + _convertVal2HexVal: function(intVal) { + return "0x" + (parseInt("0x80",16) + parseInt(intVal)).toString(16); + }, + + // Converts a ASCII string to a string with comma separated hex values + _convertPlainText2Hex: function(sPlainText) { + var hex = ''; + for(var i=0;i"); + } + }, + + // Not in use + _initDisplayConfigObject: function() { + var template = { + "keyText" : this.keyText, + "valText" : this.valText, + "keyColor" : this.keyColor, + "valColor" : this.valColor, + "keyIcon" : this.keyIcon, + "valIcon" : this.valIcon + }; + for (var loop = 0; loop <= 5; loop++) { + this.arDisplayData[loop] = template; + } + }, + + // Creates the string, necessary for the text field within the program + _createConfigString: function() { + var textElm, freeTextElm, colorElm, iconElm; + var result = this.startKey + ","; // Start key + + // Read 6 lines and create string + for (var loop = 0; loop < 6; loop++) { + textElm = jQuery("#textSelect_" + loop); + colorElm = jQuery("#colorSelect_" + loop); + iconElm = jQuery("#iconSelect_" + loop); + freeTextElm = jQuery("#freeText_" + loop); + + if (textElm.val() == -1) { + result+= this.lf + ","; + } else { + result += this.textKey + ","; + if (textElm.val() != "99") { + // Predefined text bloc + result += this._convertVal2HexVal(textElm.val()) + ","; + } else { + // Free user customized text + //result += freeTextElm.val() + ","; + result += this._convertPlainText2Hex(freeTextElm.val()); + } + result += this.colorKey + ","; + result += this._convertVal2HexVal(colorElm.val()) + ","; + if (iconElm.val() != -1) { + result += this.iconKey + ","; + result += this._convertVal2HexVal(iconElm.val()) + ","; + } + result += this.lf + ","; + } + } + result+= this.endKey; // End key + this.configString = result; + }, + + + // PUBLIC + getConfigString: function() { + return this.configString; + }, + + close: function(result) + { + Layer.remove(this.m_layer); + if (this.m_callback) { this.m_callback(result); } + }, + + yes: function() + { + this._createConfigString(); + this.close(YesNoDialog.RESULT_YES); + }, + + no: function() + { + this.close(YesNoDialog.RESULT_NO); + } + +}); + +StatusDisplayDialogEPaper = Class.create(StatusDisplayDialog, { + + initEPaper: function () { + conInfo("StatusDisplayDialogEPaper - initEPaper"); + this.displayType = "DIS-EP"; + }, + + // This creates the content of the dialog. + _addElements: function() { + var dialogContentElem = jQuery("#statusDisplayDialog"), + textOptions = this._getTextOptions(), + iconOptions = this._getIconOptions(), + soundOptions = this._getSoundOptions(), + soundQuantityOptions = this._getSoundQuantityOptions(), + soundTimeLagOptions = this._getSoundTimeLagOptions(), + flashOptions = this._getFlashOptions(), + + freeTextValue = translateKey("statusDisplayOptionFreeText"), + arrDisabledElements = ["disabled", "","","","disabled","disabled"]; + + dialogContentElem.append(function(index,html){ + //var content = ""; + var content = ""; + for (var loop = 0; loop <= 4; loop++) { + content += + "" + + ""+ + "" + + "" + + "" + + "" + + ""+ + ""; + } + + content += ""; + //content += ""; + //content += ""; + + content += ""; + content += + "" + + "" + + "" + + "" + + ""; + + content += ""; + + content += ""; + content += + "" + + "" + + "" ; + + content += ""; + + return content; + }); + }, + + // Creates the options for the text selector + _getTextOptions: function() { + var options = ""; + options += ""; + for (var loop = 0; loop <= 9; loop++) { + options += ""; + } + options += ""; + return options; + }, + + // Creates the options for the icon selector + _getIconOptions: function() { + var options = "", + arOptionText = [ + translateKey("iconOff"), + translateKey("iconOn"), + translateKey("iconOpen"), + translateKey("iconClosed"), + translateKey("iconError"), + translateKey("iconOK"), + translateKey("iconInfo"), + translateKey("iconNewMessage"), + translateKey("iconServiceMessage") + ]; + + options += ""; + for (var loop = 0; loop < 9; loop++) { + options += ""; + } + return options; + }, + + _getSoundOptions:function() { + var options = "", + arSound = ["", + translateKey("optionLong") + " " + translateKey("optionLong"), + translateKey("optionLong") + " " + translateKey("optionShort"), + translateKey("optionLong") + " " + translateKey("optionShort") + " " + translateKey("optionShort"), + translateKey("optionShort"), + translateKey("optionShort") + " " + translateKey("optionShort")]; + + options += ""; + options += ""; // This is a belated value which should appear as first option after 'not used' + for (var loop = 1; loop <= 5; loop++) { + options += ""; + } + return options; + }, + + _getSoundQuantityOptions: function() { + var options = ""; + for (var loop = 0; loop <= 14; loop++) { + options += ""; + } + options += ""; + return options; + }, + + _getSoundTimeLagOptions: function() { + var options = ""; + for (var loop = 0; loop <= 15; loop++) { + options += ""; + } + return options; + }, + + _getFlashOptions:function() { + var options = "", + arFlash = [translateKey("stringTableNotUsed"), translateKey("redFlash"), translateKey("greenFlash"), translateKey("orangeFlash")]; + for (var loop = 0; loop <= 3; loop++) { + options += ""; + } + return options; + }, + + // Creates the string, necessary for the text field within the program + _createConfigString: function() { + var textElm, freeTextElm,iconElm, + result = this.startKey + ","; // Start key + + // Read 5 lines and create string + for (var loop = 0; loop < 5; loop++) { + textElm = jQuery("#textSelect_" + loop); + iconElm = jQuery("#iconSelect_" + loop); + freeTextElm = jQuery("#freeText_" + loop); + + if (textElm.val() == -1) { + result+= this.lf + ","; + } else { + result += this.textKey + ","; + if (textElm.val() != "99") { + // Predefined text bloc + result += this._convertVal2HexVal(textElm.val()) + ","; + } else { + // Free user customized text + //result += freeTextElm.val() + ","; + result += this._convertPlainText2Hex(freeTextElm.val()); + } + if (iconElm.val() != -1) { + result += this.iconKey + ","; + result += this._convertVal2HexVal(iconElm.val()) + ","; + } + result += this.lf + ","; + } + } + result += this.soundKey + "," + jQuery("#soundSelectBox").val() + ","; + result += this.soundQuantityKey + "," + jQuery("#soundQuantitySelectBox").val() + ","; + result += this.soundTimeLagKey + "," + jQuery("#soundTimeLagSelectBox").val() + ","; + result += this.flashKey + "," + jQuery("#flashSelectBox").val() + ","; + result+= this.endKey; // End key + this.configString = result; + }, + /** + * Initializes the dialog + * @private + */ + _initAllValues: function() { + var self = this, + arValues = this.channelValue.split(","), + sizeChannelValue = arValues.length, + arAllValues = this._getAllValues(), + soundElm = jQuery("#soundSelectBox"), + soundQuantityElm = jQuery("#soundQuantitySelectBox"), + soundTimeLagElm = jQuery("#soundTimeLagSelectBox"), + flashElm = jQuery("#flashSelectBox"); + + + conInfo("DIS-EP: All values of the channel: "); + conInfo(arAllValues); + + jQuery.each(arAllValues, function(index, line) { + var textElm = jQuery("#textSelect_" + index), + iconElm = jQuery("#iconSelect_" + index), + freeTextElm = jQuery("#freeText_" + index); + + if (line.text != "notUsed") { + textElm.val(self._convertHexVal2Val(line.text)); + // User defined text + if (parseInt(line.text.split(",")[0],16) < 128) { + freeTextElm.val(decodeStringStatusDisplay(self._convertHexString2PlainText(line.text))); + } + if (line.icon != -1) { + iconElm.val(self._convertHexVal2Val(line.icon)); + setIconPreview({index: index, value: iconElm.val()}); + } else { + // Icon not in use + iconElm.val("-1"); + } + displayStatusDisplayOptionContainer(index, true); + } else { + textElm.val("-1"); + } + }); + soundElm.val(arValues[sizeChannelValue - 8]); // initialize sound select box + soundQuantityElm.val(arValues[sizeChannelValue - 6]); // initialize sound quantity select box + soundTimeLagElm.val(arValues[sizeChannelValue - 4]); // initialize sound time lag box + flashElm.val(arValues[sizeChannelValue - 2]); // initialize flash select box + + setFreeTextContainer(); + }, + // Returns an array of objects with the values of all lines. + // [Object {text="0x80, color="0x81", icon="0x82},.....]} + _getAllValues: function() { + var val = this.channelValue; + var arValues = val.split(","), //replace(/ /g, "").split(","), + arLines = []; // contains the lines 1,2,3 + + // Is a start key and end key available? Otherwise the string isn´t valid. + if (arValues[0] == this.startKey && arValues[arValues.length - 1] == this.endKey) { + var lineIndex = 0, + textIndex, + nextTextBlockIndex = 0, + textOffset = 0; + + arValues.shift(); // remove the start key 0x02 + arValues.pop(); // remove the end key 0x03 + //console.log("arValues: " + arValues); + for (var loopx = 0; loopx < arValues.length; loopx++) { + //console.log("current loopx: " + loopx); + var valueSet = {}; + nextTextBlockIndex = 0; + // Is LF? + if (arValues[loopx] == this.lf) { + valueSet.text="notUsed"; + arLines[lineIndex] = valueSet; + lineIndex++; + } + + if (arValues[loopx] == this.textKey) { + valueSet.text = ""; + // Read till icon or lf and increase loopx by the number of read chars + textIndex = loopx + 1; + do { + valueSet.text += arValues[textIndex]; + if ((arValues[textIndex + 1] != this.iconKey) && (arValues[textIndex + 1] != this.lf)) { + valueSet.text += ","; + } + + //console.log("added char: " + arValues[textIndex]); + textIndex++; + nextTextBlockIndex++; + } while ((arValues[textIndex] != this.iconKey) && (arValues[textIndex] != this.lf)) ; + + // Icon hinzufügen, entweder nicht benutzt (-1) oder den entsprechenden Wert + // Add the icon, either not used (-1) or the correspondent value + valueSet.icon = (arValues[textIndex] == this.iconKey) ? arValues[textIndex + 1] : -1; + arLines[lineIndex] = valueSet; + lineIndex++; + if (valueSet.icon == -1) {textOffset = 1;} else {textOffset = 3;} + // Jump to the next text block + loopx += nextTextBlockIndex + textOffset; // Springe zum nächsten Textblock + //console.log("new loopx : " + loopx); + } + } + } else { + conInfo("Value string invalid"); + } + return arLines; + } + +}); + +YesNoDialog.RESULT_NO = 0; +YesNoDialog.RESULT_YES = 1; +var arIconDesc = [], + resetEPaperDisplay = false; + +function getIconDescr(no) { + if(arIconDesc.length == 0) { + arIconDesc = [ + translateKey("iconLampOff"), + translateKey("iconLampOn"), + translateKey("iconPadlockOpen"), + translateKey("iconPadlockClosed"), + translateKey("iconX"), + translateKey("iconTick"), + translateKey("iconInfo"), + translateKey("iconEnvelope"), + translateKey("iconWrench"), + translateKey("iconSun"), + + translateKey("iconMoon"), + translateKey("iconWind"), + translateKey("iconCloud"), + translateKey("iconCloudBolt"), + translateKey("iconCloudLightRain"), + translateKey("iconCloudMoon"), + translateKey("iconCloudRain"), + translateKey("iconCloudSnow"), + translateKey("iconCloudSun"), + translateKey("iconCloundSunRain"), + + translateKey("iconSnowFlake"), + translateKey("iconRainDrop"), + translateKey("iconFlame"), + translateKey("iconWindowOpen"), + translateKey("iconShutter"), + translateKey("iconEco"), + translateKey("iconProtectionOff"), + translateKey("iconProtectionExternal"), + translateKey("iconProtectionInternal"), + translateKey("iconBell"), + + translateKey("iconClock") + ]; + } + return arIconDesc[no]; +}; + +function setIconPreview2(picNr, row) { + var picPath = "/ise/img/icons_hmip_wrcd/24/", + previewElm = jQuery("#iconPreview_" + row); + + if (picNr != 0) { + + previewElm.html(""); + } else { + previewElm.html(""); + } +}; + +function showHideSoundParams(soundNo) { + var soundParamElms = jQuery("[name='soundParam']"); + if (soundNo != -1) { + soundParamElms.show(); + } else { + soundParamElms.hide(); + } +}; + +function showHideDisplayConfig(elm) { + var resetDisplay = jQuery(elm).is(":checked"); + if (resetDisplay) { + jQuery("[name='displayConfig']").attr("style", "visibility:hidden"); + resetEPaperDisplay = true; + } else { + jQuery("[name='displayConfig']").attr("style", "visibility:visible"); + resetEPaperDisplay = false; + } +}; + +function setTextAlignment(row, alignment) { + var textElm = jQuery("#text_" + row); + textElm.attr("style","text-align: " + alignment.toLowerCase()); +}; + +function showDisplayConfigTextHelp() { + var title = translateKey("dialogHelpAcousticDisplayReceiverTitle"), + content = translateKey("dialogHelpAcousticDisplayReceiverContent"); + MessageBox.show(title, content,'', 475, 450); +}; + +function toggleSerialNumberDisplay() { + var tb = document.getElementById("fwUpdates"); + if (tb) { + var th = tb.getElementsByTagName("th")[2]; + if (th.style.display === "none") { + th.style.display = "block"; + document.querySelectorAll('#fwUpdates tbody tr td:nth-child(3)').forEach(el=>el.style.display = 'block') + } else { + th.style.display = "none"; + document.querySelectorAll('#fwUpdates tbody tr td:nth-child(3)').forEach(el=>el.style.display = 'none') + } + } +}; + +StatusDisplayDialogAcousticEPaper = Class.create({ + + initialize: function(title, content, value, callback, contentType) { + var _this_ = this; + + this.m_contentType = contentType; + this.m_callback = callback; + this.m_layer = document.createElement("div"); + this.m_layer.className = "YesNoDialogLayer"; + this.RESULT_NO = 0; + this.RESULT_YES = 1; + + this.arInitConfigString = value.split("},{"); // cfg string when entering the dialog + + resetEPaperDisplay = false; + + var dialog = document.createElement("div"); + dialog.className = "YesNoDialog"; + + var titleElement = document.createElement("div"); + titleElement.className = "YesNoDialogTitle"; + titleElement.appendChild(document.createTextNode(title)); + titleElement.onmousedown = function(event) { new Drag(this.parentNode, event); }; + dialog.appendChild(titleElement); + + var contentWrapper = document.createElement("div"); + contentWrapper.className = "YesNoDialogContentWrapper"; + + var contentElement = document.createElement("div"); + contentElement.className = "YesNoDialogContent"; + + if (this.m_contentType == "html") { + contentElement.innerHTML = content; + } else { + contentElement.appendChild(document.createTextNode(content)); + } + + contentWrapper.appendChild(contentElement); + + dialog.appendChild(contentWrapper); + + var footer = document.createElement("div"); + footer.className= "YesNoDialogFooter"; + + var yesButton = document.createElement("div"); + yesButton.className = "YesNoDialog_yesButton borderRadius5px colorGradient50px"; + yesButton.appendChild(document.createTextNode(translateKey('footerBtnOk'))); + yesButton.onclick = function() { _this_.yes(); }; + yesButton.id="btnYes"; + footer.appendChild(yesButton); + + var noButton = document.createElement("div"); + noButton.className = "YesNoDialog_noButton borderRadius5px colorGradient50px"; + noButton.appendChild(document.createTextNode(translateKey('footerBtnCancel'))); + noButton.onclick = function() { _this_.no(); }; + noButton.id = "btnNo"; + footer.appendChild(noButton); + + dialog.appendChild(footer); + + this.m_layer.appendChild(dialog); + Layer.add(this.m_layer); + + translatePage(".YesNoDialog"); + + this._addElements(); + if (this.arInitConfigString != "") { + this._initDialog(); + } + + this.setHeight(); + this.setWidth(700); + }, + + _initDialog: function() { + var self = this; + jQuery.each(this.arInitConfigString, function(index, cfg){ + var cfg = cfg.replace(/{/,"").replace(/}/,""), + arCfgParamString = cfg.split(","), + arParam = []; + + var curRow; + + jQuery.each(arCfgParamString, function(index, param) { + var _arParam = param.split("="); + arParam[_arParam[0]] = _arParam[1]; + }); + + if (typeof arParam["DDID"] != "undefined") { + curRow = arParam["DDID"]; + + if (arParam["DDS"] != "") { + if (arParam["DDS"] == "XXX") { + jQuery("#resetDisplay").attr("checked", true).change(); + arParam["DDS"] = ""; + // Because the reset command doesn't set DDA and DDTC + // we have to set DDA and DDTC manually when initializing the dialog within programs. + arParam["DDA"] = "CENTER"; + arParam["DDBC"] = "WHITE"; + arParam["DDTC"] = "BLACK"; + arParam["DDI"] = "0"; + } + jQuery("#text_" + curRow).val(self._decodeSpecialChars(arParam["DDS"])); + } + + jQuery("#align_" + curRow).val(arParam["DDA"]).change(); + jQuery("#bgColor_" + curRow).val(arParam["DDBC"]); + jQuery("#textColor_" + curRow).val(arParam["DDTC"]); + jQuery("#icon_" + curRow).val(arParam["DDI"]).change(); + } + + if (typeof arParam["ANS"] != "undefined") { + jQuery("#soundSelectBox").val(arParam["ANS"]).change(); + jQuery("#soundQuantitySelectBox").val(arParam["R"]); + jQuery("#soundTimeLagSelectBox").val(arParam["IN"]); + } + + }); + }, + + _addElements: function() { + var self = this, + dialogContentElem = jQuery("#statusDisplayDialog"); + + dialogContentElem.append(function(index,html){ + var content = "
Auswahl<\/th>\n + Seriennummer<\/th>\n + Zugriffscode<\/th>\n + IP Adresse<\/td>\n + <\/tr>\n +\t{for gateway in m_gateways}\n +
<\/td>\n + ${gateway.serial} <\/td>\n + ${gateway.key} <\/td>\n + ${gateway.ip} <\/td>\n + <\/tr>\n +\t{forelse}\n +\t
Momentan sind keine Funk-LAN-Gateways verfügbar.<\/td>\n + <\/tr>\n +\t{\/for}\n +<\/table>\n +<\/div>\n +<\/form>"; +STRINGFILTER_JST = "\n +
Filter<\/div>\n +
\n +
\n + \n +
Setzen<\/div>\n +
Schließen<\/div>\n + <\/div>\n + <\/div>\n +<\/th>"; +DEV_LIST = new Array(); +DEV_DESCRIPTION = new Array(); +DEV_PATHS = new Array(); +DEV_HIGHLIGHT = new Array(); +DEV_LIST.push('HM-RC-Sec4-3'); +DEV_DESCRIPTION["HM-RC-Sec4-3"] = "HM-RC-4"; +DEV_PATHS["HM-RC-Sec4-3"] = new Object(); +DEV_PATHS["HM-RC-Sec4-3"]["50"] = "/config/img/devices/50/84_hm-rc-4-x_thumb.png"; +DEV_PATHS["HM-RC-Sec4-3"]["250"] = "/config/img/devices/250/85_hm-rc-sec4-3.png"; +DEV_HIGHLIGHT["HM-RC-Sec4-3"] = new Object(); +DEV_HIGHLIGHT["HM-RC-Sec4-3"]["arrow_part1"] = [6, 0.312, 0.288, 0.416, 0.288, 0.012]; +DEV_HIGHLIGHT["HM-RC-Sec4-3"]["arrow_part2"] = [6, 0.312, 0.288, 0.352, 0.248, 0.012]; +DEV_HIGHLIGHT["HM-RC-Sec4-3"]["arrow_part3"] = [6, 0.312, 0.288, 0.352, 0.328, 0.012]; +DEV_HIGHLIGHT["HM-RC-Sec4-3"]["Arrow"] = [5, 'arrow_part1', 'arrow_part2', 'arrow_part3']; +DEV_HIGHLIGHT["HM-RC-Sec4-3"]["1_Arrow"] = [7, 'Arrow', 0.25, 0.0]; +DEV_HIGHLIGHT["HM-RC-Sec4-3"]["2_Arrow"] = [7, 'Arrow', 0.238, 0.156]; +DEV_HIGHLIGHT["HM-RC-Sec4-3"]["3_Arrow"] = [7, 'Arrow', 0.228, 0.312]; +DEV_HIGHLIGHT["HM-RC-Sec4-3"]["4_Arrow"] = [7, 'Arrow', 0.212, 0.468]; +DEV_HIGHLIGHT["HM-RC-Sec4-3"]["1"] = [5, '2_Arrow']; +DEV_HIGHLIGHT["HM-RC-Sec4-3"]["2"] = [5, '1_Arrow']; +DEV_HIGHLIGHT["HM-RC-Sec4-3"]["3"] = [5, '4_Arrow']; +DEV_HIGHLIGHT["HM-RC-Sec4-3"]["4"] = [5, '3_Arrow']; +DEV_HIGHLIGHT["HM-RC-Sec4-3"]["1+2"] = [5, '1_Arrow', '2_Arrow']; +DEV_HIGHLIGHT["HM-RC-Sec4-3"]["3+4"] = [5, '3_Arrow', '4_Arrow']; +DEV_LIST.push('HmIP-eTRV-C'); +DEV_DESCRIPTION["HmIP-eTRV-C"] = "TRV-C"; +DEV_PATHS["HmIP-eTRV-C"] = new Object(); +DEV_PATHS["HmIP-eTRV-C"]["50"] = "/config/img/devices/50/188_hmip-etrv-c_thumb.png"; +DEV_PATHS["HmIP-eTRV-C"]["250"] = "/config/img/devices/250/188_hmip-etrv-c.png"; +DEV_HIGHLIGHT["HmIP-eTRV-C"] = new Object(); +DEV_LIST.push('HMW-LC-Bl1-DR'); +DEV_DESCRIPTION["HMW-LC-Bl1-DR"] = "HMW-LC-Bl1-DR"; +DEV_PATHS["HMW-LC-Bl1-DR"] = new Object(); +DEV_PATHS["HMW-LC-Bl1-DR"]["50"] = "/config/img/devices/50/27_hmw-lc-bl1-dr_thumb.png"; +DEV_PATHS["HMW-LC-Bl1-DR"]["250"] = "/config/img/devices/250/27_hmw-lc-bl1-dr.png"; +DEV_HIGHLIGHT["HMW-LC-Bl1-DR"] = new Object(); +DEV_HIGHLIGHT["HMW-LC-Bl1-DR"]["1"] = [2, 0.452, 0.772, 0.044, 0.06]; +DEV_HIGHLIGHT["HMW-LC-Bl1-DR"]["2"] = [2, 0.5, 0.772, 0.048, 0.06]; +DEV_HIGHLIGHT["HMW-LC-Bl1-DR"]["3"] = [2, 0.452, 0.388, 0.096, 0.06]; +DEV_LIST.push('HmIP-WTH-B-2'); +DEV_DESCRIPTION["HmIP-WTH-B-2"] = "HmIP-WTH-B"; +DEV_PATHS["HmIP-WTH-B-2"] = new Object(); +DEV_PATHS["HmIP-WTH-B-2"]["50"] = "/config/img/devices/50/200_hmip-wth-b_thumb.png"; +DEV_PATHS["HmIP-WTH-B-2"]["250"] = "/config/img/devices/250/200_hmip-wth-b.png"; +DEV_HIGHLIGHT["HmIP-WTH-B-2"] = new Object(); +DEV_LIST.push('HmIPW-STH'); +DEV_DESCRIPTION["HmIPW-STH"] = "HmIPW-STH"; +DEV_PATHS["HmIPW-STH"] = new Object(); +DEV_PATHS["HmIPW-STH"]["50"] = "/config/img/devices/50/146_hmip-sth_thumb.png"; +DEV_PATHS["HmIPW-STH"]["250"] = "/config/img/devices/250/146_hmip-sth.png"; +DEV_HIGHLIGHT["HmIPW-STH"] = new Object(); +DEV_LIST.push('HM-RC-Key3'); +DEV_DESCRIPTION["HM-RC-Key3"] = "HM-RC-Key3"; +DEV_PATHS["HM-RC-Key3"] = new Object(); +DEV_PATHS["HM-RC-Key3"]["50"] = "/config/img/devices/50/23_hm-rc-key3-b_thumb.png"; +DEV_PATHS["HM-RC-Key3"]["250"] = "/config/img/devices/250/23_hm-rc-key3-b.png"; +DEV_HIGHLIGHT["HM-RC-Key3"] = new Object(); +DEV_HIGHLIGHT["HM-RC-Key3"]["1"] = [4, 0.252, 0.2, 0.16, 0.18]; +DEV_HIGHLIGHT["HM-RC-Key3"]["2"] = [4, 0.492, 0.2, 0.16, 0.18]; +DEV_HIGHLIGHT["HM-RC-Key3"]["3"] = [4, 0.34, 0.484, 0.228, 0.252]; +DEV_HIGHLIGHT["HM-RC-Key3"]["1+2"] = [5, '1', '2']; +DEV_LIST.push('HM-Dis-TD-T'); +DEV_DESCRIPTION["HM-Dis-TD-T"] = "HM-Dis-TD-T"; +DEV_PATHS["HM-Dis-TD-T"] = new Object(); +DEV_PATHS["HM-Dis-TD-T"]["50"] = "/config/img/devices/50/81_hm-dis-td-t_thumb.png"; +DEV_PATHS["HM-Dis-TD-T"]["250"] = "/config/img/devices/250/81_hm-dis-td-t.png"; +DEV_HIGHLIGHT["HM-Dis-TD-T"] = new Object(); +DEV_LIST.push('HM-ES-PMSw1-DR'); +DEV_DESCRIPTION["HM-ES-PMSw1-DR"] = "HM-ES-PMSw1-DR"; +DEV_PATHS["HM-ES-PMSw1-DR"] = new Object(); +DEV_PATHS["HM-ES-PMSw1-DR"]["50"] = "/config/img/devices/50/110_hm-es-pmsw1-dr_thump.png"; +DEV_PATHS["HM-ES-PMSw1-DR"]["250"] = "/config/img/devices/250/110_hm-es-pmsw1-dr.png"; +DEV_HIGHLIGHT["HM-ES-PMSw1-DR"] = new Object(); +DEV_LIST.push('KS550'); +DEV_DESCRIPTION["KS550"] = "KS550"; +DEV_PATHS["KS550"] = new Object(); +DEV_PATHS["KS550"]["50"] = "/config/img/devices/50/WeatherCombiSensor_thumb.png"; +DEV_PATHS["KS550"]["250"] = "/config/img/devices/250/WeatherCombiSensor.png"; +DEV_HIGHLIGHT["KS550"] = new Object(); +DEV_LIST.push('HM-WS550-US'); +DEV_DESCRIPTION["HM-WS550-US"] = "HM-WS550-US"; +DEV_PATHS["HM-WS550-US"] = new Object(); +DEV_PATHS["HM-WS550-US"]["50"] = "/config/img/devices/50/9_hm-ws550-us_thumb.png"; +DEV_PATHS["HM-WS550-US"]["250"] = "/config/img/devices/250/9_hm-ws550-us.png"; +DEV_HIGHLIGHT["HM-WS550-US"] = new Object(); +DEV_HIGHLIGHT["HM-WS550-US"]["1"] = [3, 0.440, 0.200, '1', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-WS550-US"]["2"] = [3, 0.440, 0.200, '2', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-WS550-US"]["3"] = [3, 0.440, 0.200, '3', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-WS550-US"]["4"] = [3, 0.440, 0.200, '4', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-WS550-US"]["5"] = [3, 0.440, 0.200, '5', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-WS550-US"]["6"] = [3, 0.440, 0.200, '6', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-WS550-US"]["7"] = [3, 0.440, 0.200, '7', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-WS550-US"]["8"] = [3, 0.440, 0.200, '8', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-WS550-US"]["9"] = [3, 0.440, 0.200, '9', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-WS550-US"]["10"] = [3, 0.405, 0.200, '10', 0.124, 'verdana', Font.BOLD]; +DEV_LIST.push('HmIP-PSM-2 QHJ'); +DEV_DESCRIPTION["HmIP-PSM-2 QHJ"] = "PSM"; +DEV_PATHS["HmIP-PSM-2 QHJ"] = new Object(); +DEV_PATHS["HmIP-PSM-2 QHJ"]["50"] = "/config/img/devices/50/113_hmip-psm_thumb.png"; +DEV_PATHS["HmIP-PSM-2 QHJ"]["250"] = "/config/img/devices/250/113_hmip-psm.png"; +DEV_HIGHLIGHT["HmIP-PSM-2 QHJ"] = new Object(); +DEV_LIST.push('HmIP-KRC4'); +DEV_DESCRIPTION["HmIP-KRC4"] = "KRC4"; +DEV_PATHS["HmIP-KRC4"] = new Object(); +DEV_PATHS["HmIP-KRC4"]["50"] = "/config/img/devices/50/84_hm-rc-4-x_thumb.png"; +DEV_PATHS["HmIP-KRC4"]["250"] = "/config/img/devices/250/84_hm-rc-4-3.png"; +DEV_HIGHLIGHT["HmIP-KRC4"] = new Object(); +DEV_HIGHLIGHT["HmIP-KRC4"]["arrow_part1"] = [6, 0.312, 0.288, 0.416, 0.288, 0.012]; +DEV_HIGHLIGHT["HmIP-KRC4"]["arrow_part2"] = [6, 0.312, 0.288, 0.352, 0.248, 0.012]; +DEV_HIGHLIGHT["HmIP-KRC4"]["arrow_part3"] = [6, 0.312, 0.288, 0.352, 0.328, 0.012]; +DEV_HIGHLIGHT["HmIP-KRC4"]["Arrow"] = [5, 'arrow_part1', 'arrow_part2', 'arrow_part3']; +DEV_HIGHLIGHT["HmIP-KRC4"]["1_Arrow"] = [7, 'Arrow', 0.25, 0.0]; +DEV_HIGHLIGHT["HmIP-KRC4"]["2_Arrow"] = [7, 'Arrow', 0.238, 0.156]; +DEV_HIGHLIGHT["HmIP-KRC4"]["3_Arrow"] = [7, 'Arrow', 0.228, 0.312]; +DEV_HIGHLIGHT["HmIP-KRC4"]["4_Arrow"] = [7, 'Arrow', 0.212, 0.468]; +DEV_HIGHLIGHT["HmIP-KRC4"]["1"] = [5, '2_Arrow']; +DEV_HIGHLIGHT["HmIP-KRC4"]["2"] = [5, '1_Arrow']; +DEV_HIGHLIGHT["HmIP-KRC4"]["3"] = [5, '4_Arrow']; +DEV_HIGHLIGHT["HmIP-KRC4"]["4"] = [5, '3_Arrow']; +DEV_HIGHLIGHT["HmIP-KRC4"]["1+2"] = [5, '1_Arrow', '2_Arrow']; +DEV_HIGHLIGHT["HmIP-KRC4"]["3+4"] = [5, '3_Arrow', '4_Arrow']; +DEV_LIST.push('HmIP-FLC'); +DEV_DESCRIPTION["HmIP-FLC"] = "HmIP-FLC"; +DEV_PATHS["HmIP-FLC"] = new Object(); +DEV_PATHS["HmIP-FLC"]["50"] = "/config/img/devices/50/233_hmip-flc_thumb.png"; +DEV_PATHS["HmIP-FLC"]["250"] = "/config/img/devices/250/233_hmip-flc.png"; +DEV_HIGHLIGHT["HmIP-FLC"] = new Object(); +DEV_LIST.push('HmIP-MOD-OC8'); +DEV_DESCRIPTION["HmIP-MOD-OC8"] = "HmIP-MOD-OC8"; +DEV_PATHS["HmIP-MOD-OC8"] = new Object(); +DEV_PATHS["HmIP-MOD-OC8"]["50"] = "/config/img/devices/50/156_hmip-mod-oc8_thumb.png"; +DEV_PATHS["HmIP-MOD-OC8"]["250"] = "/config/img/devices/250/156_hmip-mod-oc8.png"; +DEV_HIGHLIGHT["HmIP-MOD-OC8"] = new Object(); +DEV_LIST.push('HmIP-KRC4-2'); +DEV_DESCRIPTION["HmIP-KRC4-2"] = "KRC4"; +DEV_PATHS["HmIP-KRC4-2"] = new Object(); +DEV_PATHS["HmIP-KRC4-2"]["50"] = "/config/img/devices/50/84_hm-rc-4-x_thumb.png"; +DEV_PATHS["HmIP-KRC4-2"]["250"] = "/config/img/devices/250/84_hm-rc-4-3.png"; +DEV_HIGHLIGHT["HmIP-KRC4-2"] = new Object(); +DEV_HIGHLIGHT["HmIP-KRC4-2"]["arrow_part1"] = [6, 0.312, 0.288, 0.416, 0.288, 0.012]; +DEV_HIGHLIGHT["HmIP-KRC4-2"]["arrow_part2"] = [6, 0.312, 0.288, 0.352, 0.248, 0.012]; +DEV_HIGHLIGHT["HmIP-KRC4-2"]["arrow_part3"] = [6, 0.312, 0.288, 0.352, 0.328, 0.012]; +DEV_HIGHLIGHT["HmIP-KRC4-2"]["Arrow"] = [5, 'arrow_part1', 'arrow_part2', 'arrow_part3']; +DEV_HIGHLIGHT["HmIP-KRC4-2"]["1_Arrow"] = [7, 'Arrow', 0.25, 0.0]; +DEV_HIGHLIGHT["HmIP-KRC4-2"]["2_Arrow"] = [7, 'Arrow', 0.238, 0.156]; +DEV_HIGHLIGHT["HmIP-KRC4-2"]["3_Arrow"] = [7, 'Arrow', 0.228, 0.312]; +DEV_HIGHLIGHT["HmIP-KRC4-2"]["4_Arrow"] = [7, 'Arrow', 0.212, 0.468]; +DEV_HIGHLIGHT["HmIP-KRC4-2"]["1"] = [5, '2_Arrow']; +DEV_HIGHLIGHT["HmIP-KRC4-2"]["2"] = [5, '1_Arrow']; +DEV_HIGHLIGHT["HmIP-KRC4-2"]["3"] = [5, '4_Arrow']; +DEV_HIGHLIGHT["HmIP-KRC4-2"]["4"] = [5, '3_Arrow']; +DEV_HIGHLIGHT["HmIP-KRC4-2"]["1+2"] = [5, '1_Arrow', '2_Arrow']; +DEV_HIGHLIGHT["HmIP-KRC4-2"]["3+4"] = [5, '3_Arrow', '4_Arrow']; +DEV_LIST.push('HmIP-eTRV-B'); +DEV_DESCRIPTION["HmIP-eTRV-B"] = "TRV-B"; +DEV_PATHS["HmIP-eTRV-B"] = new Object(); +DEV_PATHS["HmIP-eTRV-B"]["50"] = "/config/img/devices/50/180_hmip-etrv-b_thumb.png"; +DEV_PATHS["HmIP-eTRV-B"]["250"] = "/config/img/devices/250/180_hmip-etrv-b.png"; +DEV_HIGHLIGHT["HmIP-eTRV-B"] = new Object(); +DEV_LIST.push('HmIPW-FAL24-C10'); +DEV_DESCRIPTION["HmIPW-FAL24-C10"] = "HmIPW-FAL24-C10"; +DEV_PATHS["HmIPW-FAL24-C10"] = new Object(); +DEV_PATHS["HmIPW-FAL24-C10"]["50"] = "/config/img/devices/50/138_hmip-fal-c10_thumb.png"; +DEV_PATHS["HmIPW-FAL24-C10"]["250"] = "/config/img/devices/250/138_hmip-fal-c10.png"; +DEV_HIGHLIGHT["HmIPW-FAL24-C10"] = new Object(); +DEV_LIST.push('HmIP-WGC'); +DEV_DESCRIPTION["HmIP-WGC"] = "HmIP-WGC"; +DEV_PATHS["HmIP-WGC"] = new Object(); +DEV_PATHS["HmIP-WGC"]["50"] = "/config/img/devices/50/144_hmip-wgc_thumb.png"; +DEV_PATHS["HmIP-WGC"]["250"] = "/config/img/devices/250/144_hmip-wgc.png"; +DEV_HIGHLIGHT["HmIP-WGC"] = new Object(); +DEV_LIST.push('HM-Sen-LI-O'); +DEV_DESCRIPTION["HM-Sen-LI-O"] = "HM-Sen-LI-O"; +DEV_PATHS["HM-Sen-LI-O"] = new Object(); +DEV_PATHS["HM-Sen-LI-O"]["50"] = "/config/img/devices/50/126_hm-sen-li-o_thumb.png"; +DEV_PATHS["HM-Sen-LI-O"]["250"] = "/config/img/devices/250/126_hm-sen-li-o.png"; +DEV_HIGHLIGHT["HM-Sen-LI-O"] = new Object(); +DEV_LIST.push('HmIP-STHO'); +DEV_DESCRIPTION["HmIP-STHO"] = "HmIP-STHO"; +DEV_PATHS["HmIP-STHO"] = new Object(); +DEV_PATHS["HmIP-STHO"]["50"] = "/config/img/devices/50/148_hmip-stho_thumb.png"; +DEV_PATHS["HmIP-STHO"]["250"] = "/config/img/devices/250/148_hmip-stho.png"; +DEV_HIGHLIGHT["HmIP-STHO"] = new Object(); +DEV_LIST.push('ELV-SH-BM-S'); +DEV_DESCRIPTION["ELV-SH-BM-S"] = "ELV-SH-BM-S"; +DEV_PATHS["ELV-SH-BM-S"] = new Object(); +DEV_PATHS["ELV-SH-BM-S"]["50"] = "/config/img/devices/50/229_elv-sh-bm-s_thumb.png"; +DEV_PATHS["ELV-SH-BM-S"]["250"] = "/config/img/devices/250/229_elv-sh-bm-s.png"; +DEV_HIGHLIGHT["ELV-SH-BM-S"] = new Object(); +DEV_LIST.push('HM-Sec-SC-2'); +DEV_DESCRIPTION["HM-Sec-SC-2"] = "HM-Sec-SC-2"; +DEV_PATHS["HM-Sec-SC-2"] = new Object(); +DEV_PATHS["HM-Sec-SC-2"]["50"] = "/config/img/devices/50/16_hm-sec-sc_thumb.png"; +DEV_PATHS["HM-Sec-SC-2"]["250"] = "/config/img/devices/250/16_hm-sec-sc.png"; +DEV_HIGHLIGHT["HM-Sec-SC-2"] = new Object(); +DEV_LIST.push('HM-LC-Sw1-Pl-DN-R3'); +DEV_DESCRIPTION["HM-LC-Sw1-Pl-DN-R3"] = "HM-LC-Sw1-Pl-DN-R3"; +DEV_PATHS["HM-LC-Sw1-Pl-DN-R3"] = new Object(); +DEV_PATHS["HM-LC-Sw1-Pl-DN-R3"]["50"] = "/config/img/devices/50/107_hm-es-pmsw1-pl-R3_thumb.png"; +DEV_PATHS["HM-LC-Sw1-Pl-DN-R3"]["250"] = "/config/img/devices/250/107_hm-es-pmsw1-pl-R3.png"; +DEV_HIGHLIGHT["HM-LC-Sw1-Pl-DN-R3"] = new Object(); +DEV_LIST.push('HmIP-BWTH'); +DEV_DESCRIPTION["HmIP-BWTH"] = "HmIP-WTH"; +DEV_PATHS["HmIP-BWTH"] = new Object(); +DEV_PATHS["HmIP-BWTH"]["50"] = "/config/img/devices/50/121_hmip-wth_thumb.png"; +DEV_PATHS["HmIP-BWTH"]["250"] = "/config/img/devices/250/121_hmip-wth.png"; +DEV_HIGHLIGHT["HmIP-BWTH"] = new Object(); +DEV_LIST.push('HmIP-WTH-2'); +DEV_DESCRIPTION["HmIP-WTH-2"] = "HmIP-WTH-2"; +DEV_PATHS["HmIP-WTH-2"] = new Object(); +DEV_PATHS["HmIP-WTH-2"]["50"] = "/config/img/devices/50/121_hmip-wth_thumb.png"; +DEV_PATHS["HmIP-WTH-2"]["250"] = "/config/img/devices/250/121_hmip-wth.png"; +DEV_HIGHLIGHT["HmIP-WTH-2"] = new Object(); +DEV_LIST.push('HM-RC-4-3-D'); +DEV_DESCRIPTION["HM-RC-4-3-D"] = "HM-RC-4"; +DEV_PATHS["HM-RC-4-3-D"] = new Object(); +DEV_PATHS["HM-RC-4-3-D"]["50"] = "/config/img/devices/50/84_hm-rc-4-x_thumb.png"; +DEV_PATHS["HM-RC-4-3-D"]["250"] = "/config/img/devices/250/116_hm-rc-4-3_brc-h3.png"; +DEV_HIGHLIGHT["HM-RC-4-3-D"] = new Object(); +DEV_LIST.push('HM-Sec-SD-Team'); +DEV_DESCRIPTION["HM-Sec-SD-Team"] = "HM-Sec-SD-Team"; +DEV_PATHS["HM-Sec-SD-Team"] = new Object(); +DEV_PATHS["HM-Sec-SD-Team"]["50"] = "/config/img/devices/50/52_hm-sec-sd-team_thumb.png"; +DEV_PATHS["HM-Sec-SD-Team"]["250"] = "/config/img/devices/250/52_hm-sec-sd-team.png"; +DEV_HIGHLIGHT["HM-Sec-SD-Team"] = new Object(); +DEV_LIST.push('263 130'); +DEV_DESCRIPTION["263 130"] = "263_130"; +DEV_PATHS["263 130"] = new Object(); +DEV_PATHS["263 130"]["50"] = "/config/img/devices/50/4_hm-lc-sw1-fm_thumb.png"; +DEV_PATHS["263 130"]["250"] = "/config/img/devices/250/4_hm-lc-sw1-fm.png"; +DEV_HIGHLIGHT["263 130"] = new Object(); +DEV_HIGHLIGHT["263 130"]["1_AUS"] = [2, 0.288, 0.66, 0.068, 0.152]; +DEV_HIGHLIGHT["263 130"]["1_EIN"] = [2, 0.548, 0.66, 0.068, 0.152]; +DEV_HIGHLIGHT["263 130"]["1"] = [5, '1_AUS', '1_EIN']; +DEV_LIST.push('263_149_/_263_150'); +DEV_DESCRIPTION["263_149_/_263_150"] = "263_149_/_263_150"; +DEV_PATHS["263_149_/_263_150"] = new Object(); +DEV_PATHS["263_149_/_263_150"]["50"] = "/config/img/devices/50/hm_resc-win-pcb-sc_thumb.png"; +DEV_PATHS["263_149_/_263_150"]["250"] = "/config/img/devices/250/hm_resc-win-pcb-sc.png"; +DEV_HIGHLIGHT["263_149_/_263_150"] = new Object(); +DEV_LIST.push('HM-PB-2-WM55-2'); +DEV_DESCRIPTION["HM-PB-2-WM55-2"] = "HM-PB-2-WM55"; +DEV_PATHS["HM-PB-2-WM55-2"] = new Object(); +DEV_PATHS["HM-PB-2-WM55-2"]["50"] = "/config/img/devices/50/75_hm-pb-2-wm55_thumb.png"; +DEV_PATHS["HM-PB-2-WM55-2"]["250"] = "/config/img/devices/250/75_hm-pb-2-wm55.png"; +DEV_HIGHLIGHT["HM-PB-2-WM55-2"] = new Object(); +DEV_HIGHLIGHT["HM-PB-2-WM55-2"]["2"] = [2, 0.204, 0.23, 0.546, 0.128]; +DEV_HIGHLIGHT["HM-PB-2-WM55-2"]["1"] = [2, 0.204, 0.65, 0.546, 0.128]; +DEV_LIST.push('HmIP-FCI1'); +DEV_DESCRIPTION["HmIP-FCI1"] = "HmIP-FCI1"; +DEV_PATHS["HmIP-FCI1"] = new Object(); +DEV_PATHS["HmIP-FCI1"]["50"] = "/config/img/devices/50/182_hmip-fci1_thumb.png"; +DEV_PATHS["HmIP-FCI1"]["250"] = "/config/img/devices/250/182_hmip-fci1.png"; +DEV_HIGHLIGHT["HmIP-FCI1"] = new Object(); +DEV_LIST.push('HmIPW-DRAP'); +DEV_DESCRIPTION["HmIPW-DRAP"] = "HmIPW-DRAP"; +DEV_PATHS["HmIPW-DRAP"] = new Object(); +DEV_PATHS["HmIPW-DRAP"]["50"] = "/config/img/devices/50/162_hmipw-drap_thumb.png"; +DEV_PATHS["HmIPW-DRAP"]["250"] = "/config/img/devices/250/162_hmipw-drap.png"; +DEV_HIGHLIGHT["HmIPW-DRAP"] = new Object(); +DEV_HIGHLIGHT["HmIPW-DRAP"]["1"] = [1, 0.240, 0.875, 0.040]; +DEV_HIGHLIGHT["HmIPW-DRAP"]["2"] = [1, 0.450, 0.875, 0.040]; +DEV_LIST.push('HM-LC-Dim1T-FM-644'); +DEV_DESCRIPTION["HM-LC-Dim1T-FM-644"] = "HM-LC-Dim1T-FM"; +DEV_PATHS["HM-LC-Dim1T-FM-644"] = new Object(); +DEV_PATHS["HM-LC-Dim1T-FM-644"]["50"] = "/config/img/devices/50/65_hm-lc-dim1t-fm_thumb.png"; +DEV_PATHS["HM-LC-Dim1T-FM-644"]["250"] = "/config/img/devices/250/65_hm-lc-dim1t-fm.png"; +DEV_HIGHLIGHT["HM-LC-Dim1T-FM-644"] = new Object(); +DEV_LIST.push('HM-WDS30-OT2-SM-2'); +DEV_DESCRIPTION["HM-WDS30-OT2-SM-2"] = "HM-WDS30-OT2-SM"; +DEV_PATHS["HM-WDS30-OT2-SM-2"] = new Object(); +DEV_PATHS["HM-WDS30-OT2-SM-2"]["50"] = "/config/img/devices/50/127_hm-wds30-ot2-sm-2_thumb.png"; +DEV_PATHS["HM-WDS30-OT2-SM-2"]["250"] = "/config/img/devices/250/127_hm-wds30-ot2-sm-2.png"; +DEV_HIGHLIGHT["HM-WDS30-OT2-SM-2"] = new Object(); +DEV_LIST.push('HM-LC-Sw1-Pl'); +DEV_DESCRIPTION["HM-LC-Sw1-Pl"] = "HM-LC-Sw1-Pl"; +DEV_PATHS["HM-LC-Sw1-Pl"] = new Object(); +DEV_PATHS["HM-LC-Sw1-Pl"]["50"] = "/config/img/devices/50/OM55_DimmerSwitch_thumb.png"; +DEV_PATHS["HM-LC-Sw1-Pl"]["250"] = "/config/img/devices/250/OM55_DimmerSwitch.png"; +DEV_HIGHLIGHT["HM-LC-Sw1-Pl"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Sw1-Pl"]["1_part1"] = [2, 0.548, 0.468, 0.072, 0.052]; +DEV_HIGHLIGHT["HM-LC-Sw1-Pl"]["1_part2"] = [2, 0.612, 0.452, 0.028, 0.056]; +DEV_HIGHLIGHT["HM-LC-Sw1-Pl"]["1"] = [5, '1_part1', '1_part2']; +DEV_LIST.push('HM-Sen-EP'); +DEV_DESCRIPTION["HM-Sen-EP"] = "HM-Sen-EP"; +DEV_PATHS["HM-Sen-EP"] = new Object(); +DEV_PATHS["HM-Sen-EP"]["50"] = "/config/img/devices/50/48_hm-sen-ep_thumb.png"; +DEV_PATHS["HM-Sen-EP"]["250"] = "/config/img/devices/250/48_hm-sen-ep.png"; +DEV_HIGHLIGHT["HM-Sen-EP"] = new Object(); +DEV_HIGHLIGHT["HM-Sen-EP"]["1_rect"] = [2, 0.14, 0.612, 0.086, 0.05]; +DEV_HIGHLIGHT["HM-Sen-EP"]["2_rect"] = [2, 0.14, 0.740, 0.086, 0.05]; +DEV_HIGHLIGHT["HM-Sen-EP"]["1_channel"] = [3, 0.44, 0.232, '1', 0.18, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-Sen-EP"]["1"] = [5, '1_channel', '1_rect']; +DEV_HIGHLIGHT["HM-Sen-EP"]["2_channel"] = [3, 0.44, 0.232, '2', 0.18, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-Sen-EP"]["2"] = [5, '2_channel', '2_rect']; +DEV_LIST.push('HM-OU-CFM-TW'); +DEV_DESCRIPTION["HM-OU-CFM-TW"] = "HM-OU-CFM-TW"; +DEV_PATHS["HM-OU-CFM-TW"] = new Object(); +DEV_PATHS["HM-OU-CFM-TW"]["50"] = "/config/img/devices/50/117_hm-ou-cfm-tw_thumb.png"; +DEV_PATHS["HM-OU-CFM-TW"]["250"] = "/config/img/devices/250/117_hm-ou-cfm-tw.png"; +DEV_HIGHLIGHT["HM-OU-CFM-TW"] = new Object(); +DEV_HIGHLIGHT["HM-OU-CFM-TW"]["Light_circle"] = [4, 0.8079999999999999, 0.656, 0.118, 0.112]; +DEV_HIGHLIGHT["HM-OU-CFM-TW"]["Light_beam_1"] = [6, 0.748, 0.712, 0.776, 0.712, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-TW"]["Light_beam_2"] = [6, 0.776, 0.632, 0.8, 0.652, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-TW"]["Light_beam_3"] = [6, 0.86, 0.6, 0.86, 0.628, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-TW"]["Light_beam_4"] = [6, 0.94, 0.628, 0.92, 0.648, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-TW"]["Light_beam_5"] = [6, 0.944, 0.712, 0.976, 0.712, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-TW"]["Light_beam_6"] = [6, 0.8, 0.772, 0.784, 0.792, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-TW"]["Light_beam_7"] = [6, 0.86, 0.796, 0.86, 0.8240000000000001, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-TW"]["Light_beam_8"] = [6, 0.92, 0.772, 0.94, 0.792, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-TW"]["1"] = [5, 'Light_circle', 'Light_beam_1', 'Light_beam_2', 'Light_beam_3', 'Light_beam_4', 'Light_beam_5', 'Light_beam_6', 'Light_beam_7', 'Light_beam_8']; +DEV_HIGHLIGHT["HM-OU-CFM-TW"]["SP_1"] = [6, 0.764, 0.12, 0.792, 0.12, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-TW"]["SP_2"] = [6, 0.792, 0.12, 0.792, 0.2599999999999999, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-TW"]["SP_3"] = [6, 0.764, 0.2599999999999999, 0.792, 0.2599999999999999, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-TW"]["SP_4"] = [6, 0.764, 0.12, 0.764, 0.2599999999999999, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-TW"]["SP_5"] = [6, 0.792, 0.12, 0.836, 0.07599999999999996, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-TW"]["SP_6"] = [6, 0.836, 0.07599999999999996, 0.836, 0.30399999999999994, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-TW"]["SP_7"] = [6, 0.792, 0.2599999999999999, 0.836, 0.30399999999999994, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-TW"]["SP_beam_1"] = [6, 0.87, 0.1439999999999999, 0.952, 0.07599999999999996, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-TW"]["SP_beam_2"] = [6, 0.87, 0.19199999999999995, 0.952, 0.19199999999999995, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-TW"]["SP_beam_3"] = [6, 0.87, 0.24, 0.952, 0.30399999999999994, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-TW"]["2"] = [5, 'SP_1', 'SP_2', 'SP_3', 'SP_4', 'SP_5', 'SP_6', 'SP_7', 'SP_beam_1', 'SP_beam_2', 'SP_beam_3']; +DEV_LIST.push('HmIP-SWDO-I'); +DEV_DESCRIPTION["HmIP-SWDO-I"] = "HmIP-SWDO-I"; +DEV_PATHS["HmIP-SWDO-I"] = new Object(); +DEV_PATHS["HmIP-SWDO-I"]["50"] = "/config/img/devices/50/152_hmip-swdo-i_thumb.png"; +DEV_PATHS["HmIP-SWDO-I"]["250"] = "/config/img/devices/250/152_hmip-swdo-i.png"; +DEV_HIGHLIGHT["HmIP-SWDO-I"] = new Object(); +DEV_LIST.push('HM-ES-PMSw1-Pl-DN-R2'); +DEV_DESCRIPTION["HM-ES-PMSw1-Pl-DN-R2"] = "HM-ES-PMSw1-Pl-DN-R2"; +DEV_PATHS["HM-ES-PMSw1-Pl-DN-R2"] = new Object(); +DEV_PATHS["HM-ES-PMSw1-Pl-DN-R2"]["50"] = "/config/img/devices/50/107_hm-es-pmsw1-pl-R2_thumb.png"; +DEV_PATHS["HM-ES-PMSw1-Pl-DN-R2"]["250"] = "/config/img/devices/250/107_hm-es-pmsw1-pl-R2.png"; +DEV_HIGHLIGHT["HM-ES-PMSw1-Pl-DN-R2"] = new Object(); +DEV_LIST.push('HM-PB-2-FM'); +DEV_DESCRIPTION["HM-PB-2-FM"] = "HM-PB-2-FM"; +DEV_PATHS["HM-PB-2-FM"] = new Object(); +DEV_PATHS["HM-PB-2-FM"]["50"] = "/config/img/devices/50/PushButton-2ch-wm_thumb.png"; +DEV_PATHS["HM-PB-2-FM"]["250"] = "/config/img/devices/250/PushButton-2ch-wm.png"; +DEV_HIGHLIGHT["HM-PB-2-FM"] = new Object(); +DEV_HIGHLIGHT["HM-PB-2-FM"]["2"] = [2, 0.244, 0.312, 0.428, 0.168]; +DEV_HIGHLIGHT["HM-PB-2-FM"]["1"] = [2, 0.244, 0.56, 0.428, 0.168]; +DEV_HIGHLIGHT["HM-PB-2-FM"]["1+2"] = [2, 0.244, 0.308, 0.428, 0.416]; +DEV_LIST.push('DEVICE'); +DEV_DESCRIPTION["DEVICE"] = "DEVICE"; +DEV_PATHS["DEVICE"] = new Object(); +DEV_PATHS["DEVICE"]["50"] = "/config/img/devices/50/unknown_device_thumb.png"; +DEV_PATHS["DEVICE"]["250"] = "/config/img/devices/250/unknown_device.png"; +DEV_HIGHLIGHT["DEVICE"] = new Object(); +DEV_HIGHLIGHT["DEVICE"]["Icon"] = [3, 0.092, 0.6, 'Icon_folgt', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["DEVICE"]["1_channel"] = [3, 0.44, 0.232, '1', 0.18, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["DEVICE"]["1"] = [5, '1_channel', 'Icon']; +DEV_HIGHLIGHT["DEVICE"]["2_channel"] = [3, 0.44, 0.232, '2', 0.18, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["DEVICE"]["2"] = [5, '2_channel', 'Icon']; +DEV_LIST.push('HmIP-FSM16'); +DEV_DESCRIPTION["HmIP-FSM16"] = "FSM16"; +DEV_PATHS["HmIP-FSM16"] = new Object(); +DEV_PATHS["HmIP-FSM16"]["50"] = "/config/img/devices/50/135_hmip-fsm16_thumb.png"; +DEV_PATHS["HmIP-FSM16"]["250"] = "/config/img/devices/250/135_hmip-fsm16.png"; +DEV_HIGHLIGHT["HmIP-FSM16"] = new Object(); +DEV_LIST.push('HM-PB-6-WM55'); +DEV_DESCRIPTION["HM-PB-6-WM55"] = "HM-PB-6-WM55"; +DEV_PATHS["HM-PB-6-WM55"] = new Object(); +DEV_PATHS["HM-PB-6-WM55"]["50"] = "/config/img/devices/50/86_hm-pb-6-wm55_thumb.png"; +DEV_PATHS["HM-PB-6-WM55"]["250"] = "/config/img/devices/250/86_hm-pb-6-wm55.png"; +DEV_HIGHLIGHT["HM-PB-6-WM55"] = new Object(); +DEV_HIGHLIGHT["HM-PB-6-WM55"]["1"] = [2, 0.164, 0.232, 0.112, 0.156]; +DEV_HIGHLIGHT["HM-PB-6-WM55"]["2"] = [2, 0.588, 0.232, 0.112, 0.156]; +DEV_HIGHLIGHT["HM-PB-6-WM55"]["3"] = [2, 0.164, 0.428, 0.112, 0.156]; +DEV_HIGHLIGHT["HM-PB-6-WM55"]["4"] = [2, 0.588, 0.428, 0.112, 0.156]; +DEV_HIGHLIGHT["HM-PB-6-WM55"]["5"] = [2, 0.164, 0.616, 0.112, 0.156]; +DEV_HIGHLIGHT["HM-PB-6-WM55"]["6"] = [2, 0.588, 0.616, 0.112, 0.156]; +DEV_HIGHLIGHT["HM-PB-6-WM55"]["1+2"] = [5, '1', '2']; +DEV_HIGHLIGHT["HM-PB-6-WM55"]["3+4"] = [5, '3', '4']; +DEV_HIGHLIGHT["HM-PB-6-WM55"]["5+6"] = [5, '5', '6']; +DEV_LIST.push('HmIP-FBL'); +DEV_DESCRIPTION["HmIP-FBL"] = "HmIP-FBL"; +DEV_PATHS["HmIP-FBL"] = new Object(); +DEV_PATHS["HmIP-FBL"]["50"] = "/config/img/devices/50/145_hmip-froll_hmip-fbl_thumb.png"; +DEV_PATHS["HmIP-FBL"]["250"] = "/config/img/devices/250/145_hmip-froll_hmip-fbl.png"; +DEV_HIGHLIGHT["HmIP-FBL"] = new Object(); +DEV_LIST.push('HmIP-SRH'); +DEV_DESCRIPTION["HmIP-SRH"] = "SRH"; +DEV_PATHS["HmIP-SRH"] = new Object(); +DEV_PATHS["HmIP-SRH"]["50"] = "/config/img/devices/50/130_hmip-srh_thumb.png"; +DEV_PATHS["HmIP-SRH"]["250"] = "/config/img/devices/250/130_hmip-srh.png"; +DEV_HIGHLIGHT["HmIP-SRH"] = new Object(); +DEV_LIST.push('HM-LC-Dim1L-CV'); +DEV_DESCRIPTION["HM-LC-Dim1L-CV"] = "HM-LC-Dim1L-CV"; +DEV_PATHS["HM-LC-Dim1L-CV"] = new Object(); +DEV_PATHS["HM-LC-Dim1L-CV"]["50"] = "/config/img/devices/50/2_hm-lc-dim1l-cv_thumb.png"; +DEV_PATHS["HM-LC-Dim1L-CV"]["250"] = "/config/img/devices/250/2_hm-lc-dim1l-cv.png"; +DEV_HIGHLIGHT["HM-LC-Dim1L-CV"] = new Object(); +DEV_LIST.push('HmIP-RC8'); +DEV_DESCRIPTION["HmIP-RC8"] = "RC8"; +DEV_PATHS["HmIP-RC8"] = new Object(); +DEV_PATHS["HmIP-RC8"]["50"] = "/config/img/devices/50/119_hmip-rc8_thumb.png"; +DEV_PATHS["HmIP-RC8"]["250"] = "/config/img/devices/250/119_hmip-rc8.png"; +DEV_HIGHLIGHT["HmIP-RC8"] = new Object(); +DEV_HIGHLIGHT["HmIP-RC8"]["1"] = [1, 0.472, 0.218, 0.025]; +DEV_HIGHLIGHT["HmIP-RC8"]["2"] = [1, 0.600, 0.224, 0.025]; +DEV_HIGHLIGHT["HmIP-RC8"]["3"] = [1, 0.476, 0.304, 0.025]; +DEV_HIGHLIGHT["HmIP-RC8"]["4"] = [1, 0.606, 0.306, 0.025]; +DEV_HIGHLIGHT["HmIP-RC8"]["5"] = [1, 0.480, 0.384, 0.025]; +DEV_HIGHLIGHT["HmIP-RC8"]["6"] = [1, 0.610, 0.386, 0.025]; +DEV_HIGHLIGHT["HmIP-RC8"]["7"] = [1, 0.484, 0.464, 0.025]; +DEV_HIGHLIGHT["HmIP-RC8"]["8"] = [1, 0.614, 0.466, 0.025]; +DEV_HIGHLIGHT["HmIP-RC8"]["1+2"] = [5, '1', '2']; +DEV_HIGHLIGHT["HmIP-RC8"]["3+4"] = [5, '3', '4']; +DEV_HIGHLIGHT["HmIP-RC8"]["5+6"] = [5, '5', '6']; +DEV_HIGHLIGHT["HmIP-RC8"]["7+8"] = [5, '7', '8']; +DEV_LIST.push('HmIP-FDT'); +DEV_DESCRIPTION["HmIP-FDT"] = "FDT"; +DEV_PATHS["HmIP-FDT"] = new Object(); +DEV_PATHS["HmIP-FDT"]["50"] = "/config/img/devices/50/134_hmip-fsm_thumb.png"; +DEV_PATHS["HmIP-FDT"]["250"] = "/config/img/devices/250/134_hmip-fsm.png"; +DEV_HIGHLIGHT["HmIP-FDT"] = new Object(); +DEV_LIST.push('263 157'); +DEV_DESCRIPTION["263 157"] = "263_157"; +DEV_PATHS["263 157"] = new Object(); +DEV_PATHS["263 157"]["50"] = "/config/img/devices/50/13_hm-ws550sth-i_thumb.png"; +DEV_PATHS["263 157"]["250"] = "/config/img/devices/250/13_hm-ws550sth-i.png"; +DEV_HIGHLIGHT["263 157"] = new Object(); +DEV_LIST.push('HmIP-WTH'); +DEV_DESCRIPTION["HmIP-WTH"] = "HmIP-WTH"; +DEV_PATHS["HmIP-WTH"] = new Object(); +DEV_PATHS["HmIP-WTH"]["50"] = "/config/img/devices/50/121_hmip-wth_thumb.png"; +DEV_PATHS["HmIP-WTH"]["250"] = "/config/img/devices/250/121_hmip-wth.png"; +DEV_HIGHLIGHT["HmIP-WTH"] = new Object(); +DEV_LIST.push('HmIP-eTRV-F'); +DEV_DESCRIPTION["HmIP-eTRV-F"] = "TRV"; +DEV_PATHS["HmIP-eTRV-F"] = new Object(); +DEV_PATHS["HmIP-eTRV-F"]["50"] = "/config/img/devices/50/230_hmip-etrv-f_thumb.png"; +DEV_PATHS["HmIP-eTRV-F"]["250"] = "/config/img/devices/250/230_hmip-etrv-f.png"; +DEV_HIGHLIGHT["HmIP-eTRV-F"] = new Object(); +DEV_LIST.push('ZEL STG RM FSA'); +DEV_DESCRIPTION["ZEL STG RM FSA"] = "ZEL_STG_RM_FSA"; +DEV_PATHS["ZEL STG RM FSA"] = new Object(); +DEV_PATHS["ZEL STG RM FSA"]["50"] = "/config/img/devices/50/43_hm-cc-vd_thumb.png"; +DEV_PATHS["ZEL STG RM FSA"]["250"] = "/config/img/devices/250/43_hm-cc-vd.png"; +DEV_HIGHLIGHT["ZEL STG RM FSA"] = new Object(); +DEV_LIST.push('HmIP-SWD-2'); +DEV_DESCRIPTION["HmIP-SWD-2"] = "HmIP-SWD"; +DEV_PATHS["HmIP-SWD-2"] = new Object(); +DEV_PATHS["HmIP-SWD-2"]["50"] = "/config/img/devices/50/172_hmip-swd_thumb.png"; +DEV_PATHS["HmIP-SWD-2"]["250"] = "/config/img/devices/250/172_hmip-swd.png"; +DEV_HIGHLIGHT["HmIP-SWD-2"] = new Object(); +DEV_LIST.push('HM-LC-Dim1T-FM-LF'); +DEV_DESCRIPTION["HM-LC-Dim1T-FM-LF"] = "HM-LC-Dim1T-FM"; +DEV_PATHS["HM-LC-Dim1T-FM-LF"] = new Object(); +DEV_PATHS["HM-LC-Dim1T-FM-LF"]["50"] = "/config/img/devices/50/114_hm-lc-dim1t-fm-lf_thumb_3.png"; +DEV_PATHS["HM-LC-Dim1T-FM-LF"]["250"] = "/config/img/devices/250/114_hm-lc-dim1t-fm-lf_3.png"; +DEV_HIGHLIGHT["HM-LC-Dim1T-FM-LF"] = new Object(); +DEV_LIST.push('HM-LC-Sw4-PCB'); +DEV_DESCRIPTION["HM-LC-Sw4-PCB"] = "HM-LC-Sw4-PCB"; +DEV_PATHS["HM-LC-Sw4-PCB"] = new Object(); +DEV_PATHS["HM-LC-Sw4-PCB"]["50"] = "/config/img/devices/50/46_hm-lc-sw4-pcb_thumb.png"; +DEV_PATHS["HM-LC-Sw4-PCB"]["250"] = "/config/img/devices/250/46_hm-lc-sw4-pcb.png"; +DEV_HIGHLIGHT["HM-LC-Sw4-PCB"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Sw4-PCB"]["Channel1"] = [2, 0.176, 0.78, 0.068, 0.064]; +DEV_HIGHLIGHT["HM-LC-Sw4-PCB"]["Channel2"] = [2, 0.244, 0.78, 0.068, 0.064]; +DEV_HIGHLIGHT["HM-LC-Sw4-PCB"]["Channel3"] = [2, 0.312, 0.78, 0.068, 0.064]; +DEV_HIGHLIGHT["HM-LC-Sw4-PCB"]["Channel4"] = [2, 0.38, 0.78, 0.068, 0.064]; +DEV_HIGHLIGHT["HM-LC-Sw4-PCB"]["1_val"] = [3, 0.372, 0.288, '1', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-LC-Sw4-PCB"]["2_val"] = [3, 0.372, 0.288, '2', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-LC-Sw4-PCB"]["3_val"] = [3, 0.372, 0.288, '3', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-LC-Sw4-PCB"]["4_val"] = [3, 0.372, 0.288, '4', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-LC-Sw4-PCB"]["Circle1"] = [4, 0.512, 0.784, 0.044, 0.044]; +DEV_HIGHLIGHT["HM-LC-Sw4-PCB"]["Circle2"] = [4, 0.570, 0.784, 0.044, 0.044]; +DEV_HIGHLIGHT["HM-LC-Sw4-PCB"]["Circle3"] = [4, 0.628, 0.784, 0.044, 0.044]; +DEV_HIGHLIGHT["HM-LC-Sw4-PCB"]["Circle4"] = [4, 0.686, 0.784, 0.044, 0.044]; +DEV_HIGHLIGHT["HM-LC-Sw4-PCB"]["1"] = [5, 'Channel1', '1_val', 'Circle1']; +DEV_HIGHLIGHT["HM-LC-Sw4-PCB"]["2"] = [5, 'Channel2', '2_val', 'Circle2']; +DEV_HIGHLIGHT["HM-LC-Sw4-PCB"]["3"] = [5, 'Channel3', '3_val', 'Circle3']; +DEV_HIGHLIGHT["HM-LC-Sw4-PCB"]["4"] = [5, 'Channel4', '4_val', 'Circle4']; +DEV_LIST.push('HmIP-eTRV-B-2'); +DEV_DESCRIPTION["HmIP-eTRV-B-2"] = "TRV-B"; +DEV_PATHS["HmIP-eTRV-B-2"] = new Object(); +DEV_PATHS["HmIP-eTRV-B-2"]["50"] = "/config/img/devices/50/180_hmip-etrv-b_thumb.png"; +DEV_PATHS["HmIP-eTRV-B-2"]["250"] = "/config/img/devices/250/180_hmip-etrv-b.png"; +DEV_HIGHLIGHT["HmIP-eTRV-B-2"] = new Object(); +DEV_LIST.push('HM-ES-PMSw1-Pl-DN-R4'); +DEV_DESCRIPTION["HM-ES-PMSw1-Pl-DN-R4"] = "HM-ES-PMSw1-Pl-DN-R4"; +DEV_PATHS["HM-ES-PMSw1-Pl-DN-R4"] = new Object(); +DEV_PATHS["HM-ES-PMSw1-Pl-DN-R4"]["50"] = "/config/img/devices/50/107_hm-es-pmsw1-pl-R4_thumb.png"; +DEV_PATHS["HM-ES-PMSw1-Pl-DN-R4"]["250"] = "/config/img/devices/250/107_hm-es-pmsw1-pl-R4.png"; +DEV_HIGHLIGHT["HM-ES-PMSw1-Pl-DN-R4"] = new Object(); +DEV_LIST.push('HM-MOD-EM-8Bit'); +DEV_DESCRIPTION["HM-MOD-EM-8Bit"] = "HM-MOD-EM-8Bit"; +DEV_PATHS["HM-MOD-EM-8Bit"] = new Object(); +DEV_PATHS["HM-MOD-EM-8Bit"]["50"] = "/config/img/devices/50/142_hm-mod-em-8bit_thumb.png"; +DEV_PATHS["HM-MOD-EM-8Bit"]["250"] = "/config/img/devices/250/142_hm-mod-em-8bit.png"; +DEV_HIGHLIGHT["HM-MOD-EM-8Bit"] = new Object(); +DEV_LIST.push('HmIP-PDT-PE'); +DEV_DESCRIPTION["HmIP-PDT-PE"] = "PDT-PE"; +DEV_PATHS["HmIP-PDT-PE"] = new Object(); +DEV_PATHS["HmIP-PDT-PE"]["50"] = "/config/img/devices/50/113_hmip-psm-pe_thumb.png"; +DEV_PATHS["HmIP-PDT-PE"]["250"] = "/config/img/devices/250/113_hmip-psm-pe.png"; +DEV_HIGHLIGHT["HmIP-PDT-PE"] = new Object(); +DEV_LIST.push('BRC-H'); +DEV_DESCRIPTION["BRC-H"] = "BRC-H"; +DEV_PATHS["BRC-H"] = new Object(); +DEV_PATHS["BRC-H"]["50"] = "/config/img/devices/50/72_hm-rc-brc-h_thumb.png"; +DEV_PATHS["BRC-H"]["250"] = "/config/img/devices/250/72_hm-rc-brc-h.png"; +DEV_HIGHLIGHT["BRC-H"] = new Object(); +DEV_HIGHLIGHT["BRC-H"]["1"] = [4, 0.196, 0.222, 0.162, 0.164]; +DEV_HIGHLIGHT["BRC-H"]["2"] = [4, 0.417, 0.222, 0.162, 0.164]; +DEV_HIGHLIGHT["BRC-H"]["3"] = [4, 0.196, 0.482, 0.162, 0.164]; +DEV_HIGHLIGHT["BRC-H"]["4"] = [4, 0.417, 0.482, 0.162, 0.164]; +DEV_LIST.push('HmIP-SMI'); +DEV_DESCRIPTION["HmIP-SMI"] = "SMI"; +DEV_PATHS["HmIP-SMI"] = new Object(); +DEV_PATHS["HmIP-SMI"]["50"] = "/config/img/devices/50/125_hmip-smi_thumb.png"; +DEV_PATHS["HmIP-SMI"]["250"] = "/config/img/devices/250/125_hmip-smi.png"; +DEV_HIGHLIGHT["HmIP-SMI"] = new Object(); +DEV_LIST.push('HM-RC-Dis-H-x-EU'); +DEV_DESCRIPTION["HM-RC-Dis-H-x-EU"] = "HM-RC-Dis-H-x-EU"; +DEV_PATHS["HM-RC-Dis-H-x-EU"] = new Object(); +DEV_PATHS["HM-RC-Dis-H-x-EU"]["50"] = "/config/img/devices/50/108_hm-rc-dis-h-x-eu_thump.png"; +DEV_PATHS["HM-RC-Dis-H-x-EU"]["250"] = "/config/img/devices/250/108_hm-rc-dis-h-x-eu.png"; +DEV_HIGHLIGHT["HM-RC-Dis-H-x-EU"] = new Object(); +DEV_LIST.push('HmIP-SRD'); +DEV_DESCRIPTION["HmIP-SRD"] = "HmIP-SRD"; +DEV_PATHS["HmIP-SRD"] = new Object(); +DEV_PATHS["HmIP-SRD"]["50"] = "/config/img/devices/50/207_hmip-srdo_thumb.png"; +DEV_PATHS["HmIP-SRD"]["250"] = "/config/img/devices/250/207_hmip-srdo.png"; +DEV_HIGHLIGHT["HmIP-SRD"] = new Object(); +DEV_LIST.push('HM-RC-19-B'); +DEV_DESCRIPTION["HM-RC-19-B"] = "HM-RC-19-B"; +DEV_PATHS["HM-RC-19-B"] = new Object(); +DEV_PATHS["HM-RC-19-B"]["50"] = "/config/img/devices/50/20_hm-rc-19_thumb.png"; +DEV_PATHS["HM-RC-19-B"]["250"] = "/config/img/devices/250/20_hm-rc-19.png"; +DEV_HIGHLIGHT["HM-RC-19-B"] = new Object(); +DEV_HIGHLIGHT["HM-RC-19-B"]["1"] = [2, 0.296, 0.344, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19-B"]["3"] = [2, 0.296, 0.416, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19-B"]["5"] = [2, 0.296, 0.488, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19-B"]["7"] = [2, 0.296, 0.56, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19-B"]["9"] = [2, 0.296, 0.628, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19-B"]["11"] = [2, 0.296, 0.704, 0.036, 0.048]; +DEV_HIGHLIGHT["HM-RC-19-B"]["13"] = [2, 0.296, 0.772, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19-B"]["15"] = [2, 0.296, 0.844, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19-B"]["2"] = [2, 0.468, 0.344, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19-B"]["4"] = [2, 0.468, 0.416, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19-B"]["6"] = [2, 0.468, 0.488, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19-B"]["8"] = [2, 0.468, 0.56, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19-B"]["10"] = [2, 0.468, 0.628, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19-B"]["12"] = [2, 0.468, 0.704, 0.036, 0.048]; +DEV_HIGHLIGHT["HM-RC-19-B"]["14"] = [2, 0.468, 0.772, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19-B"]["16"] = [2, 0.468, 0.844, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19-B"]["17"] = [2, 0.58, 0.84, 0.044, 0.056]; +DEV_HIGHLIGHT["HM-RC-19-B"]["18"] = [2, 0.312, 0.188, 0.168, 0.088]; +DEV_HIGHLIGHT["HM-RC-19-B"]["1+2"] = [5, '1', '2']; +DEV_HIGHLIGHT["HM-RC-19-B"]["3+4"] = [5, '3', '4']; +DEV_HIGHLIGHT["HM-RC-19-B"]["5+6"] = [5, '5', '6']; +DEV_HIGHLIGHT["HM-RC-19-B"]["7+8"] = [5, '7', '8']; +DEV_HIGHLIGHT["HM-RC-19-B"]["9+10"] = [5, '9', '10']; +DEV_HIGHLIGHT["HM-RC-19-B"]["11+12"] = [5, '11', '12']; +DEV_HIGHLIGHT["HM-RC-19-B"]["13+14"] = [5, '13', '14']; +DEV_HIGHLIGHT["HM-RC-19-B"]["15+16"] = [5, '15', '16']; +DEV_LIST.push('HmIP-FSI16'); +DEV_DESCRIPTION["HmIP-FSI16"] = "HmIP-FSI16"; +DEV_PATHS["HmIP-FSI16"] = new Object(); +DEV_PATHS["HmIP-FSI16"]["50"] = "/config/img/devices/50/203_hmip-fsi16_thumb.png"; +DEV_PATHS["HmIP-FSI16"]["250"] = "/config/img/devices/250/203_hmip-fsi16.png"; +DEV_HIGHLIGHT["HmIP-FSI16"] = new Object(); +DEV_LIST.push('HM-RC-4-3'); +DEV_DESCRIPTION["HM-RC-4-3"] = "HM-RC-4"; +DEV_PATHS["HM-RC-4-3"] = new Object(); +DEV_PATHS["HM-RC-4-3"]["50"] = "/config/img/devices/50/84_hm-rc-4-x_thumb.png"; +DEV_PATHS["HM-RC-4-3"]["250"] = "/config/img/devices/250/84_hm-rc-4-3.png"; +DEV_HIGHLIGHT["HM-RC-4-3"] = new Object(); +DEV_HIGHLIGHT["HM-RC-4-3"]["arrow_part1"] = [6, 0.312, 0.288, 0.416, 0.288, 0.012]; +DEV_HIGHLIGHT["HM-RC-4-3"]["arrow_part2"] = [6, 0.312, 0.288, 0.352, 0.248, 0.012]; +DEV_HIGHLIGHT["HM-RC-4-3"]["arrow_part3"] = [6, 0.312, 0.288, 0.352, 0.328, 0.012]; +DEV_HIGHLIGHT["HM-RC-4-3"]["Arrow"] = [5, 'arrow_part1', 'arrow_part2', 'arrow_part3']; +DEV_HIGHLIGHT["HM-RC-4-3"]["1_Arrow"] = [7, 'Arrow', 0.25, 0.0]; +DEV_HIGHLIGHT["HM-RC-4-3"]["2_Arrow"] = [7, 'Arrow', 0.238, 0.156]; +DEV_HIGHLIGHT["HM-RC-4-3"]["3_Arrow"] = [7, 'Arrow', 0.228, 0.312]; +DEV_HIGHLIGHT["HM-RC-4-3"]["4_Arrow"] = [7, 'Arrow', 0.212, 0.468]; +DEV_HIGHLIGHT["HM-RC-4-3"]["1"] = [5, '2_Arrow']; +DEV_HIGHLIGHT["HM-RC-4-3"]["2"] = [5, '1_Arrow']; +DEV_HIGHLIGHT["HM-RC-4-3"]["3"] = [5, '4_Arrow']; +DEV_HIGHLIGHT["HM-RC-4-3"]["4"] = [5, '3_Arrow']; +DEV_HIGHLIGHT["HM-RC-4-3"]["1+2"] = [5, '1_Arrow', '2_Arrow']; +DEV_HIGHLIGHT["HM-RC-4-3"]["3+4"] = [5, '3_Arrow', '4_Arrow']; +DEV_LIST.push('HmIP-BS2'); +DEV_DESCRIPTION["HmIP-BS2"] = "HmIP-BS2"; +DEV_PATHS["HmIP-BS2"] = new Object(); +DEV_PATHS["HmIP-BS2"]["50"] = "/config/img/devices/50/PushButton-2ch-wm_thumb.png"; +DEV_PATHS["HmIP-BS2"]["250"] = "/config/img/devices/250/PushButton-2ch-wm.png"; +DEV_HIGHLIGHT["HmIP-BS2"] = new Object(); +DEV_HIGHLIGHT["HmIP-BS2"]["1"] = [2, 0.244, 0.312, 0.428, 0.168]; +DEV_HIGHLIGHT["HmIP-BS2"]["2"] = [2, 0.244, 0.56, 0.428, 0.168]; +DEV_HIGHLIGHT["HmIP-BS2"]["1+2"] = [2, 0.244, 0.308, 0.428, 0.416]; +DEV_LIST.push('HM-Sen-Wa-Od'); +DEV_DESCRIPTION["HM-Sen-Wa-Od"] = "HM-Sen-Wa-Od"; +DEV_PATHS["HM-Sen-Wa-Od"] = new Object(); +DEV_PATHS["HM-Sen-Wa-Od"]["50"] = "/config/img/devices/50/82_hm-sen-wa-od_thumb.png"; +DEV_PATHS["HM-Sen-Wa-Od"]["250"] = "/config/img/devices/250/82_hm-sen-wa-od.png"; +DEV_HIGHLIGHT["HM-Sen-Wa-Od"] = new Object(); +DEV_LIST.push('HMW-Sec-TR-FM'); +DEV_DESCRIPTION["HMW-Sec-TR-FM"] = "HMW-Sec-TR-FM"; +DEV_PATHS["HMW-Sec-TR-FM"] = new Object(); +DEV_PATHS["HMW-Sec-TR-FM"]["50"] = "/config/img/devices/50/33_hmw-sec-tr-fm_thumb.png"; +DEV_PATHS["HMW-Sec-TR-FM"]["250"] = "/config/img/devices/250/33_hmw-sec-tr-fm.png"; +DEV_HIGHLIGHT["HMW-Sec-TR-FM"] = new Object(); +DEV_LIST.push('HM-LC-Bl1-FM'); +DEV_DESCRIPTION["HM-LC-Bl1-FM"] = "HM-LC-Bl1-FM"; +DEV_PATHS["HM-LC-Bl1-FM"] = new Object(); +DEV_PATHS["HM-LC-Bl1-FM"]["50"] = "/config/img/devices/50/7_hm-lc-bl1-fm_thumb.png"; +DEV_PATHS["HM-LC-Bl1-FM"]["250"] = "/config/img/devices/250/7_hm-lc-bl1-fm.png"; +DEV_HIGHLIGHT["HM-LC-Bl1-FM"] = new Object(); +DEV_LIST.push('HmIP-eTRV-CL'); +DEV_DESCRIPTION["HmIP-eTRV-CL"] = "TRV-CL"; +DEV_PATHS["HmIP-eTRV-CL"] = new Object(); +DEV_PATHS["HmIP-eTRV-CL"]["50"] = "/config/img/devices/50/224_hmip-etrv-cl_thumb.png"; +DEV_PATHS["HmIP-eTRV-CL"]["250"] = "/config/img/devices/250/224_hmip-etrv-cl.png"; +DEV_HIGHLIGHT["HmIP-eTRV-CL"] = new Object(); +DEV_LIST.push('HM-LC-Sw1PBU-FM'); +DEV_DESCRIPTION["HM-LC-Sw1PBU-FM"] = "HM-LC-Sw1PBU-FM"; +DEV_PATHS["HM-LC-Sw1PBU-FM"] = new Object(); +DEV_PATHS["HM-LC-Sw1PBU-FM"]["50"] = "/config/img/devices/50/PushButton-2ch-wm_thumb.png"; +DEV_PATHS["HM-LC-Sw1PBU-FM"]["250"] = "/config/img/devices/250/PushButton-2ch-wm.png"; +DEV_HIGHLIGHT["HM-LC-Sw1PBU-FM"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Sw1PBU-FM"]["1a"] = [2, 0.244, 0.312, 0.428, 0.168]; +DEV_HIGHLIGHT["HM-LC-Sw1PBU-FM"]["1b"] = [2, 0.244, 0.56, 0.428, 0.168]; +DEV_HIGHLIGHT["HM-LC-Sw1PBU-FM"]["1"] = [5, '1a', '1b']; +DEV_LIST.push('HmIP-WUA'); +DEV_DESCRIPTION["HmIP-WUA"] = "HmIP-WUA"; +DEV_PATHS["HmIP-WUA"] = new Object(); +DEV_PATHS["HmIP-WUA"]["50"] = "/config/img/devices/50/213_hmip-wua_thumb.png"; +DEV_PATHS["HmIP-WUA"]["250"] = "/config/img/devices/250/213_hmip-wua.png"; +DEV_HIGHLIGHT["HmIP-WUA"] = new Object(); +DEV_LIST.push('HmIPW-SPI'); +DEV_DESCRIPTION["HmIPW-SPI"] = "HmIPW-SPI"; +DEV_PATHS["HmIPW-SPI"] = new Object(); +DEV_PATHS["HmIPW-SPI"]["50"] = "/config/img/devices/50/153_hmip-spi_thumb.png"; +DEV_PATHS["HmIPW-SPI"]["250"] = "/config/img/devices/250/153_hmip-spi.png"; +DEV_HIGHLIGHT["HmIPW-SPI"] = new Object(); +DEV_LIST.push('HMIP-WTH'); +DEV_DESCRIPTION["HMIP-WTH"] = "HmIP-WTH"; +DEV_PATHS["HMIP-WTH"] = new Object(); +DEV_PATHS["HMIP-WTH"]["50"] = "/config/img/devices/50/121_hmip-wth_thumb.png"; +DEV_PATHS["HMIP-WTH"]["250"] = "/config/img/devices/250/121_hmip-wth.png"; +DEV_HIGHLIGHT["HMIP-WTH"] = new Object(); +DEV_LIST.push('HM-LC-Bl1PBU-FM'); +DEV_DESCRIPTION["HM-LC-Bl1PBU-FM"] = "HM-LC-Bl1PBU-FM"; +DEV_PATHS["HM-LC-Bl1PBU-FM"] = new Object(); +DEV_PATHS["HM-LC-Bl1PBU-FM"]["50"] = "/config/img/devices/50/PushButton-2ch-wm_thumb.png"; +DEV_PATHS["HM-LC-Bl1PBU-FM"]["250"] = "/config/img/devices/250/PushButton-2ch-wm.png"; +DEV_HIGHLIGHT["HM-LC-Bl1PBU-FM"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Bl1PBU-FM"]["1a"] = [2, 0.244, 0.312, 0.428, 0.168]; +DEV_HIGHLIGHT["HM-LC-Bl1PBU-FM"]["1b"] = [2, 0.244, 0.56, 0.428, 0.168]; +DEV_HIGHLIGHT["HM-LC-Bl1PBU-FM"]["1"] = [5, '1a', '1b']; +DEV_LIST.push('HmIP-STH'); +DEV_DESCRIPTION["HmIP-STH"] = "STH"; +DEV_PATHS["HmIP-STH"] = new Object(); +DEV_PATHS["HmIP-STH"]["50"] = "/config/img/devices/50/146_hmip-sth_thumb.png"; +DEV_PATHS["HmIP-STH"]["250"] = "/config/img/devices/250/146_hmip-sth.png"; +DEV_HIGHLIGHT["HmIP-STH"] = new Object(); +DEV_LIST.push('HM-LC-Dim1L-Pl-2'); +DEV_DESCRIPTION["HM-LC-Dim1L-Pl-2"] = "HM-LC-Dim1L-Pl-2"; +DEV_PATHS["HM-LC-Dim1L-Pl-2"] = new Object(); +DEV_PATHS["HM-LC-Dim1L-Pl-2"]["50"] = "/config/img/devices/50/OM55_DimmerSwitch_thumb.png"; +DEV_PATHS["HM-LC-Dim1L-Pl-2"]["250"] = "/config/img/devices/250/OM55_DimmerSwitch.png"; +DEV_HIGHLIGHT["HM-LC-Dim1L-Pl-2"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Dim1L-Pl-2"]["1_part1"] = [2, 0.548, 0.468, 0.072, 0.052]; +DEV_HIGHLIGHT["HM-LC-Dim1L-Pl-2"]["1_part2"] = [2, 0.612, 0.452, 0.028, 0.056]; +DEV_HIGHLIGHT["HM-LC-Dim1L-Pl-2"]["1"] = [5, '1_part1', '1_part2']; +DEV_LIST.push('HM-ES-TX-WM'); +DEV_DESCRIPTION["HM-ES-TX-WM"] = "HM-ES-TX-WM"; +DEV_PATHS["HM-ES-TX-WM"] = new Object(); +DEV_PATHS["HM-ES-TX-WM"]["50"] = "/config/img/devices/50/102_hm-es-tx-wm_thumb.png"; +DEV_PATHS["HM-ES-TX-WM"]["250"] = "/config/img/devices/250/102_hm-es-tx-wm.png"; +DEV_HIGHLIGHT["HM-ES-TX-WM"] = new Object(); +DEV_LIST.push('HmIP-SWDM-B2'); +DEV_DESCRIPTION["HmIP-SWDM-B2"] = "HmIP-SWDM"; +DEV_PATHS["HmIP-SWDM-B2"] = new Object(); +DEV_PATHS["HmIP-SWDM-B2"]["50"] = "/config/img/devices/50/179_hmip-swdm-b2_thumb.png"; +DEV_PATHS["HmIP-SWDM-B2"]["250"] = "/config/img/devices/250/179_hmip-swdm-b2.png"; +DEV_HIGHLIGHT["HmIP-SWDM-B2"] = new Object(); +DEV_LIST.push('HmIPW-WTH'); +DEV_DESCRIPTION["HmIPW-WTH"] = "HmIPW-WTH"; +DEV_PATHS["HmIPW-WTH"] = new Object(); +DEV_PATHS["HmIPW-WTH"]["50"] = "/config/img/devices/50/121_hmip-wth_thumb.png"; +DEV_PATHS["HmIPW-WTH"]["250"] = "/config/img/devices/250/121_hmip-wth.png"; +DEV_HIGHLIGHT["HmIPW-WTH"] = new Object(); +DEV_LIST.push('HM-WDC7000'); +DEV_DESCRIPTION["HM-WDC7000"] = "HM-WDC7000"; +DEV_PATHS["HM-WDC7000"] = new Object(); +DEV_PATHS["HM-WDC7000"]["50"] = "/config/img/devices/50/9_hm-ws550-us_thumb.png"; +DEV_PATHS["HM-WDC7000"]["250"] = "/config/img/devices/250/9_hm-ws550-us.png"; +DEV_HIGHLIGHT["HM-WDC7000"] = new Object(); +DEV_HIGHLIGHT["HM-WDC7000"]["1"] = [3, 0.440, 0.200, '1', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-WDC7000"]["2"] = [3, 0.440, 0.200, '2', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-WDC7000"]["3"] = [3, 0.440, 0.200, '3', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-WDC7000"]["4"] = [3, 0.440, 0.200, '4', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-WDC7000"]["5"] = [3, 0.440, 0.200, '5', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-WDC7000"]["6"] = [3, 0.440, 0.200, '6', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-WDC7000"]["7"] = [3, 0.440, 0.200, '7', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-WDC7000"]["8"] = [3, 0.440, 0.200, '8', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-WDC7000"]["9"] = [3, 0.440, 0.200, '9', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-WDC7000"]["10"] = [3, 0.405, 0.200, '10', 0.124, 'verdana', Font.BOLD]; +DEV_LIST.push('HM-LC-Sw2-FM-2'); +DEV_DESCRIPTION["HM-LC-Sw2-FM-2"] = "HM-LC-Sw2-FM"; +DEV_PATHS["HM-LC-Sw2-FM-2"] = new Object(); +DEV_PATHS["HM-LC-Sw2-FM-2"]["50"] = "/config/img/devices/50/5_hm-lc-sw2-fm_thumb.png"; +DEV_PATHS["HM-LC-Sw2-FM-2"]["250"] = "/config/img/devices/250/5_hm-lc-sw2-fm.png"; +DEV_HIGHLIGHT["HM-LC-Sw2-FM-2"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Sw2-FM-2"]["1_AUS"] = [2, 0.34, 0.66, 0.068, 0.148]; +DEV_HIGHLIGHT["HM-LC-Sw2-FM-2"]["1_EIN"] = [2, 0.6, 0.66, 0.068, 0.148]; +DEV_HIGHLIGHT["HM-LC-Sw2-FM-2"]["2_AUS"] = [2, 0.256, 0.66, 0.068, 0.148]; +DEV_HIGHLIGHT["HM-LC-Sw2-FM-2"]["2_EIN"] = [2, 0.508, 0.66, 0.068, 0.148]; +DEV_HIGHLIGHT["HM-LC-Sw2-FM-2"]["1"] = [5, '1_AUS', '1_EIN']; +DEV_HIGHLIGHT["HM-LC-Sw2-FM-2"]["2"] = [5, '2_AUS', '2_EIN']; +DEV_LIST.push('ZEL STG RM FST UP4'); +DEV_DESCRIPTION["ZEL STG RM FST UP4"] = "ZEL_STG_RM_FST_UP4"; +DEV_PATHS["ZEL STG RM FST UP4"] = new Object(); +DEV_PATHS["ZEL STG RM FST UP4"]["50"] = "/config/img/devices/50/38_hm-pbi-4-fm_thumb.png"; +DEV_PATHS["ZEL STG RM FST UP4"]["250"] = "/config/img/devices/250/38_hm-pbi-4-fm.png"; +DEV_HIGHLIGHT["ZEL STG RM FST UP4"] = new Object(); +DEV_HIGHLIGHT["ZEL STG RM FST UP4"]["1_Key"] = [3, 0.18, 0.216, '1', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["ZEL STG RM FST UP4"]["1_Kreis"] = [4, 0.265, 0.500, 0.028, 0.028]; +DEV_HIGHLIGHT["ZEL STG RM FST UP4"]["1"] = [5, '1_Key', '1_Kreis']; +DEV_HIGHLIGHT["ZEL STG RM FST UP4"]["2_Key"] = [3, 0.18, 0.216, '2', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["ZEL STG RM FST UP4"]["2_Kreis"] = [4, 0.287, 0.465, 0.028, 0.028]; +DEV_HIGHLIGHT["ZEL STG RM FST UP4"]["2"] = [5, '2_Key', '2_Kreis']; +DEV_HIGHLIGHT["ZEL STG RM FST UP4"]["3_Key"] = [3, 0.18, 0.216, '3', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["ZEL STG RM FST UP4"]["3_Kreis"] = [4, 0.309, 0.430, 0.028, 0.028]; +DEV_HIGHLIGHT["ZEL STG RM FST UP4"]["3"] = [5, '3_Key', '3_Kreis']; +DEV_HIGHLIGHT["ZEL STG RM FST UP4"]["4_Key"] = [3, 0.18, 0.216, '4', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["ZEL STG RM FST UP4"]["4_Kreis"] = [4, 0.331, 0.395, 0.028, 0.028]; +DEV_HIGHLIGHT["ZEL STG RM FST UP4"]["4"] = [5, '4_Key', '4_Kreis']; +DEV_LIST.push('HmIP-FWI'); +DEV_DESCRIPTION["HmIP-FWI"] = "HmIP-FWI"; +DEV_PATHS["HmIP-FWI"] = new Object(); +DEV_PATHS["HmIP-FWI"]["50"] = "/config/img/devices/50/219_hmip-fwi_thumb.png"; +DEV_PATHS["HmIP-FWI"]["250"] = "/config/img/devices/250/219_hmip-fwi.png"; +DEV_HIGHLIGHT["HmIP-FWI"] = new Object(); +DEV_LIST.push('HM-WDS100-C6-O'); +DEV_DESCRIPTION["HM-WDS100-C6-O"] = "HM-WDS100-C6-O"; +DEV_PATHS["HM-WDS100-C6-O"] = new Object(); +DEV_PATHS["HM-WDS100-C6-O"]["50"] = "/config/img/devices/50/WeatherCombiSensor_thumb.png"; +DEV_PATHS["HM-WDS100-C6-O"]["250"] = "/config/img/devices/250/WeatherCombiSensor.png"; +DEV_HIGHLIGHT["HM-WDS100-C6-O"] = new Object(); +DEV_LIST.push('HmIPW-WRC2-A'); +DEV_DESCRIPTION["HmIPW-WRC2-A"] = "HmIPW-WRC2"; +DEV_PATHS["HmIPW-WRC2-A"] = new Object(); +DEV_PATHS["HmIPW-WRC2-A"]["50"] = "/config/img/devices/50/112_hmip-wrc2_thumb.png"; +DEV_PATHS["HmIPW-WRC2-A"]["250"] = "/config/img/devices/250/112_hmip-wrc2.png"; +DEV_HIGHLIGHT["HmIPW-WRC2-A"] = new Object(); +DEV_HIGHLIGHT["HmIPW-WRC2-A"]["2"] = [4, 0.540, 0.366, 0.04, 0.044]; +DEV_HIGHLIGHT["HmIPW-WRC2-A"]["1"] = [4, 0.540, 0.622, 0.04, 0.044]; +DEV_LIST.push('HMW-IO-12-Sw7-DR'); +DEV_DESCRIPTION["HMW-IO-12-Sw7-DR"] = "HMW-IO-12-Sw7-DR"; +DEV_PATHS["HMW-IO-12-Sw7-DR"] = new Object(); +DEV_PATHS["HMW-IO-12-Sw7-DR"]["50"] = "/config/img/devices/50/30_hmw-io-12-sw7-dr_thumb.png"; +DEV_PATHS["HMW-IO-12-Sw7-DR"]["250"] = "/config/img/devices/250/30_hmw-io-12-sw7-dr.png"; +DEV_HIGHLIGHT["HMW-IO-12-Sw7-DR"] = new Object(); +DEV_HIGHLIGHT["HMW-IO-12-Sw7-DR"]["1"] = [2, 0.264, 0.7, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw7-DR"]["2"] = [2, 0.328, 0.7, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw7-DR"]["3"] = [2, 0.46, 0.7, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw7-DR"]["4"] = [2, 0.524, 0.7, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw7-DR"]["5"] = [2, 0.648, 0.7, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw7-DR"]["6"] = [2, 0.708, 0.7, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw7-DR"]["8"] = [2, 0.328, 0.764, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw7-DR"]["7"] = [2, 0.264, 0.764, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw7-DR"]["9"] = [2, 0.46, 0.764, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw7-DR"]["10"] = [2, 0.524, 0.764, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw7-DR"]["11"] = [2, 0.644, 0.764, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw7-DR"]["12"] = [2, 0.708, 0.764, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw7-DR"]["13"] = [2, 0.268, 0.396, 0.12, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw7-DR"]["14"] = [2, 0.46, 0.396, 0.12, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw7-DR"]["15"] = [2, 0.648, 0.396, 0.12, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw7-DR"]["16"] = [2, 0.076, 0.46, 0.12, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw7-DR"]["17"] = [2, 0.264, 0.46, 0.12, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw7-DR"]["18"] = [2, 0.46, 0.46, 0.12, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw7-DR"]["19"] = [2, 0.648, 0.46, 0.12, 0.06]; +DEV_LIST.push('HM-RC-Sec4-2'); +DEV_DESCRIPTION["HM-RC-Sec4-2"] = "HM-RC-Sec4-2"; +DEV_PATHS["HM-RC-Sec4-2"] = new Object(); +DEV_PATHS["HM-RC-Sec4-2"]["50"] = "/config/img/devices/50/86_hm-rc-sec4-2_thumb.png"; +DEV_PATHS["HM-RC-Sec4-2"]["250"] = "/config/img/devices/250/86_hm-rc-sec4-2.png"; +DEV_HIGHLIGHT["HM-RC-Sec4-2"] = new Object(); +DEV_HIGHLIGHT["HM-RC-Sec4-2"]["arrow_part1"] = [6, 0.312, 0.288, 0.416, 0.288, 0.012]; +DEV_HIGHLIGHT["HM-RC-Sec4-2"]["arrow_part2"] = [6, 0.312, 0.288, 0.352, 0.248, 0.012]; +DEV_HIGHLIGHT["HM-RC-Sec4-2"]["arrow_part3"] = [6, 0.312, 0.288, 0.352, 0.328, 0.012]; +DEV_HIGHLIGHT["HM-RC-Sec4-2"]["1_Arrow"] = [5, 'arrow_part1', 'arrow_part2', 'arrow_part3']; +DEV_HIGHLIGHT["HM-RC-Sec4-2"]["2_Arrow"] = [7, '1_Arrow', 0.028, 0.156]; +DEV_HIGHLIGHT["HM-RC-Sec4-2"]["3_Arrow"] = [7, '1_Arrow', 0.028, 0.312]; +DEV_HIGHLIGHT["HM-RC-Sec4-2"]["4_Arrow"] = [7, '1_Arrow', 0.012, 0.468]; +DEV_HIGHLIGHT["HM-RC-Sec4-2"]["1"] = [5, '2_Arrow']; +DEV_HIGHLIGHT["HM-RC-Sec4-2"]["2"] = [5, '1_Arrow']; +DEV_HIGHLIGHT["HM-RC-Sec4-2"]["3"] = [5, '4_Arrow']; +DEV_HIGHLIGHT["HM-RC-Sec4-2"]["4"] = [5, '3_Arrow']; +DEV_HIGHLIGHT["HM-RC-Sec4-2"]["1+2"] = [5, '1_Arrow', '2_Arrow']; +DEV_HIGHLIGHT["HM-RC-Sec4-2"]["3+4"] = [5, '3_Arrow', '4_Arrow']; +DEV_LIST.push('HM-Sec-SD-2-Team'); +DEV_DESCRIPTION["HM-Sec-SD-2-Team"] = "HM-Sec-SD-Team"; +DEV_PATHS["HM-Sec-SD-2-Team"] = new Object(); +DEV_PATHS["HM-Sec-SD-2-Team"]["50"] = "/config/img/devices/50/105_hm-sec-sd-2-team_thumb.png"; +DEV_PATHS["HM-Sec-SD-2-Team"]["250"] = "/config/img/devices/250/105_hm-sec-sd-2-team.png"; +DEV_HIGHLIGHT["HM-Sec-SD-2-Team"] = new Object(); +DEV_LIST.push('VIR-LG-RGBW-DIM'); +DEV_DESCRIPTION["VIR-LG-RGBW-DIM"] = "VIR-LG-RGBW-DIM"; +DEV_PATHS["VIR-LG-RGBW-DIM"] = new Object(); +DEV_PATHS["VIR-LG-RGBW-DIM"]["50"] = "/config/img/devices/50/coupling/hm-coupling-rgbw-dim.png"; +DEV_PATHS["VIR-LG-RGBW-DIM"]["250"] = "/config/img/devices/250/coupling/hm-coupling-rgbw-dim.png"; +DEV_HIGHLIGHT["VIR-LG-RGBW-DIM"] = new Object(); +DEV_LIST.push('HM-LC-Sw4-WM-2'); +DEV_DESCRIPTION["HM-LC-Sw4-WM-2"] = "HM-LC-Sw4-WM"; +DEV_PATHS["HM-LC-Sw4-WM-2"] = new Object(); +DEV_PATHS["HM-LC-Sw4-WM-2"]["50"] = "/config/img/devices/50/76_hm-lc-sw4-wm_thumb.png"; +DEV_PATHS["HM-LC-Sw4-WM-2"]["250"] = "/config/img/devices/250/76_hm-lc-sw4-wm.png"; +DEV_HIGHLIGHT["HM-LC-Sw4-WM-2"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Sw4-WM-2"]["Channel1"] = [2, 0.208, 0.766, 0.065, 0.060]; +DEV_HIGHLIGHT["HM-LC-Sw4-WM-2"]["Channel2"] = [2, 0.276, 0.766, 0.065, 0.060]; +DEV_HIGHLIGHT["HM-LC-Sw4-WM-2"]["Channel3"] = [2, 0.344, 0.766, 0.065, 0.060]; +DEV_HIGHLIGHT["HM-LC-Sw4-WM-2"]["Channel4"] = [2, 0.412, 0.766, 0.065, 0.060]; +DEV_HIGHLIGHT["HM-LC-Sw4-WM-2"]["1_val"] = [3, 0.372, 0.288, '1', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-LC-Sw4-WM-2"]["2_val"] = [3, 0.372, 0.288, '2', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-LC-Sw4-WM-2"]["3_val"] = [3, 0.372, 0.288, '3', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-LC-Sw4-WM-2"]["4_val"] = [3, 0.372, 0.288, '4', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-LC-Sw4-WM-2"]["Circle1"] = [4, 0.534, 0.762, 0.044, 0.044]; +DEV_HIGHLIGHT["HM-LC-Sw4-WM-2"]["Circle2"] = [4, 0.583, 0.762, 0.044, 0.044]; +DEV_HIGHLIGHT["HM-LC-Sw4-WM-2"]["Circle3"] = [4, 0.637, 0.762, 0.044, 0.044]; +DEV_HIGHLIGHT["HM-LC-Sw4-WM-2"]["Circle4"] = [4, 0.693, 0.762, 0.044, 0.044]; +DEV_HIGHLIGHT["HM-LC-Sw4-WM-2"]["1"] = [5, 'Channel1', '1_val', 'Circle1']; +DEV_HIGHLIGHT["HM-LC-Sw4-WM-2"]["2"] = [5, 'Channel2', '2_val', 'Circle2']; +DEV_HIGHLIGHT["HM-LC-Sw4-WM-2"]["3"] = [5, 'Channel3', '3_val', 'Circle3']; +DEV_HIGHLIGHT["HM-LC-Sw4-WM-2"]["4"] = [5, 'Channel4', '4_val', 'Circle4']; +DEV_LIST.push('RPI-RF-MOD'); +DEV_DESCRIPTION["RPI-RF-MOD"] = "RPI-RF-MOD"; +DEV_PATHS["RPI-RF-MOD"] = new Object(); +DEV_PATHS["RPI-RF-MOD"]["50"] = "/config/img/devices/50/CCU3_thumb.png"; +DEV_PATHS["RPI-RF-MOD"]["250"] = "/config/img/devices/250/CCU3.png"; +DEV_HIGHLIGHT["RPI-RF-MOD"] = new Object(); +DEV_LIST.push('HmIP-RFUSB'); +DEV_DESCRIPTION["HmIP-RFUSB"] = "HmIP-RFUSB"; +DEV_PATHS["HmIP-RFUSB"] = new Object(); +DEV_PATHS["HmIP-RFUSB"]["50"] = "/config/img/devices/50/CCU3_thumb.png"; +DEV_PATHS["HmIP-RFUSB"]["250"] = "/config/img/devices/250/CCU3.png"; +DEV_HIGHLIGHT["HmIP-RFUSB"] = new Object(); +DEV_LIST.push('HM-OU-CF-Pl'); +DEV_DESCRIPTION["HM-OU-CF-Pl"] = "HM-OU-CF-Pl"; +DEV_PATHS["HM-OU-CF-Pl"] = new Object(); +DEV_PATHS["HM-OU-CF-Pl"]["50"] = "/config/img/devices/50/60_hm-ou-cf-pl_thumb.png"; +DEV_PATHS["HM-OU-CF-Pl"]["250"] = "/config/img/devices/250/60_hm-ou-cf-pl.png"; +DEV_HIGHLIGHT["HM-OU-CF-Pl"] = new Object(); +DEV_HIGHLIGHT["HM-OU-CF-Pl"]["Light_circle"] = [4, 0.688, 0.224, 0.118, 0.112]; +DEV_HIGHLIGHT["HM-OU-CF-Pl"]["Light_beam_1"] = [6, 0.628, 0.28, 0.656, 0.28, 0.016]; +DEV_HIGHLIGHT["HM-OU-CF-Pl"]["Light_beam_2"] = [6, 0.656, 0.2, 0.68, 0.22, 0.016]; +DEV_HIGHLIGHT["HM-OU-CF-Pl"]["Light_beam_3"] = [6, 0.74, 0.168, 0.74, 0.196, 0.016]; +DEV_HIGHLIGHT["HM-OU-CF-Pl"]["Light_beam_4"] = [6, 0.82, 0.196, 0.8, 0.216, 0.016]; +DEV_HIGHLIGHT["HM-OU-CF-Pl"]["Light_beam_5"] = [6, 0.824, 0.28, 0.856, 0.28, 0.016]; +DEV_HIGHLIGHT["HM-OU-CF-Pl"]["Light_beam_6"] = [6, 0.68, 0.34, 0.664, 0.36, 0.016]; +DEV_HIGHLIGHT["HM-OU-CF-Pl"]["Light_beam_7"] = [6, 0.74, 0.364, 0.74, 0.392, 0.016]; +DEV_HIGHLIGHT["HM-OU-CF-Pl"]["Light_beam_8"] = [6, 0.8, 0.34, 0.82, 0.36, 0.016]; +DEV_HIGHLIGHT["HM-OU-CF-Pl"]["1"] = [5, 'Light_circle', 'Light_beam_1', 'Light_beam_2', 'Light_beam_3', 'Light_beam_4', 'Light_beam_5', 'Light_beam_6', 'Light_beam_7', 'Light_beam_8']; +DEV_HIGHLIGHT["HM-OU-CF-Pl"]["SP_1"] = [6, 0.644, 0.676, 0.672, 0.676, 0.016]; +DEV_HIGHLIGHT["HM-OU-CF-Pl"]["SP_2"] = [6, 0.672, 0.676, 0.672, 0.816, 0.016]; +DEV_HIGHLIGHT["HM-OU-CF-Pl"]["SP_3"] = [6, 0.644, 0.816, 0.672, 0.816, 0.016]; +DEV_HIGHLIGHT["HM-OU-CF-Pl"]["SP_4"] = [6, 0.644, 0.676, 0.644, 0.816, 0.016]; +DEV_HIGHLIGHT["HM-OU-CF-Pl"]["SP_5"] = [6, 0.672, 0.676, 0.716, 0.632, 0.016]; +DEV_HIGHLIGHT["HM-OU-CF-Pl"]["SP_6"] = [6, 0.716, 0.632, 0.716, 0.86, 0.016]; +DEV_HIGHLIGHT["HM-OU-CF-Pl"]["SP_7"] = [6, 0.672, 0.816, 0.716, 0.86, 0.016]; +DEV_HIGHLIGHT["HM-OU-CF-Pl"]["SP_beam_1"] = [6, 0.75, 0.7, 0.832, 0.632, 0.016]; +DEV_HIGHLIGHT["HM-OU-CF-Pl"]["SP_beam_2"] = [6, 0.75, 0.748, 0.832, 0.748, 0.016]; +DEV_HIGHLIGHT["HM-OU-CF-Pl"]["SP_beam_3"] = [6, 0.75, 0.796, 0.832, 0.86, 0.016]; +DEV_HIGHLIGHT["HM-OU-CF-Pl"]["2"] = [5, 'SP_1', 'SP_2', 'SP_3', 'SP_4', 'SP_5', 'SP_6', 'SP_7', 'SP_beam_1', 'SP_beam_2', 'SP_beam_3']; +DEV_LIST.push('HM-LC-Ja1PBU-FM'); +DEV_DESCRIPTION["HM-LC-Ja1PBU-FM"] = "HM-LC-Ja1PBU-FM"; +DEV_PATHS["HM-LC-Ja1PBU-FM"] = new Object(); +DEV_PATHS["HM-LC-Ja1PBU-FM"]["50"] = "/config/img/devices/50/PushButton-2ch-wm_thumb.png"; +DEV_PATHS["HM-LC-Ja1PBU-FM"]["250"] = "/config/img/devices/250/PushButton-2ch-wm.png"; +DEV_HIGHLIGHT["HM-LC-Ja1PBU-FM"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Ja1PBU-FM"]["1a"] = [2, 0.244, 0.312, 0.428, 0.168]; +DEV_HIGHLIGHT["HM-LC-Ja1PBU-FM"]["1b"] = [2, 0.244, 0.56, 0.428, 0.168]; +DEV_HIGHLIGHT["HM-LC-Ja1PBU-FM"]["1"] = [5, '1a', '1b']; +DEV_LIST.push('HmIP-SWSD'); +DEV_DESCRIPTION["HmIP-SWSD"] = "SWSD"; +DEV_PATHS["HmIP-SWSD"] = new Object(); +DEV_PATHS["HmIP-SWSD"]["50"] = "/config/img/devices/50/104_hm-sec-sd-2_thumb.png"; +DEV_PATHS["HmIP-SWSD"]["250"] = "/config/img/devices/250/104_hm-sec-sd-2.png"; +DEV_HIGHLIGHT["HmIP-SWSD"] = new Object(); +DEV_LIST.push('HmIPW-FALMOT-C12'); +DEV_DESCRIPTION["HmIPW-FALMOT-C12"] = "HmIP-FALMOT-C12"; +DEV_PATHS["HmIPW-FALMOT-C12"] = new Object(); +DEV_PATHS["HmIPW-FALMOT-C12"]["50"] = "/config/img/devices/50/198_hmip-falmot-c12_thumb.png"; +DEV_PATHS["HmIPW-FALMOT-C12"]["250"] = "/config/img/devices/250/198_hmip-falmot-c12.png"; +DEV_HIGHLIGHT["HmIPW-FALMOT-C12"] = new Object(); +DEV_LIST.push('VIR-LG-WHITE'); +DEV_DESCRIPTION["VIR-LG-WHITE"] = "VIR-LG-WHITE"; +DEV_PATHS["VIR-LG-WHITE"] = new Object(); +DEV_PATHS["VIR-LG-WHITE"]["50"] = "/config/img/devices/50/coupling/hm-coupling-white.png"; +DEV_PATHS["VIR-LG-WHITE"]["250"] = "/config/img/devices/250/coupling/hm-coupling-white.png"; +DEV_HIGHLIGHT["VIR-LG-WHITE"] = new Object(); +DEV_LIST.push('HM-Sec-Win'); +DEV_DESCRIPTION["HM-Sec-Win"] = "HM-Sec-Win"; +DEV_PATHS["HM-Sec-Win"] = new Object(); +DEV_PATHS["HM-Sec-Win"]["50"] = "/config/img/devices/50/15_hm-sec-win_thumb.png"; +DEV_PATHS["HM-Sec-Win"]["250"] = "/config/img/devices/250/15_hm-sec-win.png"; +DEV_HIGHLIGHT["HM-Sec-Win"] = new Object(); +DEV_LIST.push('HM-LC-Dim2T-SM-2'); +DEV_DESCRIPTION["HM-LC-Dim2T-SM-2"] = "HM-LC-Dim2T-SM"; +DEV_PATHS["HM-LC-Dim2T-SM-2"] = new Object(); +DEV_PATHS["HM-LC-Dim2T-SM-2"]["50"] = "/config/img/devices/50/64_hm-lc-dim2T-sm_thumb.png"; +DEV_PATHS["HM-LC-Dim2T-SM-2"]["250"] = "/config/img/devices/250/64_hm-lc-dim2T-sm.png"; +DEV_HIGHLIGHT["HM-LC-Dim2T-SM-2"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Dim2T-SM-2"]["1_Part1"] = [6, 0.539, 0.864, 0.539, 0.948, 0.012]; +DEV_HIGHLIGHT["HM-LC-Dim2T-SM-2"]["1_Part2"] = [6, 0.539, 0.948, 0.49, 0.884, 0.012]; +DEV_HIGHLIGHT["HM-LC-Dim2T-SM-2"]["1_Part3"] = [6, 0.539, 0.948, 0.588, 0.884, 0.012]; +DEV_HIGHLIGHT["HM-LC-Dim2T-SM-2"]["1_Arrow"] = [5, '1_Part1', '1_Part2', '1_Part3']; +DEV_HIGHLIGHT["HM-LC-Dim2T-SM-2"]["2_Arrow"] = [7, '1_Arrow', 0.179, 0]; +DEV_HIGHLIGHT["HM-LC-Dim2T-SM-2"]["1_Key"] = [4, 0.25, 0.26, 0.04, 0.044]; +DEV_HIGHLIGHT["HM-LC-Dim2T-SM-2"]["2_Key"] = [4, 0.328, 0.26, 0.04, 0.044]; +DEV_HIGHLIGHT["HM-LC-Dim2T-SM-2"]["1"] = [5, '1_Arrow', '1_Key']; +DEV_HIGHLIGHT["HM-LC-Dim2T-SM-2"]["2"] = [5, '2_Arrow', '2_Key']; +DEV_LIST.push('HmIP-STHD L9D'); +DEV_DESCRIPTION["HmIP-STHD L9D"] = "HmIP-STHD"; +DEV_PATHS["HmIP-STHD L9D"] = new Object(); +DEV_PATHS["HmIP-STHD L9D"]["50"] = "/config/img/devices/50/147_hmip-sthd_thumb.png"; +DEV_PATHS["HmIP-STHD L9D"]["250"] = "/config/img/devices/250/147_hmip-sthd.png"; +DEV_HIGHLIGHT["HmIP-STHD L9D"] = new Object(); +DEV_LIST.push('HmIP-PSM-IT'); +DEV_DESCRIPTION["HmIP-PSM-IT"] = "PSM-IT"; +DEV_PATHS["HmIP-PSM-IT"] = new Object(); +DEV_PATHS["HmIP-PSM-IT"]["50"] = "/config/img/devices/50/113_hmip-psm-it_thumb.png"; +DEV_PATHS["HmIP-PSM-IT"]["250"] = "/config/img/devices/250/113_hmip-psm-it.png"; +DEV_HIGHLIGHT["HmIP-PSM-IT"] = new Object(); +DEV_LIST.push('HM-RC-12'); +DEV_DESCRIPTION["HM-RC-12"] = "HM-RC-12"; +DEV_PATHS["HM-RC-12"] = new Object(); +DEV_PATHS["HM-RC-12"]["50"] = "/config/img/devices/50/19_hm-rc-12_thumb.png"; +DEV_PATHS["HM-RC-12"]["250"] = "/config/img/devices/250/19_hm-rc-12.png"; +DEV_HIGHLIGHT["HM-RC-12"] = new Object(); +DEV_HIGHLIGHT["HM-RC-12"]["1"] = [2, 0.252, 0.412, 0.044, 0.072]; +DEV_HIGHLIGHT["HM-RC-12"]["3"] = [2, 0.252, 0.508, 0.044, 0.072]; +DEV_HIGHLIGHT["HM-RC-12"]["5"] = [2, 0.252, 0.604, 0.044, 0.072]; +DEV_HIGHLIGHT["HM-RC-12"]["7"] = [2, 0.252, 0.7, 0.044, 0.072]; +DEV_HIGHLIGHT["HM-RC-12"]["9"] = [2, 0.252, 0.8, 0.044, 0.072]; +DEV_HIGHLIGHT["HM-RC-12"]["10"] = [2, 0.476, 0.8, 0.044, 0.072]; +DEV_HIGHLIGHT["HM-RC-12"]["8"] = [2, 0.476, 0.7, 0.044, 0.072]; +DEV_HIGHLIGHT["HM-RC-12"]["6"] = [2, 0.476, 0.604, 0.044, 0.072]; +DEV_HIGHLIGHT["HM-RC-12"]["4"] = [2, 0.476, 0.508, 0.044, 0.072]; +DEV_HIGHLIGHT["HM-RC-12"]["2"] = [2, 0.476, 0.412, 0.044, 0.072]; +DEV_HIGHLIGHT["HM-RC-12"]["11"] = [2, 0.62, 0.8, 0.068, 0.064]; +DEV_HIGHLIGHT["HM-RC-12"]["12"] = [2, 0.62, 0.704, 0.068, 0.064]; +DEV_HIGHLIGHT["HM-RC-12"]["1+2"] = [5, '1', '2']; +DEV_HIGHLIGHT["HM-RC-12"]["3+4"] = [5, '3', '4']; +DEV_HIGHLIGHT["HM-RC-12"]["5+6"] = [5, '5', '6']; +DEV_HIGHLIGHT["HM-RC-12"]["7+8"] = [5, '7', '8']; +DEV_HIGHLIGHT["HM-RC-12"]["9+10"] = [5, '9', '10']; +DEV_HIGHLIGHT["HM-RC-12"]["11+12"] = [5, '11', '12']; +DEV_LIST.push('HM-Sec-MDIR-3'); +DEV_DESCRIPTION["HM-Sec-MDIR-3"] = "HM-Sec-MDIR"; +DEV_PATHS["HM-Sec-MDIR-3"] = new Object(); +DEV_PATHS["HM-Sec-MDIR-3"]["50"] = "/config/img/devices/50/124_hm-sec-mdir_thumb.png"; +DEV_PATHS["HM-Sec-MDIR-3"]["250"] = "/config/img/devices/250/124_hm-sec-mdir.png"; +DEV_HIGHLIGHT["HM-Sec-MDIR-3"] = new Object(); +DEV_LIST.push('HmIP-SWSD-2'); +DEV_DESCRIPTION["HmIP-SWSD-2"] = "SWSD"; +DEV_PATHS["HmIP-SWSD-2"] = new Object(); +DEV_PATHS["HmIP-SWSD-2"]["50"] = "/config/img/devices/50/104_hm-sec-sd-2_thumb.png"; +DEV_PATHS["HmIP-SWSD-2"]["250"] = "/config/img/devices/250/104_hm-sec-sd-2.png"; +DEV_HIGHLIGHT["HmIP-SWSD-2"] = new Object(); +DEV_LIST.push('HmIP-PMFS'); +DEV_DESCRIPTION["HmIP-PMFS"] = "HmIP-PMFS"; +DEV_PATHS["HmIP-PMFS"] = new Object(); +DEV_PATHS["HmIP-PMFS"]["50"] = "/config/img/devices/50/113_hmip-psm_thumb.png"; +DEV_PATHS["HmIP-PMFS"]["250"] = "/config/img/devices/250/113_hmip-psm.png"; +DEV_HIGHLIGHT["HmIP-PMFS"] = new Object(); +DEV_LIST.push('HM-RC-Key4-3'); +DEV_DESCRIPTION["HM-RC-Key4-3"] = "HM-RC-4"; +DEV_PATHS["HM-RC-Key4-3"] = new Object(); +DEV_PATHS["HM-RC-Key4-3"]["50"] = "/config/img/devices/50/84_hm-rc-4-x_thumb.png"; +DEV_PATHS["HM-RC-Key4-3"]["250"] = "/config/img/devices/250/86_hm-rc-key4-3.png"; +DEV_HIGHLIGHT["HM-RC-Key4-3"] = new Object(); +DEV_HIGHLIGHT["HM-RC-Key4-3"]["arrow_part1"] = [6, 0.312, 0.288, 0.416, 0.288, 0.012]; +DEV_HIGHLIGHT["HM-RC-Key4-3"]["arrow_part2"] = [6, 0.312, 0.288, 0.352, 0.248, 0.012]; +DEV_HIGHLIGHT["HM-RC-Key4-3"]["arrow_part3"] = [6, 0.312, 0.288, 0.352, 0.328, 0.012]; +DEV_HIGHLIGHT["HM-RC-Key4-3"]["Arrow"] = [5, 'arrow_part1', 'arrow_part2', 'arrow_part3']; +DEV_HIGHLIGHT["HM-RC-Key4-3"]["1_Arrow"] = [7, 'Arrow', 0.25, 0.0]; +DEV_HIGHLIGHT["HM-RC-Key4-3"]["2_Arrow"] = [7, 'Arrow', 0.238, 0.156]; +DEV_HIGHLIGHT["HM-RC-Key4-3"]["3_Arrow"] = [7, 'Arrow', 0.228, 0.312]; +DEV_HIGHLIGHT["HM-RC-Key4-3"]["4_Arrow"] = [7, 'Arrow', 0.212, 0.468]; +DEV_HIGHLIGHT["HM-RC-Key4-3"]["1"] = [5, '2_Arrow']; +DEV_HIGHLIGHT["HM-RC-Key4-3"]["2"] = [5, '1_Arrow']; +DEV_HIGHLIGHT["HM-RC-Key4-3"]["3"] = [5, '4_Arrow']; +DEV_HIGHLIGHT["HM-RC-Key4-3"]["4"] = [5, '3_Arrow']; +DEV_HIGHLIGHT["HM-RC-Key4-3"]["1+2"] = [5, '1_Arrow', '2_Arrow']; +DEV_HIGHLIGHT["HM-RC-Key4-3"]["3+4"] = [5, '3_Arrow', '4_Arrow']; +DEV_LIST.push('HM-Sec-WDS-2'); +DEV_DESCRIPTION["HM-Sec-WDS-2"] = "HM-Sec-WDS-2"; +DEV_PATHS["HM-Sec-WDS-2"] = new Object(); +DEV_PATHS["HM-Sec-WDS-2"]["50"] = "/config/img/devices/50/49_hm-sec-wds_thumb.png"; +DEV_PATHS["HM-Sec-WDS-2"]["250"] = "/config/img/devices/250/49_hm-sec-wds.png"; +DEV_HIGHLIGHT["HM-Sec-WDS-2"] = new Object(); +DEV_LIST.push('HMIP-eTRV'); +DEV_DESCRIPTION["HMIP-eTRV"] = "TRV"; +DEV_PATHS["HMIP-eTRV"] = new Object(); +DEV_PATHS["HMIP-eTRV"]["50"] = "/config/img/devices/50/120_hmip-etrv_thumb.png"; +DEV_PATHS["HMIP-eTRV"]["250"] = "/config/img/devices/250/120_hmip-etrv.png"; +DEV_HIGHLIGHT["HMIP-eTRV"] = new Object(); +DEV_LIST.push('HmIP-ASIR-O'); +DEV_DESCRIPTION["HmIP-ASIR-O"] = "HmIP-ASIR-O"; +DEV_PATHS["HmIP-ASIR-O"] = new Object(); +DEV_PATHS["HmIP-ASIR-O"]["50"] = "/config/img/devices/50/192_hmip-asir-o_thumb.png"; +DEV_PATHS["HmIP-ASIR-O"]["250"] = "/config/img/devices/250/192_hmip-asir-o.png"; +DEV_HIGHLIGHT["HmIP-ASIR-O"] = new Object(); +DEV_LIST.push('VIR-LG-GROUP'); +DEV_DESCRIPTION["VIR-LG-GROUP"] = "VIR-LG-GROUP"; +DEV_PATHS["VIR-LG-GROUP"] = new Object(); +DEV_PATHS["VIR-LG-GROUP"]["50"] = "/config/img/devices/50/coupling/hm-coupling-group.png"; +DEV_PATHS["VIR-LG-GROUP"]["250"] = "/config/img/devices/250/coupling/hm-coupling-group.png"; +DEV_HIGHLIGHT["VIR-LG-GROUP"] = new Object(); +DEV_LIST.push('ZEL STG RM FFK'); +DEV_DESCRIPTION["ZEL STG RM FFK"] = "ZEL_STG_RM_FFK"; +DEV_PATHS["ZEL STG RM FFK"] = new Object(); +DEV_PATHS["ZEL STG RM FFK"]["50"] = "/config/img/devices/50/16_hm-sec-sc_thumb.png"; +DEV_PATHS["ZEL STG RM FFK"]["250"] = "/config/img/devices/250/16_hm-sec-sc.png"; +DEV_HIGHLIGHT["ZEL STG RM FFK"] = new Object(); +DEV_LIST.push('HmIP-SWDO'); +DEV_DESCRIPTION["HmIP-SWDO"] = "HmIP-SWDO"; +DEV_PATHS["HmIP-SWDO"] = new Object(); +DEV_PATHS["HmIP-SWDO"]["50"] = "/config/img/devices/50/118_hmip-swdo_thumb.png"; +DEV_PATHS["HmIP-SWDO"]["250"] = "/config/img/devices/250/118_hmip-swdo.png"; +DEV_HIGHLIGHT["HmIP-SWDO"] = new Object(); +DEV_LIST.push('HM-LC-Dim1T-Pl-3'); +DEV_DESCRIPTION["HM-LC-Dim1T-Pl-3"] = "HM-LC-Dim1T-Pl-3"; +DEV_PATHS["HM-LC-Dim1T-Pl-3"] = new Object(); +DEV_PATHS["HM-LC-Dim1T-Pl-3"]["50"] = "/config/img/devices/50/OM55_DimmerSwitch_thumb.png"; +DEV_PATHS["HM-LC-Dim1T-Pl-3"]["250"] = "/config/img/devices/250/OM55_DimmerSwitch.png"; +DEV_HIGHLIGHT["HM-LC-Dim1T-Pl-3"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Dim1T-Pl-3"]["1_part1"] = [2, 0.548, 0.468, 0.072, 0.052]; +DEV_HIGHLIGHT["HM-LC-Dim1T-Pl-3"]["1_part2"] = [2, 0.612, 0.452, 0.028, 0.056]; +DEV_HIGHLIGHT["HM-LC-Dim1T-Pl-3"]["1"] = [5, '1_part1', '1_part2']; +DEV_LIST.push('HM-LC-Dim1T-CV-644'); +DEV_DESCRIPTION["HM-LC-Dim1T-CV-644"] = "HM-LC-Dim1T-CV"; +DEV_PATHS["HM-LC-Dim1T-CV-644"] = new Object(); +DEV_PATHS["HM-LC-Dim1T-CV-644"]["50"] = "/config/img/devices/50/66_hm-lc-dim1t-cv_thumb.png"; +DEV_PATHS["HM-LC-Dim1T-CV-644"]["250"] = "/config/img/devices/250/66_hm-lc-dim1t-cv.png"; +DEV_HIGHLIGHT["HM-LC-Dim1T-CV-644"] = new Object(); +DEV_LIST.push('HmIPW-DRBL4'); +DEV_DESCRIPTION["HmIPW-DRBL4"] = "HmIPW-DRBL4"; +DEV_PATHS["HmIPW-DRBL4"] = new Object(); +DEV_PATHS["HmIPW-DRBL4"]["50"] = "/config/img/devices/50/163_hmipw-drbl4_thumb.png"; +DEV_PATHS["HmIPW-DRBL4"]["250"] = "/config/img/devices/250/163_hmipw-drbl4.png"; +DEV_HIGHLIGHT["HmIPW-DRBL4"] = new Object(); +DEV_LIST.push('HmIP-PSM-UK'); +DEV_DESCRIPTION["HmIP-PSM-UK"] = "PSM-UK"; +DEV_PATHS["HmIP-PSM-UK"] = new Object(); +DEV_PATHS["HmIP-PSM-UK"]["50"] = "/config/img/devices/50/113_hmip-psm-uk_thumb.png"; +DEV_PATHS["HmIP-PSM-UK"]["250"] = "/config/img/devices/250/113_hmip-psm-uk.png"; +DEV_HIGHLIGHT["HmIP-PSM-UK"] = new Object(); +DEV_LIST.push('HmIP-PSM-PE'); +DEV_DESCRIPTION["HmIP-PSM-PE"] = "PSM-PE"; +DEV_PATHS["HmIP-PSM-PE"] = new Object(); +DEV_PATHS["HmIP-PSM-PE"]["50"] = "/config/img/devices/50/113_hmip-psm-pe_thumb.png"; +DEV_PATHS["HmIP-PSM-PE"]["250"] = "/config/img/devices/250/113_hmip-psm-pe.png"; +DEV_HIGHLIGHT["HmIP-PSM-PE"] = new Object(); +DEV_LIST.push('HmIP-eTRV-F-A'); +DEV_DESCRIPTION["HmIP-eTRV-F-A"] = "TRV"; +DEV_PATHS["HmIP-eTRV-F-A"] = new Object(); +DEV_PATHS["HmIP-eTRV-F-A"]["50"] = "/config/img/devices/50/230_hmip-etrv-f_thumb.png"; +DEV_PATHS["HmIP-eTRV-F-A"]["250"] = "/config/img/devices/250/230_hmip-etrv-f.png"; +DEV_HIGHLIGHT["HmIP-eTRV-F-A"] = new Object(); +DEV_LIST.push('HM-OU-CFM-Pl'); +DEV_DESCRIPTION["HM-OU-CFM-Pl"] = "HM-OU-CFM-Pl"; +DEV_PATHS["HM-OU-CFM-Pl"] = new Object(); +DEV_PATHS["HM-OU-CFM-Pl"]["50"] = "/config/img/devices/50/60_hm-ou-cf-pl_thumb.png"; +DEV_PATHS["HM-OU-CFM-Pl"]["250"] = "/config/img/devices/250/60_hm-ou-cf-pl.png"; +DEV_HIGHLIGHT["HM-OU-CFM-Pl"] = new Object(); +DEV_HIGHLIGHT["HM-OU-CFM-Pl"]["Light_circle"] = [4, 0.688, 0.224, 0.118, 0.112]; +DEV_HIGHLIGHT["HM-OU-CFM-Pl"]["Light_beam_1"] = [6, 0.628, 0.28, 0.656, 0.28, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-Pl"]["Light_beam_2"] = [6, 0.656, 0.2, 0.68, 0.22, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-Pl"]["Light_beam_3"] = [6, 0.74, 0.168, 0.74, 0.196, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-Pl"]["Light_beam_4"] = [6, 0.82, 0.196, 0.8, 0.216, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-Pl"]["Light_beam_5"] = [6, 0.824, 0.28, 0.856, 0.28, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-Pl"]["Light_beam_6"] = [6, 0.68, 0.34, 0.664, 0.36, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-Pl"]["Light_beam_7"] = [6, 0.74, 0.364, 0.74, 0.392, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-Pl"]["Light_beam_8"] = [6, 0.8, 0.34, 0.82, 0.36, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-Pl"]["1"] = [5, 'Light_circle', 'Light_beam_1', 'Light_beam_2', 'Light_beam_3', 'Light_beam_4', 'Light_beam_5', 'Light_beam_6', 'Light_beam_7', 'Light_beam_8']; +DEV_HIGHLIGHT["HM-OU-CFM-Pl"]["SP_1"] = [6, 0.644, 0.676, 0.672, 0.676, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-Pl"]["SP_2"] = [6, 0.672, 0.676, 0.672, 0.816, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-Pl"]["SP_3"] = [6, 0.644, 0.816, 0.672, 0.816, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-Pl"]["SP_4"] = [6, 0.644, 0.676, 0.644, 0.816, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-Pl"]["SP_5"] = [6, 0.672, 0.676, 0.716, 0.632, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-Pl"]["SP_6"] = [6, 0.716, 0.632, 0.716, 0.86, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-Pl"]["SP_7"] = [6, 0.672, 0.816, 0.716, 0.86, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-Pl"]["SP_beam_1"] = [6, 0.75, 0.7, 0.832, 0.632, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-Pl"]["SP_beam_2"] = [6, 0.75, 0.748, 0.832, 0.748, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-Pl"]["SP_beam_3"] = [6, 0.75, 0.796, 0.832, 0.86, 0.016]; +DEV_HIGHLIGHT["HM-OU-CFM-Pl"]["2"] = [5, 'SP_1', 'SP_2', 'SP_3', 'SP_4', 'SP_5', 'SP_6', 'SP_7', 'SP_beam_1', 'SP_beam_2', 'SP_beam_3']; +DEV_LIST.push('HM-LC-Sw1-FM'); +DEV_DESCRIPTION["HM-LC-Sw1-FM"] = "HM-LC-Sw1-FM"; +DEV_PATHS["HM-LC-Sw1-FM"] = new Object(); +DEV_PATHS["HM-LC-Sw1-FM"]["50"] = "/config/img/devices/50/4_hm-lc-sw1-fm_thumb.png"; +DEV_PATHS["HM-LC-Sw1-FM"]["250"] = "/config/img/devices/250/4_hm-lc-sw1-fm.png"; +DEV_HIGHLIGHT["HM-LC-Sw1-FM"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Sw1-FM"]["1_AUS"] = [2, 0.288, 0.66, 0.068, 0.152]; +DEV_HIGHLIGHT["HM-LC-Sw1-FM"]["1_EIN"] = [2, 0.548, 0.66, 0.068, 0.152]; +DEV_HIGHLIGHT["HM-LC-Sw1-FM"]["1"] = [5, '1_AUS', '1_EIN']; +DEV_LIST.push('HmIP-HAP JS1'); +DEV_DESCRIPTION["HmIP-HAP JS1"] = "HmIP-HAP"; +DEV_PATHS["HmIP-HAP JS1"] = new Object(); +DEV_PATHS["HmIP-HAP JS1"]["50"] = "/config/img/devices/50/CCU3_thumb.png"; +DEV_PATHS["HmIP-HAP JS1"]["250"] = "/config/img/devices/250/CCU3.png"; +DEV_HIGHLIGHT["HmIP-HAP JS1"] = new Object(); +DEV_LIST.push('HM-WS550STH-I'); +DEV_DESCRIPTION["HM-WS550STH-I"] = "HM-WS550STH-I"; +DEV_PATHS["HM-WS550STH-I"] = new Object(); +DEV_PATHS["HM-WS550STH-I"]["50"] = "/config/img/devices/50/13_hm-ws550sth-i_thumb.png"; +DEV_PATHS["HM-WS550STH-I"]["250"] = "/config/img/devices/250/13_hm-ws550sth-i.png"; +DEV_HIGHLIGHT["HM-WS550STH-I"] = new Object(); +DEV_LIST.push('HmIP-eTRV-E-S'); +DEV_DESCRIPTION["HmIP-eTRV-E-S"] = "TRV-E"; +DEV_PATHS["HmIP-eTRV-E-S"] = new Object(); +DEV_PATHS["HmIP-eTRV-E-S"]["50"] = "/config/img/devices/50/216_hmip-etrv-e_thumb.png"; +DEV_PATHS["HmIP-eTRV-E-S"]["250"] = "/config/img/devices/250/216_hmip-etrv-e.png"; +DEV_HIGHLIGHT["HmIP-eTRV-E-S"] = new Object(); +DEV_LIST.push('HMIP-SWDO'); +DEV_DESCRIPTION["HMIP-SWDO"] = "HmIP-SWDO"; +DEV_PATHS["HMIP-SWDO"] = new Object(); +DEV_PATHS["HMIP-SWDO"]["50"] = "/config/img/devices/50/118_hmip-swdo_thumb.png"; +DEV_PATHS["HMIP-SWDO"]["250"] = "/config/img/devices/250/118_hmip-swdo.png"; +DEV_HIGHLIGHT["HMIP-SWDO"] = new Object(); +DEV_LIST.push('HmIPW-FAL24-C6'); +DEV_DESCRIPTION["HmIPW-FAL24-C6"] = "HmIPW-FAL24-C6"; +DEV_PATHS["HmIPW-FAL24-C6"] = new Object(); +DEV_PATHS["HmIPW-FAL24-C6"]["50"] = "/config/img/devices/50/137_hmip-fal-c6_thumb.png"; +DEV_PATHS["HmIPW-FAL24-C6"]["250"] = "/config/img/devices/250/137_hmip-fal-c6.png"; +DEV_HIGHLIGHT["HmIPW-FAL24-C6"] = new Object(); +DEV_LIST.push('HMW-WSTH-SM'); +DEV_DESCRIPTION["HMW-WSTH-SM"] = "HMW-WSTH-SM"; +DEV_PATHS["HMW-WSTH-SM"] = new Object(); +DEV_PATHS["HMW-WSTH-SM"]["50"] = "/config/img/devices/50/32_hmw-wsth-sm_thumb.png"; +DEV_PATHS["HMW-WSTH-SM"]["250"] = "/config/img/devices/250/32_hmw-wsth-sm.png"; +DEV_HIGHLIGHT["HMW-WSTH-SM"] = new Object(); +DEV_LIST.push('HM-RC-Sec3-B'); +DEV_DESCRIPTION["HM-RC-Sec3-B"] = "HM-RC-Sec3-B"; +DEV_PATHS["HM-RC-Sec3-B"] = new Object(); +DEV_PATHS["HM-RC-Sec3-B"]["50"] = "/config/img/devices/50/22_hm-rc-sec3-b_thumb.png"; +DEV_PATHS["HM-RC-Sec3-B"]["250"] = "/config/img/devices/250/22_hm-rc-sec3-b.png"; +DEV_HIGHLIGHT["HM-RC-Sec3-B"] = new Object(); +DEV_HIGHLIGHT["HM-RC-Sec3-B"]["1"] = [4, 0.252, 0.2, 0.16, 0.176]; +DEV_HIGHLIGHT["HM-RC-Sec3-B"]["2"] = [4, 0.492, 0.2, 0.16, 0.176]; +DEV_HIGHLIGHT["HM-RC-Sec3-B"]["3"] = [4, 0.34, 0.48, 0.224, 0.248]; +DEV_HIGHLIGHT["HM-RC-Sec3-B"]["1+2"] = [5, '1', '2']; +DEV_LIST.push('HmIP-BRC2'); +DEV_DESCRIPTION["HmIP-BRC2"] = "HmIP-BRC2"; +DEV_PATHS["HmIP-BRC2"] = new Object(); +DEV_PATHS["HmIP-BRC2"]["50"] = "/config/img/devices/50/PushButton-2ch-wm_thumb.png"; +DEV_PATHS["HmIP-BRC2"]["250"] = "/config/img/devices/250/PushButton-2ch-wm.png"; +DEV_HIGHLIGHT["HmIP-BRC2"] = new Object(); +DEV_HIGHLIGHT["HmIP-BRC2"]["2"] = [2, 0.244, 0.312, 0.428, 0.168]; +DEV_HIGHLIGHT["HmIP-BRC2"]["1"] = [2, 0.244, 0.56, 0.428, 0.168]; +DEV_HIGHLIGHT["HmIP-BRC2"]["1+2"] = [2, 0.244, 0.308, 0.428, 0.416]; +DEV_LIST.push('HmIP-MP3P'); +DEV_DESCRIPTION["HmIP-MP3P"] = "HmIP-MP3P"; +DEV_PATHS["HmIP-MP3P"] = new Object(); +DEV_PATHS["HmIP-MP3P"]["50"] = "/config/img/devices/50/186_hmip-mp3p_thumb.png"; +DEV_PATHS["HmIP-MP3P"]["250"] = "/config/img/devices/250/186_hmip-mp3p.png"; +DEV_HIGHLIGHT["HmIP-MP3P"] = new Object(); +DEV_LIST.push('HM-Sec-MDIR-2'); +DEV_DESCRIPTION["HM-Sec-MDIR-2"] = "HM-Sec-MDIR"; +DEV_PATHS["HM-Sec-MDIR-2"] = new Object(); +DEV_PATHS["HM-Sec-MDIR-2"]["50"] = "/config/img/devices/50/124_hm-sec-mdir_thumb.png"; +DEV_PATHS["HM-Sec-MDIR-2"]["250"] = "/config/img/devices/250/124_hm-sec-mdir.png"; +DEV_HIGHLIGHT["HM-Sec-MDIR-2"] = new Object(); +DEV_LIST.push('HmIP-eTRV'); +DEV_DESCRIPTION["HmIP-eTRV"] = "TRV"; +DEV_PATHS["HmIP-eTRV"] = new Object(); +DEV_PATHS["HmIP-eTRV"]["50"] = "/config/img/devices/50/120_hmip-etrv_thumb.png"; +DEV_PATHS["HmIP-eTRV"]["250"] = "/config/img/devices/250/120_hmip-etrv.png"; +DEV_HIGHLIGHT["HmIP-eTRV"] = new Object(); +DEV_LIST.push('HmIPW-DRI16'); +DEV_DESCRIPTION["HmIPW-DRI16"] = "HmIPW-DRI16"; +DEV_PATHS["HmIPW-DRI16"] = new Object(); +DEV_PATHS["HmIPW-DRI16"]["50"] = "/config/img/devices/50/164_hmipw-dri16_thumb.png"; +DEV_PATHS["HmIPW-DRI16"]["250"] = "/config/img/devices/250/164_hmipw-dri16.png"; +DEV_HIGHLIGHT["HmIPW-DRI16"] = new Object(); +DEV_LIST.push('HM-LC-Dim1TPBU-FM-2'); +DEV_DESCRIPTION["HM-LC-Dim1TPBU-FM-2"] = "HM-LC-Dim1TPBU-FM-2"; +DEV_PATHS["HM-LC-Dim1TPBU-FM-2"] = new Object(); +DEV_PATHS["HM-LC-Dim1TPBU-FM-2"]["50"] = "/config/img/devices/50/PushButton-2ch-wm_thumb.png"; +DEV_PATHS["HM-LC-Dim1TPBU-FM-2"]["250"] = "/config/img/devices/250/PushButton-2ch-wm.png"; +DEV_HIGHLIGHT["HM-LC-Dim1TPBU-FM-2"] = new Object(); +DEV_LIST.push('HM-LC-AO-SM'); +DEV_DESCRIPTION["HM-LC-AO-SM"] = "HM-LC-AO-SM"; +DEV_PATHS["HM-LC-AO-SM"] = new Object(); +DEV_PATHS["HM-LC-AO-SM"]["50"] = "/config/img/devices/50/129_hm-lc-ao-sm_thumb.png"; +DEV_PATHS["HM-LC-AO-SM"]["250"] = "/config/img/devices/250/129_hm-lc-ao-sm.png"; +DEV_HIGHLIGHT["HM-LC-AO-SM"] = new Object(); +DEV_LIST.push('HmIP-FAL24-C10'); +DEV_DESCRIPTION["HmIP-FAL24-C10"] = "HmIP-FAL24-C10"; +DEV_PATHS["HmIP-FAL24-C10"] = new Object(); +DEV_PATHS["HmIP-FAL24-C10"]["50"] = "/config/img/devices/50/138_hmip-fal-c10_thumb.png"; +DEV_PATHS["HmIP-FAL24-C10"]["250"] = "/config/img/devices/250/138_hmip-fal-c10.png"; +DEV_HIGHLIGHT["HmIP-FAL24-C10"] = new Object(); +DEV_LIST.push('HM-RC-4-B'); +DEV_DESCRIPTION["HM-RC-4-B"] = "HM-RC-4-B"; +DEV_PATHS["HM-RC-4-B"] = new Object(); +DEV_PATHS["HM-RC-4-B"]["50"] = "/config/img/devices/50/18_hm-rc-4_thumb.png"; +DEV_PATHS["HM-RC-4-B"]["250"] = "/config/img/devices/250/18_hm-rc-4.png"; +DEV_HIGHLIGHT["HM-RC-4-B"] = new Object(); +DEV_HIGHLIGHT["HM-RC-4-B"]["1"] = [4, 0.268, 0.236, 0.16, 0.164]; +DEV_HIGHLIGHT["HM-RC-4-B"]["2"] = [4, 0.476, 0.236, 0.16, 0.164]; +DEV_HIGHLIGHT["HM-RC-4-B"]["3"] = [4, 0.268, 0.48, 0.16, 0.164]; +DEV_HIGHLIGHT["HM-RC-4-B"]["4"] = [4, 0.476, 0.48, 0.16, 0.164]; +DEV_HIGHLIGHT["HM-RC-4-B"]["1+2"] = [5, '1', '2']; +DEV_HIGHLIGHT["HM-RC-4-B"]["3+4"] = [5, '3', '4']; +DEV_LIST.push('HM-RC-Sec3'); +DEV_DESCRIPTION["HM-RC-Sec3"] = "HM-RC-Sec3"; +DEV_PATHS["HM-RC-Sec3"] = new Object(); +DEV_PATHS["HM-RC-Sec3"]["50"] = "/config/img/devices/50/22_hm-rc-sec3-b_thumb.png"; +DEV_PATHS["HM-RC-Sec3"]["250"] = "/config/img/devices/250/22_hm-rc-sec3-b.png"; +DEV_HIGHLIGHT["HM-RC-Sec3"] = new Object(); +DEV_HIGHLIGHT["HM-RC-Sec3"]["1"] = [4, 0.252, 0.2, 0.16, 0.176]; +DEV_HIGHLIGHT["HM-RC-Sec3"]["2"] = [4, 0.492, 0.2, 0.16, 0.176]; +DEV_HIGHLIGHT["HM-RC-Sec3"]["3"] = [4, 0.34, 0.48, 0.224, 0.248]; +DEV_HIGHLIGHT["HM-RC-Sec3"]["1+2"] = [5, '1', '2']; +DEV_LIST.push('HmIP-SWO-PR'); +DEV_DESCRIPTION["HmIP-SWO-PR"] = "HmIP-SWO-PR"; +DEV_PATHS["HmIP-SWO-PR"] = new Object(); +DEV_PATHS["HmIP-SWO-PR"]["50"] = "/config/img/devices/50/169_hmip-swo-pr_thumb.png"; +DEV_PATHS["HmIP-SWO-PR"]["250"] = "/config/img/devices/250/169_hmip-swo-pr.png"; +DEV_HIGHLIGHT["HmIP-SWO-PR"] = new Object(); +DEV_LIST.push('HM-LC-Sw1-PB-FM'); +DEV_DESCRIPTION["HM-LC-Sw1-PB-FM"] = "HM-LC-Sw1-PB-FM"; +DEV_PATHS["HM-LC-Sw1-PB-FM"] = new Object(); +DEV_PATHS["HM-LC-Sw1-PB-FM"]["50"] = "/config/img/devices/50/PushButton-2ch-wm_thumb.png"; +DEV_PATHS["HM-LC-Sw1-PB-FM"]["250"] = "/config/img/devices/250/PushButton-2ch-wm.png"; +DEV_HIGHLIGHT["HM-LC-Sw1-PB-FM"] = new Object(); +DEV_LIST.push('HM-RC-2-PBU-FM-2'); +DEV_DESCRIPTION["HM-RC-2-PBU-FM-2"] = "HM-RC-2-PBU-FM"; +DEV_PATHS["HM-RC-2-PBU-FM-2"] = new Object(); +DEV_PATHS["HM-RC-2-PBU-FM-2"]["50"] = "/config/img/devices/50/PushButton-2ch-wm_thumb.png"; +DEV_PATHS["HM-RC-2-PBU-FM-2"]["250"] = "/config/img/devices/250/PushButton-2ch-wm.png"; +DEV_HIGHLIGHT["HM-RC-2-PBU-FM-2"] = new Object(); +DEV_HIGHLIGHT["HM-RC-2-PBU-FM-2"]["2"] = [2, 0.244, 0.312, 0.428, 0.168]; +DEV_HIGHLIGHT["HM-RC-2-PBU-FM-2"]["1"] = [2, 0.244, 0.56, 0.428, 0.168]; +DEV_HIGHLIGHT["HM-RC-2-PBU-FM-2"]["1+2"] = [2, 0.244, 0.308, 0.428, 0.416]; +DEV_LIST.push('HM-Sec-SD'); +DEV_DESCRIPTION["HM-Sec-SD"] = "HM-Sec-SD"; +DEV_PATHS["HM-Sec-SD"] = new Object(); +DEV_PATHS["HM-Sec-SD"]["50"] = "/config/img/devices/50/51_hm-sec-sd_thumb.png"; +DEV_PATHS["HM-Sec-SD"]["250"] = "/config/img/devices/250/51_hm-sec-sd.png"; +DEV_HIGHLIGHT["HM-Sec-SD"] = new Object(); +DEV_LIST.push('HmIP-SWDO-PL-2'); +DEV_DESCRIPTION["HmIP-SWDO-PL-2"] = "HmIP-SWDO-PL"; +DEV_PATHS["HmIP-SWDO-PL-2"] = new Object(); +DEV_PATHS["HmIP-SWDO-PL-2"]["50"] = "/config/img/devices/50/197_hmip-swdo-pl_thumb.png"; +DEV_PATHS["HmIP-SWDO-PL-2"]["250"] = "/config/img/devices/250/197_hmip-swdo-pl.png"; +DEV_HIGHLIGHT["HmIP-SWDO-PL-2"] = new Object(); +DEV_LIST.push('HmIPW-DRI32'); +DEV_DESCRIPTION["HmIPW-DRI32"] = "HmIPW-DRI32"; +DEV_PATHS["HmIPW-DRI32"] = new Object(); +DEV_PATHS["HmIPW-DRI32"]["50"] = "/config/img/devices/50/167_hmipw-dri32_thumb.png"; +DEV_PATHS["HmIPW-DRI32"]["250"] = "/config/img/devices/250/167_hmipw-dri32.png"; +DEV_HIGHLIGHT["HmIPW-DRI32"] = new Object(); +DEV_LIST.push('HM-CC-VD'); +DEV_DESCRIPTION["HM-CC-VD"] = "HM-CC-VD"; +DEV_PATHS["HM-CC-VD"] = new Object(); +DEV_PATHS["HM-CC-VD"]["50"] = "/config/img/devices/50/43_hm-cc-vd_thumb.png"; +DEV_PATHS["HM-CC-VD"]["250"] = "/config/img/devices/250/43_hm-cc-vd.png"; +DEV_HIGHLIGHT["HM-CC-VD"] = new Object(); +DEV_LIST.push('HM-PB-2-WM55'); +DEV_DESCRIPTION["HM-PB-2-WM55"] = "HM-PB-2-WM55"; +DEV_PATHS["HM-PB-2-WM55"] = new Object(); +DEV_PATHS["HM-PB-2-WM55"]["50"] = "/config/img/devices/50/75_hm-pb-2-wm55_thumb.png"; +DEV_PATHS["HM-PB-2-WM55"]["250"] = "/config/img/devices/250/75_hm-pb-2-wm55.png"; +DEV_HIGHLIGHT["HM-PB-2-WM55"] = new Object(); +DEV_HIGHLIGHT["HM-PB-2-WM55"]["2"] = [2, 0.204, 0.23, 0.546, 0.128]; +DEV_HIGHLIGHT["HM-PB-2-WM55"]["1"] = [2, 0.204, 0.65, 0.546, 0.128]; +DEV_LIST.push('HmIP-eTRV-B-UK'); +DEV_DESCRIPTION["HmIP-eTRV-B-UK"] = "TRV-B-UK"; +DEV_PATHS["HmIP-eTRV-B-UK"] = new Object(); +DEV_PATHS["HmIP-eTRV-B-UK"]["50"] = "/config/img/devices/50/209_hmip-etrv-b-uk_thumb.png"; +DEV_PATHS["HmIP-eTRV-B-UK"]["250"] = "/config/img/devices/250/209_hmip-etrv-b-uk.png"; +DEV_HIGHLIGHT["HmIP-eTRV-B-UK"] = new Object(); +DEV_LIST.push('HM-ES-PMSw1-Pl-DN-R1'); +DEV_DESCRIPTION["HM-ES-PMSw1-Pl-DN-R1"] = "HM-ES-PMSw1-Pl-DN-R1"; +DEV_PATHS["HM-ES-PMSw1-Pl-DN-R1"] = new Object(); +DEV_PATHS["HM-ES-PMSw1-Pl-DN-R1"]["50"] = "/config/img/devices/50/93_hm-es-pmsw1-pl_thumb.png"; +DEV_PATHS["HM-ES-PMSw1-Pl-DN-R1"]["250"] = "/config/img/devices/250/93_hm-es-pmsw1-pl.png"; +DEV_HIGHLIGHT["HM-ES-PMSw1-Pl-DN-R1"] = new Object(); +DEV_LIST.push('HM-WS550ST-IO'); +DEV_DESCRIPTION["HM-WS550ST-IO"] = "HM-WS550ST-IO"; +DEV_PATHS["HM-WS550ST-IO"] = new Object(); +DEV_PATHS["HM-WS550ST-IO"]["50"] = "/config/img/devices/50/IP65_G201_thumb.png"; +DEV_PATHS["HM-WS550ST-IO"]["250"] = "/config/img/devices/250/IP65_G201.png"; +DEV_HIGHLIGHT["HM-WS550ST-IO"] = new Object(); +DEV_LIST.push('HmIP-FDC'); +DEV_DESCRIPTION["HmIP-FDC"] = "HmIP-FLC"; +DEV_PATHS["HmIP-FDC"] = new Object(); +DEV_PATHS["HmIP-FDC"]["50"] = "/config/img/devices/50/233_hmip-flc_thumb.png"; +DEV_PATHS["HmIP-FDC"]["250"] = "/config/img/devices/250/233_hmip-flc.png"; +DEV_HIGHLIGHT["HmIP-FDC"] = new Object(); +DEV_LIST.push('HmIP-eTRV-C-2'); +DEV_DESCRIPTION["HmIP-eTRV-C-2"] = "TRV-C"; +DEV_PATHS["HmIP-eTRV-C-2"] = new Object(); +DEV_PATHS["HmIP-eTRV-C-2"]["50"] = "/config/img/devices/50/188_hmip-etrv-c_thumb.png"; +DEV_PATHS["HmIP-eTRV-C-2"]["250"] = "/config/img/devices/250/188_hmip-etrv-c.png"; +DEV_HIGHLIGHT["HmIP-eTRV-C-2"] = new Object(); +DEV_LIST.push('263 162'); +DEV_DESCRIPTION["263 162"] = "263_162"; +DEV_PATHS["263 162"] = new Object(); +DEV_PATHS["263 162"]["50"] = "/config/img/devices/50/124_hm-sec-mdir_thumb.png"; +DEV_PATHS["263 162"]["250"] = "/config/img/devices/250/124_hm-sec-mdir.png"; +DEV_HIGHLIGHT["263 162"] = new Object(); +DEV_LIST.push('HM-Sys-sRP-Pl'); +DEV_DESCRIPTION["HM-Sys-sRP-Pl"] = "HM-Sys-sRP-Pl"; +DEV_PATHS["HM-Sys-sRP-Pl"] = new Object(); +DEV_PATHS["HM-Sys-sRP-Pl"]["50"] = "/config/img/devices/50/OM55_DimmerSwitch_thumb.png"; +DEV_PATHS["HM-Sys-sRP-Pl"]["250"] = "/config/img/devices/250/OM55_DimmerSwitch.png"; +DEV_HIGHLIGHT["HM-Sys-sRP-Pl"] = new Object(); +DEV_LIST.push('HmIP-FAL230-C6'); +DEV_DESCRIPTION["HmIP-FAL230-C6"] = "HmIP-FAL230-C6"; +DEV_PATHS["HmIP-FAL230-C6"] = new Object(); +DEV_PATHS["HmIP-FAL230-C6"]["50"] = "/config/img/devices/50/137_hmip-fal-c6_thumb.png"; +DEV_PATHS["HmIP-FAL230-C6"]["250"] = "/config/img/devices/250/137_hmip-fal-c6.png"; +DEV_HIGHLIGHT["HmIP-FAL230-C6"] = new Object(); +DEV_LIST.push('HM-Sec-SFA-SM'); +DEV_DESCRIPTION["HM-Sec-SFA-SM"] = "HM-Sec-SFA-SM"; +DEV_PATHS["HM-Sec-SFA-SM"] = new Object(); +DEV_PATHS["HM-Sec-SFA-SM"]["50"] = "/config/img/devices/50/55_hm-sec-sfa-sm_thumb.png"; +DEV_PATHS["HM-Sec-SFA-SM"]["250"] = "/config/img/devices/250/55_hm-sec-sfa-sm.png"; +DEV_HIGHLIGHT["HM-Sec-SFA-SM"] = new Object(); +DEV_HIGHLIGHT["HM-Sec-SFA-SM"]["1_Taster"] = [4, 0.348, 0.388, 0.08, 0.08]; +DEV_HIGHLIGHT["HM-Sec-SFA-SM"]["1_Led"] = [4, 0.372, 0.304, 0.036, 0.036]; +DEV_HIGHLIGHT["HM-Sec-SFA-SM"]["1"] = [5, '1_Taster', '1_Led']; +DEV_HIGHLIGHT["HM-Sec-SFA-SM"]["2_Taster"] = [4, 0.552, 0.388, 0.08, 0.08]; +DEV_HIGHLIGHT["HM-Sec-SFA-SM"]["2_Led"] = [4, 0.576, 0.304, 0.036, 0.036]; +DEV_HIGHLIGHT["HM-Sec-SFA-SM"]["2"] = [5, '2_Taster', '2_Led']; +DEV_LIST.push('HmIP-SMO'); +DEV_DESCRIPTION["HmIP-SMO"] = "SMO"; +DEV_PATHS["HmIP-SMO"] = new Object(); +DEV_PATHS["HmIP-SMO"]["50"] = "/config/img/devices/50/132_hmip-smo_thumb.png"; +DEV_PATHS["HmIP-SMO"]["250"] = "/config/img/devices/250/132_hmip-smo.png"; +DEV_HIGHLIGHT["HmIP-SMO"] = new Object(); +DEV_LIST.push('HmIP-FSM'); +DEV_DESCRIPTION["HmIP-FSM"] = "FSM"; +DEV_PATHS["HmIP-FSM"] = new Object(); +DEV_PATHS["HmIP-FSM"]["50"] = "/config/img/devices/50/134_hmip-fsm_thumb.png"; +DEV_PATHS["HmIP-FSM"]["250"] = "/config/img/devices/250/134_hmip-fsm.png"; +DEV_HIGHLIGHT["HmIP-FSM"] = new Object(); +DEV_LIST.push('ZEL STG RM FZS-2'); +DEV_DESCRIPTION["ZEL STG RM FZS-2"] = "ZEL_STG_RM_FZS-2"; +DEV_PATHS["ZEL STG RM FZS-2"] = new Object(); +DEV_PATHS["ZEL STG RM FZS-2"]["50"] = "/config/img/devices/50/OM55_DimmerSwitch_thumb.png"; +DEV_PATHS["ZEL STG RM FZS-2"]["250"] = "/config/img/devices/250/OM55_DimmerSwitch.png"; +DEV_HIGHLIGHT["ZEL STG RM FZS-2"] = new Object(); +DEV_HIGHLIGHT["ZEL STG RM FZS-2"]["1_part1"] = [2, 0.548, 0.468, 0.072, 0.052]; +DEV_HIGHLIGHT["ZEL STG RM FZS-2"]["1_part2"] = [2, 0.612, 0.452, 0.028, 0.056]; +DEV_HIGHLIGHT["ZEL STG RM FZS-2"]["1"] = [5, '1_part1', '1_part2']; +DEV_LIST.push('HmIP-HEATING'); +DEV_DESCRIPTION["HmIP-HEATING"] = "HM-CC-VG-1"; +DEV_PATHS["HmIP-HEATING"] = new Object(); +DEV_PATHS["HmIP-HEATING"]["50"] = "/config/img/devices/50/175_hmip-group-heating_thumb.png"; +DEV_PATHS["HmIP-HEATING"]["250"] = "/config/img/devices/250/175_hmip-group-heating.png"; +DEV_HIGHLIGHT["HmIP-HEATING"] = new Object(); +DEV_LIST.push('HM-RCV-50'); +DEV_DESCRIPTION["HM-RCV-50"] = "HM-RCV-50"; +DEV_PATHS["HM-RCV-50"] = new Object(); +DEV_PATHS["HM-RCV-50"]["50"] = "/config/img/devices/50/CCU2_thumb.png"; +DEV_PATHS["HM-RCV-50"]["250"] = "/config/img/devices/250/CCU2.png"; +DEV_HIGHLIGHT["HM-RCV-50"] = new Object(); +DEV_HIGHLIGHT["HM-RCV-50"]["RF_1"] = [4, 0.364, 0.048, 0.028, 0.028]; +DEV_HIGHLIGHT["HM-RCV-50"]["RF_2"] = [6, 0.4, 0.052, 0.544, 0.004, 0.016]; +DEV_HIGHLIGHT["HM-RCV-50"]["RF_3"] = [6, 0.4, 0.052, 0.6, 0.052, 0.016]; +DEV_HIGHLIGHT["HM-RCV-50"]["RF_4"] = [6, 0.4, 0.052, 0.544, 0.104, 0.016]; +DEV_HIGHLIGHT["HM-RCV-50"]["RF_5"] = [6, 0.168, 0.052, 0.344, 0.052, 0.016]; +DEV_HIGHLIGHT["HM-RCV-50"]["RF_6"] = [6, 0.168, 0, 0.344, 0.052, 0.016]; +DEV_HIGHLIGHT["HM-RCV-50"]["RF_7"] = [6, 0.168, 0.104, 0.344, 0.052, 0.016]; +DEV_HIGHLIGHT["HM-RCV-50"]["RF"] = [5, 'RF_1', 'RF_2', 'RF_3', 'RF_4', 'RF_5', 'RF_6', 'RF_7']; +DEV_HIGHLIGHT["HM-RCV-50"]["S1"] = [3, 0.25, 0.15, '1', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S2"] = [3, 0.25, 0.15, '2', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S3"] = [3, 0.25, 0.15, '3', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S4"] = [3, 0.25, 0.15, '4', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S5"] = [3, 0.25, 0.15, '5', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S6"] = [3, 0.25, 0.15, '6', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S7"] = [3, 0.25, 0.15, '7', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S8"] = [3, 0.25, 0.15, '8', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S9"] = [3, 0.25, 0.15, '9', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S10"] = [3, 0.175, 0.15, '10', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S11"] = [3, 0.175, 0.15, '11', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S12"] = [3, 0.175, 0.15, '12', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S13"] = [3, 0.175, 0.15, '13', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S14"] = [3, 0.175, 0.15, '14', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S15"] = [3, 0.175, 0.15, '15', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S16"] = [3, 0.175, 0.15, '16', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S17"] = [3, 0.175, 0.15, '17', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S18"] = [3, 0.175, 0.15, '18', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S19"] = [3, 0.175, 0.15, '19', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S20"] = [3, 0.175, 0.15, '20', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S21"] = [3, 0.175, 0.15, '21', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S22"] = [3, 0.175, 0.15, '22', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S23"] = [3, 0.175, 0.15, '23', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S24"] = [3, 0.175, 0.15, '24', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S25"] = [3, 0.175, 0.15, '25', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S26"] = [3, 0.175, 0.15, '26', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S27"] = [3, 0.175, 0.15, '27', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S28"] = [3, 0.175, 0.15, '28', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S29"] = [3, 0.175, 0.15, '29', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S30"] = [3, 0.175, 0.15, '30', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S31"] = [3, 0.175, 0.15, '31', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S32"] = [3, 0.175, 0.15, '32', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S33"] = [3, 0.175, 0.15, '33', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S34"] = [3, 0.175, 0.15, '34', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S35"] = [3, 0.175, 0.15, '35', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S36"] = [3, 0.175, 0.15, '36', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S37"] = [3, 0.175, 0.15, '37', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S38"] = [3, 0.175, 0.15, '38', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S39"] = [3, 0.175, 0.15, '39', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S40"] = [3, 0.175, 0.15, '40', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S41"] = [3, 0.175, 0.15, '41', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S42"] = [3, 0.175, 0.15, '42', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S43"] = [3, 0.175, 0.15, '43', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S44"] = [3, 0.175, 0.15, '44', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S45"] = [3, 0.175, 0.15, '45', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S46"] = [3, 0.175, 0.15, '46', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S47"] = [3, 0.175, 0.15, '47', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S48"] = [3, 0.175, 0.15, '48', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S49"] = [3, 0.175, 0.15, '49', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["S50"] = [3, 0.175, 0.15, '50', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-RCV-50"]["1"] = [5, 'S1']; +DEV_HIGHLIGHT["HM-RCV-50"]["2"] = [5, 'S2']; +DEV_HIGHLIGHT["HM-RCV-50"]["3"] = [5, 'S3']; +DEV_HIGHLIGHT["HM-RCV-50"]["4"] = [5, 'S4']; +DEV_HIGHLIGHT["HM-RCV-50"]["5"] = [5, 'S5']; +DEV_HIGHLIGHT["HM-RCV-50"]["6"] = [5, 'S6']; +DEV_HIGHLIGHT["HM-RCV-50"]["7"] = [5, 'S7']; +DEV_HIGHLIGHT["HM-RCV-50"]["8"] = [5, 'S8']; +DEV_HIGHLIGHT["HM-RCV-50"]["9"] = [5, 'S9']; +DEV_HIGHLIGHT["HM-RCV-50"]["10"] = [5, 'S10']; +DEV_HIGHLIGHT["HM-RCV-50"]["11"] = [5, 'S11']; +DEV_HIGHLIGHT["HM-RCV-50"]["12"] = [5, 'S12']; +DEV_HIGHLIGHT["HM-RCV-50"]["13"] = [5, 'S13']; +DEV_HIGHLIGHT["HM-RCV-50"]["14"] = [5, 'S14']; +DEV_HIGHLIGHT["HM-RCV-50"]["15"] = [5, 'S15']; +DEV_HIGHLIGHT["HM-RCV-50"]["16"] = [5, 'S16']; +DEV_HIGHLIGHT["HM-RCV-50"]["17"] = [5, 'S17']; +DEV_HIGHLIGHT["HM-RCV-50"]["18"] = [5, 'S18']; +DEV_HIGHLIGHT["HM-RCV-50"]["19"] = [5, 'S19']; +DEV_HIGHLIGHT["HM-RCV-50"]["20"] = [5, 'S20']; +DEV_HIGHLIGHT["HM-RCV-50"]["21"] = [5, 'S21']; +DEV_HIGHLIGHT["HM-RCV-50"]["22"] = [5, 'S22']; +DEV_HIGHLIGHT["HM-RCV-50"]["23"] = [5, 'S23']; +DEV_HIGHLIGHT["HM-RCV-50"]["24"] = [5, 'S24']; +DEV_HIGHLIGHT["HM-RCV-50"]["25"] = [5, 'S25']; +DEV_HIGHLIGHT["HM-RCV-50"]["26"] = [5, 'S26']; +DEV_HIGHLIGHT["HM-RCV-50"]["27"] = [5, 'S27']; +DEV_HIGHLIGHT["HM-RCV-50"]["28"] = [5, 'S28']; +DEV_HIGHLIGHT["HM-RCV-50"]["29"] = [5, 'S29']; +DEV_HIGHLIGHT["HM-RCV-50"]["30"] = [5, 'S30']; +DEV_HIGHLIGHT["HM-RCV-50"]["31"] = [5, 'S31']; +DEV_HIGHLIGHT["HM-RCV-50"]["32"] = [5, 'S32']; +DEV_HIGHLIGHT["HM-RCV-50"]["33"] = [5, 'S33']; +DEV_HIGHLIGHT["HM-RCV-50"]["34"] = [5, 'S34']; +DEV_HIGHLIGHT["HM-RCV-50"]["35"] = [5, 'S35']; +DEV_HIGHLIGHT["HM-RCV-50"]["36"] = [5, 'S36']; +DEV_HIGHLIGHT["HM-RCV-50"]["37"] = [5, 'S37']; +DEV_HIGHLIGHT["HM-RCV-50"]["38"] = [5, 'S38']; +DEV_HIGHLIGHT["HM-RCV-50"]["39"] = [5, 'S39']; +DEV_HIGHLIGHT["HM-RCV-50"]["40"] = [5, 'S40']; +DEV_HIGHLIGHT["HM-RCV-50"]["41"] = [5, 'S41']; +DEV_HIGHLIGHT["HM-RCV-50"]["42"] = [5, 'S42']; +DEV_HIGHLIGHT["HM-RCV-50"]["43"] = [5, 'S43']; +DEV_HIGHLIGHT["HM-RCV-50"]["44"] = [5, 'S44']; +DEV_HIGHLIGHT["HM-RCV-50"]["45"] = [5, 'S45']; +DEV_HIGHLIGHT["HM-RCV-50"]["46"] = [5, 'S46']; +DEV_HIGHLIGHT["HM-RCV-50"]["47"] = [5, 'S47']; +DEV_HIGHLIGHT["HM-RCV-50"]["48"] = [5, 'S48']; +DEV_HIGHLIGHT["HM-RCV-50"]["49"] = [5, 'S49']; +DEV_HIGHLIGHT["HM-RCV-50"]["50"] = [5, 'S50']; +DEV_LIST.push('HM-CC-TC'); +DEV_DESCRIPTION["HM-CC-TC"] = "HM-CC-TC"; +DEV_PATHS["HM-CC-TC"] = new Object(); +DEV_PATHS["HM-CC-TC"]["50"] = "/config/img/devices/50/42_hm-cc-tc_thumb.png"; +DEV_PATHS["HM-CC-TC"]["250"] = "/config/img/devices/250/42_hm-cc-tc.png"; +DEV_HIGHLIGHT["HM-CC-TC"] = new Object(); +DEV_LIST.push('HmIP-BDT-I'); +DEV_DESCRIPTION["HmIP-BDT-I"] = "BDT"; +DEV_PATHS["HmIP-BDT-I"] = new Object(); +DEV_PATHS["HmIP-BDT-I"]["50"] = "/config/img/devices/50/PushButton-2ch-wm_thumb.png"; +DEV_PATHS["HmIP-BDT-I"]["250"] = "/config/img/devices/250/PushButton-2ch-wm.png"; +DEV_HIGHLIGHT["HmIP-BDT-I"] = new Object(); +DEV_HIGHLIGHT["HmIP-BDT-I"]["2"] = [2, 0.244, 0.312, 0.428, 0.168]; +DEV_HIGHLIGHT["HmIP-BDT-I"]["1"] = [2, 0.244, 0.56, 0.428, 0.168]; +DEV_HIGHLIGHT["HmIP-BDT-I"]["1+2"] = [2, 0.244, 0.308, 0.428, 0.416]; +DEV_LIST.push('263 160'); +DEV_DESCRIPTION["263 160"] = "263_160"; +DEV_PATHS["263 160"] = new Object(); +DEV_PATHS["263 160"]["50"] = "/config/img/devices/50/57_hm-cc-scd_thumb.png"; +DEV_PATHS["263 160"]["250"] = "/config/img/devices/250/57_hm-cc-scd.png"; +DEV_HIGHLIGHT["263 160"] = new Object(); +DEV_LIST.push('HM-RC-P1'); +DEV_DESCRIPTION["HM-RC-P1"] = "HM-RC-P1"; +DEV_PATHS["HM-RC-P1"] = new Object(); +DEV_PATHS["HM-RC-P1"]["50"] = "/config/img/devices/50/21_hm-rc-p1_thumb.png"; +DEV_PATHS["HM-RC-P1"]["250"] = "/config/img/devices/250/21_hm-rc-p1.png"; +DEV_HIGHLIGHT["HM-RC-P1"] = new Object(); +DEV_HIGHLIGHT["HM-RC-P1"]["1"] = [4, 0.26, 0.248, 0.38, 0.42]; +DEV_LIST.push('HM-LC-Sw1-Pl-DN-R4'); +DEV_DESCRIPTION["HM-LC-Sw1-Pl-DN-R4"] = "HM-LC-Sw1-Pl-DN-R4"; +DEV_PATHS["HM-LC-Sw1-Pl-DN-R4"] = new Object(); +DEV_PATHS["HM-LC-Sw1-Pl-DN-R4"]["50"] = "/config/img/devices/50/107_hm-es-pmsw1-pl-R4_thumb.png"; +DEV_PATHS["HM-LC-Sw1-Pl-DN-R4"]["250"] = "/config/img/devices/250/107_hm-es-pmsw1-pl-R4.png"; +DEV_HIGHLIGHT["HM-LC-Sw1-Pl-DN-R4"] = new Object(); +DEV_LIST.push('HM-Dis-WM55'); +DEV_DESCRIPTION["HM-Dis-WM55"] = "HM-Dis-WM55"; +DEV_PATHS["HM-Dis-WM55"] = new Object(); +DEV_PATHS["HM-Dis-WM55"]["50"] = "/config/img/devices/50/97_hm-dis-wm55_thumb.png"; +DEV_PATHS["HM-Dis-WM55"]["250"] = "/config/img/devices/250/97_hm-dis-wm55.png"; +DEV_HIGHLIGHT["HM-Dis-WM55"] = new Object(); +DEV_LIST.push('HM-ES-PMSw1-Pl-DN-R3'); +DEV_DESCRIPTION["HM-ES-PMSw1-Pl-DN-R3"] = "HM-ES-PMSw1-Pl-DN-R3"; +DEV_PATHS["HM-ES-PMSw1-Pl-DN-R3"] = new Object(); +DEV_PATHS["HM-ES-PMSw1-Pl-DN-R3"]["50"] = "/config/img/devices/50/107_hm-es-pmsw1-pl-R3_thumb.png"; +DEV_PATHS["HM-ES-PMSw1-Pl-DN-R3"]["250"] = "/config/img/devices/250/107_hm-es-pmsw1-pl-R3.png"; +DEV_HIGHLIGHT["HM-ES-PMSw1-Pl-DN-R3"] = new Object(); +DEV_LIST.push('HmIP-SMI55'); +DEV_DESCRIPTION["HmIP-SMI55"] = "HmIP-SMI55"; +DEV_PATHS["HmIP-SMI55"] = new Object(); +DEV_PATHS["HmIP-SMI55"]["50"] = "/config/img/devices/50/168_hmip-smi55_thumb.png"; +DEV_PATHS["HmIP-SMI55"]["250"] = "/config/img/devices/250/168_hmip-smi55.png"; +DEV_HIGHLIGHT["HmIP-SMI55"] = new Object(); +DEV_HIGHLIGHT["HmIP-SMI55"]["2"] = [4, 0.540, 0.188, 0.04, 0.044]; +DEV_HIGHLIGHT["HmIP-SMI55"]["1"] = [4, 0.540, 0.820, 0.04, 0.044]; +DEV_LIST.push('HmIP-MOD-WD-VK'); +DEV_DESCRIPTION["HmIP-MOD-WD-VK"] = "HmIP-MOD-WD-VK"; +DEV_PATHS["HmIP-MOD-WD-VK"] = new Object(); +DEV_PATHS["HmIP-MOD-WD-VK"]["50"] = "/config/img/devices/50/223_hmip-mod-wd-vk_thumb.png"; +DEV_PATHS["HmIP-MOD-WD-VK"]["250"] = "/config/img/devices/250/223_hmip-mod-wd-vk.png"; +DEV_HIGHLIGHT["HmIP-MOD-WD-VK"] = new Object(); +DEV_LIST.push('HM-LC-Sw4-DR'); +DEV_DESCRIPTION["HM-LC-Sw4-DR"] = "HM-LC-Sw4-DR"; +DEV_PATHS["HM-LC-Sw4-DR"] = new Object(); +DEV_PATHS["HM-LC-Sw4-DR"]["50"] = "/config/img/devices/50/68_hm-lc-sw4-dr_thumb.png"; +DEV_PATHS["HM-LC-Sw4-DR"]["250"] = "/config/img/devices/250/68_hm-lc-sw4-dr.png"; +DEV_HIGHLIGHT["HM-LC-Sw4-DR"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Sw4-DR"]["1"] = [4, 0.088, 0.556, 0.048, 0.04]; +DEV_HIGHLIGHT["HM-LC-Sw4-DR"]["2"] = [4, 0.280, 0.556, 0.048, 0.04]; +DEV_HIGHLIGHT["HM-LC-Sw4-DR"]["3"] = [4, 0.472, 0.556, 0.048, 0.04]; +DEV_HIGHLIGHT["HM-LC-Sw4-DR"]["4"] = [4, 0.656, 0.556, 0.048, 0.04]; +DEV_LIST.push('HmIP-SWDO-A'); +DEV_DESCRIPTION["HmIP-SWDO-A"] = "HmIP-SWDO"; +DEV_PATHS["HmIP-SWDO-A"] = new Object(); +DEV_PATHS["HmIP-SWDO-A"]["50"] = "/config/img/devices/50/118_hmip-swdo_thumb.png"; +DEV_PATHS["HmIP-SWDO-A"]["250"] = "/config/img/devices/250/118_hmip-swdo.png"; +DEV_HIGHLIGHT["HmIP-SWDO-A"] = new Object(); +DEV_LIST.push('HM-LC-Sw1-Pl-OM54'); +DEV_DESCRIPTION["HM-LC-Sw1-Pl-OM54"] = "HM-LC-Sw1-Pl-OM54"; +DEV_PATHS["HM-LC-Sw1-Pl-OM54"] = new Object(); +DEV_PATHS["HM-LC-Sw1-Pl-OM54"]["50"] = "/config/img/devices/50/OM55_DimmerSwitch_thumb.png"; +DEV_PATHS["HM-LC-Sw1-Pl-OM54"]["250"] = "/config/img/devices/250/OM55_DimmerSwitch.png"; +DEV_HIGHLIGHT["HM-LC-Sw1-Pl-OM54"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Sw1-Pl-OM54"]["1_part1"] = [2, 0.548, 0.468, 0.072, 0.052]; +DEV_HIGHLIGHT["HM-LC-Sw1-Pl-OM54"]["1_part2"] = [2, 0.612, 0.452, 0.028, 0.056]; +DEV_HIGHLIGHT["HM-LC-Sw1-Pl-OM54"]["1"] = [5, '1_part1', '1_part2']; +DEV_LIST.push('HmIP-MOD-HO'); +DEV_DESCRIPTION["HmIP-MOD-HO"] = "HmIP-MOD-HO"; +DEV_PATHS["HmIP-MOD-HO"] = new Object(); +DEV_PATHS["HmIP-MOD-HO"]["50"] = "/config/img/devices/50/191_hmip-mod-ho_thumb.png"; +DEV_PATHS["HmIP-MOD-HO"]["250"] = "/config/img/devices/250/191_hmip-mod-ho.png"; +DEV_HIGHLIGHT["HmIP-MOD-HO"] = new Object(); +DEV_LIST.push('HmIP-WHS2'); +DEV_DESCRIPTION["HmIP-WHS2"] = "HmIP-WHS2"; +DEV_PATHS["HmIP-WHS2"] = new Object(); +DEV_PATHS["HmIP-WHS2"]["50"] = "/config/img/devices/50/155_hmip-whs2_thumb.png"; +DEV_PATHS["HmIP-WHS2"]["250"] = "/config/img/devices/250/155_hmip-whs2.png"; +DEV_HIGHLIGHT["HmIP-WHS2"] = new Object(); +DEV_LIST.push('HmIPW-BRC2'); +DEV_DESCRIPTION["HmIPW-BRC2"] = "HmIPW-BRC2"; +DEV_PATHS["HmIPW-BRC2"] = new Object(); +DEV_PATHS["HmIPW-BRC2"]["50"] = "/config/img/devices/50/PushButton-2ch-wm_thumb.png"; +DEV_PATHS["HmIPW-BRC2"]["250"] = "/config/img/devices/250/PushButton-2ch-wm.png"; +DEV_HIGHLIGHT["HmIPW-BRC2"] = new Object(); +DEV_HIGHLIGHT["HmIPW-BRC2"]["2"] = [2, 0.244, 0.312, 0.428, 0.168]; +DEV_HIGHLIGHT["HmIPW-BRC2"]["1"] = [2, 0.244, 0.56, 0.428, 0.168]; +DEV_HIGHLIGHT["HmIPW-BRC2"]["1+2"] = [2, 0.244, 0.308, 0.428, 0.416]; +DEV_LIST.push('HM-LC-Sw1-DR'); +DEV_DESCRIPTION["HM-LC-Sw1-DR"] = "HM-LC-Sw1-DR"; +DEV_PATHS["HM-LC-Sw1-DR"] = new Object(); +DEV_PATHS["HM-LC-Sw1-DR"]["50"] = "/config/img/devices/50/35_hmw-sys-tm-dr_thumb.png"; +DEV_PATHS["HM-LC-Sw1-DR"]["250"] = "/config/img/devices/250/106_hm-lc-sw1-dr.png"; +DEV_HIGHLIGHT["HM-LC-Sw1-DR"] = new Object(); +DEV_LIST.push('HM-PB-4Dis-WM'); +DEV_DESCRIPTION["HM-PB-4Dis-WM"] = "HM-PB-4Dis-WM"; +DEV_PATHS["HM-PB-4Dis-WM"] = new Object(); +DEV_PATHS["HM-PB-4Dis-WM"]["50"] = "/config/img/devices/50/70_hm-pb-4dis-wm_thumb.png"; +DEV_PATHS["HM-PB-4Dis-WM"]["250"] = "/config/img/devices/250/70_hm-pb-4dis-wm.png"; +DEV_HIGHLIGHT["HM-PB-4Dis-WM"] = new Object(); +DEV_HIGHLIGHT["HM-PB-4Dis-WM"]["2"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM"]["1"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM"]["4"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM"]["3"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM"]["6"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM"]["5"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM"]["8"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM"]["7"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM"]["10"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM"]["9"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM"]["12"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM"]["11"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM"]["14"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM"]["13"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM"]["16"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM"]["15"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM"]["18"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM"]["17"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM"]["20"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM"]["19"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_LIST.push('HmIP-FAL230-C10'); +DEV_DESCRIPTION["HmIP-FAL230-C10"] = "HmIP-FAL230-C10"; +DEV_PATHS["HmIP-FAL230-C10"] = new Object(); +DEV_PATHS["HmIP-FAL230-C10"]["50"] = "/config/img/devices/50/138_hmip-fal-c10_thumb.png"; +DEV_PATHS["HmIP-FAL230-C10"]["250"] = "/config/img/devices/250/138_hmip-fal-c10.png"; +DEV_HIGHLIGHT["HmIP-FAL230-C10"] = new Object(); +DEV_LIST.push('HM-LC-Dim1T-Pl-644'); +DEV_DESCRIPTION["HM-LC-Dim1T-Pl-644"] = "HM-LC-Dim1T-Pl"; +DEV_PATHS["HM-LC-Dim1T-Pl-644"] = new Object(); +DEV_PATHS["HM-LC-Dim1T-Pl-644"]["50"] = "/config/img/devices/50/OM55_DimmerSwitch_thumb.png"; +DEV_PATHS["HM-LC-Dim1T-Pl-644"]["250"] = "/config/img/devices/250/OM55_DimmerSwitch.png"; +DEV_HIGHLIGHT["HM-LC-Dim1T-Pl-644"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Dim1T-Pl-644"]["1_part1"] = [2, 0.548, 0.468, 0.072, 0.052]; +DEV_HIGHLIGHT["HM-LC-Dim1T-Pl-644"]["1_part2"] = [2, 0.612, 0.452, 0.028, 0.056]; +DEV_HIGHLIGHT["HM-LC-Dim1T-Pl-644"]["1"] = [5, '1_part1', '1_part2']; +DEV_LIST.push('HmIP-WKP'); +DEV_DESCRIPTION["HmIP-WKP"] = "HmIP-WKP"; +DEV_PATHS["HmIP-WKP"] = new Object(); +DEV_PATHS["HmIP-WKP"]["50"] = "/config/img/devices/50/221_hmip-wkp_thumb.png"; +DEV_PATHS["HmIP-WKP"]["250"] = "/config/img/devices/250/221_hmip-wkp.png"; +DEV_HIGHLIGHT["HmIP-WKP"] = new Object(); +DEV_LIST.push('ELV-SH-CTV'); +DEV_DESCRIPTION["ELV-SH-CTV"] = "ELV-SH-CTV"; +DEV_PATHS["ELV-SH-CTV"] = new Object(); +DEV_PATHS["ELV-SH-CTV"]["50"] = "/config/img/devices/50/237_elv-sh-ctv_thumb.png"; +DEV_PATHS["ELV-SH-CTV"]["250"] = "/config/img/devices/250/237_elv-sh-ctv.png"; +DEV_HIGHLIGHT["ELV-SH-CTV"] = new Object(); +DEV_LIST.push('HmIP-DLD-A'); +DEV_DESCRIPTION["HmIP-DLD-A"] = "HmIP-DLD"; +DEV_PATHS["HmIP-DLD-A"] = new Object(); +DEV_PATHS["HmIP-DLD-A"]["50"] = "/config/img/devices/50/214_hmip-dld_thumb.png"; +DEV_PATHS["HmIP-DLD-A"]["250"] = "/config/img/devices/250/214_hmip-dld.png"; +DEV_HIGHLIGHT["HmIP-DLD-A"] = new Object(); +DEV_LIST.push('HmIP-WRC6'); +DEV_DESCRIPTION["HmIP-WRC6"] = "WRC6"; +DEV_PATHS["HmIP-WRC6"] = new Object(); +DEV_PATHS["HmIP-WRC6"]["50"] = "/config/img/devices/50/131_hmip-wrc6_thumb.png"; +DEV_PATHS["HmIP-WRC6"]["250"] = "/config/img/devices/250/131_hmip-wrc6.png"; +DEV_HIGHLIGHT["HmIP-WRC6"] = new Object(); +DEV_HIGHLIGHT["HmIP-WRC6"]["1"] = [1, 0.270, 0.310, 0.050]; +DEV_HIGHLIGHT["HmIP-WRC6"]["2"] = [1, 0.675, 0.285, 0.050]; +DEV_HIGHLIGHT["HmIP-WRC6"]["3"] = [1, 0.270, 0.510, 0.050]; +DEV_HIGHLIGHT["HmIP-WRC6"]["4"] = [1, 0.675, 0.480, 0.050]; +DEV_HIGHLIGHT["HmIP-WRC6"]["5"] = [1, 0.270, 0.706, 0.050]; +DEV_HIGHLIGHT["HmIP-WRC6"]["6"] = [1, 0.675, 0.671, 0.050]; +DEV_HIGHLIGHT["HmIP-WRC6"]["1+2"] = [5, '1', '2']; +DEV_HIGHLIGHT["HmIP-WRC6"]["3+4"] = [5, '3', '4']; +DEV_HIGHLIGHT["HmIP-WRC6"]["5+6"] = [5, '5', '6']; +DEV_LIST.push('HmIP-PS-2 9YM'); +DEV_DESCRIPTION["HmIP-PS-2 9YM"] = "PS"; +DEV_PATHS["HmIP-PS-2 9YM"] = new Object(); +DEV_PATHS["HmIP-PS-2 9YM"]["50"] = "/config/img/devices/50/113_hmip-psm_thumb.png"; +DEV_PATHS["HmIP-PS-2 9YM"]["250"] = "/config/img/devices/250/113_hmip-psm.png"; +DEV_HIGHLIGHT["HmIP-PS-2 9YM"] = new Object(); +DEV_LIST.push('HM-LC-Sw4-SM'); +DEV_DESCRIPTION["HM-LC-Sw4-SM"] = "HM-LC-Sw4-SM"; +DEV_PATHS["HM-LC-Sw4-SM"] = new Object(); +DEV_PATHS["HM-LC-Sw4-SM"]["50"] = "/config/img/devices/50/3_hm-lc-sw4-sm_thumb.png"; +DEV_PATHS["HM-LC-Sw4-SM"]["250"] = "/config/img/devices/250/3_hm-lc-sw4-sm.png"; +DEV_HIGHLIGHT["HM-LC-Sw4-SM"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Sw4-SM"]["1_Part1"] = [6, 0.136, 0.896, 0.136, 0.98, 0.012]; +DEV_HIGHLIGHT["HM-LC-Sw4-SM"]["1_Part2"] = [6, 0.136, 0.98, 0.096, 0.916, 0.012]; +DEV_HIGHLIGHT["HM-LC-Sw4-SM"]["1_Part3"] = [6, 0.136, 0.98, 0.176, 0.916, 0.012]; +DEV_HIGHLIGHT["HM-LC-Sw4-SM"]["1_Arrow"] = [5, '1_Part1', '1_Part2', '1_Part3']; +DEV_HIGHLIGHT["HM-LC-Sw4-SM"]["2_Arrow"] = [7, '1_Arrow', 0.164, 0]; +DEV_HIGHLIGHT["HM-LC-Sw4-SM"]["3_Arrow"] = [7, '1_Arrow', 0.328, 0]; +DEV_HIGHLIGHT["HM-LC-Sw4-SM"]["4_Arrow"] = [7, '1_Arrow', 0.492, 0]; +DEV_HIGHLIGHT["HM-LC-Sw4-SM"]["1_Key"] = [4, 0.244, 0.372, 0.04, 0.044]; +DEV_HIGHLIGHT["HM-LC-Sw4-SM"]["2_Key"] = [4, 0.328, 0.372, 0.04, 0.044]; +DEV_HIGHLIGHT["HM-LC-Sw4-SM"]["3_Key"] = [4, 0.404, 0.372, 0.04, 0.044]; +DEV_HIGHLIGHT["HM-LC-Sw4-SM"]["4_Key"] = [4, 0.484, 0.372, 0.04, 0.044]; +DEV_HIGHLIGHT["HM-LC-Sw4-SM"]["1"] = [5, '1_Arrow', '1_Key']; +DEV_HIGHLIGHT["HM-LC-Sw4-SM"]["2"] = [5, '2_Arrow', '2_Key']; +DEV_HIGHLIGHT["HM-LC-Sw4-SM"]["3"] = [5, '3_Arrow', '3_Key']; +DEV_HIGHLIGHT["HM-LC-Sw4-SM"]["4"] = [5, '4_Arrow', '4_Key']; +DEV_LIST.push('HmIP-MIOB'); +DEV_DESCRIPTION["HmIP-MIOB"] = "MIOB"; +DEV_PATHS["HmIP-MIOB"] = new Object(); +DEV_PATHS["HmIP-MIOB"]["50"] = "/config/img/devices/50/136_hmip-miob_thumb.png"; +DEV_PATHS["HmIP-MIOB"]["250"] = "/config/img/devices/250/136_hmip-miob.png"; +DEV_HIGHLIGHT["HmIP-MIOB"] = new Object(); +DEV_LIST.push('ALPHA-IP-RBGa'); +DEV_DESCRIPTION["ALPHA-IP-RBGa"] = "ALPHA-IP-RBGa"; +DEV_PATHS["ALPHA-IP-RBGa"] = new Object(); +DEV_PATHS["ALPHA-IP-RBGa"]["50"] = "/config/img/devices/50/141_alpha-ip-rgba_thumb.png"; +DEV_PATHS["ALPHA-IP-RBGa"]["250"] = "/config/img/devices/250/141_alpha-ip-rgba.png"; +DEV_HIGHLIGHT["ALPHA-IP-RBGa"] = new Object(); +DEV_LIST.push('HmIP-KRCK-2'); +DEV_DESCRIPTION["HmIP-KRCK-2"] = "HmIP-KRCK"; +DEV_PATHS["HmIP-KRCK-2"] = new Object(); +DEV_PATHS["HmIP-KRCK-2"]["50"] = "/config/img/devices/50/84_hm-rc-4-x_thumb.png"; +DEV_PATHS["HmIP-KRCK-2"]["250"] = "/config/img/devices/250/86_hm-rc-key4-3.png"; +DEV_HIGHLIGHT["HmIP-KRCK-2"] = new Object(); +DEV_HIGHLIGHT["HmIP-KRCK-2"]["arrow_part1"] = [6, 0.312, 0.288, 0.416, 0.288, 0.012]; +DEV_HIGHLIGHT["HmIP-KRCK-2"]["arrow_part2"] = [6, 0.312, 0.288, 0.352, 0.248, 0.012]; +DEV_HIGHLIGHT["HmIP-KRCK-2"]["arrow_part3"] = [6, 0.312, 0.288, 0.352, 0.328, 0.012]; +DEV_HIGHLIGHT["HmIP-KRCK-2"]["Arrow"] = [5, 'arrow_part1', 'arrow_part2', 'arrow_part3']; +DEV_HIGHLIGHT["HmIP-KRCK-2"]["1_Arrow"] = [7, 'Arrow', 0.25, 0.0]; +DEV_HIGHLIGHT["HmIP-KRCK-2"]["2_Arrow"] = [7, 'Arrow', 0.238, 0.156]; +DEV_HIGHLIGHT["HmIP-KRCK-2"]["3_Arrow"] = [7, 'Arrow', 0.228, 0.312]; +DEV_HIGHLIGHT["HmIP-KRCK-2"]["4_Arrow"] = [7, 'Arrow', 0.212, 0.468]; +DEV_HIGHLIGHT["HmIP-KRCK-2"]["1"] = [5, '2_Arrow']; +DEV_HIGHLIGHT["HmIP-KRCK-2"]["2"] = [5, '1_Arrow']; +DEV_HIGHLIGHT["HmIP-KRCK-2"]["3"] = [5, '4_Arrow']; +DEV_HIGHLIGHT["HmIP-KRCK-2"]["4"] = [5, '3_Arrow']; +DEV_HIGHLIGHT["HmIP-KRCK-2"]["1+2"] = [5, '1_Arrow', '2_Arrow']; +DEV_HIGHLIGHT["HmIP-KRCK-2"]["3+4"] = [5, '3_Arrow', '4_Arrow']; +DEV_LIST.push('ALPHA-IP-RBG'); +DEV_DESCRIPTION["ALPHA-IP-RBG"] = "ALPHA-IP-RBG"; +DEV_PATHS["ALPHA-IP-RBG"] = new Object(); +DEV_PATHS["ALPHA-IP-RBG"]["50"] = "/config/img/devices/50/140_alpha-ip-rgb_thumb.png"; +DEV_PATHS["ALPHA-IP-RBG"]["250"] = "/config/img/devices/250/140_alpha-ip-rgb.png"; +DEV_HIGHLIGHT["ALPHA-IP-RBG"] = new Object(); +DEV_LIST.push('HmIP-DRSI4'); +DEV_DESCRIPTION["HmIP-DRSI4"] = "HmIP-DRSI4"; +DEV_PATHS["HmIP-DRSI4"] = new Object(); +DEV_PATHS["HmIP-DRSI4"]["50"] = "/config/img/devices/50/205_hmip-drsi4_thumb.png"; +DEV_PATHS["HmIP-DRSI4"]["250"] = "/config/img/devices/250/205_hmip-drsi4.png"; +DEV_HIGHLIGHT["HmIP-DRSI4"] = new Object(); +DEV_LIST.push('VIR-HUE-GTW'); +DEV_DESCRIPTION["VIR-HUE-GTW"] = "VIR-HUE-GTW"; +DEV_PATHS["VIR-HUE-GTW"] = new Object(); +DEV_PATHS["VIR-HUE-GTW"]["50"] = "/config/img/devices/50/coupling/hm-hue_gateway.png"; +DEV_PATHS["VIR-HUE-GTW"]["250"] = "/config/img/devices/250/coupling/hm-hue_gateway.png"; +DEV_HIGHLIGHT["VIR-HUE-GTW"] = new Object(); +DEV_LIST.push('HM-LC-Sw1-PCB'); +DEV_DESCRIPTION["HM-LC-Sw1-PCB"] = "HM-LC-Sw1-PCB"; +DEV_PATHS["HM-LC-Sw1-PCB"] = new Object(); +DEV_PATHS["HM-LC-Sw1-PCB"]["50"] = "/config/img/devices/50/139_hm-lc-sw1-pcb_thumb.png"; +DEV_PATHS["HM-LC-Sw1-PCB"]["250"] = "/config/img/devices/250/139_hm-lc-sw1-pcb.png"; +DEV_HIGHLIGHT["HM-LC-Sw1-PCB"] = new Object(); +DEV_LIST.push('HM-LC-Dim2L-SM'); +DEV_DESCRIPTION["HM-LC-Dim2L-SM"] = "HM-LC-Dim2L-SM"; +DEV_PATHS["HM-LC-Dim2L-SM"] = new Object(); +DEV_PATHS["HM-LC-Dim2L-SM"]["50"] = "/config/img/devices/50/45_hm-lc-dim2l-sm_thumb.png"; +DEV_PATHS["HM-LC-Dim2L-SM"]["250"] = "/config/img/devices/250/45_hm-lc-dim2l-sm.png"; +DEV_HIGHLIGHT["HM-LC-Dim2L-SM"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Dim2L-SM"]["1_Part1"] = [6, 0.530, 0.896, 0.530, 0.98, 0.012]; +DEV_HIGHLIGHT["HM-LC-Dim2L-SM"]["1_Part2"] = [6, 0.530, 0.98, 0.49, 0.916, 0.012]; +DEV_HIGHLIGHT["HM-LC-Dim2L-SM"]["1_Part3"] = [6, 0.530, 0.98, 0.574, 0.916, 0.012]; +DEV_HIGHLIGHT["HM-LC-Dim2L-SM"]["1_Arrow"] = [5, '1_Part1', '1_Part2', '1_Part3']; +DEV_HIGHLIGHT["HM-LC-Dim2L-SM"]["2_Arrow"] = [7, '1_Arrow', 0.168, 0]; +DEV_HIGHLIGHT["HM-LC-Dim2L-SM"]["1_Key"] = [4, 0.25, 0.33, 0.04, 0.044]; +DEV_HIGHLIGHT["HM-LC-Dim2L-SM"]["2_Key"] = [4, 0.328, 0.33, 0.04, 0.044]; +DEV_HIGHLIGHT["HM-LC-Dim2L-SM"]["1"] = [5, '1_Arrow', '1_Key']; +DEV_HIGHLIGHT["HM-LC-Dim2L-SM"]["2"] = [5, '2_Arrow', '2_Key']; +DEV_LIST.push('HmIP-WRC6-A'); +DEV_DESCRIPTION["HmIP-WRC6-A"] = "WRC6"; +DEV_PATHS["HmIP-WRC6-A"] = new Object(); +DEV_PATHS["HmIP-WRC6-A"]["50"] = "/config/img/devices/50/131_hmip-wrc6_thumb.png"; +DEV_PATHS["HmIP-WRC6-A"]["250"] = "/config/img/devices/250/131_hmip-wrc6.png"; +DEV_HIGHLIGHT["HmIP-WRC6-A"] = new Object(); +DEV_HIGHLIGHT["HmIP-WRC6-A"]["1"] = [1, 0.3, 0.358, 0.025]; +DEV_HIGHLIGHT["HmIP-WRC6-A"]["2"] = [1, 0.705, 0.315, 0.025]; +DEV_HIGHLIGHT["HmIP-WRC6-A"]["3"] = [1, 0.3, 0.53, 0.025]; +DEV_HIGHLIGHT["HmIP-WRC6-A"]["4"] = [1, 0.705, 0.495, 0.025]; +DEV_HIGHLIGHT["HmIP-WRC6-A"]["5"] = [1, 0.3, 0.706, 0.025]; +DEV_HIGHLIGHT["HmIP-WRC6-A"]["6"] = [1, 0.705, 0.671, 0.025]; +DEV_HIGHLIGHT["HmIP-WRC6-A"]["1+2"] = [5, '1', '2']; +DEV_HIGHLIGHT["HmIP-WRC6-A"]["3+4"] = [5, '3', '4']; +DEV_HIGHLIGHT["HmIP-WRC6-A"]["5+6"] = [5, '5', '6']; +DEV_LIST.push('HmIP-eTRV-2'); +DEV_DESCRIPTION["HmIP-eTRV-2"] = "TRV"; +DEV_PATHS["HmIP-eTRV-2"] = new Object(); +DEV_PATHS["HmIP-eTRV-2"]["50"] = "/config/img/devices/50/120_hmip-etrv_thumb.png"; +DEV_PATHS["HmIP-eTRV-2"]["250"] = "/config/img/devices/250/120_hmip-etrv.png"; +DEV_HIGHLIGHT["HmIP-eTRV-2"] = new Object(); +DEV_LIST.push('HmIP-STI'); +DEV_DESCRIPTION["HmIP-STI"] = "HmIP-STI"; +DEV_PATHS["HmIP-STI"] = new Object(); +DEV_PATHS["HmIP-STI"]["50"] = "/config/img/devices/50/221_hmip-sti_thumb.png"; +DEV_PATHS["HmIP-STI"]["250"] = "/config/img/devices/250/221_hmip-sti.png"; +DEV_HIGHLIGHT["HmIP-STI"] = new Object(); +DEV_LIST.push('HmIP-SMO230-A'); +DEV_DESCRIPTION["HmIP-SMO230-A"] = "SMO"; +DEV_PATHS["HmIP-SMO230-A"] = new Object(); +DEV_PATHS["HmIP-SMO230-A"]["50"] = "/config/img/devices/50/213_hmip-smo230_thumb.png"; +DEV_PATHS["HmIP-SMO230-A"]["250"] = "/config/img/devices/250/213_hmip-smo230.png"; +DEV_HIGHLIGHT["HmIP-SMO230-A"] = new Object(); +DEV_LIST.push('ELV-SH-CTH'); +DEV_DESCRIPTION["ELV-SH-CTH"] = "HmIP-STHO"; +DEV_PATHS["ELV-SH-CTH"] = new Object(); +DEV_PATHS["ELV-SH-CTH"]["50"] = "/config/img/devices/50/231_elv-sh-cth_thumb.png"; +DEV_PATHS["ELV-SH-CTH"]["250"] = "/config/img/devices/250/231_elv-sh-cth.png"; +DEV_HIGHLIGHT["ELV-SH-CTH"] = new Object(); +DEV_LIST.push('HMW-IO-12-FM'); +DEV_DESCRIPTION["HMW-IO-12-FM"] = "HMW-IO-12-FM"; +DEV_PATHS["HMW-IO-12-FM"] = new Object(); +DEV_PATHS["HMW-IO-12-FM"]["50"] = "/config/img/devices/50/59_hmw-io-12-fm_thumb.png"; +DEV_PATHS["HMW-IO-12-FM"]["250"] = "/config/img/devices/250/59_hmw-io-12-fm.png"; +DEV_HIGHLIGHT["HMW-IO-12-FM"] = new Object(); +DEV_HIGHLIGHT["HMW-IO-12-FM"]["1_num"] = [3, 0.744, 0.636, '1', 0.164, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-IO-12-FM"]["1_line"] = [6, 0.77, 0.08, 0.860, 0.08, 0.016]; +DEV_HIGHLIGHT["HMW-IO-12-FM"]["1"] = [5, '1_num', '1_line']; +DEV_HIGHLIGHT["HMW-IO-12-FM"]["2_num"] = [3, 0.744, 0.636, '2', 0.164, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-IO-12-FM"]["2_line"] = [6, 0.77, 0.136, 0.86, 0.136, 0.016]; +DEV_HIGHLIGHT["HMW-IO-12-FM"]["2"] = [5, '2_num', '2_line']; +DEV_HIGHLIGHT["HMW-IO-12-FM"]["3_num"] = [3, 0.744, 0.636, '3', 0.164, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-IO-12-FM"]["3_line"] = [6, 0.77, 0.194, 0.86, 0.194, 0.016]; +DEV_HIGHLIGHT["HMW-IO-12-FM"]["3"] = [5, '3_num', '3_line']; +DEV_HIGHLIGHT["HMW-IO-12-FM"]["4_num"] = [3, 0.744, 0.636, '4', 0.164, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-IO-12-FM"]["4_line"] = [6, 0.77, 0.25, 0.86, 0.25, 0.016]; +DEV_HIGHLIGHT["HMW-IO-12-FM"]["4"] = [5, '4_num', '4_line']; +DEV_HIGHLIGHT["HMW-IO-12-FM"]["5_num"] = [3, 0.744, 0.636, '5', 0.164, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-IO-12-FM"]["5_line"] = [6, 0.77, 0.308, 0.86, 0.308, 0.016]; +DEV_HIGHLIGHT["HMW-IO-12-FM"]["5"] = [5, '5_num', '5_line']; +DEV_HIGHLIGHT["HMW-IO-12-FM"]["6_num"] = [3, 0.744, 0.636, '6', 0.164, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-IO-12-FM"]["6_line"] = [6, 0.77, 0.366, 0.86, 0.366, 0.016]; +DEV_HIGHLIGHT["HMW-IO-12-FM"]["6"] = [5, '6_num', '6_line']; +DEV_HIGHLIGHT["HMW-IO-12-FM"]["7_num"] = [3, 0.744, 0.636, '7', 0.164, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-IO-12-FM"]["7_line"] = [6, 0.77, 0.424, 0.86, 0.424, 0.016]; +DEV_HIGHLIGHT["HMW-IO-12-FM"]["7"] = [5, '7_num', '7_line']; +DEV_HIGHLIGHT["HMW-IO-12-FM"]["8_num"] = [3, 0.744, 0.636, '8', 0.164, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-IO-12-FM"]["8_arc"] = [4, 0.370, 0.748, 0.036, 0.036, 0.036]; +DEV_HIGHLIGHT["HMW-IO-12-FM"]["8"] = [5, '8_num', '8_arc']; +DEV_HIGHLIGHT["HMW-IO-12-FM"]["9_num"] = [3, 0.744, 0.636, '9', 0.164, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-IO-12-FM"]["9_arc"] = [4, 0.3895, 0.704, 0.036, 0.036, 0.036]; +DEV_HIGHLIGHT["HMW-IO-12-FM"]["9"] = [5, '9_num', '9_arc']; +DEV_HIGHLIGHT["HMW-IO-12-FM"]["10_num"] = [3, 0.744, 0.636, '10', 0.164, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-IO-12-FM"]["10_arc"] = [4, 0.41, 0.65, 0.035, 0.036, 0.036]; +DEV_HIGHLIGHT["HMW-IO-12-FM"]["10"] = [5, '10_num', '10_arc']; +DEV_HIGHLIGHT["HMW-IO-12-FM"]["11_num"] = [3, 0.744, 0.636, '11', 0.164, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-IO-12-FM"]["11_arc"] = [4, 0.4293, 0.612, 0.036, 0.036, 0.036]; +DEV_HIGHLIGHT["HMW-IO-12-FM"]["11"] = [5, '11_num', '11_arc']; +DEV_HIGHLIGHT["HMW-IO-12-FM"]["12_num"] = [3, 0.744, 0.636, '12', 0.164, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-IO-12-FM"]["12_arc"] = [4, 0.448, 0.564, 0.036, 0.036, 0.036]; +DEV_HIGHLIGHT["HMW-IO-12-FM"]["12"] = [5, '12_num', '12_arc']; +DEV_LIST.push('HM-Sec-MDIR'); +DEV_DESCRIPTION["HM-Sec-MDIR"] = "HM-Sec-MDIR"; +DEV_PATHS["HM-Sec-MDIR"] = new Object(); +DEV_PATHS["HM-Sec-MDIR"]["50"] = "/config/img/devices/50/124_hm-sec-mdir_thumb.png"; +DEV_PATHS["HM-Sec-MDIR"]["250"] = "/config/img/devices/250/124_hm-sec-mdir.png"; +DEV_HIGHLIGHT["HM-Sec-MDIR"] = new Object(); +DEV_LIST.push('HmIP-FALMOT-C12'); +DEV_DESCRIPTION["HmIP-FALMOT-C12"] = "HmIP-FALMOT-C12"; +DEV_PATHS["HmIP-FALMOT-C12"] = new Object(); +DEV_PATHS["HmIP-FALMOT-C12"]["50"] = "/config/img/devices/50/198_hmip-falmot-c12_thumb.png"; +DEV_PATHS["HmIP-FALMOT-C12"]["250"] = "/config/img/devices/250/198_hmip-falmot-c12.png"; +DEV_HIGHLIGHT["HmIP-FALMOT-C12"] = new Object(); +DEV_LIST.push('HMIP-PSM'); +DEV_DESCRIPTION["HMIP-PSM"] = "PSM"; +DEV_PATHS["HMIP-PSM"] = new Object(); +DEV_PATHS["HMIP-PSM"]["50"] = "/config/img/devices/50/113_hmip-psm_thumb.png"; +DEV_PATHS["HMIP-PSM"]["250"] = "/config/img/devices/250/113_hmip-psm.png"; +DEV_HIGHLIGHT["HMIP-PSM"] = new Object(); +DEV_LIST.push('263 134'); +DEV_DESCRIPTION["263 134"] = "263_134"; +DEV_PATHS["263 134"] = new Object(); +DEV_PATHS["263 134"]["50"] = "/config/img/devices/50/66_hm-lc-dim1t-cv_thumb.png"; +DEV_PATHS["263 134"]["250"] = "/config/img/devices/250/66_hm-lc-dim1t-cv.png"; +DEV_HIGHLIGHT["263 134"] = new Object(); +DEV_LIST.push('HmIP-eTRV-B1'); +DEV_DESCRIPTION["HmIP-eTRV-B1"] = "TRV-B"; +DEV_PATHS["HmIP-eTRV-B1"] = new Object(); +DEV_PATHS["HmIP-eTRV-B1"]["50"] = "/config/img/devices/50/178_hmip-etrv-b1_thumb.png"; +DEV_PATHS["HmIP-eTRV-B1"]["250"] = "/config/img/devices/250/178_hmip-etrv-b1.png"; +DEV_HIGHLIGHT["HmIP-eTRV-B1"] = new Object(); +DEV_LIST.push('HmIP-SFD'); +DEV_DESCRIPTION["HmIP-SFD"] = "HmIP-SFD"; +DEV_PATHS["HmIP-SFD"] = new Object(); +DEV_PATHS["HmIP-SFD"]["50"] = "/config/img/devices/50/212_hmip-sfd_thumb.png"; +DEV_PATHS["HmIP-SFD"]["250"] = "/config/img/devices/250/212_hmip-sfd.png"; +DEV_HIGHLIGHT["HmIP-SFD"] = new Object(); +DEV_LIST.push('HM-LC-Sw1-Pl-CT-R1'); +DEV_DESCRIPTION["HM-LC-Sw1-Pl-CT-R1"] = "HM-LC-Sw1-Pl-CT-R1"; +DEV_PATHS["HM-LC-Sw1-Pl-CT-R1"] = new Object(); +DEV_PATHS["HM-LC-Sw1-Pl-CT-R1"]["50"] = "/config/img/devices/50/109_hm-lc-sw1-pl-ct_thump.png"; +DEV_PATHS["HM-LC-Sw1-Pl-CT-R1"]["250"] = "/config/img/devices/250/109_hm-lc-sw1-pl-ct.png"; +DEV_HIGHLIGHT["HM-LC-Sw1-Pl-CT-R1"] = new Object(); +DEV_LIST.push('HM-PB-2-WM'); +DEV_DESCRIPTION["HM-PB-2-WM"] = "HM-PB-2-WM"; +DEV_PATHS["HM-PB-2-WM"] = new Object(); +DEV_PATHS["HM-PB-2-WM"]["50"] = "/config/img/devices/50/PushButton-2ch-wm_thumb.png"; +DEV_PATHS["HM-PB-2-WM"]["250"] = "/config/img/devices/250/PushButton-2ch-wm.png"; +DEV_HIGHLIGHT["HM-PB-2-WM"] = new Object(); +DEV_HIGHLIGHT["HM-PB-2-WM"]["2"] = [2, 0.244, 0.312, 0.428, 0.168]; +DEV_HIGHLIGHT["HM-PB-2-WM"]["1"] = [2, 0.244, 0.56, 0.428, 0.168]; +DEV_HIGHLIGHT["HM-PB-2-WM"]["1+2"] = [2, 0.244, 0.308, 0.428, 0.416]; +DEV_LIST.push('HmIP-BBL-I'); +DEV_DESCRIPTION["HmIP-BBL-I"] = "HmIP-BBL"; +DEV_PATHS["HmIP-BBL-I"] = new Object(); +DEV_PATHS["HmIP-BBL-I"]["50"] = "/config/img/devices/50/PushButton-2ch-wm_thumb.png"; +DEV_PATHS["HmIP-BBL-I"]["250"] = "/config/img/devices/250/PushButton-2ch-wm.png"; +DEV_HIGHLIGHT["HmIP-BBL-I"] = new Object(); +DEV_HIGHLIGHT["HmIP-BBL-I"]["2"] = [2, 0.244, 0.312, 0.428, 0.168]; +DEV_HIGHLIGHT["HmIP-BBL-I"]["1"] = [2, 0.244, 0.56, 0.428, 0.168]; +DEV_HIGHLIGHT["HmIP-BBL-I"]["1+2"] = [2, 0.244, 0.308, 0.428, 0.416]; +DEV_LIST.push('HmIPW-WRC6-A'); +DEV_DESCRIPTION["HmIPW-WRC6-A"] = "HmIPW-WRC6"; +DEV_PATHS["HmIPW-WRC6-A"] = new Object(); +DEV_PATHS["HmIPW-WRC6-A"]["50"] = "/config/img/devices/50/131_hmip-wrc6_thumb.png"; +DEV_PATHS["HmIPW-WRC6-A"]["250"] = "/config/img/devices/250/131_hmip-wrc6.png"; +DEV_HIGHLIGHT["HmIPW-WRC6-A"] = new Object(); +DEV_HIGHLIGHT["HmIPW-WRC6-A"]["1"] = [1, 0.3, 0.358, 0.025]; +DEV_HIGHLIGHT["HmIPW-WRC6-A"]["2"] = [1, 0.705, 0.315, 0.025]; +DEV_HIGHLIGHT["HmIPW-WRC6-A"]["3"] = [1, 0.3, 0.53, 0.025]; +DEV_HIGHLIGHT["HmIPW-WRC6-A"]["4"] = [1, 0.705, 0.495, 0.025]; +DEV_HIGHLIGHT["HmIPW-WRC6-A"]["5"] = [1, 0.3, 0.706, 0.025]; +DEV_HIGHLIGHT["HmIPW-WRC6-A"]["6"] = [1, 0.705, 0.671, 0.025]; +DEV_HIGHLIGHT["HmIPW-WRC6-A"]["7"] = [1, 0.3, 0.358, 0.025]; +DEV_HIGHLIGHT["HmIPW-WRC6-A"]["8"] = [1, 0.705, 0.315, 0.025]; +DEV_HIGHLIGHT["HmIPW-WRC6-A"]["9"] = [1, 0.3, 0.53, 0.025]; +DEV_HIGHLIGHT["HmIPW-WRC6-A"]["10"] = [1, 0.705, 0.495, 0.025]; +DEV_HIGHLIGHT["HmIPW-WRC6-A"]["11"] = [1, 0.3, 0.706, 0.025]; +DEV_HIGHLIGHT["HmIPW-WRC6-A"]["12"] = [1, 0.705, 0.671, 0.025]; +DEV_HIGHLIGHT["HmIPW-WRC6-A"]["13"] = [5, '1', '2', '3', '4', '5', '6']; +DEV_HIGHLIGHT["HmIPW-WRC6-A"]["1+2"] = [5, '1', '2']; +DEV_HIGHLIGHT["HmIPW-WRC6-A"]["3+4"] = [5, '3', '4']; +DEV_HIGHLIGHT["HmIPW-WRC6-A"]["5+6"] = [5, '5', '6']; +DEV_HIGHLIGHT["HmIPW-WRC6-A"]["7+8"] = [5, '1', '2']; +DEV_HIGHLIGHT["HmIPW-WRC6-A"]["9+10"] = [5, '3', '4']; +DEV_HIGHLIGHT["HmIPW-WRC6-A"]["11+12"] = [5, '5', '6']; +DEV_LIST.push('VIR-LG-WHITE-DIM'); +DEV_DESCRIPTION["VIR-LG-WHITE-DIM"] = "VIR-LG-WHITE-DIM"; +DEV_PATHS["VIR-LG-WHITE-DIM"] = new Object(); +DEV_PATHS["VIR-LG-WHITE-DIM"]["50"] = "/config/img/devices/50/coupling/hm-coupling-white-dim.png"; +DEV_PATHS["VIR-LG-WHITE-DIM"]["250"] = "/config/img/devices/250/coupling/hm-coupling-white-dim.png"; +DEV_HIGHLIGHT["VIR-LG-WHITE-DIM"] = new Object(); +DEV_LIST.push('HmIPW-FAL230-C10'); +DEV_DESCRIPTION["HmIPW-FAL230-C10"] = "HmIPW-FAL230-C10"; +DEV_PATHS["HmIPW-FAL230-C10"] = new Object(); +DEV_PATHS["HmIPW-FAL230-C10"]["50"] = "/config/img/devices/50/138_hmip-fal-c10_thumb.png"; +DEV_PATHS["HmIPW-FAL230-C10"]["250"] = "/config/img/devices/250/138_hmip-fal-c10.png"; +DEV_HIGHLIGHT["HmIPW-FAL230-C10"] = new Object(); +DEV_LIST.push('HM-Sec-TiS'); +DEV_DESCRIPTION["HM-Sec-TiS"] = "HM-Sec-TiS"; +DEV_PATHS["HM-Sec-TiS"] = new Object(); +DEV_PATHS["HM-Sec-TiS"]["50"] = "/config/img/devices/50/47_hm-sec-tis_thumb.png"; +DEV_PATHS["HM-Sec-TiS"]["250"] = "/config/img/devices/250/47_hm-sec-tis.png"; +DEV_HIGHLIGHT["HM-Sec-TiS"] = new Object(); +DEV_LIST.push('HmIP-BSM-I'); +DEV_DESCRIPTION["HmIP-BSM-I"] = "BSM"; +DEV_PATHS["HmIP-BSM-I"] = new Object(); +DEV_PATHS["HmIP-BSM-I"]["50"] = "/config/img/devices/50/PushButton-2ch-wm_thumb.png"; +DEV_PATHS["HmIP-BSM-I"]["250"] = "/config/img/devices/250/PushButton-2ch-wm.png"; +DEV_HIGHLIGHT["HmIP-BSM-I"] = new Object(); +DEV_HIGHLIGHT["HmIP-BSM-I"]["2"] = [2, 0.244, 0.312, 0.428, 0.168]; +DEV_HIGHLIGHT["HmIP-BSM-I"]["1"] = [2, 0.244, 0.56, 0.428, 0.168]; +DEV_HIGHLIGHT["HmIP-BSM-I"]["1+2"] = [2, 0.244, 0.308, 0.428, 0.416]; +DEV_LIST.push('HM-LC-Sw1-Pl-DN-R1'); +DEV_DESCRIPTION["HM-LC-Sw1-Pl-DN-R1"] = "HM-LC-Sw1-Pl-DN-R1"; +DEV_PATHS["HM-LC-Sw1-Pl-DN-R1"] = new Object(); +DEV_PATHS["HM-LC-Sw1-Pl-DN-R1"]["50"] = "/config/img/devices/50/93_hm-es-pmsw1-pl_thumb.png"; +DEV_PATHS["HM-LC-Sw1-Pl-DN-R1"]["250"] = "/config/img/devices/250/93_hm-es-pmsw1-pl.png"; +DEV_HIGHLIGHT["HM-LC-Sw1-Pl-DN-R1"] = new Object(); +DEV_LIST.push('HmIP-WRC2-A'); +DEV_DESCRIPTION["HmIP-WRC2-A"] = "HmIP-WRC2"; +DEV_PATHS["HmIP-WRC2-A"] = new Object(); +DEV_PATHS["HmIP-WRC2-A"]["50"] = "/config/img/devices/50/112_hmip-wrc2_thumb.png"; +DEV_PATHS["HmIP-WRC2-A"]["250"] = "/config/img/devices/250/112_hmip-wrc2.png"; +DEV_HIGHLIGHT["HmIP-WRC2-A"] = new Object(); +DEV_HIGHLIGHT["HmIP-WRC2-A"]["2"] = [4, 0.540, 0.366, 0.04, 0.044]; +DEV_HIGHLIGHT["HmIP-WRC2-A"]["1"] = [4, 0.540, 0.622, 0.04, 0.044]; +DEV_LIST.push('HmIP-KRCA'); +DEV_DESCRIPTION["HmIP-KRCA"] = "KRCA"; +DEV_PATHS["HmIP-KRCA"] = new Object(); +DEV_PATHS["HmIP-KRCA"]["50"] = "/config/img/devices/50/84_hm-rc-4-x_thumb.png"; +DEV_PATHS["HmIP-KRCA"]["250"] = "/config/img/devices/250/85_hm-rc-sec4-3.png"; +DEV_HIGHLIGHT["HmIP-KRCA"] = new Object(); +DEV_HIGHLIGHT["HmIP-KRCA"]["arrow_part1"] = [6, 0.312, 0.288, 0.416, 0.288, 0.012]; +DEV_HIGHLIGHT["HmIP-KRCA"]["arrow_part2"] = [6, 0.312, 0.288, 0.352, 0.248, 0.012]; +DEV_HIGHLIGHT["HmIP-KRCA"]["arrow_part3"] = [6, 0.312, 0.288, 0.352, 0.328, 0.012]; +DEV_HIGHLIGHT["HmIP-KRCA"]["Arrow"] = [5, 'arrow_part1', 'arrow_part2', 'arrow_part3']; +DEV_HIGHLIGHT["HmIP-KRCA"]["1_Arrow"] = [7, 'Arrow', 0.25, 0.0]; +DEV_HIGHLIGHT["HmIP-KRCA"]["2_Arrow"] = [7, 'Arrow', 0.238, 0.156]; +DEV_HIGHLIGHT["HmIP-KRCA"]["3_Arrow"] = [7, 'Arrow', 0.228, 0.312]; +DEV_HIGHLIGHT["HmIP-KRCA"]["4_Arrow"] = [7, 'Arrow', 0.212, 0.468]; +DEV_HIGHLIGHT["HmIP-KRCA"]["1"] = [5, '2_Arrow']; +DEV_HIGHLIGHT["HmIP-KRCA"]["2"] = [5, '1_Arrow']; +DEV_HIGHLIGHT["HmIP-KRCA"]["3"] = [5, '4_Arrow']; +DEV_HIGHLIGHT["HmIP-KRCA"]["4"] = [5, '3_Arrow']; +DEV_HIGHLIGHT["HmIP-KRCA"]["1+2"] = [5, '1_Arrow', '2_Arrow']; +DEV_HIGHLIGHT["HmIP-KRCA"]["3+4"] = [5, '3_Arrow', '4_Arrow']; +DEV_LIST.push('HmIP-WRCC2'); +DEV_DESCRIPTION["HmIP-WRCC2"] = "HmIP-WRCC2"; +DEV_PATHS["HmIP-WRCC2"] = new Object(); +DEV_PATHS["HmIP-WRCC2"]["50"] = "/config/img/devices/50/112_hmip-wrc2_thumb.png"; +DEV_PATHS["HmIP-WRCC2"]["250"] = "/config/img/devices/250/112_hmip-wrc2.png"; +DEV_HIGHLIGHT["HmIP-WRCC2"] = new Object(); +DEV_HIGHLIGHT["HmIP-WRCC2"]["2"] = [4, 0.540, 0.366, 0.04, 0.044]; +DEV_HIGHLIGHT["HmIP-WRCC2"]["1"] = [4, 0.540, 0.622, 0.04, 0.044]; +DEV_LIST.push('HmIPW-SMO230-A'); +DEV_DESCRIPTION["HmIPW-SMO230-A"] = "SMO"; +DEV_PATHS["HmIPW-SMO230-A"] = new Object(); +DEV_PATHS["HmIPW-SMO230-A"]["50"] = "/config/img/devices/50/213_hmip-smo230_thumb.png"; +DEV_PATHS["HmIPW-SMO230-A"]["250"] = "/config/img/devices/250/213_hmip-smo230.png"; +DEV_HIGHLIGHT["HmIPW-SMO230-A"] = new Object(); +DEV_LIST.push('HmIP-SMO-A-2'); +DEV_DESCRIPTION["HmIP-SMO-A-2"] = "SMO"; +DEV_PATHS["HmIP-SMO-A-2"] = new Object(); +DEV_PATHS["HmIP-SMO-A-2"]["50"] = "/config/img/devices/50/132_hmip-smo_thumb.png"; +DEV_PATHS["HmIP-SMO-A-2"]["250"] = "/config/img/devices/250/132_hmip-smo.png"; +DEV_HIGHLIGHT["HmIP-SMO-A-2"] = new Object(); +DEV_LIST.push('HmIP-DSD-PCB'); +DEV_DESCRIPTION["HmIP-DSD-PCB"] = "HmIP-DSD-PCB"; +DEV_PATHS["HmIP-DSD-PCB"] = new Object(); +DEV_PATHS["HmIP-DSD-PCB"]["50"] = "/config/img/devices/50/208_hmip-dsd-pcb_thumb.png"; +DEV_PATHS["HmIP-DSD-PCB"]["250"] = "/config/img/devices/250/208_hmip-dsd-pcb.png"; +DEV_HIGHLIGHT["HmIP-DSD-PCB"] = new Object(); +DEV_LIST.push('HM-LC-Dim1T-FM'); +DEV_DESCRIPTION["HM-LC-Dim1T-FM"] = "HM-LC-Dim1T-FM"; +DEV_PATHS["HM-LC-Dim1T-FM"] = new Object(); +DEV_PATHS["HM-LC-Dim1T-FM"]["50"] = "/config/img/devices/50/65_hm-lc-dim1t-fm_thumb.png"; +DEV_PATHS["HM-LC-Dim1T-FM"]["250"] = "/config/img/devices/250/65_hm-lc-dim1t-fm.png"; +DEV_HIGHLIGHT["HM-LC-Dim1T-FM"] = new Object(); +DEV_LIST.push('HmIP-RGBW'); +DEV_DESCRIPTION["HmIP-RGBW"] = "HmIP-RGBW"; +DEV_PATHS["HmIP-RGBW"] = new Object(); +DEV_PATHS["HmIP-RGBW"]["50"] = "/config/img/devices/50/225_hmip-rgbw_thumb.png"; +DEV_PATHS["HmIP-RGBW"]["250"] = "/config/img/devices/250/225_hmip-rgbw.png"; +DEV_HIGHLIGHT["HmIP-RGBW"] = new Object(); +DEV_LIST.push('HMIP-WRC2'); +DEV_DESCRIPTION["HMIP-WRC2"] = "WRC2"; +DEV_PATHS["HMIP-WRC2"] = new Object(); +DEV_PATHS["HMIP-WRC2"]["50"] = "/config/img/devices/50/112_hmip-wrc2_thumb.png"; +DEV_PATHS["HMIP-WRC2"]["250"] = "/config/img/devices/250/112_hmip-wrc2.png"; +DEV_HIGHLIGHT["HMIP-WRC2"] = new Object(); +DEV_HIGHLIGHT["HMIP-WRC2"]["2"] = [4, 0.540, 0.366, 0.04, 0.044]; +DEV_HIGHLIGHT["HMIP-WRC2"]["1"] = [4, 0.540, 0.622, 0.04, 0.044]; +DEV_LIST.push('HM-OU-CM-PCB'); +DEV_DESCRIPTION["HM-OU-CM-PCB"] = "HM-OU-CM-PCB"; +DEV_PATHS["HM-OU-CM-PCB"] = new Object(); +DEV_PATHS["HM-OU-CM-PCB"]["50"] = "/config/img/devices/50/92_hm-ou-cm-pcb_thumb.png"; +DEV_PATHS["HM-OU-CM-PCB"]["250"] = "/config/img/devices/250/92_hm-ou-cm-pcb.png"; +DEV_HIGHLIGHT["HM-OU-CM-PCB"] = new Object(); +DEV_LIST.push('HmIP-HAP-B1'); +DEV_DESCRIPTION["HmIP-HAP-B1"] = "HmIP-HAP"; +DEV_PATHS["HmIP-HAP-B1"] = new Object(); +DEV_PATHS["HmIP-HAP-B1"]["50"] = "/config/img/devices/50/CCU3_thumb.png"; +DEV_PATHS["HmIP-HAP-B1"]["250"] = "/config/img/devices/250/CCU3.png"; +DEV_HIGHLIGHT["HmIP-HAP-B1"] = new Object(); +DEV_LIST.push('HmIPW-STHD'); +DEV_DESCRIPTION["HmIPW-STHD"] = "HmIPW-STHD"; +DEV_PATHS["HmIPW-STHD"] = new Object(); +DEV_PATHS["HmIPW-STHD"]["50"] = "/config/img/devices/50/147_hmip-sthd_thumb.png"; +DEV_PATHS["HmIPW-STHD"]["250"] = "/config/img/devices/250/147_hmip-sthd.png"; +DEV_HIGHLIGHT["HmIPW-STHD"] = new Object(); +DEV_LIST.push('HM-LC-Sw1-FM-2'); +DEV_DESCRIPTION["HM-LC-Sw1-FM-2"] = "HM-LC-Sw1-FM"; +DEV_PATHS["HM-LC-Sw1-FM-2"] = new Object(); +DEV_PATHS["HM-LC-Sw1-FM-2"]["50"] = "/config/img/devices/50/4_hm-lc-sw1-fm_thumb.png"; +DEV_PATHS["HM-LC-Sw1-FM-2"]["250"] = "/config/img/devices/250/4_hm-lc-sw1-fm.png"; +DEV_HIGHLIGHT["HM-LC-Sw1-FM-2"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Sw1-FM-2"]["1_AUS"] = [2, 0.288, 0.66, 0.068, 0.152]; +DEV_HIGHLIGHT["HM-LC-Sw1-FM-2"]["1_EIN"] = [2, 0.548, 0.66, 0.068, 0.152]; +DEV_HIGHLIGHT["HM-LC-Sw1-FM-2"]["1"] = [5, '1_AUS', '1_EIN']; +DEV_LIST.push('HMW-LC-Dim1L-DR'); +DEV_DESCRIPTION["HMW-LC-Dim1L-DR"] = "HMW-LC-Dim1L-DR"; +DEV_PATHS["HMW-LC-Dim1L-DR"] = new Object(); +DEV_PATHS["HMW-LC-Dim1L-DR"]["50"] = "/config/img/devices/50/28_hmw-lc-dim1l-dr_thumb.png"; +DEV_PATHS["HMW-LC-Dim1L-DR"]["250"] = "/config/img/devices/250/28_hmw-lc-dim1l-dr.png"; +DEV_HIGHLIGHT["HMW-LC-Dim1L-DR"] = new Object(); +DEV_HIGHLIGHT["HMW-LC-Dim1L-DR"]["1"] = [2, 0.312, 0.756, 0.056, 0.06]; +DEV_HIGHLIGHT["HMW-LC-Dim1L-DR"]["2"] = [2, 0.368, 0.752, 0.048, 0.068]; +DEV_HIGHLIGHT["HMW-LC-Dim1L-DR"]["3"] = [2, 0.368, 0.388, 0.048, 0.064]; +DEV_LIST.push('HM-Sen-MDIR-O-2'); +DEV_DESCRIPTION["HM-Sen-MDIR-O-2"] = "HM-Sen-MDIR-O"; +DEV_PATHS["HM-Sen-MDIR-O-2"] = new Object(); +DEV_PATHS["HM-Sen-MDIR-O-2"]["50"] = "/config/img/devices/50/80_hm-sen-mdir-o_thumb.png"; +DEV_PATHS["HM-Sen-MDIR-O-2"]["250"] = "/config/img/devices/250/80_hm-sen-mdir-o.png"; +DEV_HIGHLIGHT["HM-Sen-MDIR-O-2"] = new Object(); +DEV_LIST.push('HmIPW-FAL230-C6'); +DEV_DESCRIPTION["HmIPW-FAL230-C6"] = "HmIPW-FAL230-C6"; +DEV_PATHS["HmIPW-FAL230-C6"] = new Object(); +DEV_PATHS["HmIPW-FAL230-C6"]["50"] = "/config/img/devices/50/137_hmip-fal-c6_thumb.png"; +DEV_PATHS["HmIPW-FAL230-C6"]["250"] = "/config/img/devices/250/137_hmip-fal-c6.png"; +DEV_HIGHLIGHT["HmIPW-FAL230-C6"] = new Object(); +DEV_LIST.push('HmIP-PS'); +DEV_DESCRIPTION["HmIP-PS"] = "PS"; +DEV_PATHS["HmIP-PS"] = new Object(); +DEV_PATHS["HmIP-PS"]["50"] = "/config/img/devices/50/113_hmip-psm_thumb.png"; +DEV_PATHS["HmIP-PS"]["250"] = "/config/img/devices/250/113_hmip-psm.png"; +DEV_HIGHLIGHT["HmIP-PS"] = new Object(); +DEV_LIST.push('HmIP-eTRV-E-A'); +DEV_DESCRIPTION["HmIP-eTRV-E-A"] = "TRV-E"; +DEV_PATHS["HmIP-eTRV-E-A"] = new Object(); +DEV_PATHS["HmIP-eTRV-E-A"]["50"] = "/config/img/devices/50/216_hmip-etrv-e_thumb.png"; +DEV_PATHS["HmIP-eTRV-E-A"]["250"] = "/config/img/devices/250/216_hmip-etrv-e.png"; +DEV_HIGHLIGHT["HmIP-eTRV-E-A"] = new Object(); +DEV_LIST.push('HmIPW-SMI55-A'); +DEV_DESCRIPTION["HmIPW-SMI55-A"] = "HmIPW-SMI55"; +DEV_PATHS["HmIPW-SMI55-A"] = new Object(); +DEV_PATHS["HmIPW-SMI55-A"]["50"] = "/config/img/devices/50/195_hmipw-smi55_thumb.png"; +DEV_PATHS["HmIPW-SMI55-A"]["250"] = "/config/img/devices/250/195_hmipw-smi55.png"; +DEV_HIGHLIGHT["HmIPW-SMI55-A"] = new Object(); +DEV_HIGHLIGHT["HmIPW-SMI55-A"]["1"] = [1, 0.530, 0.820, 0.025]; +DEV_HIGHLIGHT["HmIPW-SMI55-A"]["2"] = [1, 0.505, 0.210, 0.025]; +DEV_LIST.push('HmIP-PCBS2'); +DEV_DESCRIPTION["HmIP-PCBS2"] = "HmIP-PCBS2"; +DEV_PATHS["HmIP-PCBS2"] = new Object(); +DEV_PATHS["HmIP-PCBS2"]["50"] = "/config/img/devices/50/184_hmip-pcbs2_thumb.png"; +DEV_PATHS["HmIP-PCBS2"]["250"] = "/config/img/devices/250/184_hmip-pcbs2.png"; +DEV_HIGHLIGHT["HmIP-PCBS2"] = new Object(); +DEV_LIST.push('HM-LC-Dim1PWM-CV-2'); +DEV_DESCRIPTION["HM-LC-Dim1PWM-CV-2"] = "HM-LC-Dim1PWM-CV"; +DEV_PATHS["HM-LC-Dim1PWM-CV-2"] = new Object(); +DEV_PATHS["HM-LC-Dim1PWM-CV-2"]["50"] = "/config/img/devices/50/2_hm-lc-dim1l-cv_thumb.png"; +DEV_PATHS["HM-LC-Dim1PWM-CV-2"]["250"] = "/config/img/devices/250/79_hm-lc-dim1pwm-cv.png"; +DEV_HIGHLIGHT["HM-LC-Dim1PWM-CV-2"] = new Object(); +DEV_LIST.push('HM-RC-2-PBU-FM'); +DEV_DESCRIPTION["HM-RC-2-PBU-FM"] = "HM-RC-2-PBU-FM"; +DEV_PATHS["HM-RC-2-PBU-FM"] = new Object(); +DEV_PATHS["HM-RC-2-PBU-FM"]["50"] = "/config/img/devices/50/PushButton-2ch-wm_thumb.png"; +DEV_PATHS["HM-RC-2-PBU-FM"]["250"] = "/config/img/devices/250/PushButton-2ch-wm.png"; +DEV_HIGHLIGHT["HM-RC-2-PBU-FM"] = new Object(); +DEV_HIGHLIGHT["HM-RC-2-PBU-FM"]["2"] = [2, 0.244, 0.312, 0.428, 0.168]; +DEV_HIGHLIGHT["HM-RC-2-PBU-FM"]["1"] = [2, 0.244, 0.56, 0.428, 0.168]; +DEV_HIGHLIGHT["HM-RC-2-PBU-FM"]["1+2"] = [2, 0.244, 0.308, 0.428, 0.416]; +DEV_LIST.push('HmIP-PS-2'); +DEV_DESCRIPTION["HmIP-PS-2"] = "PS"; +DEV_PATHS["HmIP-PS-2"] = new Object(); +DEV_PATHS["HmIP-PS-2"]["50"] = "/config/img/devices/50/113_hmip-psm_thumb.png"; +DEV_PATHS["HmIP-PS-2"]["250"] = "/config/img/devices/250/113_hmip-psm.png"; +DEV_HIGHLIGHT["HmIP-PS-2"] = new Object(); +DEV_LIST.push('HmIP-SWDM'); +DEV_DESCRIPTION["HmIP-SWDM"] = "HmIP-SWDM"; +DEV_PATHS["HmIP-SWDM"] = new Object(); +DEV_PATHS["HmIP-SWDM"]["50"] = "/config/img/devices/50/181_hmip-swdm_thumb.png"; +DEV_PATHS["HmIP-SWDM"]["250"] = "/config/img/devices/250/181_hmip-swdm.png"; +DEV_HIGHLIGHT["HmIP-SWDM"] = new Object(); +DEV_LIST.push('HmIP-WTH-B-A'); +DEV_DESCRIPTION["HmIP-WTH-B-A"] = "HmIP-WTH-B"; +DEV_PATHS["HmIP-WTH-B-A"] = new Object(); +DEV_PATHS["HmIP-WTH-B-A"]["50"] = "/config/img/devices/50/200_hmip-wth-b_thumb.png"; +DEV_PATHS["HmIP-WTH-B-A"]["250"] = "/config/img/devices/250/200_hmip-wth-b.png"; +DEV_HIGHLIGHT["HmIP-WTH-B-A"] = new Object(); +DEV_LIST.push('HmIP-SPI'); +DEV_DESCRIPTION["HmIP-SPI"] = "HmIP-SPI"; +DEV_PATHS["HmIP-SPI"] = new Object(); +DEV_PATHS["HmIP-SPI"]["50"] = "/config/img/devices/50/153_hmip-spi_thumb.png"; +DEV_PATHS["HmIP-SPI"]["250"] = "/config/img/devices/250/153_hmip-spi.png"; +DEV_HIGHLIGHT["HmIP-SPI"] = new Object(); +DEV_LIST.push('VIR-LG-RGB'); +DEV_DESCRIPTION["VIR-LG-RGB"] = "VIR-LG-RGB"; +DEV_PATHS["VIR-LG-RGB"] = new Object(); +DEV_PATHS["VIR-LG-RGB"]["50"] = "/config/img/devices/50/coupling/hm-coupling-rgb.png"; +DEV_PATHS["VIR-LG-RGB"]["250"] = "/config/img/devices/250/coupling/hm-coupling-rgb.png"; +DEV_HIGHLIGHT["VIR-LG-RGB"] = new Object(); +DEV_LIST.push('HM-DW-WM'); +DEV_DESCRIPTION["HM-DW-WM"] = "HM-DW-WM"; +DEV_PATHS["HM-DW-WM"] = new Object(); +DEV_PATHS["HM-DW-WM"]["50"] = "/config/img/devices/50/150_hm-lc-dw-wm_thumb.png"; +DEV_PATHS["HM-DW-WM"]["250"] = "/config/img/devices/250/150_hm-lc-dw-wm.png"; +DEV_HIGHLIGHT["HM-DW-WM"] = new Object(); +DEV_LIST.push('HM-Sen-MDIR-O-3'); +DEV_DESCRIPTION["HM-Sen-MDIR-O-3"] = "HM-Sen-MDIR-O"; +DEV_PATHS["HM-Sen-MDIR-O-3"] = new Object(); +DEV_PATHS["HM-Sen-MDIR-O-3"]["50"] = "/config/img/devices/50/80_hm-sen-mdir-o_thumb.png"; +DEV_PATHS["HM-Sen-MDIR-O-3"]["250"] = "/config/img/devices/250/80_hm-sen-mdir-o.png"; +DEV_HIGHLIGHT["HM-Sen-MDIR-O-3"] = new Object(); +DEV_LIST.push('263 144'); +DEV_DESCRIPTION["263 144"] = "263_144"; +DEV_PATHS["263 144"] = new Object(); +DEV_PATHS["263 144"]["50"] = "/config/img/devices/50/39_hm-swi-3-fm_thumb.png"; +DEV_PATHS["263 144"]["250"] = "/config/img/devices/250/39_hm-swi-3-fm.png"; +DEV_HIGHLIGHT["263 144"] = new Object(); +DEV_HIGHLIGHT["263 144"]["1_Key"] = [3, 0.18, 0.216, '1', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["263 144"]["1_Kreis"] = [4, 0.220, 0.480, 0.028, 0.028]; +DEV_HIGHLIGHT["263 144"]["1"] = [5, '1_Key', '1_Kreis']; +DEV_HIGHLIGHT["263 144"]["2_Key"] = [3, 0.18, 0.216, '2', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["263 144"]["2_Kreis"] = [4, 0.265, 0.405, 0.028, 0.028]; +DEV_HIGHLIGHT["263 144"]["2"] = [5, '2_Key', '2_Kreis']; +DEV_HIGHLIGHT["263 144"]["3_Key"] = [3, 0.18, 0.216, '3', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["263 144"]["3_Kreis"] = [4, 0.310, 0.33, 0.028, 0.028]; +DEV_HIGHLIGHT["263 144"]["3"] = [5, '3_Key', '3_Kreis']; +DEV_LIST.push('HmIPW-DRS4'); +DEV_DESCRIPTION["HmIPW-DRS4"] = "HmIPW-DRS4"; +DEV_PATHS["HmIPW-DRS4"] = new Object(); +DEV_PATHS["HmIPW-DRS4"]["50"] = "/config/img/devices/50/160_hmipw-drs4_thumb.png"; +DEV_PATHS["HmIPW-DRS4"]["250"] = "/config/img/devices/250/160_hmipw-drs4.png"; +DEV_HIGHLIGHT["HmIPW-DRS4"] = new Object(); +DEV_HIGHLIGHT["HmIPW-DRS4"]["1"] = [1, 0.217, 0.090, 0.040]; +DEV_HIGHLIGHT["HmIPW-DRS4"]["2"] = [1, 0.217, 0.090, 0.040]; +DEV_HIGHLIGHT["HmIPW-DRS4"]["3"] = [1, 0.217, 0.090, 0.040]; +DEV_HIGHLIGHT["HmIPW-DRS4"]["4"] = [1, 0.217, 0.090, 0.040]; +DEV_HIGHLIGHT["HmIPW-DRS4"]["5"] = [1, 0.650, 0.075, 0.040]; +DEV_HIGHLIGHT["HmIPW-DRS4"]["6"] = [1, 0.650, 0.075, 0.040]; +DEV_HIGHLIGHT["HmIPW-DRS4"]["7"] = [1, 0.650, 0.075, 0.040]; +DEV_HIGHLIGHT["HmIPW-DRS4"]["8"] = [1, 0.650, 0.075, 0.040]; +DEV_HIGHLIGHT["HmIPW-DRS4"]["9"] = [1, 0.210, 0.910, 0.040]; +DEV_HIGHLIGHT["HmIPW-DRS4"]["10"] = [1, 0.210, 0.910, 0.040]; +DEV_HIGHLIGHT["HmIPW-DRS4"]["11"] = [1, 0.210, 0.910, 0.040]; +DEV_HIGHLIGHT["HmIPW-DRS4"]["12"] = [1, 0.210, 0.910, 0.040]; +DEV_HIGHLIGHT["HmIPW-DRS4"]["13"] = [1, 0.645, 0.900, 0.040]; +DEV_HIGHLIGHT["HmIPW-DRS4"]["14"] = [1, 0.645, 0.900, 0.040]; +DEV_HIGHLIGHT["HmIPW-DRS4"]["15"] = [1, 0.645, 0.900, 0.040]; +DEV_HIGHLIGHT["HmIPW-DRS4"]["16"] = [1, 0.645, 0.900, 0.040]; +DEV_LIST.push('HM-LC-Sw1-SM-2'); +DEV_DESCRIPTION["HM-LC-Sw1-SM-2"] = "HM-LC-Sw1-SM"; +DEV_PATHS["HM-LC-Sw1-SM-2"] = new Object(); +DEV_PATHS["HM-LC-Sw1-SM-2"]["50"] = "/config/img/devices/50/8_hm-lc-sw1-sm_thumb.png"; +DEV_PATHS["HM-LC-Sw1-SM-2"]["250"] = "/config/img/devices/250/8_hm-lc-sw1-sm.png"; +DEV_HIGHLIGHT["HM-LC-Sw1-SM-2"] = new Object(); +DEV_LIST.push('HmIP-SLO'); +DEV_DESCRIPTION["HmIP-SLO"] = "HmIP-SLO"; +DEV_PATHS["HmIP-SLO"] = new Object(); +DEV_PATHS["HmIP-SLO"]["50"] = "/config/img/devices/50/174_hmip-slo_thumb.png"; +DEV_PATHS["HmIP-SLO"]["250"] = "/config/img/devices/250/174_hmip-slo.png"; +DEV_HIGHLIGHT["HmIP-SLO"] = new Object(); +DEV_LIST.push('HM-LC-Dim1L-Pl-644'); +DEV_DESCRIPTION["HM-LC-Dim1L-Pl-644"] = "HM-LC-Dim1L-Pl"; +DEV_PATHS["HM-LC-Dim1L-Pl-644"] = new Object(); +DEV_PATHS["HM-LC-Dim1L-Pl-644"]["50"] = "/config/img/devices/50/OM55_DimmerSwitch_thumb.png"; +DEV_PATHS["HM-LC-Dim1L-Pl-644"]["250"] = "/config/img/devices/250/OM55_DimmerSwitch.png"; +DEV_HIGHLIGHT["HM-LC-Dim1L-Pl-644"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Dim1L-Pl-644"]["1_part1"] = [2, 0.548, 0.468, 0.072, 0.052]; +DEV_HIGHLIGHT["HM-LC-Dim1L-Pl-644"]["1_part2"] = [2, 0.612, 0.452, 0.028, 0.056]; +DEV_HIGHLIGHT["HM-LC-Dim1L-Pl-644"]["1"] = [5, '1_part1', '1_part2']; +DEV_LIST.push('HmIP-LSC'); +DEV_DESCRIPTION["HmIP-LSC"] = "HmIP-LSC"; +DEV_PATHS["HmIP-LSC"] = new Object(); +DEV_PATHS["HmIP-LSC"]["50"] = "/config/img/devices/50/227_hmip-lsc_thump.png"; +DEV_PATHS["HmIP-LSC"]["250"] = "/config/img/devices/250/227_hmip-lsc.png"; +DEV_HIGHLIGHT["HmIP-LSC"] = new Object(); +DEV_LIST.push('HmIP-MOD-TM'); +DEV_DESCRIPTION["HmIP-MOD-TM"] = "HmIP-MOD-TM"; +DEV_PATHS["HmIP-MOD-TM"] = new Object(); +DEV_PATHS["HmIP-MOD-TM"]["50"] = "/config/img/devices/50/183_hmip-mod-tm_thumb.png"; +DEV_PATHS["HmIP-MOD-TM"]["250"] = "/config/img/devices/250/183_hmip-mod-tm.png"; +DEV_HIGHLIGHT["HmIP-MOD-TM"] = new Object(); +DEV_LIST.push('HM-WDS30-OT2-SM'); +DEV_DESCRIPTION["HM-WDS30-OT2-SM"] = "HM-WDS30-OT2-SM"; +DEV_PATHS["HM-WDS30-OT2-SM"] = new Object(); +DEV_PATHS["HM-WDS30-OT2-SM"]["50"] = "/config/img/devices/50/IP65_G201_thumb.png"; +DEV_PATHS["HM-WDS30-OT2-SM"]["250"] = "/config/img/devices/250/IP65_G201.png"; +DEV_HIGHLIGHT["HM-WDS30-OT2-SM"] = new Object(); +DEV_LIST.push('HmIP-eTRV-2-UK'); +DEV_DESCRIPTION["HmIP-eTRV-2-UK"] = "TRV-UK"; +DEV_PATHS["HmIP-eTRV-2-UK"] = new Object(); +DEV_PATHS["HmIP-eTRV-2-UK"]["50"] = "/config/img/devices/50/158_hmip-etrv-uk_thumb.png"; +DEV_PATHS["HmIP-eTRV-2-UK"]["250"] = "/config/img/devices/250/158_hmip-etrv-uk.png"; +DEV_HIGHLIGHT["HmIP-eTRV-2-UK"] = new Object(); +DEV_LIST.push('HM-LC-Dim2L-SM-644'); +DEV_DESCRIPTION["HM-LC-Dim2L-SM-644"] = "HM-LC-Dim2L-SM"; +DEV_PATHS["HM-LC-Dim2L-SM-644"] = new Object(); +DEV_PATHS["HM-LC-Dim2L-SM-644"]["50"] = "/config/img/devices/50/45_hm-lc-dim2l-sm_thumb.png"; +DEV_PATHS["HM-LC-Dim2L-SM-644"]["250"] = "/config/img/devices/250/45_hm-lc-dim2l-sm.png"; +DEV_HIGHLIGHT["HM-LC-Dim2L-SM-644"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Dim2L-SM-644"]["1_Part1"] = [6, 0.530, 0.896, 0.530, 0.98, 0.012]; +DEV_HIGHLIGHT["HM-LC-Dim2L-SM-644"]["1_Part2"] = [6, 0.530, 0.98, 0.49, 0.916, 0.012]; +DEV_HIGHLIGHT["HM-LC-Dim2L-SM-644"]["1_Part3"] = [6, 0.530, 0.98, 0.574, 0.916, 0.012]; +DEV_HIGHLIGHT["HM-LC-Dim2L-SM-644"]["1_Arrow"] = [5, '1_Part1', '1_Part2', '1_Part3']; +DEV_HIGHLIGHT["HM-LC-Dim2L-SM-644"]["2_Arrow"] = [7, '1_Arrow', 0.168, 0]; +DEV_HIGHLIGHT["HM-LC-Dim2L-SM-644"]["1_Key"] = [4, 0.25, 0.33, 0.04, 0.044]; +DEV_HIGHLIGHT["HM-LC-Dim2L-SM-644"]["2_Key"] = [4, 0.328, 0.33, 0.04, 0.044]; +DEV_HIGHLIGHT["HM-LC-Dim2L-SM-644"]["1"] = [5, '1_Arrow', '1_Key']; +DEV_HIGHLIGHT["HM-LC-Dim2L-SM-644"]["2"] = [5, '2_Arrow', '2_Key']; +DEV_LIST.push('VIR-LG-RGB-DIM'); +DEV_DESCRIPTION["VIR-LG-RGB-DIM"] = "VIR-LG-RGB-DIM"; +DEV_PATHS["VIR-LG-RGB-DIM"] = new Object(); +DEV_PATHS["VIR-LG-RGB-DIM"]["50"] = "/config/img/devices/50/coupling/hm-coupling-rgb-dim.png"; +DEV_PATHS["VIR-LG-RGB-DIM"]["250"] = "/config/img/devices/250/coupling/hm-coupling-rgb-dim.png"; +DEV_HIGHLIGHT["VIR-LG-RGB-DIM"] = new Object(); +DEV_LIST.push('HmIPW-WRC2'); +DEV_DESCRIPTION["HmIPW-WRC2"] = "HmIPW-WRC2"; +DEV_PATHS["HmIPW-WRC2"] = new Object(); +DEV_PATHS["HmIPW-WRC2"]["50"] = "/config/img/devices/50/112_hmip-wrc2_thumb.png"; +DEV_PATHS["HmIPW-WRC2"]["250"] = "/config/img/devices/250/112_hmip-wrc2.png"; +DEV_HIGHLIGHT["HmIPW-WRC2"] = new Object(); +DEV_HIGHLIGHT["HmIPW-WRC2"]["2"] = [4, 0.540, 0.366, 0.04, 0.044]; +DEV_HIGHLIGHT["HmIPW-WRC2"]["1"] = [4, 0.540, 0.622, 0.04, 0.044]; +DEV_LIST.push('HM-Sen-MDIR-SM'); +DEV_DESCRIPTION["HM-Sen-MDIR-SM"] = "HM-Sen-MDIR-SM"; +DEV_PATHS["HM-Sen-MDIR-SM"] = new Object(); +DEV_PATHS["HM-Sen-MDIR-SM"]["50"] = "/config/img/devices/50/53_hm-sen-mdir-sm_thumb.png"; +DEV_PATHS["HM-Sen-MDIR-SM"]["250"] = "/config/img/devices/250/53_hm-sen-mdir-sm.png"; +DEV_HIGHLIGHT["HM-Sen-MDIR-SM"] = new Object(); +DEV_LIST.push('HmIP-DBB'); +DEV_DESCRIPTION["HmIP-DBB"] = "HmIP-DBB"; +DEV_PATHS["HmIP-DBB"] = new Object(); +DEV_PATHS["HmIP-DBB"]["50"] = "/config/img/devices/50/177_hmip-dbb_thumb.png"; +DEV_PATHS["HmIP-DBB"]["250"] = "/config/img/devices/250/177_hmip-dbb.png"; +DEV_HIGHLIGHT["HmIP-DBB"] = new Object(); +DEV_LIST.push('263 155'); +DEV_DESCRIPTION["263 155"] = "263_155"; +DEV_PATHS["263 155"] = new Object(); +DEV_PATHS["263 155"]["50"] = "/config/img/devices/50/70_hm-pb-4dis-wm_thumb.png"; +DEV_PATHS["263 155"]["250"] = "/config/img/devices/250/70_hm-pb-4dis-wm.png"; +DEV_HIGHLIGHT["263 155"] = new Object(); +DEV_HIGHLIGHT["263 155"]["2"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["263 155"]["1"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["263 155"]["4"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["263 155"]["3"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["263 155"]["6"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["263 155"]["5"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["263 155"]["8"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["263 155"]["7"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["263 155"]["10"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["263 155"]["9"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["263 155"]["12"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["263 155"]["11"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["263 155"]["14"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["263 155"]["13"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["263 155"]["16"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["263 155"]["15"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["263 155"]["18"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["263 155"]["17"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["263 155"]["20"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["263 155"]["19"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_LIST.push('HM-LC-Dim2T-SM'); +DEV_DESCRIPTION["HM-LC-Dim2T-SM"] = "HM-LC-Dim2T-SM"; +DEV_PATHS["HM-LC-Dim2T-SM"] = new Object(); +DEV_PATHS["HM-LC-Dim2T-SM"]["50"] = "/config/img/devices/50/64_hm-lc-dim2T-sm_thumb.png"; +DEV_PATHS["HM-LC-Dim2T-SM"]["250"] = "/config/img/devices/250/64_hm-lc-dim2T-sm.png"; +DEV_HIGHLIGHT["HM-LC-Dim2T-SM"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Dim2T-SM"]["1_Part1"] = [6, 0.539, 0.864, 0.539, 0.948, 0.012]; +DEV_HIGHLIGHT["HM-LC-Dim2T-SM"]["1_Part2"] = [6, 0.539, 0.948, 0.49, 0.884, 0.012]; +DEV_HIGHLIGHT["HM-LC-Dim2T-SM"]["1_Part3"] = [6, 0.539, 0.948, 0.588, 0.884, 0.012]; +DEV_HIGHLIGHT["HM-LC-Dim2T-SM"]["1_Arrow"] = [5, '1_Part1', '1_Part2', '1_Part3']; +DEV_HIGHLIGHT["HM-LC-Dim2T-SM"]["2_Arrow"] = [7, '1_Arrow', 0.179, 0]; +DEV_HIGHLIGHT["HM-LC-Dim2T-SM"]["1_Key"] = [4, 0.25, 0.26, 0.04, 0.044]; +DEV_HIGHLIGHT["HM-LC-Dim2T-SM"]["2_Key"] = [4, 0.328, 0.26, 0.04, 0.044]; +DEV_HIGHLIGHT["HM-LC-Dim2T-SM"]["1"] = [5, '1_Arrow', '1_Key']; +DEV_HIGHLIGHT["HM-LC-Dim2T-SM"]["2"] = [5, '2_Arrow', '2_Key']; +DEV_LIST.push('HM-Sec-Sir-WM'); +DEV_DESCRIPTION["HM-Sec-Sir-WM"] = "HM-Sec-Sir-WM"; +DEV_PATHS["HM-Sec-Sir-WM"] = new Object(); +DEV_PATHS["HM-Sec-Sir-WM"]["50"] = "/config/img/devices/50/117_hm-sec-sir-wm_thumb.png"; +DEV_PATHS["HM-Sec-Sir-WM"]["250"] = "/config/img/devices/250/117_hm-sec-sir-wm.png"; +DEV_HIGHLIGHT["HM-Sec-Sir-WM"] = new Object(); +DEV_LIST.push('HM-MOD-Re-8'); +DEV_DESCRIPTION["HM-MOD-Re-8"] = "HM-MOD-Re-8"; +DEV_PATHS["HM-MOD-Re-8"] = new Object(); +DEV_PATHS["HM-MOD-Re-8"]["50"] = "/config/img/devices/50/94_hm-mod-re-8_thumb.png"; +DEV_PATHS["HM-MOD-Re-8"]["250"] = "/config/img/devices/250/94_hm-mod-re-8.png"; +DEV_HIGHLIGHT["HM-MOD-Re-8"] = new Object(); +DEV_LIST.push('ZEL STG RM FWT'); +DEV_DESCRIPTION["ZEL STG RM FWT"] = "ZEL_STG_RM_FWT"; +DEV_PATHS["ZEL STG RM FWT"] = new Object(); +DEV_PATHS["ZEL STG RM FWT"]["50"] = "/config/img/devices/50/42_hm-cc-tc_thumb.png"; +DEV_PATHS["ZEL STG RM FWT"]["250"] = "/config/img/devices/250/42_hm-cc-tc.png"; +DEV_HIGHLIGHT["ZEL STG RM FWT"] = new Object(); +DEV_LIST.push('ELV-SH-TACO'); +DEV_DESCRIPTION["ELV-SH-TACO"] = "ELV-SH-TACO"; +DEV_PATHS["ELV-SH-TACO"] = new Object(); +DEV_PATHS["ELV-SH-TACO"]["50"] = "/config/img/devices/50/232_elv-sh-taco_thumb.png"; +DEV_PATHS["ELV-SH-TACO"]["250"] = "/config/img/devices/250/232_elv-sh-taco.png"; +DEV_HIGHLIGHT["ELV-SH-TACO"] = new Object(); +DEV_LIST.push('VIR-OL-GTW'); +DEV_DESCRIPTION["VIR-OL-GTW"] = "VIR-OL-GTW"; +DEV_PATHS["VIR-OL-GTW"] = new Object(); +DEV_PATHS["VIR-OL-GTW"]["50"] = "/config/img/devices/50/coupling/hm-lightify_gateway.png"; +DEV_PATHS["VIR-OL-GTW"]["250"] = "/config/img/devices/250/coupling/hm-lightify_gateway.png"; +DEV_HIGHLIGHT["VIR-OL-GTW"] = new Object(); +DEV_LIST.push('HMW-RCV-50'); +DEV_DESCRIPTION["HMW-RCV-50"] = "HMW-RCV-50"; +DEV_PATHS["HMW-RCV-50"] = new Object(); +DEV_PATHS["HMW-RCV-50"]["50"] = "/config/img/devices/50/CCU2_thumb.png"; +DEV_PATHS["HMW-RCV-50"]["250"] = "/config/img/devices/250/CCU2.png"; +DEV_HIGHLIGHT["HMW-RCV-50"] = new Object(); +DEV_HIGHLIGHT["HMW-RCV-50"]["RF_1"] = [4, 0.364, 0.048, 0.028, 0.028]; +DEV_HIGHLIGHT["HMW-RCV-50"]["RF_2"] = [6, 0.4, 0.052, 0.544, 0.004, 0.016]; +DEV_HIGHLIGHT["HMW-RCV-50"]["RF_3"] = [6, 0.4, 0.052, 0.6, 0.052, 0.016]; +DEV_HIGHLIGHT["HMW-RCV-50"]["RF_4"] = [6, 0.4, 0.052, 0.544, 0.104, 0.016]; +DEV_HIGHLIGHT["HMW-RCV-50"]["RF_5"] = [6, 0.168, 0.052, 0.344, 0.052, 0.016]; +DEV_HIGHLIGHT["HMW-RCV-50"]["RF_6"] = [6, 0.168, 0, 0.344, 0.052, 0.016]; +DEV_HIGHLIGHT["HMW-RCV-50"]["RF_7"] = [6, 0.168, 0.104, 0.344, 0.052, 0.016]; +DEV_HIGHLIGHT["HMW-RCV-50"]["RF"] = [5, 'RF_1', 'RF_2', 'RF_3', 'RF_4', 'RF_5', 'RF_6', 'RF_7']; +DEV_HIGHLIGHT["HMW-RCV-50"]["S1"] = [3, 0.25, 0.57, '1', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S2"] = [3, 0.25, 0.57, '2', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S3"] = [3, 0.25, 0.57, '3', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S4"] = [3, 0.25, 0.57, '4', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S5"] = [3, 0.25, 0.57, '5', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S6"] = [3, 0.25, 0.57, '6', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S7"] = [3, 0.25, 0.57, '7', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S8"] = [3, 0.25, 0.57, '8', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S9"] = [3, 0.25, 0.57, '9', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S10"] = [3, 0.175, 0.57, '10', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S11"] = [3, 0.175, 0.57, '11', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S12"] = [3, 0.175, 0.57, '12', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S13"] = [3, 0.175, 0.57, '13', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S14"] = [3, 0.175, 0.57, '14', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S15"] = [3, 0.175, 0.57, '15', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S16"] = [3, 0.175, 0.57, '16', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S17"] = [3, 0.175, 0.57, '17', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S18"] = [3, 0.175, 0.57, '18', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S19"] = [3, 0.175, 0.57, '19', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S20"] = [3, 0.175, 0.57, '20', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S21"] = [3, 0.175, 0.57, '21', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S22"] = [3, 0.175, 0.57, '22', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S23"] = [3, 0.175, 0.57, '23', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S24"] = [3, 0.175, 0.57, '24', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S25"] = [3, 0.175, 0.57, '25', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S26"] = [3, 0.175, 0.57, '26', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S27"] = [3, 0.175, 0.57, '27', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S28"] = [3, 0.175, 0.57, '28', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S29"] = [3, 0.175, 0.57, '29', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S30"] = [3, 0.175, 0.57, '30', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S31"] = [3, 0.175, 0.57, '31', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S32"] = [3, 0.175, 0.57, '32', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S33"] = [3, 0.175, 0.57, '33', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S34"] = [3, 0.175, 0.57, '34', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S35"] = [3, 0.175, 0.57, '35', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S36"] = [3, 0.175, 0.57, '36', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S37"] = [3, 0.175, 0.57, '37', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S38"] = [3, 0.175, 0.57, '38', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S39"] = [3, 0.175, 0.57, '39', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S40"] = [3, 0.175, 0.57, '40', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S41"] = [3, 0.175, 0.57, '41', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S42"] = [3, 0.175, 0.57, '42', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S43"] = [3, 0.175, 0.57, '43', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S44"] = [3, 0.175, 0.57, '44', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S45"] = [3, 0.175, 0.57, '45', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S46"] = [3, 0.175, 0.57, '46', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S47"] = [3, 0.175, 0.57, '47', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S48"] = [3, 0.175, 0.57, '48', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S49"] = [3, 0.175, 0.57, '49', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["S50"] = [3, 0.175, 0.57, '50', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-RCV-50"]["1"] = [5, 'S1']; +DEV_HIGHLIGHT["HMW-RCV-50"]["2"] = [5, 'S2']; +DEV_HIGHLIGHT["HMW-RCV-50"]["3"] = [5, 'S3']; +DEV_HIGHLIGHT["HMW-RCV-50"]["4"] = [5, 'S4']; +DEV_HIGHLIGHT["HMW-RCV-50"]["5"] = [5, 'S5']; +DEV_HIGHLIGHT["HMW-RCV-50"]["6"] = [5, 'S6']; +DEV_HIGHLIGHT["HMW-RCV-50"]["7"] = [5, 'S7']; +DEV_HIGHLIGHT["HMW-RCV-50"]["8"] = [5, 'S8']; +DEV_HIGHLIGHT["HMW-RCV-50"]["9"] = [5, 'S9']; +DEV_HIGHLIGHT["HMW-RCV-50"]["10"] = [5, 'S10']; +DEV_HIGHLIGHT["HMW-RCV-50"]["11"] = [5, 'S11']; +DEV_HIGHLIGHT["HMW-RCV-50"]["12"] = [5, 'S12']; +DEV_HIGHLIGHT["HMW-RCV-50"]["13"] = [5, 'S13']; +DEV_HIGHLIGHT["HMW-RCV-50"]["14"] = [5, 'S14']; +DEV_HIGHLIGHT["HMW-RCV-50"]["15"] = [5, 'S15']; +DEV_HIGHLIGHT["HMW-RCV-50"]["16"] = [5, 'S16']; +DEV_HIGHLIGHT["HMW-RCV-50"]["17"] = [5, 'S17']; +DEV_HIGHLIGHT["HMW-RCV-50"]["18"] = [5, 'S18']; +DEV_HIGHLIGHT["HMW-RCV-50"]["19"] = [5, 'S19']; +DEV_HIGHLIGHT["HMW-RCV-50"]["20"] = [5, 'S20']; +DEV_HIGHLIGHT["HMW-RCV-50"]["21"] = [5, 'S21']; +DEV_HIGHLIGHT["HMW-RCV-50"]["22"] = [5, 'S22']; +DEV_HIGHLIGHT["HMW-RCV-50"]["23"] = [5, 'S23']; +DEV_HIGHLIGHT["HMW-RCV-50"]["24"] = [5, 'S24']; +DEV_HIGHLIGHT["HMW-RCV-50"]["25"] = [5, 'S25']; +DEV_HIGHLIGHT["HMW-RCV-50"]["26"] = [5, 'S26']; +DEV_HIGHLIGHT["HMW-RCV-50"]["27"] = [5, 'S27']; +DEV_HIGHLIGHT["HMW-RCV-50"]["28"] = [5, 'S28']; +DEV_HIGHLIGHT["HMW-RCV-50"]["29"] = [5, 'S29']; +DEV_HIGHLIGHT["HMW-RCV-50"]["30"] = [5, 'S30']; +DEV_HIGHLIGHT["HMW-RCV-50"]["31"] = [5, 'S31']; +DEV_HIGHLIGHT["HMW-RCV-50"]["32"] = [5, 'S32']; +DEV_HIGHLIGHT["HMW-RCV-50"]["33"] = [5, 'S33']; +DEV_HIGHLIGHT["HMW-RCV-50"]["34"] = [5, 'S34']; +DEV_HIGHLIGHT["HMW-RCV-50"]["35"] = [5, 'S35']; +DEV_HIGHLIGHT["HMW-RCV-50"]["36"] = [5, 'S36']; +DEV_HIGHLIGHT["HMW-RCV-50"]["37"] = [5, 'S37']; +DEV_HIGHLIGHT["HMW-RCV-50"]["38"] = [5, 'S38']; +DEV_HIGHLIGHT["HMW-RCV-50"]["39"] = [5, 'S39']; +DEV_HIGHLIGHT["HMW-RCV-50"]["40"] = [5, 'S40']; +DEV_HIGHLIGHT["HMW-RCV-50"]["41"] = [5, 'S41']; +DEV_HIGHLIGHT["HMW-RCV-50"]["42"] = [5, 'S42']; +DEV_HIGHLIGHT["HMW-RCV-50"]["43"] = [5, 'S43']; +DEV_HIGHLIGHT["HMW-RCV-50"]["44"] = [5, 'S44']; +DEV_HIGHLIGHT["HMW-RCV-50"]["45"] = [5, 'S45']; +DEV_HIGHLIGHT["HMW-RCV-50"]["46"] = [5, 'S46']; +DEV_HIGHLIGHT["HMW-RCV-50"]["47"] = [5, 'S47']; +DEV_HIGHLIGHT["HMW-RCV-50"]["48"] = [5, 'S48']; +DEV_HIGHLIGHT["HMW-RCV-50"]["49"] = [5, 'S49']; +DEV_HIGHLIGHT["HMW-RCV-50"]["50"] = [5, 'S50']; +DEV_LIST.push('HM-RC-4-2'); +DEV_DESCRIPTION["HM-RC-4-2"] = "HM-RC-4-2"; +DEV_PATHS["HM-RC-4-2"] = new Object(); +DEV_PATHS["HM-RC-4-2"]["50"] = "/config/img/devices/50/84_hm-rc-4-2_thumb.png"; +DEV_PATHS["HM-RC-4-2"]["250"] = "/config/img/devices/250/84_hm-rc-4-2.png"; +DEV_HIGHLIGHT["HM-RC-4-2"] = new Object(); +DEV_HIGHLIGHT["HM-RC-4-2"]["arrow_part1"] = [6, 0.312, 0.288, 0.416, 0.288, 0.012]; +DEV_HIGHLIGHT["HM-RC-4-2"]["arrow_part2"] = [6, 0.312, 0.288, 0.352, 0.248, 0.012]; +DEV_HIGHLIGHT["HM-RC-4-2"]["arrow_part3"] = [6, 0.312, 0.288, 0.352, 0.328, 0.012]; +DEV_HIGHLIGHT["HM-RC-4-2"]["1_Arrow"] = [5, 'arrow_part1', 'arrow_part2', 'arrow_part3']; +DEV_HIGHLIGHT["HM-RC-4-2"]["2_Arrow"] = [7, '1_Arrow', 0.028, 0.156]; +DEV_HIGHLIGHT["HM-RC-4-2"]["3_Arrow"] = [7, '1_Arrow', 0.028, 0.312]; +DEV_HIGHLIGHT["HM-RC-4-2"]["4_Arrow"] = [7, '1_Arrow', 0.012, 0.468]; +DEV_HIGHLIGHT["HM-RC-4-2"]["1"] = [5, '2_Arrow']; +DEV_HIGHLIGHT["HM-RC-4-2"]["2"] = [5, '1_Arrow']; +DEV_HIGHLIGHT["HM-RC-4-2"]["3"] = [5, '4_Arrow']; +DEV_HIGHLIGHT["HM-RC-4-2"]["4"] = [5, '3_Arrow']; +DEV_HIGHLIGHT["HM-RC-4-2"]["1+2"] = [5, '1_Arrow', '2_Arrow']; +DEV_HIGHLIGHT["HM-RC-4-2"]["3+4"] = [5, '3_Arrow', '4_Arrow']; +DEV_LIST.push('HM-LC-Sw1-Pl-DN-R5'); +DEV_DESCRIPTION["HM-LC-Sw1-Pl-DN-R5"] = "HM-LC-Sw1-Pl-DN-R5"; +DEV_PATHS["HM-LC-Sw1-Pl-DN-R5"] = new Object(); +DEV_PATHS["HM-LC-Sw1-Pl-DN-R5"]["50"] = "/config/img/devices/50/107_hm-es-pmsw1-pl-R5_thumb.png"; +DEV_PATHS["HM-LC-Sw1-Pl-DN-R5"]["250"] = "/config/img/devices/250/107_hm-es-pmsw1-pl-R5.png"; +DEV_HIGHLIGHT["HM-LC-Sw1-Pl-DN-R5"] = new Object(); +DEV_LIST.push('HM-WDS40-TH-I'); +DEV_DESCRIPTION["HM-WDS40-TH-I"] = "HM-WDS40-TH-I"; +DEV_PATHS["HM-WDS40-TH-I"] = new Object(); +DEV_PATHS["HM-WDS40-TH-I"]["50"] = "/config/img/devices/50/13_hm-ws550sth-i_thumb.png"; +DEV_PATHS["HM-WDS40-TH-I"]["250"] = "/config/img/devices/250/13_hm-ws550sth-i.png"; +DEV_HIGHLIGHT["HM-WDS40-TH-I"] = new Object(); +DEV_LIST.push('HMIP-WTH-2'); +DEV_DESCRIPTION["HMIP-WTH-2"] = "HmIP-WTH"; +DEV_PATHS["HMIP-WTH-2"] = new Object(); +DEV_PATHS["HMIP-WTH-2"]["50"] = "/config/img/devices/50/121_hmip-wth_thumb.png"; +DEV_PATHS["HMIP-WTH-2"]["250"] = "/config/img/devices/250/121_hmip-wth.png"; +DEV_HIGHLIGHT["HMIP-WTH-2"] = new Object(); +DEV_LIST.push('HM-Sec-SCo'); +DEV_DESCRIPTION["HM-Sec-SCo"] = "HM-Sec-SCo"; +DEV_PATHS["HM-Sec-SCo"] = new Object(); +DEV_PATHS["HM-Sec-SCo"]["50"] = "/config/img/devices/50/98_hm-sec-sco_thumb.png"; +DEV_PATHS["HM-Sec-SCo"]["250"] = "/config/img/devices/250/98_hm-sec-sco.png"; +DEV_HIGHLIGHT["HM-Sec-SCo"] = new Object(); +DEV_LIST.push('HmIP-MIO16-PCB'); +DEV_DESCRIPTION["HmIP-MIO16-PCB"] = "HmIP-MIO16-PCB"; +DEV_PATHS["HmIP-MIO16-PCB"] = new Object(); +DEV_PATHS["HmIP-MIO16-PCB"]["50"] = "/config/img/devices/50/199_hmip-mio16-pcb_thumb.png"; +DEV_PATHS["HmIP-MIO16-PCB"]["250"] = "/config/img/devices/250/199_hmip-mio16-pcb.png"; +DEV_HIGHLIGHT["HmIP-MIO16-PCB"] = new Object(); +DEV_LIST.push('HmIP-WRC2'); +DEV_DESCRIPTION["HmIP-WRC2"] = "HmIP-WRC2"; +DEV_PATHS["HmIP-WRC2"] = new Object(); +DEV_PATHS["HmIP-WRC2"]["50"] = "/config/img/devices/50/112_hmip-wrc2_thumb.png"; +DEV_PATHS["HmIP-WRC2"]["250"] = "/config/img/devices/250/112_hmip-wrc2.png"; +DEV_HIGHLIGHT["HmIP-WRC2"] = new Object(); +DEV_HIGHLIGHT["HmIP-WRC2"]["2"] = [4, 0.540, 0.366, 0.04, 0.044]; +DEV_HIGHLIGHT["HmIP-WRC2"]["1"] = [4, 0.540, 0.622, 0.04, 0.044]; +DEV_LIST.push('HmIP-ASIR'); +DEV_DESCRIPTION["HmIP-ASIR"] = "HmIP-ASIR"; +DEV_PATHS["HmIP-ASIR"] = new Object(); +DEV_PATHS["HmIP-ASIR"]["50"] = "/config/img/devices/50/133_hmip-asir_thumb.png"; +DEV_PATHS["HmIP-ASIR"]["250"] = "/config/img/devices/250/133_hmip-asir.png"; +DEV_HIGHLIGHT["HmIP-ASIR"] = new Object(); +DEV_LIST.push('VIR-LG-RGBW'); +DEV_DESCRIPTION["VIR-LG-RGBW"] = "VIR-LG-RGBW"; +DEV_PATHS["VIR-LG-RGBW"] = new Object(); +DEV_PATHS["VIR-LG-RGBW"]["50"] = "/config/img/devices/50/coupling/hm-coupling-rgbw.png"; +DEV_PATHS["VIR-LG-RGBW"]["250"] = "/config/img/devices/250/coupling/hm-coupling-rgbw.png"; +DEV_HIGHLIGHT["VIR-LG-RGBW"] = new Object(); +DEV_LIST.push('HM-RC-4'); +DEV_DESCRIPTION["HM-RC-4"] = "HM-RC-4"; +DEV_PATHS["HM-RC-4"] = new Object(); +DEV_PATHS["HM-RC-4"]["50"] = "/config/img/devices/50/18_hm-rc-4_thumb.png"; +DEV_PATHS["HM-RC-4"]["250"] = "/config/img/devices/250/18_hm-rc-4.png"; +DEV_HIGHLIGHT["HM-RC-4"] = new Object(); +DEV_HIGHLIGHT["HM-RC-4"]["1"] = [4, 0.268, 0.236, 0.16, 0.164]; +DEV_HIGHLIGHT["HM-RC-4"]["2"] = [4, 0.476, 0.236, 0.16, 0.164]; +DEV_HIGHLIGHT["HM-RC-4"]["3"] = [4, 0.268, 0.48, 0.16, 0.164]; +DEV_HIGHLIGHT["HM-RC-4"]["4"] = [4, 0.476, 0.48, 0.16, 0.164]; +DEV_HIGHLIGHT["HM-RC-4"]["1+2"] = [5, '1', '2']; +DEV_HIGHLIGHT["HM-RC-4"]["3+4"] = [5, '3', '4']; +DEV_LIST.push('HmIP-BDT'); +DEV_DESCRIPTION["HmIP-BDT"] = "BDT"; +DEV_PATHS["HmIP-BDT"] = new Object(); +DEV_PATHS["HmIP-BDT"]["50"] = "/config/img/devices/50/PushButton-2ch-wm_thumb.png"; +DEV_PATHS["HmIP-BDT"]["250"] = "/config/img/devices/250/PushButton-2ch-wm.png"; +DEV_HIGHLIGHT["HmIP-BDT"] = new Object(); +DEV_HIGHLIGHT["HmIP-BDT"]["2"] = [2, 0.244, 0.312, 0.428, 0.168]; +DEV_HIGHLIGHT["HmIP-BDT"]["1"] = [2, 0.244, 0.56, 0.428, 0.168]; +DEV_HIGHLIGHT["HmIP-BDT"]["1+2"] = [2, 0.244, 0.308, 0.428, 0.416]; +DEV_LIST.push('HM-LC-Sw1-Ba-PCB'); +DEV_DESCRIPTION["HM-LC-Sw1-Ba-PCB"] = "HM-LC-Sw1-Ba-PCB"; +DEV_PATHS["HM-LC-Sw1-Ba-PCB"] = new Object(); +DEV_PATHS["HM-LC-Sw1-Ba-PCB"]["50"] = "/config/img/devices/50/77_hm-lc-sw1-ba-pcb_thumb.png"; +DEV_PATHS["HM-LC-Sw1-Ba-PCB"]["250"] = "/config/img/devices/250/77_hm-lc-sw1-ba-pcb.png"; +DEV_HIGHLIGHT["HM-LC-Sw1-Ba-PCB"] = new Object(); +DEV_LIST.push('HmIP-SPDR'); +DEV_DESCRIPTION["HmIP-SPDR"] = "HmIP-SPDR"; +DEV_PATHS["HmIP-SPDR"] = new Object(); +DEV_PATHS["HmIP-SPDR"]["50"] = "/config/img/devices/50/154_hmip-spdr_thumb.png"; +DEV_PATHS["HmIP-SPDR"]["250"] = "/config/img/devices/250/154_hmip-spdr.png"; +DEV_HIGHLIGHT["HmIP-SPDR"] = new Object(); +DEV_LIST.push('HM-PB-4-WM'); +DEV_DESCRIPTION["HM-PB-4-WM"] = "HM-PB-4-WM"; +DEV_PATHS["HM-PB-4-WM"] = new Object(); +DEV_PATHS["HM-PB-4-WM"]["50"] = "/config/img/devices/50/PushButton-4ch-wm_thumb.png"; +DEV_PATHS["HM-PB-4-WM"]["250"] = "/config/img/devices/250/PushButton-4ch-wm.png"; +DEV_HIGHLIGHT["HM-PB-4-WM"] = new Object(); +DEV_HIGHLIGHT["HM-PB-4-WM"]["2"] = [2, 0.24, 0.312, 0.204, 0.168]; +DEV_HIGHLIGHT["HM-PB-4-WM"]["1"] = [2, 0.24, 0.556, 0.204, 0.168]; +DEV_HIGHLIGHT["HM-PB-4-WM"]["3"] = [2, 0.46, 0.556, 0.204, 0.168]; +DEV_HIGHLIGHT["HM-PB-4-WM"]["4"] = [2, 0.46, 0.312, 0.204, 0.168]; +DEV_HIGHLIGHT["HM-PB-4-WM"]["1+2"] = [2, 0.24, 0.312, 0.204, 0.412]; +DEV_HIGHLIGHT["HM-PB-4-WM"]["3+4"] = [2, 0.46, 0.312, 0.204, 0.412]; +DEV_LIST.push('HmIP-BWTH24'); +DEV_DESCRIPTION["HmIP-BWTH24"] = "HmIP-WTH"; +DEV_PATHS["HmIP-BWTH24"] = new Object(); +DEV_PATHS["HmIP-BWTH24"]["50"] = "/config/img/devices/50/121_hmip-wth_thumb.png"; +DEV_PATHS["HmIP-BWTH24"]["250"] = "/config/img/devices/250/121_hmip-wth.png"; +DEV_HIGHLIGHT["HmIP-BWTH24"] = new Object(); +DEV_LIST.push('HmIP-WRCR'); +DEV_DESCRIPTION["HmIP-WRCR"] = "HmIP-WRCR"; +DEV_PATHS["HmIP-WRCR"] = new Object(); +DEV_PATHS["HmIP-WRCR"]["50"] = "/config/img/devices/50/202_hmip-wrcr_thumb.png"; +DEV_PATHS["HmIP-WRCR"]["250"] = "/config/img/devices/250/202_hmip-wrcr.png"; +DEV_HIGHLIGHT["HmIP-WRCR"] = new Object(); +DEV_LIST.push('HmIP-FROLL'); +DEV_DESCRIPTION["HmIP-FROLL"] = "HmIP-FROLL"; +DEV_PATHS["HmIP-FROLL"] = new Object(); +DEV_PATHS["HmIP-FROLL"]["50"] = "/config/img/devices/50/145_hmip-froll_hmip-fbl_thumb.png"; +DEV_PATHS["HmIP-FROLL"]["250"] = "/config/img/devices/250/145_hmip-froll_hmip-fbl.png"; +DEV_HIGHLIGHT["HmIP-FROLL"] = new Object(); +DEV_LIST.push('HmIP-PSMCO'); +DEV_DESCRIPTION["HmIP-PSMCO"] = "PSMCO"; +DEV_PATHS["HmIP-PSMCO"] = new Object(); +DEV_PATHS["HmIP-PSMCO"]["50"] = "/config/img/devices/50/235_hmip-psmco_thumb.png"; +DEV_PATHS["HmIP-PSMCO"]["250"] = "/config/img/devices/250/235_hmip-psmco.png"; +DEV_HIGHLIGHT["HmIP-PSMCO"] = new Object(); +DEV_LIST.push('HM-ES-PMSw1-Pl'); +DEV_DESCRIPTION["HM-ES-PMSw1-Pl"] = "HM-ES-PMSw1-Pl"; +DEV_PATHS["HM-ES-PMSw1-Pl"] = new Object(); +DEV_PATHS["HM-ES-PMSw1-Pl"]["50"] = "/config/img/devices/50/93_hm-es-pmsw1-pl_thumb.png"; +DEV_PATHS["HM-ES-PMSw1-Pl"]["250"] = "/config/img/devices/250/93_hm-es-pmsw1-pl.png"; +DEV_HIGHLIGHT["HM-ES-PMSw1-Pl"] = new Object(); +DEV_LIST.push('HM-WDS40-TH-I-2'); +DEV_DESCRIPTION["HM-WDS40-TH-I-2"] = "HM-WDS40-TH-I"; +DEV_PATHS["HM-WDS40-TH-I-2"] = new Object(); +DEV_PATHS["HM-WDS40-TH-I-2"]["50"] = "/config/img/devices/50/13_hm-ws550sth-i_thumb.png"; +DEV_PATHS["HM-WDS40-TH-I-2"]["250"] = "/config/img/devices/250/13_hm-ws550sth-i.png"; +DEV_HIGHLIGHT["HM-WDS40-TH-I-2"] = new Object(); +DEV_LIST.push('HMW-WSE-SM'); +DEV_DESCRIPTION["HMW-WSE-SM"] = "HMW-WSE-SM"; +DEV_PATHS["HMW-WSE-SM"] = new Object(); +DEV_PATHS["HMW-WSE-SM"]["50"] = "/config/img/devices/50/31_hmw-wse-sm_thumb.png"; +DEV_PATHS["HMW-WSE-SM"]["250"] = "/config/img/devices/250/31_hmw-wse-sm.png"; +DEV_HIGHLIGHT["HMW-WSE-SM"] = new Object(); +DEV_LIST.push('HM-PBI-4-FM'); +DEV_DESCRIPTION["HM-PBI-4-FM"] = "HM-PBI-4-FM"; +DEV_PATHS["HM-PBI-4-FM"] = new Object(); +DEV_PATHS["HM-PBI-4-FM"]["50"] = "/config/img/devices/50/38_hm-pbi-4-fm_thumb.png"; +DEV_PATHS["HM-PBI-4-FM"]["250"] = "/config/img/devices/250/38_hm-pbi-4-fm.png"; +DEV_HIGHLIGHT["HM-PBI-4-FM"] = new Object(); +DEV_HIGHLIGHT["HM-PBI-4-FM"]["1_Key"] = [3, 0.18, 0.216, '1', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-PBI-4-FM"]["1_Kreis"] = [4, 0.265, 0.500, 0.028, 0.028]; +DEV_HIGHLIGHT["HM-PBI-4-FM"]["1"] = [5, '1_Key', '1_Kreis']; +DEV_HIGHLIGHT["HM-PBI-4-FM"]["2_Key"] = [3, 0.18, 0.216, '2', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-PBI-4-FM"]["2_Kreis"] = [4, 0.287, 0.465, 0.028, 0.028]; +DEV_HIGHLIGHT["HM-PBI-4-FM"]["2"] = [5, '2_Key', '2_Kreis']; +DEV_HIGHLIGHT["HM-PBI-4-FM"]["3_Key"] = [3, 0.18, 0.216, '3', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-PBI-4-FM"]["3_Kreis"] = [4, 0.309, 0.430, 0.028, 0.028]; +DEV_HIGHLIGHT["HM-PBI-4-FM"]["3"] = [5, '3_Key', '3_Kreis']; +DEV_HIGHLIGHT["HM-PBI-4-FM"]["4_Key"] = [3, 0.18, 0.216, '4', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-PBI-4-FM"]["4_Kreis"] = [4, 0.331, 0.395, 0.028, 0.028]; +DEV_HIGHLIGHT["HM-PBI-4-FM"]["4"] = [5, '4_Key', '4_Kreis']; +DEV_LIST.push('HM-LC-Sw2-PB-FM'); +DEV_DESCRIPTION["HM-LC-Sw2-PB-FM"] = "HM-LC-Sw2-PB-FM"; +DEV_PATHS["HM-LC-Sw2-PB-FM"] = new Object(); +DEV_PATHS["HM-LC-Sw2-PB-FM"]["50"] = "/config/img/devices/50/PushButton-4ch-wm_thumb.png"; +DEV_PATHS["HM-LC-Sw2-PB-FM"]["250"] = "/config/img/devices/250/PushButton-4ch-wm.png"; +DEV_HIGHLIGHT["HM-LC-Sw2-PB-FM"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Sw2-PB-FM"]["1"] = [2, 0.24, 0.312, 0.204, 0.412]; +DEV_HIGHLIGHT["HM-LC-Sw2-PB-FM"]["2"] = [2, 0.46, 0.312, 0.204, 0.412]; +DEV_LIST.push('263 131'); +DEV_DESCRIPTION["263 131"] = "263_131"; +DEV_PATHS["263 131"] = new Object(); +DEV_PATHS["263 131"]["50"] = "/config/img/devices/50/PushButton-2ch-wm_thumb.png"; +DEV_PATHS["263 131"]["250"] = "/config/img/devices/250/PushButton-2ch-wm.png"; +DEV_HIGHLIGHT["263 131"] = new Object(); +DEV_HIGHLIGHT["263 131"]["1a"] = [2, 0.244, 0.312, 0.428, 0.168]; +DEV_HIGHLIGHT["263 131"]["1b"] = [2, 0.244, 0.56, 0.428, 0.168]; +DEV_HIGHLIGHT["263 131"]["1"] = [5, '1a', '1b']; +DEV_LIST.push('HMW-LC-Bl1-DR-2'); +DEV_DESCRIPTION["HMW-LC-Bl1-DR-2"] = "HMW-LC-Bl1-DR"; +DEV_PATHS["HMW-LC-Bl1-DR-2"] = new Object(); +DEV_PATHS["HMW-LC-Bl1-DR-2"]["50"] = "/config/img/devices/50/27_hmw-lc-bl1-dr_thumb.png"; +DEV_PATHS["HMW-LC-Bl1-DR-2"]["250"] = "/config/img/devices/250/27_hmw-lc-bl1-dr.png"; +DEV_HIGHLIGHT["HMW-LC-Bl1-DR-2"] = new Object(); +DEV_HIGHLIGHT["HMW-LC-Bl1-DR-2"]["1"] = [2, 0.452, 0.772, 0.044, 0.06]; +DEV_HIGHLIGHT["HMW-LC-Bl1-DR-2"]["2"] = [2, 0.5, 0.772, 0.048, 0.06]; +DEV_HIGHLIGHT["HMW-LC-Bl1-DR-2"]["3"] = [2, 0.452, 0.388, 0.096, 0.06]; +DEV_LIST.push('HmIP-SCI'); +DEV_DESCRIPTION["HmIP-SCI"] = "HmIP-SCI"; +DEV_PATHS["HmIP-SCI"] = new Object(); +DEV_PATHS["HmIP-SCI"]["50"] = "/config/img/devices/50/190_hmip-sci_thumb.png"; +DEV_PATHS["HmIP-SCI"]["250"] = "/config/img/devices/250/190_hmip-sci.png"; +DEV_HIGHLIGHT["HmIP-SCI"] = new Object(); +DEV_LIST.push('HmIP-DLS'); +DEV_DESCRIPTION["HmIP-DLS"] = "HmIP-DLS"; +DEV_PATHS["HmIP-DLS"] = new Object(); +DEV_PATHS["HmIP-DLS"]["50"] = "/config/img/devices/50/218_hmip-dls_thumb.png"; +DEV_PATHS["HmIP-DLS"]["250"] = "/config/img/devices/250/218_hmip-dls.png"; +DEV_HIGHLIGHT["HmIP-DLS"] = new Object(); +DEV_LIST.push('ELV-SH-WUA'); +DEV_DESCRIPTION["ELV-SH-WUA"] = "HmIP-WUA"; +DEV_PATHS["ELV-SH-WUA"] = new Object(); +DEV_PATHS["ELV-SH-WUA"]["50"] = "/config/img/devices/50/213_hmip-wua_thumb.png"; +DEV_PATHS["ELV-SH-WUA"]["250"] = "/config/img/devices/250/213_hmip-wua.png"; +DEV_HIGHLIGHT["ELV-SH-WUA"] = new Object(); +DEV_LIST.push('HM-WDS100-C6-O-2'); +DEV_DESCRIPTION["HM-WDS100-C6-O-2"] = "HM-WDS100-C6-O"; +DEV_PATHS["HM-WDS100-C6-O-2"] = new Object(); +DEV_PATHS["HM-WDS100-C6-O-2"]["50"] = "/config/img/devices/50/WeatherCombiSensor_thumb.png"; +DEV_PATHS["HM-WDS100-C6-O-2"]["250"] = "/config/img/devices/250/WeatherCombiSensor.png"; +DEV_HIGHLIGHT["HM-WDS100-C6-O-2"] = new Object(); +DEV_LIST.push('HmIP-BROLL'); +DEV_DESCRIPTION["HmIP-BROLL"] = "HmIP-BROLL"; +DEV_PATHS["HmIP-BROLL"] = new Object(); +DEV_PATHS["HmIP-BROLL"]["50"] = "/config/img/devices/50/PushButton-2ch-wm_thumb.png"; +DEV_PATHS["HmIP-BROLL"]["250"] = "/config/img/devices/250/PushButton-2ch-wm.png"; +DEV_HIGHLIGHT["HmIP-BROLL"] = new Object(); +DEV_HIGHLIGHT["HmIP-BROLL"]["2"] = [2, 0.244, 0.312, 0.428, 0.168]; +DEV_HIGHLIGHT["HmIP-BROLL"]["1"] = [2, 0.244, 0.56, 0.428, 0.168]; +DEV_HIGHLIGHT["HmIP-BROLL"]["1+2"] = [2, 0.244, 0.308, 0.428, 0.416]; +DEV_LIST.push('HmIP-DLD'); +DEV_DESCRIPTION["HmIP-DLD"] = "HmIP-DLD"; +DEV_PATHS["HmIP-DLD"] = new Object(); +DEV_PATHS["HmIP-DLD"]["50"] = "/config/img/devices/50/214_hmip-dld_thumb.png"; +DEV_PATHS["HmIP-DLD"]["250"] = "/config/img/devices/250/214_hmip-dld.png"; +DEV_HIGHLIGHT["HmIP-DLD"] = new Object(); +DEV_LIST.push('HM-LC-Bl1-PB-FM'); +DEV_DESCRIPTION["HM-LC-Bl1-PB-FM"] = "HM-LC-Bl1-PB-FM"; +DEV_PATHS["HM-LC-Bl1-PB-FM"] = new Object(); +DEV_PATHS["HM-LC-Bl1-PB-FM"]["50"] = "/config/img/devices/50/61_hm-lc-bl1-pb-fm_thumb.png"; +DEV_PATHS["HM-LC-Bl1-PB-FM"]["250"] = "/config/img/devices/250/61_hm-lc-bl1-pb-fm.png"; +DEV_HIGHLIGHT["HM-LC-Bl1-PB-FM"] = new Object(); +DEV_LIST.push('HM-LC-Dim1L-CV-2'); +DEV_DESCRIPTION["HM-LC-Dim1L-CV-2"] = "HM-LC-Dim1L-CV"; +DEV_PATHS["HM-LC-Dim1L-CV-2"] = new Object(); +DEV_PATHS["HM-LC-Dim1L-CV-2"]["50"] = "/config/img/devices/50/2_hm-lc-dim1l-cv_thumb.png"; +DEV_PATHS["HM-LC-Dim1L-CV-2"]["250"] = "/config/img/devices/250/2_hm-lc-dim1l-cv.png"; +DEV_HIGHLIGHT["HM-LC-Dim1L-CV-2"] = new Object(); +DEV_LIST.push('ZEL STG RM FZS'); +DEV_DESCRIPTION["ZEL STG RM FZS"] = "ZEL_STG_RM_FZS"; +DEV_PATHS["ZEL STG RM FZS"] = new Object(); +DEV_PATHS["ZEL STG RM FZS"]["50"] = "/config/img/devices/50/OM55_DimmerSwitch_thumb.png"; +DEV_PATHS["ZEL STG RM FZS"]["250"] = "/config/img/devices/250/OM55_DimmerSwitch.png"; +DEV_HIGHLIGHT["ZEL STG RM FZS"] = new Object(); +DEV_HIGHLIGHT["ZEL STG RM FZS"]["1_part1"] = [2, 0.548, 0.468, 0.072, 0.052]; +DEV_HIGHLIGHT["ZEL STG RM FZS"]["1_part2"] = [2, 0.612, 0.452, 0.028, 0.056]; +DEV_HIGHLIGHT["ZEL STG RM FZS"]["1"] = [5, '1_part1', '1_part2']; +DEV_LIST.push('HmIP-eTRV-B-2 R4M'); +DEV_DESCRIPTION["HmIP-eTRV-B-2 R4M"] = "TRV-B"; +DEV_PATHS["HmIP-eTRV-B-2 R4M"] = new Object(); +DEV_PATHS["HmIP-eTRV-B-2 R4M"]["50"] = "/config/img/devices/50/180_hmip-etrv-b_thumb.png"; +DEV_PATHS["HmIP-eTRV-B-2 R4M"]["250"] = "/config/img/devices/250/180_hmip-etrv-b.png"; +DEV_HIGHLIGHT["HmIP-eTRV-B-2 R4M"] = new Object(); +DEV_LIST.push('HmIPW-WRC6'); +DEV_DESCRIPTION["HmIPW-WRC6"] = "HmIPW-WRC6"; +DEV_PATHS["HmIPW-WRC6"] = new Object(); +DEV_PATHS["HmIPW-WRC6"]["50"] = "/config/img/devices/50/131_hmip-wrc6_thumb.png"; +DEV_PATHS["HmIPW-WRC6"]["250"] = "/config/img/devices/250/131_hmip-wrc6.png"; +DEV_HIGHLIGHT["HmIPW-WRC6"] = new Object(); +DEV_HIGHLIGHT["HmIPW-WRC6"]["1"] = [1, 0.270, 0.310, 0.050]; +DEV_HIGHLIGHT["HmIPW-WRC6"]["2"] = [1, 0.675, 0.285, 0.050]; +DEV_HIGHLIGHT["HmIPW-WRC6"]["3"] = [1, 0.270, 0.510, 0.050]; +DEV_HIGHLIGHT["HmIPW-WRC6"]["4"] = [1, 0.675, 0.480, 0.050]; +DEV_HIGHLIGHT["HmIPW-WRC6"]["5"] = [1, 0.270, 0.706, 0.050]; +DEV_HIGHLIGHT["HmIPW-WRC6"]["6"] = [1, 0.675, 0.671, 0.050]; +DEV_HIGHLIGHT["HmIPW-WRC6"]["7"] = [1, 0.270, 0.310, 0.050]; +DEV_HIGHLIGHT["HmIPW-WRC6"]["8"] = [1, 0.675, 0.285, 0.050]; +DEV_HIGHLIGHT["HmIPW-WRC6"]["9"] = [1, 0.270, 0.510, 0.050]; +DEV_HIGHLIGHT["HmIPW-WRC6"]["10"] = [1, 0.675, 0.480, 0.050]; +DEV_HIGHLIGHT["HmIPW-WRC6"]["11"] = [1, 0.270, 0.706, 0.050]; +DEV_HIGHLIGHT["HmIPW-WRC6"]["12"] = [1, 0.675, 0.671, 0.050]; +DEV_HIGHLIGHT["HmIPW-WRC6"]["13"] = [5, '1', '2', '3', '4', '5', '6']; +DEV_HIGHLIGHT["HmIPW-WRC6"]["1+2"] = [5, '1', '2']; +DEV_HIGHLIGHT["HmIPW-WRC6"]["3+4"] = [5, '3', '4']; +DEV_HIGHLIGHT["HmIPW-WRC6"]["5+6"] = [5, '5', '6']; +DEV_HIGHLIGHT["HmIPW-WRC6"]["7+8"] = [5, '1', '2']; +DEV_HIGHLIGHT["HmIPW-WRC6"]["9+10"] = [5, '3', '4']; +DEV_HIGHLIGHT["HmIPW-WRC6"]["11+12"] = [5, '5', '6']; +DEV_LIST.push('HM-LC-Sw1-SM'); +DEV_DESCRIPTION["HM-LC-Sw1-SM"] = "HM-LC-Sw1-SM"; +DEV_PATHS["HM-LC-Sw1-SM"] = new Object(); +DEV_PATHS["HM-LC-Sw1-SM"]["50"] = "/config/img/devices/50/8_hm-lc-sw1-sm_thumb.png"; +DEV_PATHS["HM-LC-Sw1-SM"]["250"] = "/config/img/devices/250/8_hm-lc-sw1-sm.png"; +DEV_HIGHLIGHT["HM-LC-Sw1-SM"] = new Object(); +DEV_LIST.push('HM-EM-CMM'); +DEV_DESCRIPTION["HM-EM-CMM"] = "HM-EM-CMM"; +DEV_PATHS["HM-EM-CMM"] = new Object(); +DEV_PATHS["HM-EM-CMM"]["50"] = "/config/img/devices/50/25_hm-em-cmm_thumb.png"; +DEV_PATHS["HM-EM-CMM"]["250"] = "/config/img/devices/250/25_hm-em-cmm.png"; +DEV_HIGHLIGHT["HM-EM-CMM"] = new Object(); +DEV_LIST.push('263 147'); +DEV_DESCRIPTION["263 147"] = "263_147"; +DEV_PATHS["263 147"] = new Object(); +DEV_PATHS["263 147"]["50"] = "/config/img/devices/50/PushButton-2ch-wm_thumb.png"; +DEV_PATHS["263 147"]["250"] = "/config/img/devices/250/PushButton-2ch-wm.png"; +DEV_HIGHLIGHT["263 147"] = new Object(); +DEV_HIGHLIGHT["263 147"]["1a"] = [2, 0.244, 0.312, 0.428, 0.168]; +DEV_HIGHLIGHT["263 147"]["1b"] = [2, 0.244, 0.56, 0.428, 0.168]; +DEV_HIGHLIGHT["263 147"]["1"] = [5, '1a', '1b']; +DEV_LIST.push('HmIP-PSM-PE-2'); +DEV_DESCRIPTION["HmIP-PSM-PE-2"] = "PSM-PE"; +DEV_PATHS["HmIP-PSM-PE-2"] = new Object(); +DEV_PATHS["HmIP-PSM-PE-2"]["50"] = "/config/img/devices/50/215_hmip-psm-pe-2_thumb.png"; +DEV_PATHS["HmIP-PSM-PE-2"]["250"] = "/config/img/devices/250/215_hmip-psm-pe-2.png"; +DEV_HIGHLIGHT["HmIP-PSM-PE-2"] = new Object(); +DEV_LIST.push('HM-WS550STH-O'); +DEV_DESCRIPTION["HM-WS550STH-O"] = "HM-WS550STH-O"; +DEV_PATHS["HM-WS550STH-O"] = new Object(); +DEV_PATHS["HM-WS550STH-O"]["50"] = "/config/img/devices/50/TH_CS_thumb.png"; +DEV_PATHS["HM-WS550STH-O"]["250"] = "/config/img/devices/250/TH_CS.png"; +DEV_HIGHLIGHT["HM-WS550STH-O"] = new Object(); +DEV_LIST.push('HMW-Sen-SC-12-DR'); +DEV_DESCRIPTION["HMW-Sen-SC-12-DR"] = "HMW-Sen-SC-12-DR"; +DEV_PATHS["HMW-Sen-SC-12-DR"] = new Object(); +DEV_PATHS["HMW-Sen-SC-12-DR"]["50"] = "/config/img/devices/50/56_hmw-sen-sc-12-dr_thumb.png"; +DEV_PATHS["HMW-Sen-SC-12-DR"]["250"] = "/config/img/devices/250/56_hmw-sen-sc-12-dr.png"; +DEV_HIGHLIGHT["HMW-Sen-SC-12-DR"] = new Object(); +DEV_HIGHLIGHT["HMW-Sen-SC-12-DR"]["1"] = [2, 0.244, 0.688, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-Sen-SC-12-DR"]["2"] = [2, 0.304, 0.688, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-Sen-SC-12-DR"]["3"] = [2, 0.436, 0.688, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-Sen-SC-12-DR"]["4"] = [2, 0.496, 0.688, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-Sen-SC-12-DR"]["5"] = [2, 0.62, 0.688, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-Sen-SC-12-DR"]["6"] = [2, 0.68, 0.688, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-Sen-SC-12-DR"]["7"] = [2, 0.244, 0.752, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-Sen-SC-12-DR"]["8"] = [2, 0.304, 0.752, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-Sen-SC-12-DR"]["9"] = [2, 0.436, 0.752, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-Sen-SC-12-DR"]["10"] = [2, 0.496, 0.752, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-Sen-SC-12-DR"]["11"] = [2, 0.62, 0.752, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-Sen-SC-12-DR"]["12"] = [2, 0.68, 0.752, 0.06, 0.06]; +DEV_LIST.push('ZEL STG RM HS 4'); +DEV_DESCRIPTION["ZEL STG RM HS 4"] = "ZEL_STG_RM_HS_4"; +DEV_PATHS["ZEL STG RM HS 4"] = new Object(); +DEV_PATHS["ZEL STG RM HS 4"]["50"] = "/config/img/devices/50/18_hm-rc-4_thumb.png"; +DEV_PATHS["ZEL STG RM HS 4"]["250"] = "/config/img/devices/250/18_hm-rc-4.png"; +DEV_HIGHLIGHT["ZEL STG RM HS 4"] = new Object(); +DEV_HIGHLIGHT["ZEL STG RM HS 4"]["1"] = [4, 0.268, 0.236, 0.16, 0.164]; +DEV_HIGHLIGHT["ZEL STG RM HS 4"]["2"] = [4, 0.476, 0.236, 0.16, 0.164]; +DEV_HIGHLIGHT["ZEL STG RM HS 4"]["3"] = [4, 0.268, 0.48, 0.16, 0.164]; +DEV_HIGHLIGHT["ZEL STG RM HS 4"]["4"] = [4, 0.476, 0.48, 0.16, 0.164]; +DEV_HIGHLIGHT["ZEL STG RM HS 4"]["1+2"] = [5, '1', '2']; +DEV_HIGHLIGHT["ZEL STG RM HS 4"]["3+4"] = [5, '3', '4']; +DEV_LIST.push('HmIP-SWDO-PL'); +DEV_DESCRIPTION["HmIP-SWDO-PL"] = "HmIP-SWDO-PL"; +DEV_PATHS["HmIP-SWDO-PL"] = new Object(); +DEV_PATHS["HmIP-SWDO-PL"]["50"] = "/config/img/devices/50/197_hmip-swdo-pl_thumb.png"; +DEV_PATHS["HmIP-SWDO-PL"]["250"] = "/config/img/devices/250/197_hmip-swdo-pl.png"; +DEV_HIGHLIGHT["HmIP-SWDO-PL"] = new Object(); +DEV_LIST.push('HmIP-WRCD'); +DEV_DESCRIPTION["HmIP-WRCD"] = "HmIP-WRCD"; +DEV_PATHS["HmIP-WRCD"] = new Object(); +DEV_PATHS["HmIP-WRCD"]["50"] = "/config/img/devices/50/194_hmip-wrcd_thumb.png"; +DEV_PATHS["HmIP-WRCD"]["250"] = "/config/img/devices/250/194_hmip-wrcd.png"; +DEV_HIGHLIGHT["HmIP-WRCD"] = new Object(); +DEV_HIGHLIGHT["HmIP-WRCD"]["1"] = [1, 0.525, 0.690, 0.025]; +DEV_HIGHLIGHT["HmIP-WRCD"]["2"] = [1, 0.510, 0.360, 0.025]; +DEV_LIST.push('HM-OU-LED16'); +DEV_DESCRIPTION["HM-OU-LED16"] = "HM-OU-LED16"; +DEV_PATHS["HM-OU-LED16"] = new Object(); +DEV_PATHS["HM-OU-LED16"]["50"] = "/config/img/devices/50/78_hm-ou-led16_thumb.png"; +DEV_PATHS["HM-OU-LED16"]["250"] = "/config/img/devices/250/78_hm-ou-led16.png"; +DEV_HIGHLIGHT["HM-OU-LED16"] = new Object(); +DEV_HIGHLIGHT["HM-OU-LED16"]["1"] = [2, 0.152, 0.218, 0.064, 0.056]; +DEV_HIGHLIGHT["HM-OU-LED16"]["2"] = [2, 0.152, 0.277, 0.064, 0.056]; +DEV_HIGHLIGHT["HM-OU-LED16"]["3"] = [2, 0.152, 0.336, 0.064, 0.056]; +DEV_HIGHLIGHT["HM-OU-LED16"]["4"] = [2, 0.152, 0.395, 0.064, 0.056]; +DEV_HIGHLIGHT["HM-OU-LED16"]["5"] = [2, 0.152, 0.454, 0.064, 0.056]; +DEV_HIGHLIGHT["HM-OU-LED16"]["6"] = [2, 0.152, 0.513, 0.064, 0.056]; +DEV_HIGHLIGHT["HM-OU-LED16"]["7"] = [2, 0.152, 0.572, 0.064, 0.056]; +DEV_HIGHLIGHT["HM-OU-LED16"]["8"] = [2, 0.152, 0.631, 0.064, 0.056]; +DEV_HIGHLIGHT["HM-OU-LED16"]["9"] = [2, 0.728, 0.218, 0.064, 0.056]; +DEV_HIGHLIGHT["HM-OU-LED16"]["10"] = [2, 0.728, 0.277, 0.064, 0.056]; +DEV_HIGHLIGHT["HM-OU-LED16"]["11"] = [2, 0.728, 0.336, 0.064, 0.056]; +DEV_HIGHLIGHT["HM-OU-LED16"]["12"] = [2, 0.728, 0.395, 0.064, 0.056]; +DEV_HIGHLIGHT["HM-OU-LED16"]["13"] = [2, 0.728, 0.454, 0.064, 0.056]; +DEV_HIGHLIGHT["HM-OU-LED16"]["14"] = [2, 0.728, 0.513, 0.064, 0.056]; +DEV_HIGHLIGHT["HM-OU-LED16"]["15"] = [2, 0.728, 0.572, 0.064, 0.056]; +DEV_HIGHLIGHT["HM-OU-LED16"]["16"] = [2, 0.728, 0.631, 0.064, 0.056]; +DEV_LIST.push('HM-WDS30-T-O'); +DEV_DESCRIPTION["HM-WDS30-T-O"] = "HM-WDS30-T-O"; +DEV_PATHS["HM-WDS30-T-O"] = new Object(); +DEV_PATHS["HM-WDS30-T-O"]["50"] = "/config/img/devices/50/IP65_G201_thumb.png"; +DEV_PATHS["HM-WDS30-T-O"]["250"] = "/config/img/devices/250/IP65_G201.png"; +DEV_HIGHLIGHT["HM-WDS30-T-O"] = new Object(); +DEV_LIST.push('HM-RC-12-B'); +DEV_DESCRIPTION["HM-RC-12-B"] = "HM-RC-12-B"; +DEV_PATHS["HM-RC-12-B"] = new Object(); +DEV_PATHS["HM-RC-12-B"]["50"] = "/config/img/devices/50/19_hm-rc-12_thumb.png"; +DEV_PATHS["HM-RC-12-B"]["250"] = "/config/img/devices/250/19_hm-rc-12.png"; +DEV_HIGHLIGHT["HM-RC-12-B"] = new Object(); +DEV_HIGHLIGHT["HM-RC-12-B"]["1"] = [2, 0.252, 0.412, 0.044, 0.072]; +DEV_HIGHLIGHT["HM-RC-12-B"]["3"] = [2, 0.252, 0.508, 0.044, 0.072]; +DEV_HIGHLIGHT["HM-RC-12-B"]["5"] = [2, 0.252, 0.604, 0.044, 0.072]; +DEV_HIGHLIGHT["HM-RC-12-B"]["7"] = [2, 0.252, 0.7, 0.044, 0.072]; +DEV_HIGHLIGHT["HM-RC-12-B"]["9"] = [2, 0.252, 0.8, 0.044, 0.072]; +DEV_HIGHLIGHT["HM-RC-12-B"]["10"] = [2, 0.476, 0.8, 0.044, 0.072]; +DEV_HIGHLIGHT["HM-RC-12-B"]["8"] = [2, 0.476, 0.7, 0.044, 0.072]; +DEV_HIGHLIGHT["HM-RC-12-B"]["6"] = [2, 0.476, 0.604, 0.044, 0.072]; +DEV_HIGHLIGHT["HM-RC-12-B"]["4"] = [2, 0.476, 0.508, 0.044, 0.072]; +DEV_HIGHLIGHT["HM-RC-12-B"]["2"] = [2, 0.476, 0.412, 0.044, 0.072]; +DEV_HIGHLIGHT["HM-RC-12-B"]["11"] = [2, 0.62, 0.8, 0.068, 0.064]; +DEV_HIGHLIGHT["HM-RC-12-B"]["12"] = [2, 0.62, 0.704, 0.068, 0.064]; +DEV_HIGHLIGHT["HM-RC-12-B"]["1+2"] = [5, '1', '2']; +DEV_HIGHLIGHT["HM-RC-12-B"]["3+4"] = [5, '3', '4']; +DEV_HIGHLIGHT["HM-RC-12-B"]["5+6"] = [5, '5', '6']; +DEV_HIGHLIGHT["HM-RC-12-B"]["7+8"] = [5, '7', '8']; +DEV_HIGHLIGHT["HM-RC-12-B"]["9+10"] = [5, '9', '10']; +DEV_HIGHLIGHT["HM-RC-12-B"]["11+12"] = [5, '11', '12']; +DEV_LIST.push('HM-ES-PMSw1-Pl-DN-R5'); +DEV_DESCRIPTION["HM-ES-PMSw1-Pl-DN-R5"] = "HM-ES-PMSw1-Pl-DN-R5"; +DEV_PATHS["HM-ES-PMSw1-Pl-DN-R5"] = new Object(); +DEV_PATHS["HM-ES-PMSw1-Pl-DN-R5"]["50"] = "/config/img/devices/50/107_hm-es-pmsw1-pl-R5_thumb.png"; +DEV_PATHS["HM-ES-PMSw1-Pl-DN-R5"]["250"] = "/config/img/devices/250/107_hm-es-pmsw1-pl-R5.png"; +DEV_HIGHLIGHT["HM-ES-PMSw1-Pl-DN-R5"] = new Object(); +DEV_LIST.push('HM-LC-Sw4-SM-ATmega168'); +DEV_DESCRIPTION["HM-LC-Sw4-SM-ATmega168"] = "HM-LC-Sw4-SM-ATmega168"; +DEV_PATHS["HM-LC-Sw4-SM-ATmega168"] = new Object(); +DEV_PATHS["HM-LC-Sw4-SM-ATmega168"]["50"] = "/config/img/devices/50/3_hm-lc-sw4-sm_thumb.png"; +DEV_PATHS["HM-LC-Sw4-SM-ATmega168"]["250"] = "/config/img/devices/250/3_hm-lc-sw4-sm.png"; +DEV_HIGHLIGHT["HM-LC-Sw4-SM-ATmega168"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Sw4-SM-ATmega168"]["1_Part1"] = [6, 0.136, 0.896, 0.136, 0.98, 0.012]; +DEV_HIGHLIGHT["HM-LC-Sw4-SM-ATmega168"]["1_Part2"] = [6, 0.136, 0.98, 0.096, 0.916, 0.012]; +DEV_HIGHLIGHT["HM-LC-Sw4-SM-ATmega168"]["1_Part3"] = [6, 0.136, 0.98, 0.176, 0.916, 0.012]; +DEV_HIGHLIGHT["HM-LC-Sw4-SM-ATmega168"]["1_Arrow"] = [5, '1_Part1', '1_Part2', '1_Part3']; +DEV_HIGHLIGHT["HM-LC-Sw4-SM-ATmega168"]["2_Arrow"] = [7, '1_Arrow', 0.164, 0]; +DEV_HIGHLIGHT["HM-LC-Sw4-SM-ATmega168"]["3_Arrow"] = [7, '1_Arrow', 0.328, 0]; +DEV_HIGHLIGHT["HM-LC-Sw4-SM-ATmega168"]["4_Arrow"] = [7, '1_Arrow', 0.492, 0]; +DEV_HIGHLIGHT["HM-LC-Sw4-SM-ATmega168"]["1_Key"] = [4, 0.244, 0.372, 0.04, 0.044]; +DEV_HIGHLIGHT["HM-LC-Sw4-SM-ATmega168"]["2_Key"] = [4, 0.328, 0.372, 0.04, 0.044]; +DEV_HIGHLIGHT["HM-LC-Sw4-SM-ATmega168"]["3_Key"] = [4, 0.404, 0.372, 0.04, 0.044]; +DEV_HIGHLIGHT["HM-LC-Sw4-SM-ATmega168"]["4_Key"] = [4, 0.484, 0.372, 0.04, 0.044]; +DEV_HIGHLIGHT["HM-LC-Sw4-SM-ATmega168"]["1"] = [5, '1_Arrow', '1_Key']; +DEV_HIGHLIGHT["HM-LC-Sw4-SM-ATmega168"]["2"] = [5, '2_Arrow', '2_Key']; +DEV_HIGHLIGHT["HM-LC-Sw4-SM-ATmega168"]["3"] = [5, '3_Arrow', '3_Key']; +DEV_HIGHLIGHT["HM-LC-Sw4-SM-ATmega168"]["4"] = [5, '4_Arrow', '4_Key']; +DEV_LIST.push('HM-SCI-3-FM'); +DEV_DESCRIPTION["HM-SCI-3-FM"] = "HM-SCI-3-FM"; +DEV_PATHS["HM-SCI-3-FM"] = new Object(); +DEV_PATHS["HM-SCI-3-FM"]["50"] = "/config/img/devices/50/67_hm-sci-3-fm_thumb.png"; +DEV_PATHS["HM-SCI-3-FM"]["250"] = "/config/img/devices/250/67_hm-sci-3-fm.png"; +DEV_HIGHLIGHT["HM-SCI-3-FM"] = new Object(); +DEV_HIGHLIGHT["HM-SCI-3-FM"]["1_Key"] = [3, 0.18, 0.216, '1', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-SCI-3-FM"]["1_Kreis"] = [4, 0.220, 0.480, 0.028, 0.028]; +DEV_HIGHLIGHT["HM-SCI-3-FM"]["1"] = [5, '1_Key', '1_Kreis']; +DEV_HIGHLIGHT["HM-SCI-3-FM"]["2_Key"] = [3, 0.18, 0.216, '2', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-SCI-3-FM"]["2_Kreis"] = [4, 0.265, 0.405, 0.028, 0.028]; +DEV_HIGHLIGHT["HM-SCI-3-FM"]["2"] = [5, '2_Key', '2_Kreis']; +DEV_HIGHLIGHT["HM-SCI-3-FM"]["3_Key"] = [3, 0.18, 0.216, '3', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-SCI-3-FM"]["3_Kreis"] = [4, 0.310, 0.33, 0.028, 0.028]; +DEV_HIGHLIGHT["HM-SCI-3-FM"]["3"] = [5, '3_Key', '3_Kreis']; +DEV_LIST.push('HM-LC-Sw2PBU-FM'); +DEV_DESCRIPTION["HM-LC-Sw2PBU-FM"] = "HM-LC-Sw2PBU-FM"; +DEV_PATHS["HM-LC-Sw2PBU-FM"] = new Object(); +DEV_PATHS["HM-LC-Sw2PBU-FM"]["50"] = "/config/img/devices/50/PushButton-2ch-wm_thumb.png"; +DEV_PATHS["HM-LC-Sw2PBU-FM"]["250"] = "/config/img/devices/250/PushButton-2ch-wm.png"; +DEV_HIGHLIGHT["HM-LC-Sw2PBU-FM"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Sw2PBU-FM"]["2"] = [2, 0.244, 0.312, 0.428, 0.168]; +DEV_HIGHLIGHT["HM-LC-Sw2PBU-FM"]["1"] = [2, 0.244, 0.56, 0.428, 0.168]; +DEV_HIGHLIGHT["HM-LC-Sw2PBU-FM"]["1+2"] = [2, 0.244, 0.308, 0.428, 0.416]; +DEV_LIST.push('HmIP-SMI55-2'); +DEV_DESCRIPTION["HmIP-SMI55-2"] = "HmIP-SMI55"; +DEV_PATHS["HmIP-SMI55-2"] = new Object(); +DEV_PATHS["HmIP-SMI55-2"]["50"] = "/config/img/devices/50/168_hmip-smi55_thumb.png"; +DEV_PATHS["HmIP-SMI55-2"]["250"] = "/config/img/devices/250/168_hmip-smi55.png"; +DEV_HIGHLIGHT["HmIP-SMI55-2"] = new Object(); +DEV_HIGHLIGHT["HmIP-SMI55-2"]["2"] = [4, 0.540, 0.188, 0.04, 0.044]; +DEV_HIGHLIGHT["HmIP-SMI55-2"]["1"] = [4, 0.540, 0.820, 0.04, 0.044]; +DEV_LIST.push('HmIP-HAP'); +DEV_DESCRIPTION["HmIP-HAP"] = "HmIP-HAP"; +DEV_PATHS["HmIP-HAP"] = new Object(); +DEV_PATHS["HmIP-HAP"]["50"] = "/config/img/devices/50/CCU3_thumb.png"; +DEV_PATHS["HmIP-HAP"]["250"] = "/config/img/devices/250/CCU3.png"; +DEV_HIGHLIGHT["HmIP-HAP"] = new Object(); +DEV_LIST.push('263 146'); +DEV_DESCRIPTION["263 146"] = "263_146"; +DEV_PATHS["263 146"] = new Object(); +DEV_PATHS["263 146"]["50"] = "/config/img/devices/50/7_hm-lc-bl1-fm_thumb.png"; +DEV_PATHS["263 146"]["250"] = "/config/img/devices/250/7_hm-lc-bl1-fm.png"; +DEV_HIGHLIGHT["263 146"] = new Object(); +DEV_LIST.push('HM-CC-VG-1'); +DEV_DESCRIPTION["HM-CC-VG-1"] = "HM-CC-VG-1"; +DEV_PATHS["HM-CC-VG-1"] = new Object(); +DEV_PATHS["HM-CC-VG-1"]["50"] = "/config/img/devices/50/95_group_hm-cc-vg-1_thumb.png"; +DEV_PATHS["HM-CC-VG-1"]["250"] = "/config/img/devices/250/95_group_hm-cc-vg-1.png"; +DEV_HIGHLIGHT["HM-CC-VG-1"] = new Object(); +DEV_LIST.push('HmIP-BSL'); +DEV_DESCRIPTION["HmIP-BSL"] = "HmIP-BSL"; +DEV_PATHS["HmIP-BSL"] = new Object(); +DEV_PATHS["HmIP-BSL"]["50"] = "/config/img/devices/50/173_hmip-bsl_thumb.png"; +DEV_PATHS["HmIP-BSL"]["250"] = "/config/img/devices/250/173_hmip-bsl.png"; +DEV_HIGHLIGHT["HmIP-BSL"] = new Object(); +DEV_HIGHLIGHT["HmIP-BSL"]["1"] = [1, 0.505, 0.635, 0.050]; +DEV_HIGHLIGHT["HmIP-BSL"]["2"] = [1, 0.505, 0.360, 0.050]; +DEV_HIGHLIGHT["HmIP-BSL"]["8"] = [1, 0.505, 0.360, 0.050]; +DEV_HIGHLIGHT["HmIP-BSL"]["9"] = [1, 0.505, 0.360, 0.050]; +DEV_HIGHLIGHT["HmIP-BSL"]["10"] = [1, 0.505, 0.360, 0.050]; +DEV_HIGHLIGHT["HmIP-BSL"]["12"] = [1, 0.505, 0.635, 0.050]; +DEV_HIGHLIGHT["HmIP-BSL"]["13"] = [1, 0.505, 0.635, 0.050]; +DEV_HIGHLIGHT["HmIP-BSL"]["14"] = [1, 0.505, 0.635, 0.050]; +DEV_LIST.push('HmIP-PDT-CH'); +DEV_DESCRIPTION["HmIP-PDT-CH"] = "PDT-CH"; +DEV_PATHS["HmIP-PDT-CH"] = new Object(); +DEV_PATHS["HmIP-PDT-CH"]["50"] = "/config/img/devices/50/113_hmip-psm-ch_thumb.png"; +DEV_PATHS["HmIP-PDT-CH"]["250"] = "/config/img/devices/250/113_hmip-psm-ch.png"; +DEV_HIGHLIGHT["HmIP-PDT-CH"] = new Object(); +DEV_LIST.push('HmIP-WTH-B'); +DEV_DESCRIPTION["HmIP-WTH-B"] = "HmIP-WTH-B"; +DEV_PATHS["HmIP-WTH-B"] = new Object(); +DEV_PATHS["HmIP-WTH-B"]["50"] = "/config/img/devices/50/200_hmip-wth-b_thumb.png"; +DEV_PATHS["HmIP-WTH-B"]["250"] = "/config/img/devices/250/200_hmip-wth-b.png"; +DEV_HIGHLIGHT["HmIP-WTH-B"] = new Object(); +DEV_LIST.push('HM-LC-DDC1-PCB'); +DEV_DESCRIPTION["HM-LC-DDC1-PCB"] = "HM-LC-DDC1-PCB"; +DEV_PATHS["HM-LC-DDC1-PCB"] = new Object(); +DEV_PATHS["HM-LC-DDC1-PCB"]["50"] = "/config/img/devices/50/54a_lc-ddc1_thumb.png"; +DEV_PATHS["HM-LC-DDC1-PCB"]["250"] = "/config/img/devices/250/54a_lc-ddc1-pcb.png"; +DEV_HIGHLIGHT["HM-LC-DDC1-PCB"] = new Object(); +DEV_LIST.push('HmIP-PSM-CH-2'); +DEV_DESCRIPTION["HmIP-PSM-CH-2"] = "PSM-CH"; +DEV_PATHS["HmIP-PSM-CH-2"] = new Object(); +DEV_PATHS["HmIP-PSM-CH-2"]["50"] = "/config/img/devices/50/216_hmip-psm-ch-2_thumb.png"; +DEV_PATHS["HmIP-PSM-CH-2"]["250"] = "/config/img/devices/250/216_hmip-psm-ch-2.png"; +DEV_HIGHLIGHT["HmIP-PSM-CH-2"] = new Object(); +DEV_LIST.push('HmIP-BWTH-A'); +DEV_DESCRIPTION["HmIP-BWTH-A"] = "HmIP-WTH"; +DEV_PATHS["HmIP-BWTH-A"] = new Object(); +DEV_PATHS["HmIP-BWTH-A"]["50"] = "/config/img/devices/50/121_hmip-wth_thumb.png"; +DEV_PATHS["HmIP-BWTH-A"]["250"] = "/config/img/devices/250/121_hmip-wth.png"; +DEV_HIGHLIGHT["HmIP-BWTH-A"] = new Object(); +DEV_LIST.push('HmIP-ESI'); +DEV_DESCRIPTION["HmIP-ESI"] = "HmIP-ESI"; +DEV_PATHS["HmIP-ESI"] = new Object(); +DEV_PATHS["HmIP-ESI"]["50"] = "/config/img/devices/50/226_hmip-esi_thumb.png"; +DEV_PATHS["HmIP-ESI"]["250"] = "/config/img/devices/250/226_hmip-esi.png"; +DEV_HIGHLIGHT["HmIP-ESI"] = new Object(); +DEV_LIST.push('HmIP-STV'); +DEV_DESCRIPTION["HmIP-STV"] = "HmIP-STV"; +DEV_PATHS["HmIP-STV"] = new Object(); +DEV_PATHS["HmIP-STV"]["50"] = "/config/img/devices/50/201_hmip-stv_thumb.png"; +DEV_PATHS["HmIP-STV"]["250"] = "/config/img/devices/250/201_hmip-stv.png"; +DEV_HIGHLIGHT["HmIP-STV"] = new Object(); +DEV_LIST.push('VIR-LG-ONOFF'); +DEV_DESCRIPTION["VIR-LG-ONOFF"] = "VIR-LG-ONOFFVIR-LG-ONOFF"; +DEV_PATHS["VIR-LG-ONOFF"] = new Object(); +DEV_PATHS["VIR-LG-ONOFF"]["50"] = "/config/img/devices/50/coupling/hm-coupling-onoff.png"; +DEV_PATHS["VIR-LG-ONOFF"]["250"] = "/config/img/devices/250/coupling/hm-coupling-onoff.png"; +DEV_HIGHLIGHT["VIR-LG-ONOFF"] = new Object(); +DEV_LIST.push('HmIPW-WGD'); +DEV_DESCRIPTION["HmIPW-WGD"] = "HmIPW-WGD"; +DEV_PATHS["HmIPW-WGD"] = new Object(); +DEV_PATHS["HmIPW-WGD"]["50"] = "/config/img/devices/50/222_hmipw-wgd_thumb.png"; +DEV_PATHS["HmIPW-WGD"]["250"] = "/config/img/devices/250/222_hmipw-wgd.png"; +DEV_HIGHLIGHT["HmIPW-WGD"] = new Object(); +DEV_LIST.push('HM-Sec-RHS-2'); +DEV_DESCRIPTION["HM-Sec-RHS-2"] = "HM-Sec-RHS"; +DEV_PATHS["HM-Sec-RHS-2"] = new Object(); +DEV_PATHS["HM-Sec-RHS-2"]["50"] = "/config/img/devices/50/17_hm-sec-rhs_thumb.png"; +DEV_PATHS["HM-Sec-RHS-2"]["250"] = "/config/img/devices/250/17_hm-sec-rhs.png"; +DEV_HIGHLIGHT["HM-Sec-RHS-2"] = new Object(); +DEV_LIST.push('HmIPW-DRS8'); +DEV_DESCRIPTION["HmIPW-DRS8"] = "HmIPW-DRS8"; +DEV_PATHS["HmIPW-DRS8"] = new Object(); +DEV_PATHS["HmIPW-DRS8"]["50"] = "/config/img/devices/50/161_hmipw-drs8_thumb.png"; +DEV_PATHS["HmIPW-DRS8"]["250"] = "/config/img/devices/250/161_hmipw-drs8.png"; +DEV_HIGHLIGHT["HmIPW-DRS8"] = new Object(); +DEV_HIGHLIGHT["HmIPW-DRS8"]["1"] = [1, 0.208, 0.080, 0.050]; +DEV_HIGHLIGHT["HmIPW-DRS8"]["2"] = [1, 0.208, 0.080, 0.050]; +DEV_HIGHLIGHT["HmIPW-DRS8"]["3"] = [1, 0.208, 0.080, 0.050]; +DEV_HIGHLIGHT["HmIPW-DRS8"]["4"] = [1, 0.208, 0.080, 0.050]; +DEV_HIGHLIGHT["HmIPW-DRS8"]["5"] = [1, 0.422, 0.075, 0.050]; +DEV_HIGHLIGHT["HmIPW-DRS8"]["6"] = [1, 0.422, 0.075, 0.050]; +DEV_HIGHLIGHT["HmIPW-DRS8"]["7"] = [1, 0.422, 0.075, 0.050]; +DEV_HIGHLIGHT["HmIPW-DRS8"]["8"] = [1, 0.422, 0.075, 0.050]; +DEV_HIGHLIGHT["HmIPW-DRS8"]["9"] = [1, 0.636, 0.070, 0.050]; +DEV_HIGHLIGHT["HmIPW-DRS8"]["10"] = [1, 0.636, 0.070, 0.050]; +DEV_HIGHLIGHT["HmIPW-DRS8"]["11"] = [1, 0.636, 0.070, 0.050]; +DEV_HIGHLIGHT["HmIPW-DRS8"]["12"] = [1, 0.636, 0.070, 0.050]; +DEV_HIGHLIGHT["HmIPW-DRS8"]["13"] = [1, 0.205, 0.910, 0.040]; +DEV_HIGHLIGHT["HmIPW-DRS8"]["14"] = [1, 0.205, 0.910, 0.040]; +DEV_HIGHLIGHT["HmIPW-DRS8"]["15"] = [1, 0.205, 0.910, 0.040]; +DEV_HIGHLIGHT["HmIPW-DRS8"]["16"] = [1, 0.205, 0.910, 0.040]; +DEV_HIGHLIGHT["HmIPW-DRS8"]["17"] = [1, 0.425, 0.910, 0.040]; +DEV_HIGHLIGHT["HmIPW-DRS8"]["18"] = [1, 0.425, 0.910, 0.040]; +DEV_HIGHLIGHT["HmIPW-DRS8"]["19"] = [1, 0.425, 0.910, 0.040]; +DEV_HIGHLIGHT["HmIPW-DRS8"]["20"] = [1, 0.425, 0.910, 0.040]; +DEV_HIGHLIGHT["HmIPW-DRS8"]["21"] = [1, 0.645, 0.900, 0.040]; +DEV_HIGHLIGHT["HmIPW-DRS8"]["22"] = [1, 0.645, 0.900, 0.040]; +DEV_HIGHLIGHT["HmIPW-DRS8"]["23"] = [1, 0.645, 0.900, 0.040]; +DEV_HIGHLIGHT["HmIPW-DRS8"]["24"] = [1, 0.645, 0.900, 0.040]; +DEV_HIGHLIGHT["HmIPW-DRS8"]["25"] = [1, 0.275, 0.242, 0.050]; +DEV_HIGHLIGHT["HmIPW-DRS8"]["26"] = [1, 0.275, 0.242, 0.050]; +DEV_HIGHLIGHT["HmIPW-DRS8"]["27"] = [1, 0.275, 0.242, 0.050]; +DEV_HIGHLIGHT["HmIPW-DRS8"]["28"] = [1, 0.275, 0.242, 0.050]; +DEV_HIGHLIGHT["HmIPW-DRS8"]["29"] = [1, 0.485, 0.230, 0.050]; +DEV_HIGHLIGHT["HmIPW-DRS8"]["30"] = [1, 0.485, 0.230, 0.050]; +DEV_HIGHLIGHT["HmIPW-DRS8"]["31"] = [1, 0.485, 0.230, 0.050]; +DEV_HIGHLIGHT["HmIPW-DRS8"]["32"] = [1, 0.485, 0.230, 0.050]; +DEV_LIST.push('263 158'); +DEV_DESCRIPTION["263 158"] = "263_158"; +DEV_PATHS["263 158"] = new Object(); +DEV_PATHS["263 158"]["50"] = "/config/img/devices/50/TH_CS_thumb.png"; +DEV_PATHS["263 158"]["250"] = "/config/img/devices/250/TH_CS.png"; +DEV_HIGHLIGHT["263 158"] = new Object(); +DEV_LIST.push('WS888'); +DEV_DESCRIPTION["WS888"] = "WS888"; +DEV_PATHS["WS888"] = new Object(); +DEV_PATHS["WS888"]["50"] = "/config/img/devices/50/9_hm-ws550-us_thumb.png"; +DEV_PATHS["WS888"]["250"] = "/config/img/devices/250/9_hm-ws550-us.png"; +DEV_HIGHLIGHT["WS888"] = new Object(); +DEV_HIGHLIGHT["WS888"]["1"] = [3, 0.440, 0.200, '1', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["WS888"]["2"] = [3, 0.440, 0.200, '2', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["WS888"]["3"] = [3, 0.440, 0.200, '3', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["WS888"]["4"] = [3, 0.440, 0.200, '4', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["WS888"]["5"] = [3, 0.440, 0.200, '5', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["WS888"]["6"] = [3, 0.440, 0.200, '6', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["WS888"]["7"] = [3, 0.440, 0.200, '7', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["WS888"]["8"] = [3, 0.440, 0.200, '8', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["WS888"]["9"] = [3, 0.440, 0.200, '9', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["WS888"]["10"] = [3, 0.405, 0.200, '10', 0.124, 'verdana', Font.BOLD]; +DEV_LIST.push('HM-LC-Bl1-FM-2'); +DEV_DESCRIPTION["HM-LC-Bl1-FM-2"] = "HM-LC-Bl1-FM"; +DEV_PATHS["HM-LC-Bl1-FM-2"] = new Object(); +DEV_PATHS["HM-LC-Bl1-FM-2"]["50"] = "/config/img/devices/50/7_hm-lc-bl1-fm_thumb.png"; +DEV_PATHS["HM-LC-Bl1-FM-2"]["250"] = "/config/img/devices/250/7_hm-lc-bl1-fm.png"; +DEV_HIGHLIGHT["HM-LC-Bl1-FM-2"] = new Object(); +DEV_LIST.push('HmIP-ASIR-B1'); +DEV_DESCRIPTION["HmIP-ASIR-B1"] = "HmIP-ASIR"; +DEV_PATHS["HmIP-ASIR-B1"] = new Object(); +DEV_PATHS["HmIP-ASIR-B1"]["50"] = "/config/img/devices/50/133_hmip-asir_thumb.png"; +DEV_PATHS["HmIP-ASIR-B1"]["250"] = "/config/img/devices/250/133_hmip-asir.png"; +DEV_HIGHLIGHT["HmIP-ASIR-B1"] = new Object(); +DEV_LIST.push('HM-LC-Dim1L-Pl-3'); +DEV_DESCRIPTION["HM-LC-Dim1L-Pl-3"] = "HM-LC-Dim1L-Pl-3"; +DEV_PATHS["HM-LC-Dim1L-Pl-3"] = new Object(); +DEV_PATHS["HM-LC-Dim1L-Pl-3"]["50"] = "/config/img/devices/50/OM55_DimmerSwitch_thumb.png"; +DEV_PATHS["HM-LC-Dim1L-Pl-3"]["250"] = "/config/img/devices/250/OM55_DimmerSwitch.png"; +DEV_HIGHLIGHT["HM-LC-Dim1L-Pl-3"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Dim1L-Pl-3"]["1_part1"] = [2, 0.548, 0.468, 0.072, 0.052]; +DEV_HIGHLIGHT["HM-LC-Dim1L-Pl-3"]["1_part2"] = [2, 0.612, 0.452, 0.028, 0.056]; +DEV_HIGHLIGHT["HM-LC-Dim1L-Pl-3"]["1"] = [5, '1_part1', '1_part2']; +DEV_LIST.push('HmIP-FCI6'); +DEV_DESCRIPTION["HmIP-FCI6"] = "HmIP-FCI6"; +DEV_PATHS["HmIP-FCI6"] = new Object(); +DEV_PATHS["HmIP-FCI6"]["50"] = "/config/img/devices/50/185_hmip-FCI6_thumb.png"; +DEV_PATHS["HmIP-FCI6"]["250"] = "/config/img/devices/250/185_hmip-FCI6.png"; +DEV_HIGHLIGHT["HmIP-FCI6"] = new Object(); +DEV_LIST.push('HMW-IO-12-Sw14-DR'); +DEV_DESCRIPTION["HMW-IO-12-Sw14-DR"] = "HMW-IO-12-Sw14-DR"; +DEV_PATHS["HMW-IO-12-Sw14-DR"] = new Object(); +DEV_PATHS["HMW-IO-12-Sw14-DR"]["50"] = "/config/img/devices/50/71_hmw-io-12-sw14-dr_thumb.png"; +DEV_PATHS["HMW-IO-12-Sw14-DR"]["250"] = "/config/img/devices/250/71_hmw-io-12-sw14-dr.png"; +DEV_HIGHLIGHT["HMW-IO-12-Sw14-DR"] = new Object(); +DEV_HIGHLIGHT["HMW-IO-12-Sw14-DR"]["1"] = [2, 0.106, 0.398, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw14-DR"]["2"] = [2, 0.230, 0.398, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw14-DR"]["3"] = [2, 0.294, 0.398, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw14-DR"]["4"] = [2, 0.422, 0.398, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw14-DR"]["5"] = [2, 0.482, 0.398, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw14-DR"]["6"] = [2, 0.602, 0.398, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw14-DR"]["7"] = [2, 0.046, 0.458, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw14-DR"]["8"] = [2, 0.106, 0.458, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw14-DR"]["9"] = [2, 0.230, 0.458, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw14-DR"]["10"] = [2, 0.294, 0.458, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw14-DR"]["11"] = [2, 0.422, 0.458, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw14-DR"]["12"] = [2, 0.482, 0.458, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw14-DR"]["13"] = [2, 0.602, 0.458, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw14-DR"]["14"] = [2, 0.666, 0.458, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw14-DR"]["15"] = [2, 0.230, 0.69, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw14-DR"]["16"] = [2, 0.294, 0.69, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw14-DR"]["17"] = [2, 0.422, 0.69, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw14-DR"]["18"] = [2, 0.482, 0.69, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw14-DR"]["19"] = [2, 0.602, 0.69, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw14-DR"]["20"] = [2, 0.666, 0.69, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw14-DR"]["21"] = [2, 0.230, 0.755, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw14-DR"]["22"] = [2, 0.294, 0.755, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw14-DR"]["23"] = [2, 0.422, 0.755, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw14-DR"]["24"] = [2, 0.482, 0.755, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw14-DR"]["25"] = [2, 0.602, 0.755, 0.06, 0.06]; +DEV_HIGHLIGHT["HMW-IO-12-Sw14-DR"]["26"] = [2, 0.666, 0.755, 0.06, 0.06]; +DEV_LIST.push('HmIP-WT'); +DEV_DESCRIPTION["HmIP-WT"] = "WT"; +DEV_PATHS["HmIP-WT"] = new Object(); +DEV_PATHS["HmIP-WT"]["50"] = "/config/img/devices/50/193_hmip-wt_thumb.png"; +DEV_PATHS["HmIP-WT"]["250"] = "/config/img/devices/250/193_hmip-wt.png"; +DEV_HIGHLIGHT["HmIP-WT"] = new Object(); +DEV_LIST.push('HmIP-RCV-50'); +DEV_DESCRIPTION["HmIP-RCV-50"] = "HmIP-RCV-50"; +DEV_PATHS["HmIP-RCV-50"] = new Object(); +DEV_PATHS["HmIP-RCV-50"]["50"] = "/config/img/devices/50/CCU3-1-50_thumb.png"; +DEV_PATHS["HmIP-RCV-50"]["250"] = "/config/img/devices/250/CCU3-1-50.png"; +DEV_HIGHLIGHT["HmIP-RCV-50"] = new Object(); +DEV_HIGHLIGHT["HmIP-RCV-50"]["RF_1"] = [4, 0.364, 0.048, 0.028, 0.028]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["RF_2"] = [6, 0.4, 0.052, 0.544, 0.004, 0.016]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["RF_3"] = [6, 0.4, 0.052, 0.6, 0.052, 0.016]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["RF_4"] = [6, 0.4, 0.052, 0.544, 0.104, 0.016]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["RF_5"] = [6, 0.168, 0.052, 0.344, 0.052, 0.016]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["RF_6"] = [6, 0.168, 0, 0.344, 0.052, 0.016]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["RF_7"] = [6, 0.168, 0.104, 0.344, 0.052, 0.016]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["RF"] = [5, 'RF_1', 'RF_2', 'RF_3', 'RF_4', 'RF_5', 'RF_6', 'RF_7']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S1"] = [3, 0.25, 0.57, '1', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S2"] = [3, 0.25, 0.57, '2', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S3"] = [3, 0.25, 0.57, '3', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S4"] = [3, 0.25, 0.57, '4', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S5"] = [3, 0.25, 0.57, '5', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S6"] = [3, 0.25, 0.57, '6', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S7"] = [3, 0.25, 0.57, '7', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S8"] = [3, 0.25, 0.57, '8', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S9"] = [3, 0.25, 0.57, '9', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S10"] = [3, 0.175, 0.57, '10', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S11"] = [3, 0.175, 0.57, '11', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S12"] = [3, 0.175, 0.57, '12', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S13"] = [3, 0.175, 0.57, '13', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S14"] = [3, 0.175, 0.57, '14', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S15"] = [3, 0.175, 0.57, '15', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S16"] = [3, 0.175, 0.57, '16', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S17"] = [3, 0.175, 0.57, '17', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S18"] = [3, 0.175, 0.57, '18', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S19"] = [3, 0.175, 0.57, '19', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S20"] = [3, 0.175, 0.57, '20', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S21"] = [3, 0.175, 0.57, '21', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S22"] = [3, 0.175, 0.57, '22', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S23"] = [3, 0.175, 0.57, '23', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S24"] = [3, 0.175, 0.57, '24', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S25"] = [3, 0.175, 0.57, '25', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S26"] = [3, 0.175, 0.57, '26', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S27"] = [3, 0.175, 0.57, '27', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S28"] = [3, 0.175, 0.57, '28', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S29"] = [3, 0.175, 0.57, '29', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S30"] = [3, 0.175, 0.57, '30', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S31"] = [3, 0.175, 0.57, '31', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S32"] = [3, 0.175, 0.57, '32', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S33"] = [3, 0.175, 0.57, '33', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S34"] = [3, 0.175, 0.57, '34', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S35"] = [3, 0.175, 0.57, '35', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S36"] = [3, 0.175, 0.57, '36', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S37"] = [3, 0.175, 0.57, '37', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S38"] = [3, 0.175, 0.57, '38', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S39"] = [3, 0.175, 0.57, '39', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S40"] = [3, 0.175, 0.57, '40', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S41"] = [3, 0.175, 0.57, '41', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S42"] = [3, 0.175, 0.57, '42', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S43"] = [3, 0.175, 0.57, '43', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S44"] = [3, 0.175, 0.57, '44', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S45"] = [3, 0.175, 0.57, '45', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S46"] = [3, 0.175, 0.57, '46', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S47"] = [3, 0.175, 0.57, '47', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S48"] = [3, 0.175, 0.57, '48', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S49"] = [3, 0.175, 0.57, '49', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["S50"] = [3, 0.175, 0.57, '50', 0.3, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HmIP-RCV-50"]["1"] = [5, 'S1']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["2"] = [5, 'S2']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["3"] = [5, 'S3']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["4"] = [5, 'S4']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["5"] = [5, 'S5']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["6"] = [5, 'S6']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["7"] = [5, 'S7']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["8"] = [5, 'S8']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["9"] = [5, 'S9']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["10"] = [5, 'S10']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["11"] = [5, 'S11']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["12"] = [5, 'S12']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["13"] = [5, 'S13']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["14"] = [5, 'S14']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["15"] = [5, 'S15']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["16"] = [5, 'S16']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["17"] = [5, 'S17']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["18"] = [5, 'S18']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["19"] = [5, 'S19']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["20"] = [5, 'S20']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["21"] = [5, 'S21']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["22"] = [5, 'S22']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["23"] = [5, 'S23']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["24"] = [5, 'S24']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["25"] = [5, 'S25']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["26"] = [5, 'S26']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["27"] = [5, 'S27']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["28"] = [5, 'S28']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["29"] = [5, 'S29']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["30"] = [5, 'S30']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["31"] = [5, 'S31']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["32"] = [5, 'S32']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["33"] = [5, 'S33']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["34"] = [5, 'S34']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["35"] = [5, 'S35']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["36"] = [5, 'S36']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["37"] = [5, 'S37']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["38"] = [5, 'S38']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["39"] = [5, 'S39']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["40"] = [5, 'S40']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["41"] = [5, 'S41']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["42"] = [5, 'S42']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["43"] = [5, 'S43']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["44"] = [5, 'S44']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["45"] = [5, 'S45']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["46"] = [5, 'S46']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["47"] = [5, 'S47']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["48"] = [5, 'S48']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["49"] = [5, 'S49']; +DEV_HIGHLIGHT["HmIP-RCV-50"]["50"] = [5, 'S50']; +DEV_LIST.push('HmIP-SMI55-A'); +DEV_DESCRIPTION["HmIP-SMI55-A"] = "HmIP-SMI55"; +DEV_PATHS["HmIP-SMI55-A"] = new Object(); +DEV_PATHS["HmIP-SMI55-A"]["50"] = "/config/img/devices/50/168_hmip-smi55_thumb.png"; +DEV_PATHS["HmIP-SMI55-A"]["250"] = "/config/img/devices/250/168_hmip-smi55.png"; +DEV_HIGHLIGHT["HmIP-SMI55-A"] = new Object(); +DEV_HIGHLIGHT["HmIP-SMI55-A"]["2"] = [4, 0.540, 0.188, 0.04, 0.044]; +DEV_HIGHLIGHT["HmIP-SMI55-A"]["1"] = [4, 0.540, 0.820, 0.04, 0.044]; +DEV_LIST.push('ELV-SH-SW1-BAT'); +DEV_DESCRIPTION["ELV-SH-SW1-BAT"] = "HmIP-PCBS-BAT"; +DEV_PATHS["ELV-SH-SW1-BAT"] = new Object(); +DEV_PATHS["ELV-SH-SW1-BAT"]["50"] = "/config/img/devices/50/228_elv-sh-sw1-bat_thumb.png"; +DEV_PATHS["ELV-SH-SW1-BAT"]["250"] = "/config/img/devices/250/228_elv-sh-sw1-bat.png"; +DEV_HIGHLIGHT["ELV-SH-SW1-BAT"] = new Object(); +DEV_LIST.push('Wired-LAN-Sniffer'); +DEV_DESCRIPTION["Wired-LAN-Sniffer"] = "Wired-LAN-Sniffer"; +DEV_PATHS["Wired-LAN-Sniffer"] = new Object(); +DEV_PATHS["Wired-LAN-Sniffer"]["50"] = "/config/img/devices/50/162_hmipw-drap_thumb.png"; +DEV_PATHS["Wired-LAN-Sniffer"]["250"] = "/config/img/devices/250/162_hmipw-drap.png"; +DEV_HIGHLIGHT["Wired-LAN-Sniffer"] = new Object(); +DEV_LIST.push('HM-Sec-SD-2'); +DEV_DESCRIPTION["HM-Sec-SD-2"] = "HM-Sec-SD"; +DEV_PATHS["HM-Sec-SD-2"] = new Object(); +DEV_PATHS["HM-Sec-SD-2"]["50"] = "/config/img/devices/50/104_hm-sec-sd-2_thumb.png"; +DEV_PATHS["HM-Sec-SD-2"]["250"] = "/config/img/devices/250/104_hm-sec-sd-2.png"; +DEV_HIGHLIGHT["HM-Sec-SD-2"] = new Object(); +DEV_LIST.push('HM-Sec-SC'); +DEV_DESCRIPTION["HM-Sec-SC"] = "HM-Sec-SC"; +DEV_PATHS["HM-Sec-SC"] = new Object(); +DEV_PATHS["HM-Sec-SC"]["50"] = "/config/img/devices/50/16_hm-sec-sc_thumb.png"; +DEV_PATHS["HM-Sec-SC"]["250"] = "/config/img/devices/250/16_hm-sec-sc.png"; +DEV_HIGHLIGHT["HM-Sec-SC"] = new Object(); +DEV_LIST.push('HMW-LC-Sw2-DR'); +DEV_DESCRIPTION["HMW-LC-Sw2-DR"] = "HMW-LC-Sw2-DR"; +DEV_PATHS["HMW-LC-Sw2-DR"] = new Object(); +DEV_PATHS["HMW-LC-Sw2-DR"]["50"] = "/config/img/devices/50/26_hmw-lc-sw2-dr_thumb.png"; +DEV_PATHS["HMW-LC-Sw2-DR"]["250"] = "/config/img/devices/250/26_hmw-lc-sw2-dr.png"; +DEV_HIGHLIGHT["HMW-LC-Sw2-DR"] = new Object(); +DEV_HIGHLIGHT["HMW-LC-Sw2-DR"]["1"] = [2, 0.448, 0.764, 0.048, 0.064]; +DEV_HIGHLIGHT["HMW-LC-Sw2-DR"]["2"] = [2, 0.496, 0.764, 0.052, 0.068]; +DEV_HIGHLIGHT["HMW-LC-Sw2-DR"]["3"] = [2, 0.232, 0.384, 0.104, 0.068]; +DEV_HIGHLIGHT["HMW-LC-Sw2-DR"]["4"] = [2, 0.448, 0.384, 0.104, 0.068]; +DEV_LIST.push('HM-LC-Bl1-SM'); +DEV_DESCRIPTION["HM-LC-Bl1-SM"] = "HM-LC-Bl1-SM"; +DEV_PATHS["HM-LC-Bl1-SM"] = new Object(); +DEV_PATHS["HM-LC-Bl1-SM"]["50"] = "/config/img/devices/50/6_hm-lc-bl1-sm_thumb.png"; +DEV_PATHS["HM-LC-Bl1-SM"]["250"] = "/config/img/devices/250/6_hm-lc-bl1-sm.png"; +DEV_HIGHLIGHT["HM-LC-Bl1-SM"] = new Object(); +DEV_LIST.push('HmIP-HAP-A'); +DEV_DESCRIPTION["HmIP-HAP-A"] = "HmIP-HAP"; +DEV_PATHS["HmIP-HAP-A"] = new Object(); +DEV_PATHS["HmIP-HAP-A"]["50"] = "/config/img/devices/50/CCU3_thumb.png"; +DEV_PATHS["HmIP-HAP-A"]["250"] = "/config/img/devices/250/CCU3.png"; +DEV_HIGHLIGHT["HmIP-HAP-A"] = new Object(); +DEV_LIST.push('HmIP-PSM-2'); +DEV_DESCRIPTION["HmIP-PSM-2"] = "PSM"; +DEV_PATHS["HmIP-PSM-2"] = new Object(); +DEV_PATHS["HmIP-PSM-2"]["50"] = "/config/img/devices/50/113_hmip-psm_thumb.png"; +DEV_PATHS["HmIP-PSM-2"]["250"] = "/config/img/devices/250/113_hmip-psm.png"; +DEV_HIGHLIGHT["HmIP-PSM-2"] = new Object(); +DEV_LIST.push('HM-LC-Dim1T-FM-2'); +DEV_DESCRIPTION["HM-LC-Dim1T-FM-2"] = "HM-LC-Dim1T-FM"; +DEV_PATHS["HM-LC-Dim1T-FM-2"] = new Object(); +DEV_PATHS["HM-LC-Dim1T-FM-2"]["50"] = "/config/img/devices/50/65_hm-lc-dim1t-fm_thumb.png"; +DEV_PATHS["HM-LC-Dim1T-FM-2"]["250"] = "/config/img/devices/250/65_hm-lc-dim1t-fm.png"; +DEV_HIGHLIGHT["HM-LC-Dim1T-FM-2"] = new Object(); +DEV_LIST.push('HmIP-SMO-A'); +DEV_DESCRIPTION["HmIP-SMO-A"] = "SMO"; +DEV_PATHS["HmIP-SMO-A"] = new Object(); +DEV_PATHS["HmIP-SMO-A"]["50"] = "/config/img/devices/50/132_hmip-smo_thumb.png"; +DEV_PATHS["HmIP-SMO-A"]["250"] = "/config/img/devices/250/132_hmip-smo.png"; +DEV_HIGHLIGHT["HmIP-SMO-A"] = new Object(); +DEV_LIST.push('HmIP-SWDO-2'); +DEV_DESCRIPTION["HmIP-SWDO-2"] = "HmIP-SWDO"; +DEV_PATHS["HmIP-SWDO-2"] = new Object(); +DEV_PATHS["HmIP-SWDO-2"]["50"] = "/config/img/devices/50/118_hmip-swdo_thumb.png"; +DEV_PATHS["HmIP-SWDO-2"]["250"] = "/config/img/devices/250/118_hmip-swdo.png"; +DEV_HIGHLIGHT["HmIP-SWDO-2"] = new Object(); +DEV_LIST.push('HmIP-SWO-PL'); +DEV_DESCRIPTION["HmIP-SWO-PL"] = "HmIP-SWO-PL"; +DEV_PATHS["HmIP-SWO-PL"] = new Object(); +DEV_PATHS["HmIP-SWO-PL"]["50"] = "/config/img/devices/50/170_hmip-swo-pl_thumb.png"; +DEV_PATHS["HmIP-SWO-PL"]["250"] = "/config/img/devices/250/170_hmip-swo-pl.png"; +DEV_HIGHLIGHT["HmIP-SWO-PL"] = new Object(); +DEV_LIST.push('HM-PB-4Dis-WM-2'); +DEV_DESCRIPTION["HM-PB-4Dis-WM-2"] = "HM-PB-4Dis-WM-2"; +DEV_PATHS["HM-PB-4Dis-WM-2"] = new Object(); +DEV_PATHS["HM-PB-4Dis-WM-2"]["50"] = "/config/img/devices/50/70_hm-pb-4dis-wm_thumb.png"; +DEV_PATHS["HM-PB-4Dis-WM-2"]["250"] = "/config/img/devices/250/70_hm-pb-4dis-wm.png"; +DEV_HIGHLIGHT["HM-PB-4Dis-WM-2"] = new Object(); +DEV_HIGHLIGHT["HM-PB-4Dis-WM-2"]["2"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM-2"]["1"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM-2"]["4"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM-2"]["3"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM-2"]["6"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM-2"]["5"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM-2"]["8"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM-2"]["7"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM-2"]["10"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM-2"]["9"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM-2"]["12"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM-2"]["11"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM-2"]["14"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM-2"]["13"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM-2"]["16"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM-2"]["15"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM-2"]["18"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM-2"]["17"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM-2"]["20"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["HM-PB-4Dis-WM-2"]["19"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_LIST.push('HM-LC-Dim1L-Pl'); +DEV_DESCRIPTION["HM-LC-Dim1L-Pl"] = "HM-LC-Dim1L-Pl"; +DEV_PATHS["HM-LC-Dim1L-Pl"] = new Object(); +DEV_PATHS["HM-LC-Dim1L-Pl"]["50"] = "/config/img/devices/50/OM55_DimmerSwitch_thumb.png"; +DEV_PATHS["HM-LC-Dim1L-Pl"]["250"] = "/config/img/devices/250/OM55_DimmerSwitch.png"; +DEV_HIGHLIGHT["HM-LC-Dim1L-Pl"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Dim1L-Pl"]["1_part1"] = [2, 0.548, 0.468, 0.072, 0.052]; +DEV_HIGHLIGHT["HM-LC-Dim1L-Pl"]["1_part2"] = [2, 0.612, 0.452, 0.028, 0.056]; +DEV_HIGHLIGHT["HM-LC-Dim1L-Pl"]["1"] = [5, '1_part1', '1_part2']; +DEV_LIST.push('HmIP-DRDI3'); +DEV_DESCRIPTION["HmIP-DRDI3"] = "HmIP-DRDI3"; +DEV_PATHS["HmIP-DRDI3"] = new Object(); +DEV_PATHS["HmIP-DRDI3"]["50"] = "/config/img/devices/50/204_hmip-drdi3_thumb.png"; +DEV_PATHS["HmIP-DRDI3"]["250"] = "/config/img/devices/250/204_hmip-drdi3.png"; +DEV_HIGHLIGHT["HmIP-DRDI3"] = new Object(); +DEV_LIST.push('HmIP-PDT'); +DEV_DESCRIPTION["HmIP-PDT"] = "PDT"; +DEV_PATHS["HmIP-PDT"] = new Object(); +DEV_PATHS["HmIP-PDT"]["50"] = "/config/img/devices/50/113_hmip-psm_thumb.png"; +DEV_PATHS["HmIP-PDT"]["250"] = "/config/img/devices/250/113_hmip-psm.png"; +DEV_HIGHLIGHT["HmIP-PDT"] = new Object(); +DEV_LIST.push('HmIP-BROLL-2'); +DEV_DESCRIPTION["HmIP-BROLL-2"] = "HmIP-BROLL-2"; +DEV_PATHS["HmIP-BROLL-2"] = new Object(); +DEV_PATHS["HmIP-BROLL-2"]["50"] = "/config/img/devices/50/PushButton-2ch-wm_thumb.png"; +DEV_PATHS["HmIP-BROLL-2"]["250"] = "/config/img/devices/250/PushButton-2ch-wm.png"; +DEV_HIGHLIGHT["HmIP-BROLL-2"] = new Object(); +DEV_HIGHLIGHT["HmIP-BROLL-2"]["2"] = [2, 0.244, 0.312, 0.428, 0.168]; +DEV_HIGHLIGHT["HmIP-BROLL-2"]["1"] = [2, 0.244, 0.56, 0.428, 0.168]; +DEV_HIGHLIGHT["HmIP-BROLL-2"]["1+2"] = [2, 0.244, 0.308, 0.428, 0.416]; +DEV_LIST.push('HM-Sec-WDS'); +DEV_DESCRIPTION["HM-Sec-WDS"] = "HM-Sec-WDS"; +DEV_PATHS["HM-Sec-WDS"] = new Object(); +DEV_PATHS["HM-Sec-WDS"]["50"] = "/config/img/devices/50/49_hm-sec-wds_thumb.png"; +DEV_PATHS["HM-Sec-WDS"]["250"] = "/config/img/devices/250/49_hm-sec-wds.png"; +DEV_HIGHLIGHT["HM-Sec-WDS"] = new Object(); +DEV_LIST.push('HmIP-eTRV-3'); +DEV_DESCRIPTION["HmIP-eTRV-3"] = "TRV"; +DEV_PATHS["HmIP-eTRV-3"] = new Object(); +DEV_PATHS["HmIP-eTRV-3"]["50"] = "/config/img/devices/50/234_hmip-etrv-3_thumb.png"; +DEV_PATHS["HmIP-eTRV-3"]["250"] = "/config/img/devices/250/234_hmip-etrv-3.png"; +DEV_HIGHLIGHT["HmIP-eTRV-3"] = new Object(); +DEV_LIST.push('HM-CC-SCD'); +DEV_DESCRIPTION["HM-CC-SCD"] = "HM-CC-SCD"; +DEV_PATHS["HM-CC-SCD"] = new Object(); +DEV_PATHS["HM-CC-SCD"]["50"] = "/config/img/devices/50/57_hm-cc-scd_thumb.png"; +DEV_PATHS["HM-CC-SCD"]["250"] = "/config/img/devices/250/57_hm-cc-scd.png"; +DEV_HIGHLIGHT["HM-CC-SCD"] = new Object(); +DEV_LIST.push('HM-LC-Dim1T-CV'); +DEV_DESCRIPTION["HM-LC-Dim1T-CV"] = "HM-LC-Dim1T-CV"; +DEV_PATHS["HM-LC-Dim1T-CV"] = new Object(); +DEV_PATHS["HM-LC-Dim1T-CV"]["50"] = "/config/img/devices/50/66_hm-lc-dim1t-cv_thumb.png"; +DEV_PATHS["HM-LC-Dim1T-CV"]["250"] = "/config/img/devices/250/66_hm-lc-dim1t-cv.png"; +DEV_HIGHLIGHT["HM-LC-Dim1T-CV"] = new Object(); +DEV_LIST.push('HM-LC-Dim1T-Pl'); +DEV_DESCRIPTION["HM-LC-Dim1T-Pl"] = "HM-LC-Dim1T-Pl"; +DEV_PATHS["HM-LC-Dim1T-Pl"] = new Object(); +DEV_PATHS["HM-LC-Dim1T-Pl"]["50"] = "/config/img/devices/50/OM55_DimmerSwitch_thumb.png"; +DEV_PATHS["HM-LC-Dim1T-Pl"]["250"] = "/config/img/devices/250/OM55_DimmerSwitch.png"; +DEV_HIGHLIGHT["HM-LC-Dim1T-Pl"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Dim1T-Pl"]["1_part1"] = [2, 0.548, 0.468, 0.072, 0.052]; +DEV_HIGHLIGHT["HM-LC-Dim1T-Pl"]["1_part2"] = [2, 0.612, 0.452, 0.028, 0.056]; +DEV_HIGHLIGHT["HM-LC-Dim1T-Pl"]["1"] = [5, '1_part1', '1_part2']; +DEV_LIST.push('HmIP-DRG-DALI'); +DEV_DESCRIPTION["HmIP-DRG-DALI"] = "HmIP-DRG-DALI"; +DEV_PATHS["HmIP-DRG-DALI"] = new Object(); +DEV_PATHS["HmIP-DRG-DALI"]["50"] = "/config/img/devices/50/211_hmip-drg-dali_thumb.png"; +DEV_PATHS["HmIP-DRG-DALI"]["250"] = "/config/img/devices/250/211_hmip-drg-dali.png"; +DEV_HIGHLIGHT["HmIP-DRG-DALI"] = new Object(); +DEV_LIST.push('HM-LC-Dim2T-SM-644'); +DEV_DESCRIPTION["HM-LC-Dim2T-SM-644"] = "HM-LC-Dim2T-SM"; +DEV_PATHS["HM-LC-Dim2T-SM-644"] = new Object(); +DEV_PATHS["HM-LC-Dim2T-SM-644"]["50"] = "/config/img/devices/50/64_hm-lc-dim2T-sm_thumb.png"; +DEV_PATHS["HM-LC-Dim2T-SM-644"]["250"] = "/config/img/devices/250/64_hm-lc-dim2T-sm.png"; +DEV_HIGHLIGHT["HM-LC-Dim2T-SM-644"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Dim2T-SM-644"]["1_Part1"] = [6, 0.539, 0.864, 0.539, 0.948, 0.012]; +DEV_HIGHLIGHT["HM-LC-Dim2T-SM-644"]["1_Part2"] = [6, 0.539, 0.948, 0.49, 0.884, 0.012]; +DEV_HIGHLIGHT["HM-LC-Dim2T-SM-644"]["1_Part3"] = [6, 0.539, 0.948, 0.588, 0.884, 0.012]; +DEV_HIGHLIGHT["HM-LC-Dim2T-SM-644"]["1_Arrow"] = [5, '1_Part1', '1_Part2', '1_Part3']; +DEV_HIGHLIGHT["HM-LC-Dim2T-SM-644"]["2_Arrow"] = [7, '1_Arrow', 0.179, 0]; +DEV_HIGHLIGHT["HM-LC-Dim2T-SM-644"]["1_Key"] = [4, 0.25, 0.26, 0.04, 0.044]; +DEV_HIGHLIGHT["HM-LC-Dim2T-SM-644"]["2_Key"] = [4, 0.328, 0.26, 0.04, 0.044]; +DEV_HIGHLIGHT["HM-LC-Dim2T-SM-644"]["1"] = [5, '1_Arrow', '1_Key']; +DEV_HIGHLIGHT["HM-LC-Dim2T-SM-644"]["2"] = [5, '2_Arrow', '2_Key']; +DEV_LIST.push('HmIP-KRCK'); +DEV_DESCRIPTION["HmIP-KRCK"] = "HmIP-KRCK"; +DEV_PATHS["HmIP-KRCK"] = new Object(); +DEV_PATHS["HmIP-KRCK"]["50"] = "/config/img/devices/50/84_hm-rc-4-x_thumb.png"; +DEV_PATHS["HmIP-KRCK"]["250"] = "/config/img/devices/250/86_hm-rc-key4-3.png"; +DEV_HIGHLIGHT["HmIP-KRCK"] = new Object(); +DEV_HIGHLIGHT["HmIP-KRCK"]["arrow_part1"] = [6, 0.312, 0.288, 0.416, 0.288, 0.012]; +DEV_HIGHLIGHT["HmIP-KRCK"]["arrow_part2"] = [6, 0.312, 0.288, 0.352, 0.248, 0.012]; +DEV_HIGHLIGHT["HmIP-KRCK"]["arrow_part3"] = [6, 0.312, 0.288, 0.352, 0.328, 0.012]; +DEV_HIGHLIGHT["HmIP-KRCK"]["Arrow"] = [5, 'arrow_part1', 'arrow_part2', 'arrow_part3']; +DEV_HIGHLIGHT["HmIP-KRCK"]["1_Arrow"] = [7, 'Arrow', 0.25, 0.0]; +DEV_HIGHLIGHT["HmIP-KRCK"]["2_Arrow"] = [7, 'Arrow', 0.238, 0.156]; +DEV_HIGHLIGHT["HmIP-KRCK"]["3_Arrow"] = [7, 'Arrow', 0.228, 0.312]; +DEV_HIGHLIGHT["HmIP-KRCK"]["4_Arrow"] = [7, 'Arrow', 0.212, 0.468]; +DEV_HIGHLIGHT["HmIP-KRCK"]["1"] = [5, '2_Arrow']; +DEV_HIGHLIGHT["HmIP-KRCK"]["2"] = [5, '1_Arrow']; +DEV_HIGHLIGHT["HmIP-KRCK"]["3"] = [5, '4_Arrow']; +DEV_HIGHLIGHT["HmIP-KRCK"]["4"] = [5, '3_Arrow']; +DEV_HIGHLIGHT["HmIP-KRCK"]["1+2"] = [5, '1_Arrow', '2_Arrow']; +DEV_HIGHLIGHT["HmIP-KRCK"]["3+4"] = [5, '3_Arrow', '4_Arrow']; +DEV_LIST.push('HMW-Sen-SC-12-FM'); +DEV_DESCRIPTION["HMW-Sen-SC-12-FM"] = "HMW-Sen-SC-12-FM"; +DEV_PATHS["HMW-Sen-SC-12-FM"] = new Object(); +DEV_PATHS["HMW-Sen-SC-12-FM"]["50"] = "/config/img/devices/50/58_hmw-sen-sc-12-fm_thumb.png"; +DEV_PATHS["HMW-Sen-SC-12-FM"]["250"] = "/config/img/devices/250/58_hmw-sen-sc-12-fm.png"; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"] = new Object(); +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["1_num"] = [3, 0.744, 0.636, '1', 0.164, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["1_line"] = [6, 0.77, 0.055, 0.860, 0.055, 0.016]; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["1"] = [5, '1_num', '1_line']; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["2_num"] = [3, 0.744, 0.636, '2', 0.164, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["2_line"] = [6, 0.77, 0.115, 0.86, 0.115, 0.016]; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["2"] = [5, '2_num', '2_line']; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["3_num"] = [3, 0.744, 0.636, '3', 0.164, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["3_line"] = [6, 0.77, 0.173, 0.86, 0.173, 0.016]; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["3"] = [5, '3_num', '3_line']; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["4_num"] = [3, 0.744, 0.636, '4', 0.164, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["4_line"] = [6, 0.77, 0.226, 0.86, 0.226, 0.016]; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["4"] = [5, '4_num', '4_line']; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["5_num"] = [3, 0.744, 0.636, '5', 0.164, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["5_line"] = [6, 0.77, 0.288, 0.86, 0.288, 0.016]; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["5"] = [5, '5_num', '5_line']; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["6_num"] = [3, 0.744, 0.636, '6', 0.164, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["6_line"] = [6, 0.77, 0.348, 0.86, 0.348, 0.016]; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["6"] = [5, '6_num', '6_line']; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["7_num"] = [3, 0.744, 0.636, '7', 0.164, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["7_line"] = [6, 0.77, 0.403, 0.86, 0.403, 0.016]; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["7"] = [5, '7_num', '7_line']; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["8_num"] = [3, 0.744, 0.636, '8', 0.164, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["8_arc"] = [4, 0.370, 0.730, 0.036, 0.036, 0.036]; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["8"] = [5, '8_num', '8_arc']; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["9_num"] = [3, 0.744, 0.636, '9', 0.164, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["9_arc"] = [4, 0.3895, 0.685, 0.036, 0.036, 0.0368]; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["9"] = [5, '9_num', '9_arc']; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["10_num"] = [3, 0.744, 0.636, '10', 0.164, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["10_arc"] = [4, 0.41, 0.64, 0.036, 0.036, 0.036]; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["10"] = [5, '10_num', '10_arc']; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["11_num"] = [3, 0.744, 0.636, '11', 0.164, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["11_arc"] = [4, 0.43, 0.589, 0.036, 0.036, 0.036]; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["11"] = [5, '11_num', '11_arc']; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["12_num"] = [3, 0.744, 0.636, '12', 0.164, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["12_arc"] = [4, 0.45, 0.542, 0.036, 0.036, 0.036]; +DEV_HIGHLIGHT["HMW-Sen-SC-12-FM"]["12"] = [5, '12_num', '12_arc']; +DEV_LIST.push('HM-RC-Key3-B'); +DEV_DESCRIPTION["HM-RC-Key3-B"] = "HM-RC-Key3-B"; +DEV_PATHS["HM-RC-Key3-B"] = new Object(); +DEV_PATHS["HM-RC-Key3-B"]["50"] = "/config/img/devices/50/23_hm-rc-key3-b_thumb.png"; +DEV_PATHS["HM-RC-Key3-B"]["250"] = "/config/img/devices/250/23_hm-rc-key3-b.png"; +DEV_HIGHLIGHT["HM-RC-Key3-B"] = new Object(); +DEV_HIGHLIGHT["HM-RC-Key3-B"]["1"] = [4, 0.252, 0.2, 0.16, 0.18]; +DEV_HIGHLIGHT["HM-RC-Key3-B"]["2"] = [4, 0.492, 0.2, 0.16, 0.18]; +DEV_HIGHLIGHT["HM-RC-Key3-B"]["3"] = [4, 0.34, 0.484, 0.228, 0.252]; +DEV_HIGHLIGHT["HM-RC-Key3-B"]["1+2"] = [5, '1', '2']; +DEV_LIST.push('HM-LC-DW-WM'); +DEV_DESCRIPTION["HM-LC-DW-WM"] = "HM-LC-DW-WM"; +DEV_PATHS["HM-LC-DW-WM"] = new Object(); +DEV_PATHS["HM-LC-DW-WM"]["50"] = "/config/img/devices/50/150_hm-lc-dw-wm_thumb.png"; +DEV_PATHS["HM-LC-DW-WM"]["250"] = "/config/img/devices/250/150_hm-lc-dw-wm.png"; +DEV_HIGHLIGHT["HM-LC-DW-WM"] = new Object(); +DEV_LIST.push('HmIP-eTRV-B-UK-2'); +DEV_DESCRIPTION["HmIP-eTRV-B-UK-2"] = "TRV-B-UK"; +DEV_PATHS["HmIP-eTRV-B-UK-2"] = new Object(); +DEV_PATHS["HmIP-eTRV-B-UK-2"]["50"] = "/config/img/devices/50/209_hmip-etrv-b-uk_thumb.png"; +DEV_PATHS["HmIP-eTRV-B-UK-2"]["250"] = "/config/img/devices/250/209_hmip-etrv-b-uk.png"; +DEV_HIGHLIGHT["HmIP-eTRV-B-UK-2"] = new Object(); +DEV_LIST.push('HM-RC-Key4-2'); +DEV_DESCRIPTION["HM-RC-Key4-2"] = "HM-RC-Key4-2"; +DEV_PATHS["HM-RC-Key4-2"] = new Object(); +DEV_PATHS["HM-RC-Key4-2"]["50"] = "/config/img/devices/50/85_hm-rc-key4-2_thumb.png"; +DEV_PATHS["HM-RC-Key4-2"]["250"] = "/config/img/devices/250/85_hm-rc-key4-2.png"; +DEV_HIGHLIGHT["HM-RC-Key4-2"] = new Object(); +DEV_HIGHLIGHT["HM-RC-Key4-2"]["arrow_part1"] = [6, 0.312, 0.288, 0.416, 0.288, 0.012]; +DEV_HIGHLIGHT["HM-RC-Key4-2"]["arrow_part2"] = [6, 0.312, 0.288, 0.352, 0.248, 0.012]; +DEV_HIGHLIGHT["HM-RC-Key4-2"]["arrow_part3"] = [6, 0.312, 0.288, 0.352, 0.328, 0.012]; +DEV_HIGHLIGHT["HM-RC-Key4-2"]["1_Arrow"] = [5, 'arrow_part1', 'arrow_part2', 'arrow_part3']; +DEV_HIGHLIGHT["HM-RC-Key4-2"]["2_Arrow"] = [7, '1_Arrow', 0.028, 0.156]; +DEV_HIGHLIGHT["HM-RC-Key4-2"]["3_Arrow"] = [7, '1_Arrow', 0.028, 0.312]; +DEV_HIGHLIGHT["HM-RC-Key4-2"]["4_Arrow"] = [7, '1_Arrow', 0.012, 0.468]; +DEV_HIGHLIGHT["HM-RC-Key4-2"]["1"] = [5, '2_Arrow']; +DEV_HIGHLIGHT["HM-RC-Key4-2"]["2"] = [5, '1_Arrow']; +DEV_HIGHLIGHT["HM-RC-Key4-2"]["3"] = [5, '4_Arrow']; +DEV_HIGHLIGHT["HM-RC-Key4-2"]["4"] = [5, '3_Arrow']; +DEV_HIGHLIGHT["HM-RC-Key4-2"]["1+2"] = [5, '1_Arrow', '2_Arrow']; +DEV_HIGHLIGHT["HM-RC-Key4-2"]["3+4"] = [5, '3_Arrow', '4_Arrow']; +DEV_LIST.push('HmIP-PSM-CH'); +DEV_DESCRIPTION["HmIP-PSM-CH"] = "PSM-CH"; +DEV_PATHS["HmIP-PSM-CH"] = new Object(); +DEV_PATHS["HmIP-PSM-CH"]["50"] = "/config/img/devices/50/113_hmip-psm-ch_thumb.png"; +DEV_PATHS["HmIP-PSM-CH"]["250"] = "/config/img/devices/250/113_hmip-psm-ch.png"; +DEV_HIGHLIGHT["HmIP-PSM-CH"] = new Object(); +DEV_LIST.push('HM-LC-Dim1T-DR'); +DEV_DESCRIPTION["HM-LC-Dim1T-DR"] = "HM-LC-Dim1T-DR"; +DEV_PATHS["HM-LC-Dim1T-DR"] = new Object(); +DEV_PATHS["HM-LC-Dim1T-DR"]["50"] = "/config/img/devices/50/143_hm-lc-dim1t-dr_thumb.png"; +DEV_PATHS["HM-LC-Dim1T-DR"]["250"] = "/config/img/devices/250/143_hm-lc-dim1t-dr.png"; +DEV_HIGHLIGHT["HM-LC-Dim1T-DR"] = new Object(); +DEV_LIST.push('HM-LC-Sw1-SM-ATmega168'); +DEV_DESCRIPTION["HM-LC-Sw1-SM-ATmega168"] = "HM-LC-Sw1-SM-ATmega168"; +DEV_PATHS["HM-LC-Sw1-SM-ATmega168"] = new Object(); +DEV_PATHS["HM-LC-Sw1-SM-ATmega168"]["50"] = "/config/img/devices/50/8_hm-lc-sw1-sm_thumb.png"; +DEV_PATHS["HM-LC-Sw1-SM-ATmega168"]["250"] = "/config/img/devices/250/8_hm-lc-sw1-sm.png"; +DEV_HIGHLIGHT["HM-LC-Sw1-SM-ATmega168"] = new Object(); +DEV_LIST.push('HM-LC-Sw4-PCB-2'); +DEV_DESCRIPTION["HM-LC-Sw4-PCB-2"] = "HM-LC-Sw4-PCB"; +DEV_PATHS["HM-LC-Sw4-PCB-2"] = new Object(); +DEV_PATHS["HM-LC-Sw4-PCB-2"]["50"] = "/config/img/devices/50/46_hm-lc-sw4-pcb_thumb.png"; +DEV_PATHS["HM-LC-Sw4-PCB-2"]["250"] = "/config/img/devices/250/46_hm-lc-sw4-pcb.png"; +DEV_HIGHLIGHT["HM-LC-Sw4-PCB-2"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Sw4-PCB-2"]["Channel1"] = [2, 0.176, 0.78, 0.068, 0.064]; +DEV_HIGHLIGHT["HM-LC-Sw4-PCB-2"]["Channel2"] = [2, 0.244, 0.78, 0.068, 0.064]; +DEV_HIGHLIGHT["HM-LC-Sw4-PCB-2"]["Channel3"] = [2, 0.312, 0.78, 0.068, 0.064]; +DEV_HIGHLIGHT["HM-LC-Sw4-PCB-2"]["Channel4"] = [2, 0.38, 0.78, 0.068, 0.064]; +DEV_HIGHLIGHT["HM-LC-Sw4-PCB-2"]["1_val"] = [3, 0.372, 0.288, '1', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-LC-Sw4-PCB-2"]["2_val"] = [3, 0.372, 0.288, '2', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-LC-Sw4-PCB-2"]["3_val"] = [3, 0.372, 0.288, '3', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-LC-Sw4-PCB-2"]["4_val"] = [3, 0.372, 0.288, '4', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-LC-Sw4-PCB-2"]["Circle1"] = [4, 0.512, 0.784, 0.044, 0.044]; +DEV_HIGHLIGHT["HM-LC-Sw4-PCB-2"]["Circle2"] = [4, 0.570, 0.784, 0.044, 0.044]; +DEV_HIGHLIGHT["HM-LC-Sw4-PCB-2"]["Circle3"] = [4, 0.628, 0.784, 0.044, 0.044]; +DEV_HIGHLIGHT["HM-LC-Sw4-PCB-2"]["Circle4"] = [4, 0.686, 0.784, 0.044, 0.044]; +DEV_HIGHLIGHT["HM-LC-Sw4-PCB-2"]["1"] = [5, 'Channel1', '1_val', 'Circle1']; +DEV_HIGHLIGHT["HM-LC-Sw4-PCB-2"]["2"] = [5, 'Channel2', '2_val', 'Circle2']; +DEV_HIGHLIGHT["HM-LC-Sw4-PCB-2"]["3"] = [5, 'Channel3', '3_val', 'Circle3']; +DEV_HIGHLIGHT["HM-LC-Sw4-PCB-2"]["4"] = [5, 'Channel4', '4_val', 'Circle4']; +DEV_LIST.push('HmIP-SWO-B'); +DEV_DESCRIPTION["HmIP-SWO-B"] = "HmIP-SWO-B"; +DEV_PATHS["HmIP-SWO-B"] = new Object(); +DEV_PATHS["HmIP-SWO-B"]["50"] = "/config/img/devices/50/171_hmip-swo-b_thumb.png"; +DEV_PATHS["HmIP-SWO-B"]["250"] = "/config/img/devices/250/171_hmip-swo-b.png"; +DEV_HIGHLIGHT["HmIP-SWO-B"] = new Object(); +DEV_LIST.push('HMW-Sys-PS7-DR'); +DEV_DESCRIPTION["HMW-Sys-PS7-DR"] = "HMW-Sys-PS7-DR"; +DEV_PATHS["HMW-Sys-PS7-DR"] = new Object(); +DEV_PATHS["HMW-Sys-PS7-DR"]["50"] = "/config/img/devices/50/36_hmw-sys-ps7-dr_thumb.png"; +DEV_PATHS["HMW-Sys-PS7-DR"]["250"] = "/config/img/devices/250/36_hmw-sys-ps7-dr.png"; +DEV_HIGHLIGHT["HMW-Sys-PS7-DR"] = new Object(); +DEV_LIST.push('HmIP-SMO-2'); +DEV_DESCRIPTION["HmIP-SMO-2"] = "SMO"; +DEV_PATHS["HmIP-SMO-2"] = new Object(); +DEV_PATHS["HmIP-SMO-2"]["50"] = "/config/img/devices/50/132_hmip-smo_thumb.png"; +DEV_PATHS["HmIP-SMO-2"]["250"] = "/config/img/devices/250/132_hmip-smo.png"; +DEV_HIGHLIGHT["HmIP-SMO-2"] = new Object(); +DEV_LIST.push('HmIPW-DRD3'); +DEV_DESCRIPTION["HmIPW-DRD3"] = "HmIPW-DRD3"; +DEV_PATHS["HmIPW-DRD3"] = new Object(); +DEV_PATHS["HmIPW-DRD3"]["50"] = "/config/img/devices/50/166_hmipw-drd3_thumb.png"; +DEV_PATHS["HmIPW-DRD3"]["250"] = "/config/img/devices/250/166_hmipw-drd3.png"; +DEV_HIGHLIGHT["HmIPW-DRD3"] = new Object(); +DEV_LIST.push('WS550'); +DEV_DESCRIPTION["WS550"] = "Funk- Wetterstation"; +DEV_PATHS["WS550"] = new Object(); +DEV_PATHS["WS550"]["50"] = "/config/img/devices/50/9_hm-ws550-us_thumb.png"; +DEV_PATHS["WS550"]["250"] = "/config/img/devices/250/9_hm-ws550-us.png"; +DEV_HIGHLIGHT["WS550"] = new Object(); +DEV_HIGHLIGHT["WS550"]["1"] = [3, 0.440, 0.200, '1', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["WS550"]["2"] = [3, 0.440, 0.200, '2', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["WS550"]["3"] = [3, 0.440, 0.200, '3', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["WS550"]["4"] = [3, 0.440, 0.200, '4', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["WS550"]["5"] = [3, 0.440, 0.200, '5', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["WS550"]["6"] = [3, 0.440, 0.200, '6', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["WS550"]["7"] = [3, 0.440, 0.200, '7', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["WS550"]["8"] = [3, 0.440, 0.200, '8', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["WS550"]["9"] = [3, 0.440, 0.200, '9', 0.124, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["WS550"]["10"] = [3, 0.405, 0.200, '10', 0.124, 'verdana', Font.BOLD]; +DEV_LIST.push('HM-LC-Dim1T-Pl-2'); +DEV_DESCRIPTION["HM-LC-Dim1T-Pl-2"] = "HM-LC-Dim1T-Pl-2"; +DEV_PATHS["HM-LC-Dim1T-Pl-2"] = new Object(); +DEV_PATHS["HM-LC-Dim1T-Pl-2"]["50"] = "/config/img/devices/50/OM55_DimmerSwitch_thumb.png"; +DEV_PATHS["HM-LC-Dim1T-Pl-2"]["250"] = "/config/img/devices/250/OM55_DimmerSwitch.png"; +DEV_HIGHLIGHT["HM-LC-Dim1T-Pl-2"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Dim1T-Pl-2"]["1_part1"] = [2, 0.548, 0.468, 0.072, 0.052]; +DEV_HIGHLIGHT["HM-LC-Dim1T-Pl-2"]["1_part2"] = [2, 0.612, 0.452, 0.028, 0.056]; +DEV_HIGHLIGHT["HM-LC-Dim1T-Pl-2"]["1"] = [5, '1_part1', '1_part2']; +DEV_LIST.push('HmIP-STE2-PCB'); +DEV_DESCRIPTION["HmIP-STE2-PCB"] = "HmIP-STE2-PCB"; +DEV_PATHS["HmIP-STE2-PCB"] = new Object(); +DEV_PATHS["HmIP-STE2-PCB"]["50"] = "/config/img/devices/50/210_hmip-ste2-pcb_thumb.png"; +DEV_PATHS["HmIP-STE2-PCB"]["250"] = "/config/img/devices/250/210_hmip-ste2-pcb.png"; +DEV_HIGHLIGHT["HmIP-STE2-PCB"] = new Object(); +DEV_LIST.push('HmIP-STH-A'); +DEV_DESCRIPTION["HmIP-STH-A"] = "STH"; +DEV_PATHS["HmIP-STH-A"] = new Object(); +DEV_PATHS["HmIP-STH-A"]["50"] = "/config/img/devices/50/146_hmip-sth_thumb.png"; +DEV_PATHS["HmIP-STH-A"]["250"] = "/config/img/devices/250/146_hmip-sth.png"; +DEV_HIGHLIGHT["HmIP-STH-A"] = new Object(); +DEV_LIST.push('HmIPW-STHD-A'); +DEV_DESCRIPTION["HmIPW-STHD-A"] = "HmIPW-STHD"; +DEV_PATHS["HmIPW-STHD-A"] = new Object(); +DEV_PATHS["HmIPW-STHD-A"]["50"] = "/config/img/devices/50/147_hmip-sthd_thumb.png"; +DEV_PATHS["HmIPW-STHD-A"]["250"] = "/config/img/devices/250/147_hmip-sthd.png"; +DEV_HIGHLIGHT["HmIPW-STHD-A"] = new Object(); +DEV_LIST.push('HM-Sec-Key-O'); +DEV_DESCRIPTION["HM-Sec-Key-O"] = "HM-Sec-Key-O"; +DEV_PATHS["HM-Sec-Key-O"] = new Object(); +DEV_PATHS["HM-Sec-Key-O"]["50"] = "/config/img/devices/50/14_hm-sec-key_thumb.png"; +DEV_PATHS["HM-Sec-Key-O"]["250"] = "/config/img/devices/250/14_hm-sec-key.png"; +DEV_HIGHLIGHT["HM-Sec-Key-O"] = new Object(); +DEV_LIST.push('ZEL STG RM DWT 10'); +DEV_DESCRIPTION["ZEL STG RM DWT 10"] = "ZEL_STG_RM_DWT_10"; +DEV_PATHS["ZEL STG RM DWT 10"] = new Object(); +DEV_PATHS["ZEL STG RM DWT 10"]["50"] = "/config/img/devices/50/70_hm-pb-4dis-wm_thumb.png"; +DEV_PATHS["ZEL STG RM DWT 10"]["250"] = "/config/img/devices/250/70_hm-pb-4dis-wm.png"; +DEV_HIGHLIGHT["ZEL STG RM DWT 10"] = new Object(); +DEV_HIGHLIGHT["ZEL STG RM DWT 10"]["2"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["ZEL STG RM DWT 10"]["1"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["ZEL STG RM DWT 10"]["4"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["ZEL STG RM DWT 10"]["3"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["ZEL STG RM DWT 10"]["6"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["ZEL STG RM DWT 10"]["5"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["ZEL STG RM DWT 10"]["8"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["ZEL STG RM DWT 10"]["7"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["ZEL STG RM DWT 10"]["10"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["ZEL STG RM DWT 10"]["9"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["ZEL STG RM DWT 10"]["12"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["ZEL STG RM DWT 10"]["11"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["ZEL STG RM DWT 10"]["14"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["ZEL STG RM DWT 10"]["13"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["ZEL STG RM DWT 10"]["16"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["ZEL STG RM DWT 10"]["15"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["ZEL STG RM DWT 10"]["18"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["ZEL STG RM DWT 10"]["17"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_HIGHLIGHT["ZEL STG RM DWT 10"]["20"] = [2, 0.204, 0.244, 0.556, 0.12]; +DEV_HIGHLIGHT["ZEL STG RM DWT 10"]["19"] = [2, 0.204, 0.68, 0.556, 0.12]; +DEV_LIST.push('HmIPW-SCTHD'); +DEV_DESCRIPTION["HmIPW-SCTHD"] = "HmIPW-SCTHD"; +DEV_PATHS["HmIPW-SCTHD"] = new Object(); +DEV_PATHS["HmIPW-SCTHD"]["50"] = "/config/img/devices/50/212_hmipw-scthd_thumb.png"; +DEV_PATHS["HmIPW-SCTHD"]["250"] = "/config/img/devices/250/212_hmipw-scthd.png"; +DEV_HIGHLIGHT["HmIPW-SCTHD"] = new Object(); +DEV_LIST.push('HM-TC-IT-WM-W-EU'); +DEV_DESCRIPTION["HM-TC-IT-WM-W-EU"] = "HM-TC-IT-WM-W-EU"; +DEV_PATHS["HM-TC-IT-WM-W-EU"] = new Object(); +DEV_PATHS["HM-TC-IT-WM-W-EU"]["50"] = "/config/img/devices/50/96_hm-tc-it-wm-w-eu_thumb.png"; +DEV_PATHS["HM-TC-IT-WM-W-EU"]["250"] = "/config/img/devices/250/96_hm-tc-it-wm-w-eu.png"; +DEV_HIGHLIGHT["HM-TC-IT-WM-W-EU"] = new Object(); +DEV_LIST.push('HmIPW-STH-A'); +DEV_DESCRIPTION["HmIPW-STH-A"] = "HmIPW-STH"; +DEV_PATHS["HmIPW-STH-A"] = new Object(); +DEV_PATHS["HmIPW-STH-A"]["50"] = "/config/img/devices/50/146_hmip-sth_thumb.png"; +DEV_PATHS["HmIPW-STH-A"]["250"] = "/config/img/devices/250/146_hmip-sth.png"; +DEV_HIGHLIGHT["HmIPW-STH-A"] = new Object(); +DEV_LIST.push('HM-Sec-Key-S'); +DEV_DESCRIPTION["HM-Sec-Key-S"] = "HM-Sec-Key-S"; +DEV_PATHS["HM-Sec-Key-S"] = new Object(); +DEV_PATHS["HM-Sec-Key-S"]["50"] = "/config/img/devices/50/14_hm-sec-key_thumb.png"; +DEV_PATHS["HM-Sec-Key-S"]["250"] = "/config/img/devices/250/14_hm-sec-key.png"; +DEV_HIGHLIGHT["HM-Sec-Key-S"] = new Object(); +DEV_LIST.push('263 167'); +DEV_DESCRIPTION["263 167"] = "263_167"; +DEV_PATHS["263 167"] = new Object(); +DEV_PATHS["263 167"]["50"] = "/config/img/devices/50/51_hm-sec-sd_thumb.png"; +DEV_PATHS["263 167"]["250"] = "/config/img/devices/250/51_hm-sec-sd.png"; +DEV_HIGHLIGHT["263 167"] = new Object(); +DEV_LIST.push('HmIPW-WGD-PL'); +DEV_DESCRIPTION["HmIPW-WGD-PL"] = "HmIPW-WGD-PL"; +DEV_PATHS["HmIPW-WGD-PL"] = new Object(); +DEV_PATHS["HmIPW-WGD-PL"]["50"] = "/config/img/devices/50/222_hmipw-wgd_thumb.png"; +DEV_PATHS["HmIPW-WGD-PL"]["250"] = "/config/img/devices/250/222_hmipw-wgd.png"; +DEV_HIGHLIGHT["HmIPW-WGD-PL"] = new Object(); +DEV_LIST.push('HM-SwI-3-FM'); +DEV_DESCRIPTION["HM-SwI-3-FM"] = "HM-SwI-3-FM"; +DEV_PATHS["HM-SwI-3-FM"] = new Object(); +DEV_PATHS["HM-SwI-3-FM"]["50"] = "/config/img/devices/50/39_hm-swi-3-fm_thumb.png"; +DEV_PATHS["HM-SwI-3-FM"]["250"] = "/config/img/devices/250/39_hm-swi-3-fm.png"; +DEV_HIGHLIGHT["HM-SwI-3-FM"] = new Object(); +DEV_HIGHLIGHT["HM-SwI-3-FM"]["1_Key"] = [3, 0.18, 0.216, '1', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-SwI-3-FM"]["1_Kreis"] = [4, 0.220, 0.480, 0.028, 0.028]; +DEV_HIGHLIGHT["HM-SwI-3-FM"]["1"] = [5, '1_Key', '1_Kreis']; +DEV_HIGHLIGHT["HM-SwI-3-FM"]["2_Key"] = [3, 0.18, 0.216, '2', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-SwI-3-FM"]["2_Kreis"] = [4, 0.265, 0.405, 0.028, 0.028]; +DEV_HIGHLIGHT["HM-SwI-3-FM"]["2"] = [5, '2_Key', '2_Kreis']; +DEV_HIGHLIGHT["HM-SwI-3-FM"]["3_Key"] = [3, 0.18, 0.216, '3', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-SwI-3-FM"]["3_Kreis"] = [4, 0.310, 0.33, 0.028, 0.028]; +DEV_HIGHLIGHT["HM-SwI-3-FM"]["3"] = [5, '3_Key', '3_Kreis']; +DEV_LIST.push('HmIP-RCB1'); +DEV_DESCRIPTION["HmIP-RCB1"] = "HmIP-RCB1"; +DEV_PATHS["HmIP-RCB1"] = new Object(); +DEV_PATHS["HmIP-RCB1"]["50"] = "/config/img/devices/50/187_hmip-rcb1_thumb.png"; +DEV_PATHS["HmIP-RCB1"]["250"] = "/config/img/devices/250/187_hmip-rcb1.png"; +DEV_HIGHLIGHT["HmIP-RCB1"] = new Object(); +DEV_LIST.push('HM-RC-19-SW'); +DEV_DESCRIPTION["HM-RC-19-SW"] = "HM-RC-19-SW"; +DEV_PATHS["HM-RC-19-SW"] = new Object(); +DEV_PATHS["HM-RC-19-SW"]["50"] = "/config/img/devices/50/20_hm-rc-19_thumb.png"; +DEV_PATHS["HM-RC-19-SW"]["250"] = "/config/img/devices/250/20_hm-rc-19.png"; +DEV_HIGHLIGHT["HM-RC-19-SW"] = new Object(); +DEV_HIGHLIGHT["HM-RC-19-SW"]["1"] = [2, 0.296, 0.344, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19-SW"]["3"] = [2, 0.296, 0.416, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19-SW"]["5"] = [2, 0.296, 0.488, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19-SW"]["7"] = [2, 0.296, 0.56, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19-SW"]["9"] = [2, 0.296, 0.628, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19-SW"]["11"] = [2, 0.296, 0.704, 0.036, 0.048]; +DEV_HIGHLIGHT["HM-RC-19-SW"]["13"] = [2, 0.296, 0.772, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19-SW"]["15"] = [2, 0.296, 0.844, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19-SW"]["2"] = [2, 0.468, 0.344, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19-SW"]["4"] = [2, 0.468, 0.416, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19-SW"]["6"] = [2, 0.468, 0.488, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19-SW"]["8"] = [2, 0.468, 0.56, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19-SW"]["10"] = [2, 0.468, 0.628, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19-SW"]["12"] = [2, 0.468, 0.704, 0.036, 0.048]; +DEV_HIGHLIGHT["HM-RC-19-SW"]["14"] = [2, 0.468, 0.772, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19-SW"]["16"] = [2, 0.468, 0.844, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19-SW"]["17"] = [2, 0.58, 0.84, 0.044, 0.056]; +DEV_HIGHLIGHT["HM-RC-19-SW"]["18"] = [2, 0.312, 0.188, 0.168, 0.088]; +DEV_HIGHLIGHT["HM-RC-19-SW"]["1+2"] = [5, '1', '2']; +DEV_HIGHLIGHT["HM-RC-19-SW"]["3+4"] = [5, '3', '4']; +DEV_HIGHLIGHT["HM-RC-19-SW"]["5+6"] = [5, '5', '6']; +DEV_HIGHLIGHT["HM-RC-19-SW"]["7+8"] = [5, '7', '8']; +DEV_HIGHLIGHT["HM-RC-19-SW"]["9+10"] = [5, '9', '10']; +DEV_HIGHLIGHT["HM-RC-19-SW"]["11+12"] = [5, '11', '12']; +DEV_HIGHLIGHT["HM-RC-19-SW"]["13+14"] = [5, '13', '14']; +DEV_HIGHLIGHT["HM-RC-19-SW"]["15+16"] = [5, '15', '16']; +DEV_LIST.push('HM-Sec-Key'); +DEV_DESCRIPTION["HM-Sec-Key"] = "HM-Sec-Key"; +DEV_PATHS["HM-Sec-Key"] = new Object(); +DEV_PATHS["HM-Sec-Key"]["50"] = "/config/img/devices/50/14_hm-sec-key_thumb.png"; +DEV_PATHS["HM-Sec-Key"]["250"] = "/config/img/devices/250/14_hm-sec-key.png"; +DEV_HIGHLIGHT["HM-Sec-Key"] = new Object(); +DEV_LIST.push('HM-LC-RGBW-WM'); +DEV_DESCRIPTION["HM-LC-RGBW-WM"] = "HM-LC-RGBW-WM"; +DEV_PATHS["HM-LC-RGBW-WM"] = new Object(); +DEV_PATHS["HM-LC-RGBW-WM"]["50"] = "/config/img/devices/50/111_hm-lc-rgbw-wm_thumb.png"; +DEV_PATHS["HM-LC-RGBW-WM"]["250"] = "/config/img/devices/250/111_hm-lc-rgbw-wm.png"; +DEV_HIGHLIGHT["HM-LC-RGBW-WM"] = new Object(); +DEV_HIGHLIGHT["HM-LC-RGBW-WM"]["1"] = [1, 0.280, 0.569, 0.014]; +DEV_HIGHLIGHT["HM-LC-RGBW-WM"]["2"] = [1, 0.280, 0.645, 0.014]; +DEV_HIGHLIGHT["HM-LC-RGBW-WM"]["3"] = [1, 0.280, 0.721, 0.014]; +DEV_LIST.push('HM-RC-19'); +DEV_DESCRIPTION["HM-RC-19"] = "HM-RC-19"; +DEV_PATHS["HM-RC-19"] = new Object(); +DEV_PATHS["HM-RC-19"]["50"] = "/config/img/devices/50/20_hm-rc-19_thumb.png"; +DEV_PATHS["HM-RC-19"]["250"] = "/config/img/devices/250/20_hm-rc-19.png"; +DEV_HIGHLIGHT["HM-RC-19"] = new Object(); +DEV_HIGHLIGHT["HM-RC-19"]["1"] = [2, 0.296, 0.344, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19"]["3"] = [2, 0.296, 0.416, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19"]["5"] = [2, 0.296, 0.488, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19"]["7"] = [2, 0.296, 0.56, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19"]["9"] = [2, 0.296, 0.628, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19"]["11"] = [2, 0.296, 0.704, 0.036, 0.048]; +DEV_HIGHLIGHT["HM-RC-19"]["13"] = [2, 0.296, 0.772, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19"]["15"] = [2, 0.296, 0.844, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19"]["2"] = [2, 0.468, 0.344, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19"]["4"] = [2, 0.468, 0.416, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19"]["6"] = [2, 0.468, 0.488, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19"]["8"] = [2, 0.468, 0.56, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19"]["10"] = [2, 0.468, 0.628, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19"]["12"] = [2, 0.468, 0.704, 0.036, 0.048]; +DEV_HIGHLIGHT["HM-RC-19"]["14"] = [2, 0.468, 0.772, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19"]["16"] = [2, 0.468, 0.844, 0.036, 0.052]; +DEV_HIGHLIGHT["HM-RC-19"]["17"] = [2, 0.58, 0.84, 0.044, 0.056]; +DEV_HIGHLIGHT["HM-RC-19"]["18"] = [2, 0.312, 0.188, 0.168, 0.088]; +DEV_HIGHLIGHT["HM-RC-19"]["1+2"] = [5, '1', '2']; +DEV_HIGHLIGHT["HM-RC-19"]["3+4"] = [5, '3', '4']; +DEV_HIGHLIGHT["HM-RC-19"]["5+6"] = [5, '5', '6']; +DEV_HIGHLIGHT["HM-RC-19"]["7+8"] = [5, '7', '8']; +DEV_HIGHLIGHT["HM-RC-19"]["9+10"] = [5, '9', '10']; +DEV_HIGHLIGHT["HM-RC-19"]["11+12"] = [5, '11', '12']; +DEV_HIGHLIGHT["HM-RC-19"]["13+14"] = [5, '13', '14']; +DEV_HIGHLIGHT["HM-RC-19"]["15+16"] = [5, '15', '16']; +DEV_LIST.push('263 167 Gruppe'); +DEV_DESCRIPTION["263 167 Gruppe"] = "263_167_Gruppe"; +DEV_PATHS["263 167 Gruppe"] = new Object(); +DEV_PATHS["263 167 Gruppe"]["50"] = "/config/img/devices/50/52_hm-sec-sd-team_thumb.png"; +DEV_PATHS["263 167 Gruppe"]["250"] = "/config/img/devices/250/52_hm-sec-sd-team.png"; +DEV_HIGHLIGHT["263 167 Gruppe"] = new Object(); +DEV_LIST.push('HMW-IO-4-FM'); +DEV_DESCRIPTION["HMW-IO-4-FM"] = "HMW-IO-4-FM"; +DEV_PATHS["HMW-IO-4-FM"] = new Object(); +DEV_PATHS["HMW-IO-4-FM"]["50"] = "/config/img/devices/50/29_hmw-io-4-fm_thumb.png"; +DEV_PATHS["HMW-IO-4-FM"]["250"] = "/config/img/devices/250/29_hmw-io-4-fm.png"; +DEV_HIGHLIGHT["HMW-IO-4-FM"] = new Object(); +DEV_HIGHLIGHT["HMW-IO-4-FM"]["1"] = [6, 0.616, 0.736, 0.612, 0.836, 0.02]; +DEV_HIGHLIGHT["HMW-IO-4-FM"]["2"] = [6, 0.672, 0.736, 0.668, 0.836, 0.02]; +DEV_HIGHLIGHT["HMW-IO-4-FM"]["3"] = [6, 0.724, 0.736, 0.724, 0.836, 0.02]; +DEV_HIGHLIGHT["HMW-IO-4-FM"]["4"] = [6, 0.78, 0.736, 0.78, 0.836, 0.02]; +DEV_LIST.push('HM-Sen-MDIR-O'); +DEV_DESCRIPTION["HM-Sen-MDIR-O"] = "HM-Sen-MDIR-O"; +DEV_PATHS["HM-Sen-MDIR-O"] = new Object(); +DEV_PATHS["HM-Sen-MDIR-O"]["50"] = "/config/img/devices/50/80_hm-sen-mdir-o_thumb.png"; +DEV_PATHS["HM-Sen-MDIR-O"]["250"] = "/config/img/devices/250/80_hm-sen-mdir-o.png"; +DEV_HIGHLIGHT["HM-Sen-MDIR-O"] = new Object(); +DEV_LIST.push('HM-RC-8'); +DEV_DESCRIPTION["HM-RC-8"] = "HM-RC-8"; +DEV_PATHS["HM-RC-8"] = new Object(); +DEV_PATHS["HM-RC-8"]["50"] = "/config/img/devices/50/100_hm-rc-8_thumb.png"; +DEV_PATHS["HM-RC-8"]["250"] = "/config/img/devices/250/100_hm-rc-8.png"; +DEV_HIGHLIGHT["HM-RC-8"] = new Object(); +DEV_HIGHLIGHT["HM-RC-8"]["1"] = [1, 0.374, 0.192, 0.02]; +DEV_HIGHLIGHT["HM-RC-8"]["2"] = [1, 0.537, 0.248, 0.02]; +DEV_HIGHLIGHT["HM-RC-8"]["3"] = [1, 0.374, 0.284, 0.02]; +DEV_HIGHLIGHT["HM-RC-8"]["4"] = [1, 0.537, 0.340, 0.02]; +DEV_HIGHLIGHT["HM-RC-8"]["5"] = [1, 0.374, 0.378, 0.02]; +DEV_HIGHLIGHT["HM-RC-8"]["6"] = [1, 0.537, 0.434, 0.02]; +DEV_HIGHLIGHT["HM-RC-8"]["7"] = [1, 0.374, 0.470, 0.02]; +DEV_HIGHLIGHT["HM-RC-8"]["8"] = [1, 0.537, 0.526, 0.02]; +DEV_HIGHLIGHT["HM-RC-8"]["1+2"] = [5, '1', '2']; +DEV_HIGHLIGHT["HM-RC-8"]["3+4"] = [5, '3', '4']; +DEV_HIGHLIGHT["HM-RC-8"]["5+6"] = [5, '5', '6']; +DEV_HIGHLIGHT["HM-RC-8"]["7+8"] = [5, '7', '8']; +DEV_LIST.push('HmIP-BSM'); +DEV_DESCRIPTION["HmIP-BSM"] = "BSM"; +DEV_PATHS["HmIP-BSM"] = new Object(); +DEV_PATHS["HmIP-BSM"]["50"] = "/config/img/devices/50/PushButton-2ch-wm_thumb.png"; +DEV_PATHS["HmIP-BSM"]["250"] = "/config/img/devices/250/PushButton-2ch-wm.png"; +DEV_HIGHLIGHT["HmIP-BSM"] = new Object(); +DEV_HIGHLIGHT["HmIP-BSM"]["2"] = [2, 0.244, 0.312, 0.428, 0.168]; +DEV_HIGHLIGHT["HmIP-BSM"]["1"] = [2, 0.244, 0.56, 0.428, 0.168]; +DEV_HIGHLIGHT["HmIP-BSM"]["1+2"] = [2, 0.244, 0.308, 0.428, 0.416]; +DEV_LIST.push('263 135'); +DEV_DESCRIPTION["263 135"] = "263_135"; +DEV_PATHS["263 135"] = new Object(); +DEV_PATHS["263 135"]["50"] = "/config/img/devices/50/75_hm-pb-2-wm55_thumb.png"; +DEV_PATHS["263 135"]["250"] = "/config/img/devices/250/75_hm-pb-2-wm55.png"; +DEV_HIGHLIGHT["263 135"] = new Object(); +DEV_HIGHLIGHT["263 135"]["2"] = [2, 0.204, 0.23, 0.546, 0.128]; +DEV_HIGHLIGHT["263 135"]["1"] = [2, 0.204, 0.65, 0.546, 0.128]; +DEV_LIST.push('HmIP-SMO230'); +DEV_DESCRIPTION["HmIP-SMO230"] = "SMO"; +DEV_PATHS["HmIP-SMO230"] = new Object(); +DEV_PATHS["HmIP-SMO230"]["50"] = "/config/img/devices/50/213_hmip-smo230_thumb.png"; +DEV_PATHS["HmIP-SMO230"]["250"] = "/config/img/devices/250/213_hmip-smo230.png"; +DEV_HIGHLIGHT["HmIP-SMO230"] = new Object(); +DEV_LIST.push('HmIPW-SMO230'); +DEV_DESCRIPTION["HmIPW-SMO230"] = "SMO"; +DEV_PATHS["HmIPW-SMO230"] = new Object(); +DEV_PATHS["HmIPW-SMO230"]["50"] = "/config/img/devices/50/213_hmip-smo230_thumb.png"; +DEV_PATHS["HmIPW-SMO230"]["250"] = "/config/img/devices/250/213_hmip-smo230.png"; +DEV_HIGHLIGHT["HmIPW-SMO230"] = new Object(); +DEV_LIST.push('HM-CCU-1'); +DEV_DESCRIPTION["HM-CCU-1"] = "HM-CCU-1"; +DEV_PATHS["HM-CCU-1"] = new Object(); +DEV_PATHS["HM-CCU-1"]["50"] = "/config/img/devices/50/24_hm-cen-3-1_thumb.png"; +DEV_PATHS["HM-CCU-1"]["250"] = "/config/img/devices/250/24_hm-cen-3-1.png"; +DEV_HIGHLIGHT["HM-CCU-1"] = new Object(); +DEV_LIST.push('HmIP-DRBLI4'); +DEV_DESCRIPTION["HmIP-DRBLI4"] = "HmIP-DRBLI4"; +DEV_PATHS["HmIP-DRBLI4"] = new Object(); +DEV_PATHS["HmIP-DRBLI4"]["50"] = "/config/img/devices/50/206_hmip-drbli4_thumb.png"; +DEV_PATHS["HmIP-DRBLI4"]["250"] = "/config/img/devices/250/206_hmip-drbli4.png"; +DEV_HIGHLIGHT["HmIP-DRBLI4"] = new Object(); +DEV_LIST.push('HmIP-DRSI1'); +DEV_DESCRIPTION["HmIP-DRSI1"] = "HmIP-DRSI1"; +DEV_PATHS["HmIP-DRSI1"] = new Object(); +DEV_PATHS["HmIP-DRSI1"]["50"] = "/config/img/devices/50/211_hmip-drsi1_thumb.png"; +DEV_PATHS["HmIP-DRSI1"]["250"] = "/config/img/devices/250/211_hmip-drsi1.png"; +DEV_HIGHLIGHT["HmIP-DRSI1"] = new Object(); +DEV_LIST.push('HmIP-KRCA-2'); +DEV_DESCRIPTION["HmIP-KRCA-2"] = "KRCA"; +DEV_PATHS["HmIP-KRCA-2"] = new Object(); +DEV_PATHS["HmIP-KRCA-2"]["50"] = "/config/img/devices/50/84_hm-rc-4-x_thumb.png"; +DEV_PATHS["HmIP-KRCA-2"]["250"] = "/config/img/devices/250/85_hm-rc-sec4-3.png"; +DEV_HIGHLIGHT["HmIP-KRCA-2"] = new Object(); +DEV_HIGHLIGHT["HmIP-KRCA-2"]["arrow_part1"] = [6, 0.312, 0.288, 0.416, 0.288, 0.012]; +DEV_HIGHLIGHT["HmIP-KRCA-2"]["arrow_part2"] = [6, 0.312, 0.288, 0.352, 0.248, 0.012]; +DEV_HIGHLIGHT["HmIP-KRCA-2"]["arrow_part3"] = [6, 0.312, 0.288, 0.352, 0.328, 0.012]; +DEV_HIGHLIGHT["HmIP-KRCA-2"]["Arrow"] = [5, 'arrow_part1', 'arrow_part2', 'arrow_part3']; +DEV_HIGHLIGHT["HmIP-KRCA-2"]["1_Arrow"] = [7, 'Arrow', 0.25, 0.0]; +DEV_HIGHLIGHT["HmIP-KRCA-2"]["2_Arrow"] = [7, 'Arrow', 0.238, 0.156]; +DEV_HIGHLIGHT["HmIP-KRCA-2"]["3_Arrow"] = [7, 'Arrow', 0.228, 0.312]; +DEV_HIGHLIGHT["HmIP-KRCA-2"]["4_Arrow"] = [7, 'Arrow', 0.212, 0.468]; +DEV_HIGHLIGHT["HmIP-KRCA-2"]["1"] = [5, '2_Arrow']; +DEV_HIGHLIGHT["HmIP-KRCA-2"]["2"] = [5, '1_Arrow']; +DEV_HIGHLIGHT["HmIP-KRCA-2"]["3"] = [5, '4_Arrow']; +DEV_HIGHLIGHT["HmIP-KRCA-2"]["4"] = [5, '3_Arrow']; +DEV_HIGHLIGHT["HmIP-KRCA-2"]["1+2"] = [5, '1_Arrow', '2_Arrow']; +DEV_HIGHLIGHT["HmIP-KRCA-2"]["3+4"] = [5, '3_Arrow', '4_Arrow']; +DEV_LIST.push('HM-Sen-RD-O'); +DEV_DESCRIPTION["HM-Sen-RD-O"] = "HM-Sen-RD-O"; +DEV_PATHS["HM-Sen-RD-O"] = new Object(); +DEV_PATHS["HM-Sen-RD-O"]["50"] = "/config/img/devices/50/87_hm-sen-rd-o_thumb.png"; +DEV_PATHS["HM-Sen-RD-O"]["250"] = "/config/img/devices/250/87_hm-sen-rd-o.png"; +DEV_HIGHLIGHT["HM-Sen-RD-O"] = new Object(); +DEV_LIST.push('HmIP-SWD'); +DEV_DESCRIPTION["HmIP-SWD"] = "HmIP-SWD"; +DEV_PATHS["HmIP-SWD"] = new Object(); +DEV_PATHS["HmIP-SWD"]["50"] = "/config/img/devices/50/172_hmip-swd_thumb.png"; +DEV_PATHS["HmIP-SWD"]["250"] = "/config/img/devices/250/172_hmip-swd.png"; +DEV_HIGHLIGHT["HmIP-SWD"] = new Object(); +DEV_LIST.push('VIR-LG-DIM'); +DEV_DESCRIPTION["VIR-LG-DIM"] = "VIR-LG-DIM"; +DEV_PATHS["VIR-LG-DIM"] = new Object(); +DEV_PATHS["VIR-LG-DIM"]["50"] = "/config/img/devices/50/coupling/hm-coupling-dim.png"; +DEV_PATHS["VIR-LG-DIM"]["250"] = "/config/img/devices/250/coupling/hm-coupling-dim.png"; +DEV_HIGHLIGHT["VIR-LG-DIM"] = new Object(); +DEV_LIST.push('HmIP-BBL'); +DEV_DESCRIPTION["HmIP-BBL"] = "HmIP-BBL"; +DEV_PATHS["HmIP-BBL"] = new Object(); +DEV_PATHS["HmIP-BBL"]["50"] = "/config/img/devices/50/PushButton-2ch-wm_thumb.png"; +DEV_PATHS["HmIP-BBL"]["250"] = "/config/img/devices/250/PushButton-2ch-wm.png"; +DEV_HIGHLIGHT["HmIP-BBL"] = new Object(); +DEV_HIGHLIGHT["HmIP-BBL"]["2"] = [2, 0.244, 0.312, 0.428, 0.168]; +DEV_HIGHLIGHT["HmIP-BBL"]["1"] = [2, 0.244, 0.56, 0.428, 0.168]; +DEV_HIGHLIGHT["HmIP-BBL"]["1+2"] = [2, 0.244, 0.308, 0.428, 0.416]; +DEV_LIST.push('HM-LC-Dim1PWM-CV'); +DEV_DESCRIPTION["HM-LC-Dim1PWM-CV"] = "HM-LC-Dim1PWM-CV"; +DEV_PATHS["HM-LC-Dim1PWM-CV"] = new Object(); +DEV_PATHS["HM-LC-Dim1PWM-CV"]["50"] = "/config/img/devices/50/2_hm-lc-dim1l-cv_thumb.png"; +DEV_PATHS["HM-LC-Dim1PWM-CV"]["250"] = "/config/img/devices/250/79_hm-lc-dim1pwm-cv.png"; +DEV_HIGHLIGHT["HM-LC-Dim1PWM-CV"] = new Object(); +DEV_LIST.push('HmIP-ASIR-2'); +DEV_DESCRIPTION["HmIP-ASIR-2"] = "HmIP-ASIR"; +DEV_PATHS["HmIP-ASIR-2"] = new Object(); +DEV_PATHS["HmIP-ASIR-2"]["50"] = "/config/img/devices/50/196_hmip-ASIR-2_thumb.png"; +DEV_PATHS["HmIP-ASIR-2"]["250"] = "/config/img/devices/250/196_hmip-ASIR-2.png"; +DEV_HIGHLIGHT["HmIP-ASIR-2"] = new Object(); +DEV_LIST.push('HmIP-STH-A 8DU'); +DEV_DESCRIPTION["HmIP-STH-A 8DU"] = "STH"; +DEV_PATHS["HmIP-STH-A 8DU"] = new Object(); +DEV_PATHS["HmIP-STH-A 8DU"]["50"] = "/config/img/devices/50/146_hmip-sth_thumb.png"; +DEV_PATHS["HmIP-STH-A 8DU"]["250"] = "/config/img/devices/250/146_hmip-sth.png"; +DEV_HIGHLIGHT["HmIP-STH-A 8DU"] = new Object(); +DEV_LIST.push('HM-CC-RT-DN'); +DEV_DESCRIPTION["HM-CC-RT-DN"] = "HM-CC-RT-DN"; +DEV_PATHS["HM-CC-RT-DN"] = new Object(); +DEV_PATHS["HM-CC-RT-DN"]["50"] = "/config/img/devices/50/83_hm-cc-rt-dn_thumb.png"; +DEV_PATHS["HM-CC-RT-DN"]["250"] = "/config/img/devices/250/83_hm-cc-rt-dn.png"; +DEV_HIGHLIGHT["HM-CC-RT-DN"] = new Object(); +DEV_LIST.push('HmIP-STHD-A L9D'); +DEV_DESCRIPTION["HmIP-STHD-A L9D"] = "HmIP-STHD"; +DEV_PATHS["HmIP-STHD-A L9D"] = new Object(); +DEV_PATHS["HmIP-STHD-A L9D"]["50"] = "/config/img/devices/50/147_hmip-sthd_thumb.png"; +DEV_PATHS["HmIP-STHD-A L9D"]["250"] = "/config/img/devices/250/147_hmip-sthd.png"; +DEV_HIGHLIGHT["HmIP-STHD-A L9D"] = new Object(); +DEV_LIST.push('HM-LC-Dim1TPBU-FM'); +DEV_DESCRIPTION["HM-LC-Dim1TPBU-FM"] = "HM-LC-Dim1TPBU-FM"; +DEV_PATHS["HM-LC-Dim1TPBU-FM"] = new Object(); +DEV_PATHS["HM-LC-Dim1TPBU-FM"]["50"] = "/config/img/devices/50/PushButton-2ch-wm_thumb.png"; +DEV_PATHS["HM-LC-Dim1TPBU-FM"]["250"] = "/config/img/devices/250/PushButton-2ch-wm.png"; +DEV_HIGHLIGHT["HM-LC-Dim1TPBU-FM"] = new Object(); +DEV_LIST.push('HmIP-SCTH230'); +DEV_DESCRIPTION["HmIP-SCTH230"] = "HmIP-SCTH230"; +DEV_PATHS["HmIP-SCTH230"] = new Object(); +DEV_PATHS["HmIP-SCTH230"]["50"] = "/config/img/devices/50/215_hmip-scth230_thumb.png"; +DEV_PATHS["HmIP-SCTH230"]["250"] = "/config/img/devices/250/215_hmip-scth230.png"; +DEV_HIGHLIGHT["HmIP-SCTH230"] = new Object(); +DEV_LIST.push('OLIGO.smart.iq.HM'); +DEV_DESCRIPTION["OLIGO.smart.iq.HM"] = "OLIGO.smart.iq.HM"; +DEV_PATHS["OLIGO.smart.iq.HM"] = new Object(); +DEV_PATHS["OLIGO.smart.iq.HM"]["50"] = "/config/img/devices/50/123_oligo.smart.ip.hm_thumb.png"; +DEV_PATHS["OLIGO.smart.iq.HM"]["250"] = "/config/img/devices/250/123_oligo.smart.ip.hm.png"; +DEV_HIGHLIGHT["OLIGO.smart.iq.HM"] = new Object(); +DEV_LIST.push('HMIP-PS'); +DEV_DESCRIPTION["HMIP-PS"] = "PS"; +DEV_PATHS["HMIP-PS"] = new Object(); +DEV_PATHS["HMIP-PS"]["50"] = "/config/img/devices/50/113_hmip-psm_thumb.png"; +DEV_PATHS["HMIP-PS"]["250"] = "/config/img/devices/250/113_hmip-psm.png"; +DEV_HIGHLIGHT["HMIP-PS"] = new Object(); +DEV_LIST.push('HM-LC-Sw4-WM'); +DEV_DESCRIPTION["HM-LC-Sw4-WM"] = "HM-LC-Sw4-WM"; +DEV_PATHS["HM-LC-Sw4-WM"] = new Object(); +DEV_PATHS["HM-LC-Sw4-WM"]["50"] = "/config/img/devices/50/76_hm-lc-sw4-wm_thumb.png"; +DEV_PATHS["HM-LC-Sw4-WM"]["250"] = "/config/img/devices/250/76_hm-lc-sw4-wm.png"; +DEV_HIGHLIGHT["HM-LC-Sw4-WM"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Sw4-WM"]["Channel1"] = [2, 0.208, 0.766, 0.065, 0.060]; +DEV_HIGHLIGHT["HM-LC-Sw4-WM"]["Channel2"] = [2, 0.276, 0.766, 0.065, 0.060]; +DEV_HIGHLIGHT["HM-LC-Sw4-WM"]["Channel3"] = [2, 0.344, 0.766, 0.065, 0.060]; +DEV_HIGHLIGHT["HM-LC-Sw4-WM"]["Channel4"] = [2, 0.412, 0.766, 0.065, 0.060]; +DEV_HIGHLIGHT["HM-LC-Sw4-WM"]["1_val"] = [3, 0.372, 0.288, '1', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-LC-Sw4-WM"]["2_val"] = [3, 0.372, 0.288, '2', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-LC-Sw4-WM"]["3_val"] = [3, 0.372, 0.288, '3', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-LC-Sw4-WM"]["4_val"] = [3, 0.372, 0.288, '4', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["HM-LC-Sw4-WM"]["Circle1"] = [4, 0.534, 0.762, 0.044, 0.044]; +DEV_HIGHLIGHT["HM-LC-Sw4-WM"]["Circle2"] = [4, 0.583, 0.762, 0.044, 0.044]; +DEV_HIGHLIGHT["HM-LC-Sw4-WM"]["Circle3"] = [4, 0.637, 0.762, 0.044, 0.044]; +DEV_HIGHLIGHT["HM-LC-Sw4-WM"]["Circle4"] = [4, 0.693, 0.762, 0.044, 0.044]; +DEV_HIGHLIGHT["HM-LC-Sw4-WM"]["1"] = [5, 'Channel1', '1_val', 'Circle1']; +DEV_HIGHLIGHT["HM-LC-Sw4-WM"]["2"] = [5, 'Channel2', '2_val', 'Circle2']; +DEV_HIGHLIGHT["HM-LC-Sw4-WM"]["3"] = [5, 'Channel3', '3_val', 'Circle3']; +DEV_HIGHLIGHT["HM-LC-Sw4-WM"]["4"] = [5, 'Channel4', '4_val', 'Circle4']; +DEV_LIST.push('HmIP-eTRV-E'); +DEV_DESCRIPTION["HmIP-eTRV-E"] = "TRV-E"; +DEV_PATHS["HmIP-eTRV-E"] = new Object(); +DEV_PATHS["HmIP-eTRV-E"]["50"] = "/config/img/devices/50/216_hmip-etrv-e_thumb.png"; +DEV_PATHS["HmIP-eTRV-E"]["250"] = "/config/img/devices/250/216_hmip-etrv-e.png"; +DEV_HIGHLIGHT["HmIP-eTRV-E"] = new Object(); +DEV_LIST.push('ELV-SH-SB8'); +DEV_DESCRIPTION["ELV-SH-SB8"] = "ELV-SH-SB8"; +DEV_PATHS["ELV-SH-SB8"] = new Object(); +DEV_PATHS["ELV-SH-SB8"]["50"] = "/config/img/devices/50/236_elv-sh-sb8_thumb.png"; +DEV_PATHS["ELV-SH-SB8"]["250"] = "/config/img/devices/250/236_elv-sh-sb8.png"; +DEV_HIGHLIGHT["ELV-SH-SB8"] = new Object(); +DEV_HIGHLIGHT["ELV-SH-SB8"]["1"] = [1, 0.770, 0.165, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["2"] = [1, 0.775, 0.226, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["3"] = [1, 0.780, 0.290, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["4"] = [1, 0.787, 0.355, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["5"] = [1, 0.792, 0.418, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["6"] = [1, 0.795, 0.485, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["7"] = [1, 0.798, 0.549, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["8"] = [1, 0.803, 0.610, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["10"] = [1, 0.710, 0.169, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["11"] = [1, 0.710, 0.169, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["12"] = [1, 0.710, 0.169, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["14"] = [1, 0.715, 0.230, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["15"] = [1, 0.715, 0.230, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["16"] = [1, 0.715, 0.230, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["18"] = [1, 0.720, 0.291, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["19"] = [1, 0.720, 0.291, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["20"] = [1, 0.720, 0.291, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["22"] = [1, 0.727, 0.355, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["23"] = [1, 0.727, 0.355, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["24"] = [1, 0.727, 0.355, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["26"] = [1, 0.732, 0.418, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["27"] = [1, 0.732, 0.418, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["28"] = [1, 0.732, 0.418, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["30"] = [1, 0.737, 0.485, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["31"] = [1, 0.737, 0.485, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["32"] = [1, 0.737, 0.485, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["34"] = [1, 0.742, 0.550, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["35"] = [1, 0.742, 0.550, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["36"] = [1, 0.742, 0.550, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["38"] = [1, 0.747, 0.615, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["39"] = [1, 0.747, 0.615, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["40"] = [1, 0.747, 0.615, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["1"] = [1, 0.770, 0.165, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["2"] = [1, 0.775, 0.226, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["3"] = [1, 0.780, 0.290, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["4"] = [1, 0.787, 0.355, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["5"] = [1, 0.792, 0.418, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["6"] = [1, 0.795, 0.485, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["7"] = [1, 0.798, 0.549, 0.02]; +DEV_HIGHLIGHT["ELV-SH-SB8"]["8"] = [1, 0.803, 0.610, 0.02]; +DEV_LIST.push('HmIP-STHD'); +DEV_DESCRIPTION["HmIP-STHD"] = "HmIP-STHD"; +DEV_PATHS["HmIP-STHD"] = new Object(); +DEV_PATHS["HmIP-STHD"]["50"] = "/config/img/devices/50/147_hmip-sthd_thumb.png"; +DEV_PATHS["HmIP-STHD"]["250"] = "/config/img/devices/250/147_hmip-sthd.png"; +DEV_HIGHLIGHT["HmIP-STHD"] = new Object(); +DEV_LIST.push('HM-ES-PMSw1-SM'); +DEV_DESCRIPTION["HM-ES-PMSw1-SM"] = "HM-ES-PMSw1-SM"; +DEV_PATHS["HM-ES-PMSw1-SM"] = new Object(); +DEV_PATHS["HM-ES-PMSw1-SM"]["50"] = "/config/img/devices/50/115_hm-es-pmsw1-sm_thumb.png"; +DEV_PATHS["HM-ES-PMSw1-SM"]["250"] = "/config/img/devices/250/115_hm-es-pmsw1-sm.png"; +DEV_HIGHLIGHT["HM-ES-PMSw1-SM"] = new Object(); +DEV_LIST.push('HmIP-STH 8DU'); +DEV_DESCRIPTION["HmIP-STH 8DU"] = "STH"; +DEV_PATHS["HmIP-STH 8DU"] = new Object(); +DEV_PATHS["HmIP-STH 8DU"]["50"] = "/config/img/devices/50/146_hmip-sth_thumb.png"; +DEV_PATHS["HmIP-STH 8DU"]["250"] = "/config/img/devices/250/146_hmip-sth.png"; +DEV_HIGHLIGHT["HmIP-STH 8DU"] = new Object(); +DEV_LIST.push('HmIP-FAL24-C6'); +DEV_DESCRIPTION["HmIP-FAL24-C6"] = "HmIP-FAL24-C6"; +DEV_PATHS["HmIP-FAL24-C6"] = new Object(); +DEV_PATHS["HmIP-FAL24-C6"]["50"] = "/config/img/devices/50/137_hmip-fal-c6_thumb.png"; +DEV_PATHS["HmIP-FAL24-C6"]["250"] = "/config/img/devices/250/137_hmip-fal-c6.png"; +DEV_HIGHLIGHT["HmIP-FAL24-C6"] = new Object(); +DEV_LIST.push('RF-LAN-Sniffer'); +DEV_DESCRIPTION["RF-LAN-Sniffer"] = "RF-LAN-Sniffer"; +DEV_PATHS["RF-LAN-Sniffer"] = new Object(); +DEV_PATHS["RF-LAN-Sniffer"]["50"] = "/config/img/devices/50/CCU2_thumb.png"; +DEV_PATHS["RF-LAN-Sniffer"]["250"] = "/config/img/devices/250/CCU2.png"; +DEV_HIGHLIGHT["RF-LAN-Sniffer"] = new Object(); +DEV_LIST.push('HmIP-SAM'); +DEV_DESCRIPTION["HmIP-SAM"] = "HmIP-SAM"; +DEV_PATHS["HmIP-SAM"] = new Object(); +DEV_PATHS["HmIP-SAM"]["50"] = "/config/img/devices/50/149_hmip-sam_thumb.png"; +DEV_PATHS["HmIP-SAM"]["250"] = "/config/img/devices/250/149_hmip-sam.png"; +DEV_HIGHLIGHT["HmIP-SAM"] = new Object(); +DEV_LIST.push('HmIP-MOD-RC8'); +DEV_DESCRIPTION["HmIP-MOD-RC8"] = "HmIP-MOD-RC8"; +DEV_PATHS["HmIP-MOD-RC8"] = new Object(); +DEV_PATHS["HmIP-MOD-RC8"]["50"] = "/config/img/devices/50/159_hmip-mod-rc8_thumb.png"; +DEV_PATHS["HmIP-MOD-RC8"]["250"] = "/config/img/devices/250/159_hmip-mod-rc8.png"; +DEV_HIGHLIGHT["HmIP-MOD-RC8"] = new Object(); +DEV_LIST.push('HmIP-PSM'); +DEV_DESCRIPTION["HmIP-PSM"] = "PSM"; +DEV_PATHS["HmIP-PSM"] = new Object(); +DEV_PATHS["HmIP-PSM"]["50"] = "/config/img/devices/50/113_hmip-psm_thumb.png"; +DEV_PATHS["HmIP-PSM"]["250"] = "/config/img/devices/250/113_hmip-psm.png"; +DEV_HIGHLIGHT["HmIP-PSM"] = new Object(); +DEV_LIST.push('HmIP-PCBS'); +DEV_DESCRIPTION["HmIP-PCBS"] = "HmIP-PCBS"; +DEV_PATHS["HmIP-PCBS"] = new Object(); +DEV_PATHS["HmIP-PCBS"]["50"] = "/config/img/devices/50/139_hm-lc-sw1-pcb_thumb.png"; +DEV_PATHS["HmIP-PCBS"]["250"] = "/config/img/devices/250/139_hm-lc-sw1-pcb.png"; +DEV_HIGHLIGHT["HmIP-PCBS"] = new Object(); +DEV_LIST.push('HmIPW-FIO6'); +DEV_DESCRIPTION["HmIPW-FIO6"] = "HmIPW-FIO6"; +DEV_PATHS["HmIPW-FIO6"] = new Object(); +DEV_PATHS["HmIPW-FIO6"]["50"] = "/config/img/devices/50/165_hmipw-fio6_thumb.png"; +DEV_PATHS["HmIPW-FIO6"]["250"] = "/config/img/devices/250/165_hmipw-fio6.png"; +DEV_HIGHLIGHT["HmIPW-FIO6"] = new Object(); +DEV_LIST.push('HM-LC-Sw4-DR-2'); +DEV_DESCRIPTION["HM-LC-Sw4-DR-2"] = "HM-LC-Sw4-DR"; +DEV_PATHS["HM-LC-Sw4-DR-2"] = new Object(); +DEV_PATHS["HM-LC-Sw4-DR-2"]["50"] = "/config/img/devices/50/68_hm-lc-sw4-dr_thumb.png"; +DEV_PATHS["HM-LC-Sw4-DR-2"]["250"] = "/config/img/devices/250/68_hm-lc-sw4-dr.png"; +DEV_HIGHLIGHT["HM-LC-Sw4-DR-2"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Sw4-DR-2"]["1"] = [4, 0.088, 0.556, 0.048, 0.04]; +DEV_HIGHLIGHT["HM-LC-Sw4-DR-2"]["2"] = [4, 0.280, 0.556, 0.048, 0.04]; +DEV_HIGHLIGHT["HM-LC-Sw4-DR-2"]["3"] = [4, 0.472, 0.556, 0.048, 0.04]; +DEV_HIGHLIGHT["HM-LC-Sw4-DR-2"]["4"] = [4, 0.656, 0.556, 0.048, 0.04]; +DEV_LIST.push('ZEL STG RM FDK'); +DEV_DESCRIPTION["ZEL STG RM FDK"] = "ZEL_STG_RM_FDK"; +DEV_PATHS["ZEL STG RM FDK"] = new Object(); +DEV_PATHS["ZEL STG RM FDK"]["50"] = "/config/img/devices/50/17_hm-sec-rhs_thumb.png"; +DEV_PATHS["ZEL STG RM FDK"]["250"] = "/config/img/devices/250/17_hm-sec-rhs.png"; +DEV_HIGHLIGHT["ZEL STG RM FDK"] = new Object(); +DEV_LIST.push('HmIP-PCBS-BAT'); +DEV_DESCRIPTION["HmIP-PCBS-BAT"] = "HmIP-PCBS-BAT"; +DEV_PATHS["HmIP-PCBS-BAT"] = new Object(); +DEV_PATHS["HmIP-PCBS-BAT"]["50"] = "/config/img/devices/50/151_hmip-pcbs-bat_thumb.png"; +DEV_PATHS["HmIP-PCBS-BAT"]["250"] = "/config/img/devices/250/151_hmip-pcbs-bat.png"; +DEV_HIGHLIGHT["HmIP-PCBS-BAT"] = new Object(); +DEV_LIST.push('HmIP-eTRV-2 I9F'); +DEV_DESCRIPTION["HmIP-eTRV-2 I9F"] = "TRV"; +DEV_PATHS["HmIP-eTRV-2 I9F"] = new Object(); +DEV_PATHS["HmIP-eTRV-2 I9F"]["50"] = "/config/img/devices/50/120_hmip-etrv_thumb.png"; +DEV_PATHS["HmIP-eTRV-2 I9F"]["250"] = "/config/img/devices/250/120_hmip-etrv.png"; +DEV_HIGHLIGHT["HmIP-eTRV-2 I9F"] = new Object(); +DEV_LIST.push('HM-LC-Bl1-SM-2'); +DEV_DESCRIPTION["HM-LC-Bl1-SM-2"] = "HM-LC-Bl1-SM"; +DEV_PATHS["HM-LC-Bl1-SM-2"] = new Object(); +DEV_PATHS["HM-LC-Bl1-SM-2"]["50"] = "/config/img/devices/50/6_hm-lc-bl1-sm_thumb.png"; +DEV_PATHS["HM-LC-Bl1-SM-2"]["250"] = "/config/img/devices/250/6_hm-lc-bl1-sm.png"; +DEV_HIGHLIGHT["HM-LC-Bl1-SM-2"] = new Object(); +DEV_LIST.push('ZEL STG RM FEP 230V'); +DEV_DESCRIPTION["ZEL STG RM FEP 230V"] = "ZEL_STG_RM_FEP_230V"; +DEV_PATHS["ZEL STG RM FEP 230V"] = new Object(); +DEV_PATHS["ZEL STG RM FEP 230V"]["50"] = "/config/img/devices/50/7_hm-lc-bl1-fm_thumb.png"; +DEV_PATHS["ZEL STG RM FEP 230V"]["250"] = "/config/img/devices/250/7_hm-lc-bl1-fm.png"; +DEV_HIGHLIGHT["ZEL STG RM FEP 230V"] = new Object(); +DEV_LIST.push('HM-Sen-MDIR-WM55'); +DEV_DESCRIPTION["HM-Sen-MDIR-WM55"] = "HM-Sen-MDIR-WM55"; +DEV_PATHS["HM-Sen-MDIR-WM55"] = new Object(); +DEV_PATHS["HM-Sen-MDIR-WM55"]["50"] = "/config/img/devices/50/103_hm-sen-mdir-wm55_thumb.png"; +DEV_PATHS["HM-Sen-MDIR-WM55"]["250"] = "/config/img/devices/250/103_hm-sen-mdir-wm55.png"; +DEV_HIGHLIGHT["HM-Sen-MDIR-WM55"] = new Object(); +DEV_HIGHLIGHT["HM-Sen-MDIR-WM55"]["1"] = [2, 0.192, 0.660, 0.524, 0.12]; +DEV_HIGHLIGHT["HM-Sen-MDIR-WM55"]["2"] = [2, 0.192, 0.252, 0.524, 0.12]; +DEV_HIGHLIGHT["HM-Sen-MDIR-WM55"]["1+2"] = [5, '1', '2']; +DEV_LIST.push('HmIP-SWDM-2'); +DEV_DESCRIPTION["HmIP-SWDM-2"] = "HmIP-SWDM"; +DEV_PATHS["HmIP-SWDM-2"] = new Object(); +DEV_PATHS["HmIP-SWDM-2"]["50"] = "/config/img/devices/50/181_hmip-swdm_thumb.png"; +DEV_PATHS["HmIP-SWDM-2"]["250"] = "/config/img/devices/250/181_hmip-swdm.png"; +DEV_HIGHLIGHT["HmIP-SWDM-2"] = new Object(); +DEV_LIST.push('HmIPW-WTH-A'); +DEV_DESCRIPTION["HmIPW-WTH-A"] = "HmIPW-WTH"; +DEV_PATHS["HmIPW-WTH-A"] = new Object(); +DEV_PATHS["HmIPW-WTH-A"]["50"] = "/config/img/devices/50/121_hmip-wth_thumb.png"; +DEV_PATHS["HmIPW-WTH-A"]["250"] = "/config/img/devices/250/121_hmip-wth.png"; +DEV_HIGHLIGHT["HmIPW-WTH-A"] = new Object(); +DEV_LIST.push('HM-Sen-DB-PCB'); +DEV_DESCRIPTION["HM-Sen-DB-PCB"] = "HM-Sen-DB-PCB"; +DEV_PATHS["HM-Sen-DB-PCB"] = new Object(); +DEV_PATHS["HM-Sen-DB-PCB"]["50"] = "/config/img/devices/50/101_hm-sen-db-pcb_thumb.png"; +DEV_PATHS["HM-Sen-DB-PCB"]["250"] = "/config/img/devices/250/101_hm-sen-db-pcb.png"; +DEV_HIGHLIGHT["HM-Sen-DB-PCB"] = new Object(); +DEV_LIST.push('HM-LC-Sw2-DR'); +DEV_DESCRIPTION["HM-LC-Sw2-DR"] = "HM-LC-Sw2-DR"; +DEV_PATHS["HM-LC-Sw2-DR"] = new Object(); +DEV_PATHS["HM-LC-Sw2-DR"]["50"] = "/config/img/devices/50/69_hm-lc-sw2-dr_thumb.png"; +DEV_PATHS["HM-LC-Sw2-DR"]["250"] = "/config/img/devices/250/69_hm-lc-sw2-dr.png"; +DEV_HIGHLIGHT["HM-LC-Sw2-DR"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Sw2-DR"]["1"] = [4, 0.095, 0.556, 0.045, 0.04]; +DEV_HIGHLIGHT["HM-LC-Sw2-DR"]["2"] = [4, 0.285, 0.556, 0.045, 0.04]; +DEV_LIST.push('HM-LC-Sw2-DR-2'); +DEV_DESCRIPTION["HM-LC-Sw2-DR-2"] = "HM-LC-Sw2-DR"; +DEV_PATHS["HM-LC-Sw2-DR-2"] = new Object(); +DEV_PATHS["HM-LC-Sw2-DR-2"]["50"] = "/config/img/devices/50/69_hm-lc-sw2-dr_thumb.png"; +DEV_PATHS["HM-LC-Sw2-DR-2"]["250"] = "/config/img/devices/250/69_hm-lc-sw2-dr.png"; +DEV_HIGHLIGHT["HM-LC-Sw2-DR-2"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Sw2-DR-2"]["1"] = [4, 0.095, 0.556, 0.045, 0.04]; +DEV_HIGHLIGHT["HM-LC-Sw2-DR-2"]["2"] = [4, 0.285, 0.556, 0.045, 0.04]; +DEV_LIST.push('263 133'); +DEV_DESCRIPTION["263 133"] = "263_133"; +DEV_PATHS["263 133"] = new Object(); +DEV_PATHS["263 133"]["50"] = "/config/img/devices/50/PushButton-2ch-wm_thumb.png"; +DEV_PATHS["263 133"]["250"] = "/config/img/devices/250/PushButton-2ch-wm.png"; +DEV_HIGHLIGHT["263 133"] = new Object(); +DEV_LIST.push('HM-LC-Dim1L-CV-644'); +DEV_DESCRIPTION["HM-LC-Dim1L-CV-644"] = "HM-LC-Dim1L-CV"; +DEV_PATHS["HM-LC-Dim1L-CV-644"] = new Object(); +DEV_PATHS["HM-LC-Dim1L-CV-644"]["50"] = "/config/img/devices/50/2_hm-lc-dim1l-cv_thumb.png"; +DEV_PATHS["HM-LC-Dim1L-CV-644"]["250"] = "/config/img/devices/250/2_hm-lc-dim1l-cv.png"; +DEV_HIGHLIGHT["HM-LC-Dim1L-CV-644"] = new Object(); +DEV_LIST.push('HmIP-DLD-S'); +DEV_DESCRIPTION["HmIP-DLD-S"] = "HmIP-DLD"; +DEV_PATHS["HmIP-DLD-S"] = new Object(); +DEV_PATHS["HmIP-DLD-S"]["50"] = "/config/img/devices/50/214_hmip-dld_thumb.png"; +DEV_PATHS["HmIP-DLD-S"]["250"] = "/config/img/devices/250/214_hmip-dld.png"; +DEV_HIGHLIGHT["HmIP-DLD-S"] = new Object(); +DEV_LIST.push('HmIP-WTH-A'); +DEV_DESCRIPTION["HmIP-WTH-A"] = "HmIP-WTH-2"; +DEV_PATHS["HmIP-WTH-A"] = new Object(); +DEV_PATHS["HmIP-WTH-A"]["50"] = "/config/img/devices/50/121_hmip-wth_thumb.png"; +DEV_PATHS["HmIP-WTH-A"]["250"] = "/config/img/devices/250/121_hmip-wth.png"; +DEV_HIGHLIGHT["HmIP-WTH-A"] = new Object(); +DEV_LIST.push('263 132'); +DEV_DESCRIPTION["263 132"] = "263_132"; +DEV_PATHS["263 132"] = new Object(); +DEV_PATHS["263 132"]["50"] = "/config/img/devices/50/2_hm-lc-dim1l-cv_thumb.png"; +DEV_PATHS["263 132"]["250"] = "/config/img/devices/250/2_hm-lc-dim1l-cv.png"; +DEV_HIGHLIGHT["263 132"] = new Object(); +DEV_LIST.push('HmIP-STHD-A'); +DEV_DESCRIPTION["HmIP-STHD-A"] = "HmIP-STHD"; +DEV_PATHS["HmIP-STHD-A"] = new Object(); +DEV_PATHS["HmIP-STHD-A"]["50"] = "/config/img/devices/50/147_hmip-sthd_thumb.png"; +DEV_PATHS["HmIP-STHD-A"]["250"] = "/config/img/devices/250/147_hmip-sthd.png"; +DEV_HIGHLIGHT["HmIP-STHD-A"] = new Object(); +DEV_LIST.push('HM-Sec-RHS'); +DEV_DESCRIPTION["HM-Sec-RHS"] = "HM-Sec-RHS"; +DEV_PATHS["HM-Sec-RHS"] = new Object(); +DEV_PATHS["HM-Sec-RHS"]["50"] = "/config/img/devices/50/17_hm-sec-rhs_thumb.png"; +DEV_PATHS["HM-Sec-RHS"]["250"] = "/config/img/devices/250/17_hm-sec-rhs.png"; +DEV_HIGHLIGHT["HM-Sec-RHS"] = new Object(); +DEV_LIST.push('atent'); +DEV_DESCRIPTION["atent"] = "atent"; +DEV_PATHS["atent"] = new Object(); +DEV_PATHS["atent"]["50"] = "/config/img/devices/50/73_hm-atent_thumb.png"; +DEV_PATHS["atent"]["250"] = "/config/img/devices/250/73_hm-atent.png"; +DEV_HIGHLIGHT["atent"] = new Object(); +DEV_HIGHLIGHT["atent"]["1"] = [4, 0.177, 0.216, 0.166, 0.166]; +DEV_HIGHLIGHT["atent"]["2"] = [4, 0.438, 0.216, 0.166, 0.166]; +DEV_HIGHLIGHT["atent"]["3"] = [4, 0.273, 0.49, 0.24, 0.235]; +DEV_HIGHLIGHT["atent"]["1+2"] = [5, '1', '2']; +DEV_LIST.push('HM-LC-Dim2L-SM-2'); +DEV_DESCRIPTION["HM-LC-Dim2L-SM-2"] = "HM-LC-Dim2L-SM"; +DEV_PATHS["HM-LC-Dim2L-SM-2"] = new Object(); +DEV_PATHS["HM-LC-Dim2L-SM-2"]["50"] = "/config/img/devices/50/45_hm-lc-dim2l-sm_thumb.png"; +DEV_PATHS["HM-LC-Dim2L-SM-2"]["250"] = "/config/img/devices/250/45_hm-lc-dim2l-sm.png"; +DEV_HIGHLIGHT["HM-LC-Dim2L-SM-2"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Dim2L-SM-2"]["1_Part1"] = [6, 0.530, 0.896, 0.530, 0.98, 0.012]; +DEV_HIGHLIGHT["HM-LC-Dim2L-SM-2"]["1_Part2"] = [6, 0.530, 0.98, 0.49, 0.916, 0.012]; +DEV_HIGHLIGHT["HM-LC-Dim2L-SM-2"]["1_Part3"] = [6, 0.530, 0.98, 0.574, 0.916, 0.012]; +DEV_HIGHLIGHT["HM-LC-Dim2L-SM-2"]["1_Arrow"] = [5, '1_Part1', '1_Part2', '1_Part3']; +DEV_HIGHLIGHT["HM-LC-Dim2L-SM-2"]["2_Arrow"] = [7, '1_Arrow', 0.168, 0]; +DEV_HIGHLIGHT["HM-LC-Dim2L-SM-2"]["1_Key"] = [4, 0.25, 0.33, 0.04, 0.044]; +DEV_HIGHLIGHT["HM-LC-Dim2L-SM-2"]["2_Key"] = [4, 0.328, 0.33, 0.04, 0.044]; +DEV_HIGHLIGHT["HM-LC-Dim2L-SM-2"]["1"] = [5, '1_Arrow', '1_Key']; +DEV_HIGHLIGHT["HM-LC-Dim2L-SM-2"]["2"] = [5, '2_Arrow', '2_Key']; +DEV_LIST.push('HmIP-USBSM'); +DEV_DESCRIPTION["HmIP-USBSM"] = "HmIP-USBSM"; +DEV_PATHS["HmIP-USBSM"] = new Object(); +DEV_PATHS["HmIP-USBSM"]["50"] = "/config/img/devices/50/217_hmip-usbsm_thumb.png"; +DEV_PATHS["HmIP-USBSM"]["250"] = "/config/img/devices/250/217_hmip-usbsm.png"; +DEV_HIGHLIGHT["HmIP-USBSM"] = new Object(); +DEV_LIST.push('HM-LC-Sw2-FM'); +DEV_DESCRIPTION["HM-LC-Sw2-FM"] = "HM-LC-Sw2-FM"; +DEV_PATHS["HM-LC-Sw2-FM"] = new Object(); +DEV_PATHS["HM-LC-Sw2-FM"]["50"] = "/config/img/devices/50/5_hm-lc-sw2-fm_thumb.png"; +DEV_PATHS["HM-LC-Sw2-FM"]["250"] = "/config/img/devices/250/5_hm-lc-sw2-fm.png"; +DEV_HIGHLIGHT["HM-LC-Sw2-FM"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Sw2-FM"]["1_AUS"] = [2, 0.34, 0.66, 0.068, 0.148]; +DEV_HIGHLIGHT["HM-LC-Sw2-FM"]["1_EIN"] = [2, 0.6, 0.66, 0.068, 0.148]; +DEV_HIGHLIGHT["HM-LC-Sw2-FM"]["2_AUS"] = [2, 0.256, 0.66, 0.068, 0.148]; +DEV_HIGHLIGHT["HM-LC-Sw2-FM"]["2_EIN"] = [2, 0.508, 0.66, 0.068, 0.148]; +DEV_HIGHLIGHT["HM-LC-Sw2-FM"]["1"] = [5, '1_AUS', '1_EIN']; +DEV_HIGHLIGHT["HM-LC-Sw2-FM"]["2"] = [5, '2_AUS', '2_EIN']; +DEV_LIST.push('ELV-SH-WSC'); +DEV_DESCRIPTION["ELV-SH-WSC"] = "HmIP-WSC"; +DEV_PATHS["ELV-SH-WSC"] = new Object(); +DEV_PATHS["ELV-SH-WSC"]["50"] = "/config/img/devices/50/220_hmip-wsc_thumb.png"; +DEV_PATHS["ELV-SH-WSC"]["250"] = "/config/img/devices/250/220_hmip-wsc.png"; +DEV_HIGHLIGHT["ELV-SH-WSC"] = new Object(); +DEV_LIST.push('HmIP-WTH-1'); +DEV_DESCRIPTION["HmIP-WTH-1"] = "HmIP-WTH-2"; +DEV_PATHS["HmIP-WTH-1"] = new Object(); +DEV_PATHS["HmIP-WTH-1"]["50"] = "/config/img/devices/50/121_hmip-wth_thumb.png"; +DEV_PATHS["HmIP-WTH-1"]["250"] = "/config/img/devices/250/121_hmip-wth.png"; +DEV_HIGHLIGHT["HmIP-WTH-1"] = new Object(); +DEV_LIST.push('HM-LC-Dim1T-CV-2'); +DEV_DESCRIPTION["HM-LC-Dim1T-CV-2"] = "HM-LC-Dim1T-CV"; +DEV_PATHS["HM-LC-Dim1T-CV-2"] = new Object(); +DEV_PATHS["HM-LC-Dim1T-CV-2"]["50"] = "/config/img/devices/50/66_hm-lc-dim1t-cv_thumb.png"; +DEV_PATHS["HM-LC-Dim1T-CV-2"]["250"] = "/config/img/devices/250/66_hm-lc-dim1t-cv.png"; +DEV_HIGHLIGHT["HM-LC-Dim1T-CV-2"] = new Object(); +DEV_LIST.push('HM-Dis-EP-WM55'); +DEV_DESCRIPTION["HM-Dis-EP-WM55"] = "HM-Dis-EP-WM55"; +DEV_PATHS["HM-Dis-EP-WM55"] = new Object(); +DEV_PATHS["HM-Dis-EP-WM55"]["50"] = "/config/img/devices/50/128_hm-dis-ep-wm55_thumb.png"; +DEV_PATHS["HM-Dis-EP-WM55"]["250"] = "/config/img/devices/250/128_hm-dis-ep-wm55.png"; +DEV_HIGHLIGHT["HM-Dis-EP-WM55"] = new Object(); +DEV_LIST.push('HM-LC-Sw1-Pl-3'); +DEV_DESCRIPTION["HM-LC-Sw1-Pl-3"] = "HM-LC-Sw1-Pl"; +DEV_PATHS["HM-LC-Sw1-Pl-3"] = new Object(); +DEV_PATHS["HM-LC-Sw1-Pl-3"]["50"] = "/config/img/devices/50/OM55_DimmerSwitch_thumb.png"; +DEV_PATHS["HM-LC-Sw1-Pl-3"]["250"] = "/config/img/devices/250/OM55_DimmerSwitch.png"; +DEV_HIGHLIGHT["HM-LC-Sw1-Pl-3"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Sw1-Pl-3"]["1_part1"] = [2, 0.548, 0.468, 0.072, 0.052]; +DEV_HIGHLIGHT["HM-LC-Sw1-Pl-3"]["1_part2"] = [2, 0.612, 0.452, 0.028, 0.056]; +DEV_HIGHLIGHT["HM-LC-Sw1-Pl-3"]["1"] = [5, '1_part1', '1_part2']; +DEV_LIST.push('HmIP-PDT-UK'); +DEV_DESCRIPTION["HmIP-PDT-UK"] = "PDT"; +DEV_PATHS["HmIP-PDT-UK"] = new Object(); +DEV_PATHS["HmIP-PDT-UK"]["50"] = "/config/img/devices/50/113_hmip-psm-uk_thumb.png"; +DEV_PATHS["HmIP-PDT-UK"]["250"] = "/config/img/devices/250/113_hmip-psm-uk.png"; +DEV_HIGHLIGHT["HmIP-PDT-UK"] = new Object(); +DEV_LIST.push('HmIPW-SMI55'); +DEV_DESCRIPTION["HmIPW-SMI55"] = "HmIPW-SMI55"; +DEV_PATHS["HmIPW-SMI55"] = new Object(); +DEV_PATHS["HmIPW-SMI55"]["50"] = "/config/img/devices/50/195_hmipw-smi55_thumb.png"; +DEV_PATHS["HmIPW-SMI55"]["250"] = "/config/img/devices/250/195_hmipw-smi55.png"; +DEV_HIGHLIGHT["HmIPW-SMI55"] = new Object(); +DEV_HIGHLIGHT["HmIPW-SMI55"]["1"] = [1, 0.530, 0.820, 0.025]; +DEV_HIGHLIGHT["HmIPW-SMI55"]["2"] = [1, 0.505, 0.210, 0.025]; +DEV_LIST.push('HM-LC-Sw1-Pl-DN-R2'); +DEV_DESCRIPTION["HM-LC-Sw1-Pl-DN-R2"] = "HM-LC-Sw1-Pl-DN-R2"; +DEV_PATHS["HM-LC-Sw1-Pl-DN-R2"] = new Object(); +DEV_PATHS["HM-LC-Sw1-Pl-DN-R2"]["50"] = "/config/img/devices/50/107_hm-es-pmsw1-pl-R2_thumb.png"; +DEV_PATHS["HM-LC-Sw1-Pl-DN-R2"]["250"] = "/config/img/devices/250/107_hm-es-pmsw1-pl-R2.png"; +DEV_HIGHLIGHT["HM-LC-Sw1-Pl-DN-R2"] = new Object(); +DEV_LIST.push('HmIP-BBL-2'); +DEV_DESCRIPTION["HmIP-BBL-2"] = "HmIP-BBL-2"; +DEV_PATHS["HmIP-BBL-2"] = new Object(); +DEV_PATHS["HmIP-BBL-2"]["50"] = "/config/img/devices/50/PushButton-2ch-wm_thumb.png"; +DEV_PATHS["HmIP-BBL-2"]["250"] = "/config/img/devices/250/PushButton-2ch-wm.png"; +DEV_HIGHLIGHT["HmIP-BBL-2"] = new Object(); +DEV_HIGHLIGHT["HmIP-BBL-2"]["2"] = [2, 0.244, 0.312, 0.428, 0.168]; +DEV_HIGHLIGHT["HmIP-BBL-2"]["1"] = [2, 0.244, 0.56, 0.428, 0.168]; +DEV_HIGHLIGHT["HmIP-BBL-2"]["1+2"] = [2, 0.244, 0.308, 0.428, 0.416]; +DEV_LIST.push('HmIP-STHO-A'); +DEV_DESCRIPTION["HmIP-STHO-A"] = "HmIP-STHO"; +DEV_PATHS["HmIP-STHO-A"] = new Object(); +DEV_PATHS["HmIP-STHO-A"]["50"] = "/config/img/devices/50/148_hmip-stho_thumb.png"; +DEV_PATHS["HmIP-STHO-A"]["250"] = "/config/img/devices/250/148_hmip-stho.png"; +DEV_HIGHLIGHT["HmIP-STHO-A"] = new Object(); +DEV_LIST.push('HM-WDS10-TH-O'); +DEV_DESCRIPTION["HM-WDS10-TH-O"] = "HM-WDS10-TH-O"; +DEV_PATHS["HM-WDS10-TH-O"] = new Object(); +DEV_PATHS["HM-WDS10-TH-O"]["50"] = "/config/img/devices/50/TH_CS_thumb.png"; +DEV_PATHS["HM-WDS10-TH-O"]["250"] = "/config/img/devices/250/TH_CS.png"; +DEV_HIGHLIGHT["HM-WDS10-TH-O"] = new Object(); +DEV_LIST.push('ELV-SH-BS2'); +DEV_DESCRIPTION["ELV-SH-BS2"] = "HmIP-BS2"; +DEV_PATHS["ELV-SH-BS2"] = new Object(); +DEV_PATHS["ELV-SH-BS2"]["50"] = "/config/img/devices/50/PushButton-2ch-wm_thumb.png"; +DEV_PATHS["ELV-SH-BS2"]["250"] = "/config/img/devices/250/PushButton-2ch-wm.png"; +DEV_HIGHLIGHT["ELV-SH-BS2"] = new Object(); +DEV_HIGHLIGHT["ELV-SH-BS2"]["1"] = [2, 0.244, 0.312, 0.428, 0.168]; +DEV_HIGHLIGHT["ELV-SH-BS2"]["2"] = [2, 0.244, 0.56, 0.428, 0.168]; +DEV_HIGHLIGHT["ELV-SH-BS2"]["1+2"] = [2, 0.244, 0.308, 0.428, 0.416]; +DEV_LIST.push('ZEL STG RM FSS UP3'); +DEV_DESCRIPTION["ZEL STG RM FSS UP3"] = "ZEL_STG_RM_FSS_UP3"; +DEV_PATHS["ZEL STG RM FSS UP3"] = new Object(); +DEV_PATHS["ZEL STG RM FSS UP3"]["50"] = "/config/img/devices/50/39_hm-swi-3-fm_thumb.png"; +DEV_PATHS["ZEL STG RM FSS UP3"]["250"] = "/config/img/devices/250/39_hm-swi-3-fm.png"; +DEV_HIGHLIGHT["ZEL STG RM FSS UP3"] = new Object(); +DEV_HIGHLIGHT["ZEL STG RM FSS UP3"]["1_Key"] = [3, 0.18, 0.216, '1', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["ZEL STG RM FSS UP3"]["1_Kreis"] = [4, 0.220, 0.480, 0.028, 0.028]; +DEV_HIGHLIGHT["ZEL STG RM FSS UP3"]["1"] = [5, '1_Key', '1_Kreis']; +DEV_HIGHLIGHT["ZEL STG RM FSS UP3"]["2_Key"] = [3, 0.18, 0.216, '2', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["ZEL STG RM FSS UP3"]["2_Kreis"] = [4, 0.265, 0.405, 0.028, 0.028]; +DEV_HIGHLIGHT["ZEL STG RM FSS UP3"]["2"] = [5, '2_Key', '2_Kreis']; +DEV_HIGHLIGHT["ZEL STG RM FSS UP3"]["3_Key"] = [3, 0.18, 0.216, '3', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["ZEL STG RM FSS UP3"]["3_Kreis"] = [4, 0.310, 0.33, 0.028, 0.028]; +DEV_HIGHLIGHT["ZEL STG RM FSS UP3"]["3"] = [5, '3_Key', '3_Kreis']; +DEV_LIST.push('HmIP-CCU3'); +DEV_DESCRIPTION["HmIP-CCU3"] = "HmIP-CCU3"; +DEV_PATHS["HmIP-CCU3"] = new Object(); +DEV_PATHS["HmIP-CCU3"]["50"] = "/config/img/devices/50/CCU3_thumb.png"; +DEV_PATHS["HmIP-CCU3"]["250"] = "/config/img/devices/250/CCU3.png"; +DEV_HIGHLIGHT["HmIP-CCU3"] = new Object(); +DEV_LIST.push('263 145'); +DEV_DESCRIPTION["263 145"] = "263_145"; +DEV_PATHS["263 145"] = new Object(); +DEV_PATHS["263 145"]["50"] = "/config/img/devices/50/38_hm-pbi-4-fm_thumb.png"; +DEV_PATHS["263 145"]["250"] = "/config/img/devices/250/38_hm-pbi-4-fm.png"; +DEV_HIGHLIGHT["263 145"] = new Object(); +DEV_HIGHLIGHT["263 145"]["1_Key"] = [3, 0.18, 0.216, '1', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["263 145"]["1_Kreis"] = [4, 0.265, 0.500, 0.028, 0.028]; +DEV_HIGHLIGHT["263 145"]["1"] = [5, '1_Key', '1_Kreis']; +DEV_HIGHLIGHT["263 145"]["2_Key"] = [3, 0.18, 0.216, '2', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["263 145"]["2_Kreis"] = [4, 0.287, 0.465, 0.028, 0.028]; +DEV_HIGHLIGHT["263 145"]["2"] = [5, '2_Key', '2_Kreis']; +DEV_HIGHLIGHT["263 145"]["3_Key"] = [3, 0.18, 0.216, '3', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["263 145"]["3_Kreis"] = [4, 0.309, 0.430, 0.028, 0.028]; +DEV_HIGHLIGHT["263 145"]["3"] = [5, '3_Key', '3_Kreis']; +DEV_HIGHLIGHT["263 145"]["4_Key"] = [3, 0.18, 0.216, '4', 0.14, 'verdana', Font.BOLD]; +DEV_HIGHLIGHT["263 145"]["4_Kreis"] = [4, 0.331, 0.395, 0.028, 0.028]; +DEV_HIGHLIGHT["263 145"]["4"] = [5, '4_Key', '4_Kreis']; +DEV_LIST.push('HM-LC-Sw4-SM-2'); +DEV_DESCRIPTION["HM-LC-Sw4-SM-2"] = "HM-LC-Sw4-SM"; +DEV_PATHS["HM-LC-Sw4-SM-2"] = new Object(); +DEV_PATHS["HM-LC-Sw4-SM-2"]["50"] = "/config/img/devices/50/3_hm-lc-sw4-sm_thumb.png"; +DEV_PATHS["HM-LC-Sw4-SM-2"]["250"] = "/config/img/devices/250/3_hm-lc-sw4-sm.png"; +DEV_HIGHLIGHT["HM-LC-Sw4-SM-2"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Sw4-SM-2"]["1_Part1"] = [6, 0.136, 0.896, 0.136, 0.98, 0.012]; +DEV_HIGHLIGHT["HM-LC-Sw4-SM-2"]["1_Part2"] = [6, 0.136, 0.98, 0.096, 0.916, 0.012]; +DEV_HIGHLIGHT["HM-LC-Sw4-SM-2"]["1_Part3"] = [6, 0.136, 0.98, 0.176, 0.916, 0.012]; +DEV_HIGHLIGHT["HM-LC-Sw4-SM-2"]["1_Arrow"] = [5, '1_Part1', '1_Part2', '1_Part3']; +DEV_HIGHLIGHT["HM-LC-Sw4-SM-2"]["2_Arrow"] = [7, '1_Arrow', 0.164, 0]; +DEV_HIGHLIGHT["HM-LC-Sw4-SM-2"]["3_Arrow"] = [7, '1_Arrow', 0.328, 0]; +DEV_HIGHLIGHT["HM-LC-Sw4-SM-2"]["4_Arrow"] = [7, '1_Arrow', 0.492, 0]; +DEV_HIGHLIGHT["HM-LC-Sw4-SM-2"]["1_Key"] = [4, 0.244, 0.372, 0.04, 0.044]; +DEV_HIGHLIGHT["HM-LC-Sw4-SM-2"]["2_Key"] = [4, 0.328, 0.372, 0.04, 0.044]; +DEV_HIGHLIGHT["HM-LC-Sw4-SM-2"]["3_Key"] = [4, 0.404, 0.372, 0.04, 0.044]; +DEV_HIGHLIGHT["HM-LC-Sw4-SM-2"]["4_Key"] = [4, 0.484, 0.372, 0.04, 0.044]; +DEV_HIGHLIGHT["HM-LC-Sw4-SM-2"]["1"] = [5, '1_Arrow', '1_Key']; +DEV_HIGHLIGHT["HM-LC-Sw4-SM-2"]["2"] = [5, '2_Arrow', '2_Key']; +DEV_HIGHLIGHT["HM-LC-Sw4-SM-2"]["3"] = [5, '3_Arrow', '3_Key']; +DEV_HIGHLIGHT["HM-LC-Sw4-SM-2"]["4"] = [5, '4_Arrow', '4_Key']; +DEV_LIST.push('HmIP-WSC'); +DEV_DESCRIPTION["HmIP-WSC"] = "HmIP-WSC"; +DEV_PATHS["HmIP-WSC"] = new Object(); +DEV_PATHS["HmIP-WSC"]["50"] = "/config/img/devices/50/220_hmip-wsc_thumb.png"; +DEV_PATHS["HmIP-WSC"]["250"] = "/config/img/devices/250/220_hmip-wsc.png"; +DEV_HIGHLIGHT["HmIP-WSC"] = new Object(); +DEV_LIST.push('HM-LC-Sw4-Ba-PCB'); +DEV_DESCRIPTION["HM-LC-Sw4-Ba-PCB"] = "HM-LC-Sw4-Ba-PCB"; +DEV_PATHS["HM-LC-Sw4-Ba-PCB"] = new Object(); +DEV_PATHS["HM-LC-Sw4-Ba-PCB"]["50"] = "/config/img/devices/50/88_hm-lc-sw4-ba-pcb_thumb.png"; +DEV_PATHS["HM-LC-Sw4-Ba-PCB"]["250"] = "/config/img/devices/250/88_hm-lc-sw4-ba-pcb.png"; +DEV_HIGHLIGHT["HM-LC-Sw4-Ba-PCB"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Sw4-Ba-PCB"]["1"] = [2, 0.140, 0.704, 0.092, 0.052]; +DEV_HIGHLIGHT["HM-LC-Sw4-Ba-PCB"]["2"] = [2, 0.328, 0.704, 0.092, 0.052]; +DEV_HIGHLIGHT["HM-LC-Sw4-Ba-PCB"]["3"] = [2, 0.512, 0.704, 0.092, 0.052]; +DEV_HIGHLIGHT["HM-LC-Sw4-Ba-PCB"]["4"] = [2, 0.688, 0.704, 0.092, 0.052]; +DEV_LIST.push('ZEL STG RM WT 2'); +DEV_DESCRIPTION["ZEL STG RM WT 2"] = "ZEL_STG_RM_WT_2"; +DEV_PATHS["ZEL STG RM WT 2"] = new Object(); +DEV_PATHS["ZEL STG RM WT 2"]["50"] = "/config/img/devices/50/75_hm-pb-2-wm55_thumb.png"; +DEV_PATHS["ZEL STG RM WT 2"]["250"] = "/config/img/devices/250/75_hm-pb-2-wm55.png"; +DEV_HIGHLIGHT["ZEL STG RM WT 2"] = new Object(); +DEV_HIGHLIGHT["ZEL STG RM WT 2"]["2"] = [2, 0.204, 0.23, 0.546, 0.128]; +DEV_HIGHLIGHT["ZEL STG RM WT 2"]["1"] = [2, 0.204, 0.65, 0.546, 0.128]; +DEV_LIST.push('HM-EM-CCM'); +DEV_DESCRIPTION["HM-EM-CCM"] = "HM-EM-CCM"; +DEV_PATHS["HM-EM-CCM"] = new Object(); +DEV_PATHS["HM-EM-CCM"]["50"] = "/config/img/devices/50/44_hm-em-ccm_thumb.png"; +DEV_PATHS["HM-EM-CCM"]["250"] = "/config/img/devices/250/44_hm-em-ccm.png"; +DEV_HIGHLIGHT["HM-EM-CCM"] = new Object(); +DEV_LIST.push('HM-LC-Sw1-Pl-2'); +DEV_DESCRIPTION["HM-LC-Sw1-Pl-2"] = "HM-LC-Sw1-Pl"; +DEV_PATHS["HM-LC-Sw1-Pl-2"] = new Object(); +DEV_PATHS["HM-LC-Sw1-Pl-2"]["50"] = "/config/img/devices/50/OM55_DimmerSwitch_thumb.png"; +DEV_PATHS["HM-LC-Sw1-Pl-2"]["250"] = "/config/img/devices/250/OM55_DimmerSwitch.png"; +DEV_HIGHLIGHT["HM-LC-Sw1-Pl-2"] = new Object(); +DEV_HIGHLIGHT["HM-LC-Sw1-Pl-2"]["1_part1"] = [2, 0.548, 0.468, 0.072, 0.052]; +DEV_HIGHLIGHT["HM-LC-Sw1-Pl-2"]["1_part2"] = [2, 0.612, 0.452, 0.028, 0.056]; +DEV_HIGHLIGHT["HM-LC-Sw1-Pl-2"]["1"] = [5, '1_part1', '1_part2']; +DEV_LIST.push('HM-MOD-EM-8'); +DEV_DESCRIPTION["HM-MOD-EM-8"] = "HM-MOD-EM-8"; +DEV_PATHS["HM-MOD-EM-8"] = new Object(); +DEV_PATHS["HM-MOD-EM-8"]["50"] = "/config/img/devices/50/99_hm-mod-em-8_thumb.png"; +DEV_PATHS["HM-MOD-EM-8"]["250"] = "/config/img/devices/250/99_hm-mod-em-8.png"; +DEV_HIGHLIGHT["HM-MOD-EM-8"] = new Object(); +//====================================================================== +//Defines +//====================================================================== +GD_TYPE = new Array(); +GD_TYPE["UNDEFINED"] = 0; +GD_TYPE["CIRCLE"] = 1; +GD_TYPE["RECTANGLE"] = 2; +GD_TYPE["STRING"] = 3; +GD_TYPE["ELLIPSE"] = 4; +GD_TYPE["FORMSET"] = 5; +GD_TYPE["LINE"] = 6; +GD_TYPE["OFFSET"] = 7; + +//Bedeutung einer Position im Array DEV_HIGHLIGHT +//Typangabe +gd_type = 0; + +//circle, point +gd_xx = 1; +gd_yy = 2; +gd_rr = 3; + +//rectangle, line, ellipse +gd_dx = 3; +gd_dy = 4; + +//String +gd_string = 3; +gd_fontsize = 4; +gd_fontfamily = 5; +gd_fontstyle = 6; + +//Line +gd_x1 = 1; +gd_y1 = 2; +gd_x2 = 3; +gd_y2 = 4; +gd_stroke = 5; + +//Offset +gd_nameoff = 1; +gd_xoff = 2; +gd_yoff = 3; +//====================================================================== + +DEV_TypeExists = function(type) +{ + return DEV_LIST.indexOf(type) >= 0; +}; + +DEV_getDescription = function(type) +{ + //if (DEV_TypeExists(type)) descr = DEV_DESCRIPTION[type]; + + var descr; + + try { + descr = DEV_DESCRIPTION[type]; + } catch (e) { } + + if (!descr) descr = type; + + return descr; +}; + +DEV_getImagePath = function(type, size) +{ + + var product = WEBUI_VERSION.split(".")[0]; + + if (product < 3 && (type == "HmIP-RCV-50")) { + DEV_PATHS[type][50] = "/config/img/devices/50/CCU2_thumb.png"; + DEV_PATHS[type][250] = "/config/img/devices/250/CCU2.png"; + } + + if (product >= 3 && (type == "HM-RCV-50" || type == "HMW-RCV-50")) { + DEV_PATHS[type][50] = "/config/img/devices/50/CCU3-1-50_thumb.png"; + DEV_PATHS[type][250] = "/config/img/devices/250/CCU3-1-50.png"; + } + + var path; + + try { + path = DEV_PATHS[type][size]; + } catch (e) { } + + if (! path) path = "#"; + + return path; +}; + +DEV_getImageHighlight = function(type, form) +{ + var form; + + try { + form = DEV_HIGHLIGHT[type][form]; + } catch (e) { } + + if (! form) form = null; + + // The position of the channel number adapted to the housing of the CCU3 + var product = WEBUI_VERSION.split(".")[0]; + if (product >= 3 && (type == "HM-RCV-50" || type == "HMW-RCV-50")) { + if (form && form.length > 2) { + form[2] = 0.57; // y-position + } + } + + return form; +}; +elvST = new Array(); +elvST['ABSOLUTE_ANGLE'] = '${stringTableAbsoluteAngle}'; +elvST['ABSOLUTE_ANGLE_STATUS=NORMAL'] = '${stringTableAbsoluteAngleStatus}: ${lblNormal}'; +elvST['ABSOLUTE_ANGLE_STATUS=UNKNOWN'] = '${stringTableAbsoluteAngleStatus}: ${lblUnknown}'; +elvST['ACCELERATION_TRANSCEIVER'] = '${stringTableAccelerationTransceiverTitle}'; +elvST['ACCELERATION_TRANSCEIVER|CHANNEL_OPERATION_MODE'] = '${stringTableAccelerationTransceiverChannelOperationMode}'; +elvST['ACCELERATION_TRANSCEIVER|CHANNEL_OPERATION_MODE=OFF'] = '${stringTableAccelerationTransceiverChannelOperationModeOff}'; +elvST['ACCELERATION_TRANSCEIVER|CHANNEL_OPERATION_MODE=ANY_MOTION'] = '${stringTableAccelerationTransceiverChannelOperationModeAnyMotion}'; +elvST['ACCELERATION_TRANSCEIVER|CHANNEL_OPERATION_MODE=FLAT_DECT'] = '${stringTableAccelerationTransceiverChannelOperationModeFlat}'; +elvST['ACCELERATION_TRANSCEIVER|MOTION=FALSE'] = '${stringTableAccelerationTransceiverMotionDetectorMotionFalse}'; +elvST['ACCELERATION_TRANSCEIVER|MOTION=TRUE'] = '${stringTableAccelerationTransceiverMotionDetectorMotionTrue}'; +elvST['ACCELERATION_TRANSCEIVER|MSG_FOR_POS_A'] = '${stringTableTiltSensorMsgPosA0}'; +elvST['ACCELERATION_TRANSCEIVER|MSG_FOR_POS_A=CLOSED'] = '${stringTableTiltSensorMsgPosA1}'; +elvST['ACCELERATION_TRANSCEIVER|MSG_FOR_POS_A=NO_MSG'] = '${stringTableTiltSensorMsgPosA2}'; +elvST['ACCELERATION_TRANSCEIVER|MSG_FOR_POS_A=OPEN'] = '${stringTableTiltSensorMsgPosA3}'; +elvST['ACCELERATION_TRANSCEIVER|MSG_FOR_POS_B'] = '${stringTableTiltSensorMsgPosB0}'; +elvST['ACCELERATION_TRANSCEIVER|MSG_FOR_POS_B=CLOSED'] = '${stringTableTiltSensorMsgPosB1}'; +elvST['ACCELERATION_TRANSCEIVER|MSG_FOR_POS_B=NO_MSG'] = '${stringTableTiltSensorMsgPosB2}'; +elvST['ACCELERATION_TRANSCEIVER|MSG_FOR_POS_B=OPEN'] = '${stringTableTiltSensorMsgPosB3}'; +elvST['ACCELERATION_TRANSCEIVER|NOTIFICATION_SOUND_TYPE_HIGH_TO_LOW'] = '${stringTableAccelerationTransceiverNotificationSoundTypeHighToLow}'; +elvST['ACCELERATION_TRANSCEIVER|NOTIFICATION_SOUND_TYPE_LOW_TO_HIGH'] = '${stringTableAccelerationTransceiverNotificationSoundTypeLowToHigh}'; +elvST['ACCELERATION_TRANSCEIVER|STATE=CLOSED'] = '${stringTableRHSMsgPosClosed}'; +elvST['ACCELERATION_TRANSCEIVER|STATE=OPEN'] = '${stringTableRHSMsgPosOpen}'; +elvST['ACCELERATION_TRANSCEIVER|STATE=TILTED'] = '${stringTableRHSMsgPosTilted}'; +elvST['ACCESS_RECEIVER'] = '${stringTableAccessReceiverTitle}'; +elvST['ACCESS_RECEIVER|STATE=FALSE'] = '${stringTableAccessReceiverStateFalse}'; +elvST['ACCESS_RECEIVER|STATE=TRUE'] = '${stringTableAccessReceiverStateTrue}'; +elvST['ACCESS_RECEIVER|ACCESS_AUTHORIZATION=ENABLE'] = '${stringTableAccessReceiverAccessAuthorizationTrue}'; +elvST['ACCESS_RECEIVER|ACCESS_AUTHORIZATION=DISABLE'] = '${stringTableAccessReceiverAccessAuthorizationFalse}'; +elvST['ACCESS_TRANSCEIVER'] = '${stringTableAccessTransceiverTitle}'; +elvST['ACCESS_TRANSCEIVER|STATE=FALSE'] = '${stringTableAccessTransceiverStateFalse}'; +elvST['ACCESS_TRANSCEIVER|STATE=TRUE'] = '${stringTableAccessTransceiverStateTrue}'; +elvST['ACCESS_TRANSCEIVER|ACCESS_AUTHORIZATION=ENABLE'] = '${stringTableAccessTransceiverAccessAuthorizationTrue}'; +elvST['ACCESS_TRANSCEIVER|ACCESS_AUTHORIZATION=DISABLE'] = '${stringTableAccessTransceiverAccessAuthorizationFalse}'; +elvST['ACCESS_TRANSCEIVER|PRESS_LOCK'] = '${stringTableKeyAccessTransceiverPressLock}'; +elvST['ACCESS_TRANSCEIVER|PRESS_UNLOCK'] = '${stringTableKeyAccessTransceiverPressUnLock}'; +elvST['ACOUSTIC_ALARM_ACTIVE=FALSE'] = '${stringTableAcousticAlarmActiveFalse}'; +elvST['ACOUSTIC_ALARM_ACTIVE=TRUE'] = '${stringTableAcousticAlarmActiveTrue}'; +elvST['OPTICAL_ALARM_ACTIVE=FALSE'] = '${stringTableOpticalAlarmActiveFalse}'; +elvST['OPTICAL_ALARM_ACTIVE=TRUE'] = '${stringTableOpticalAlarmActiveTrue}'; +elvST['ACOUSTIC_ALARM_SELECTION=DELAYED_EXTERNALLY_ARMED'] = '${stringTableAlarmDelayedExternallyArmed}'; +elvST['ACOUSTIC_ALARM_SELECTION=DELAYED_INTERNALLY_ARMED'] = '${stringTableAlarmDelayedInternallyArmed}'; +elvST['ACOUSTIC_ALARM_SELECTION=DISABLE_ACOUSTIC_SIGNAL'] = '${stringTableAlarmDisableAcousticSignal}'; +elvST['ACOUSTIC_ALARM_SELECTION=DISARMED'] = '${stringTableAlarmDisarmed}'; +elvST['ACOUSTIC_ALARM_SELECTION=ERROR'] = '${stringTableAlarmError}'; +elvST['ACOUSTIC_ALARM_SELECTION=EVENT'] = '${stringTableAlarmEvent}'; +elvST['ACOUSTIC_ALARM_SELECTION=EXTERNALLY_ARMED'] = '${stringTableAlarmExternallyArmed}'; +elvST['ACOUSTIC_ALARM_SELECTION=INTERNALLY_ARMED'] = '${stringTableAlarmInternallyArmed}'; +elvST['ACOUSTIC_ALARM_SELECTION=LOW_BATTERY'] = '${stringTableAlarmLowBattery}'; +elvST['ACOUSTIC_ALARM_SELECTION=FREQUENCY_RISING'] = '${stringTableAlarmFrequencyRising}'; +elvST['ACOUSTIC_ALARM_SELECTION=FREQUENCY_FALLING'] = '${stringTableAlarmFrequencyFalling}'; +elvST['ACOUSTIC_ALARM_SELECTION=FREQUENCY_RISING_AND_FALLING'] = '${stringTableAlarmFrequencyRisingAndFalling}'; +elvST['ACOUSTIC_ALARM_SELECTION=FREQUENCY_ALTERNATING_LOW_HIGH'] = '${stringTableAlarmFrequencyAlternatingLowHigh}'; +elvST['ACOUSTIC_ALARM_SELECTION=FREQUENCY_ALTERNATING_LOW_MID_HIGH'] = '${stringTableAlarmFrequencyAlternatingLowMidHigh}'; +elvST['ACOUSTIC_ALARM_SELECTION=FREQUENCY_HIGHON_OFF'] = '${stringTableAlarmFrequencyHighOnOff}'; +elvST['ACOUSTIC_ALARM_SELECTION=FREQUENCY_HIGHON_LONGOFF'] = '${stringTableAlarmFrequencyHighOnLongOff}'; +elvST['ACOUSTIC_ALARM_SELECTION=FREQUENCY_LOWON_OFF_HIGHON_OFF'] = '${stringTableAlarmFrequencyLowOnOffHighonOff}'; +elvST['ACOUSTIC_ALARM_SELECTION=FREQUENCY_LOWON_LONGOFF_HIGHON_LONGOFF'] = '${stringTableAlarmFrequencyLowOnLongOffHighOnLongOff}'; +elvST['ACOUSTIC_SIGNAL_VIRTUAL_RECEIVER'] = '${stringTableAcousticSignalVirtualReceiverTitle}'; +elvST['ACOUSTIC_SIGNAL_VIRTUAL_RECEIVER|COMBINED_PARAMETER'] = '${lblPlaylist}'; +elvST['ACOUSTIC_SIGNAL_VIRTUAL_RECEIVER|LEVEL'] = '${lblVolume}'; +elvST['ACTOR_SECURITY'] = '${stringTableActorSecurityTitle}'; +elvST['ACTOR_SECURITY|ON_TIME'] = '${stringTableActorSecurityOnTime}'; +elvST['ACTOR_SECURITY|SECURE_STATE=FALSE'] = '${stringTableActorSecuritySecureStateFalse}'; +elvST['ACTOR_SECURITY|SECURE_STATE=TRUE'] = '${stringTableActorSecuritySecureStateTrue}'; +elvST['ACTOR_WINDOW'] = '${stringTableActorWindowTitle}'; +elvST['ACTOR_WINDOW|ERROR=NO_ERROR'] = '${stringTableActorWindowNoError}'; +elvST['ACTOR_WINDOW|ERR_DETECT_EIA485_SERVICE=TRUE'] = '${stringTableActorWindowErrorETA485}'; +elvST['ACTOR_WINDOW|ERR_TTCU_INTERNAL_TEST=TRUE'] = '${stringTableActorWindowErrorWindowControlDevice}'; +elvST['ACTOR_WINDOW|ERR_TTCU_LOCK_ROLLERS_SHORTED=TRUE'] = '${stringTableActorWindowErrorLockRoller}'; +elvST['ACTOR_WINDOW|ERR_TTCU_MAGNET_ERROR=TRUE'] = '${stringTableActorWindowErrorMagnet}'; +elvST['ACTOR_WINDOW|ERR_TTCU_POWER_ONTIME_EXCEEDED=TRUE'] = '${stringTableActorWindowErrorOntimeExceeded}'; +elvST['ACTOR_WINDOW|ERR_TTCU_SENSOR_STRIP_DISCONNECTED=TRUE'] = '${stringTableActorWindowErrorSensorStrip_1}'; +elvST['ACTOR_WINDOW|ERR_TTCU_SENSOR_STRIP_SHORTED=TRUE'] = '${stringTableActorWindowErrorSensorStrip_0}'; +elvST['ACTOR_WINDOW|ERR_TTCU_STOP_AFTER_10_CLOSING_TRIES=TRUE'] = '${stringTableActorWindowErrorCancel10}'; +elvST['ACTOR_WINDOW|ERR_TTCU_TURN_TILT_ACT_ALLOY_MOSFET=TRUE'] = '${stringTableActorWindowErrorMOSFET}'; +elvST['ACTOR_WINDOW|ERR_TTCU_TURN_TILT_ACT_ASYNCHRON=TRUE'] = '${stringTableActorWindowErrorAsynchron}'; +elvST['ACTOR_WINDOW|ERR_TTCU_TURN_TILT_ACT_BLOCKED=TRUE'] = '${stringTableActorWindowErrorTurnTiltAct_1}'; +elvST['ACTOR_WINDOW|ERR_TTCU_TURN_TILT_ACT_CONTACT_PROBLEM=TRUE'] = '${stringTableActorWindowErrorTurnTiltAct_3}'; +elvST['ACTOR_WINDOW|ERR_TTCU_TURN_TILT_ACT_NO_SPEED_SIGNAL=TRUE'] = '${stringTableActorWindowErrorNoSpeedSignal}'; +elvST['ACTOR_WINDOW|ERR_TTCU_TURN_TILT_ACT_OVERCURRENT=TRUE'] = '${stringTableActorWindowErrorTurnTiltAct_2}'; +elvST['ACTOR_WINDOW|ERR_TTCU_TURN_TILT_ACT_SHORTED=TRUE'] = '${stringTableActorWindowErrorTurnTiltAct_0}'; +elvST['ACTOR_WINDOW|ERR_TTCU_WRONG_VOLTAGE_POLARITY=TRUE'] = '${stringTableActorWindowErrorVoltageWrongPolarity}'; +elvST['ACTOR_WINDOW|ERR_TTM_INTERNAL=TRUE'] = '${stringTableActorWindowErrorTipTronicModul}'; +elvST['ACTOR_WINDOW|ERR_TTM_OVERVOLT=NO_ERROR'] = '${stringTableActorWindowErrorVoltageOverNoError}'; +elvST['ACTOR_WINDOW|ERR_TTM_OVERVOLT=OVERVOLT'] = '${stringTableActorWindowErrorVoltageOver}'; +elvST['ACTOR_WINDOW|ERR_TTM_UNDERVOLT=NO_ERROR'] = '${stringTableActorWindowErrorVoltageUnderNoError}'; +elvST['ACTOR_WINDOW|ERR_TTM_UNDERVOLT=UNDERVOLT'] = '${stringTableActorWindowErrorVoltageUnder}'; +elvST['ACTOR_WINDOW|ERR_WINDOW_NOT_FOUND=TRUE'] = '${stringTableActorWindowErrorNotFound}'; +elvST['ACTOR_WINDOW|ERR_WIN_STAY_IN_INITIAL_OPERATION=TRUE'] = '${stringTableActorWindowErrorStayInInitial}'; +elvST['ACTOR_WINDOW|FREE_TO_USE=TRUE'] = '${stringTableActorWindowErrorFreeToUse}'; +elvST['ACTOR_WINDOW|HANDLE_LED_MODE=DIMMED_ON'] = '${stringTableActorWindowLEDDimmed}'; +elvST['ACTOR_WINDOW|HANDLE_LED_MODE=FULL_ON'] = '${stringTableActorWindowLEDOn}'; +elvST['ACTOR_WINDOW|HANDLE_LED_MODE=OFF'] = '${stringTableActorWindowLEDOff}'; +elvST['ACTOR_WINDOW|HANDLE_LOCK=FALSE'] = '${stringTableActorWindowHandleLockFalse}'; +elvST['ACTOR_WINDOW|HANDLE_LOCK=TRUE'] = '${stringTableActorWindowHandleLockTrue}'; +elvST['ACTOR_WINDOW|LEVEL'] = '${stringTableActorWindowLevel}'; +elvST['ACTOR_WINDOW|LEVEL=LOCKED'] = '${stringTableActorWindowLevelLocked}'; +elvST['ACTOR_WINDOW|ON_TIME'] = '${stringTableActorWindowOnTime}'; +elvST['ACTOR_WINDOW|RELEASE_TURN=FALSE'] = '${stringTableActorWindowReleaseTurnFalse}'; +elvST['ACTOR_WINDOW|RELEASE_TURN=TRUE'] = '${stringTableActorWindowReleaseTurnTrue}'; +elvST['ACTOR_WINDOW|SHEV_POS=ZULUFT_BLOCKED'] = '${stringTableActorWindowVentBlocked}'; +elvST['ACTOR_WINDOW|SHEV_POS=ZULUFT_DEACTIVATED'] = '${stringTableActorWindowVentDeactivated}'; +elvST['ACTOR_WINDOW|SHEV_POS=ZULUFT_UNBLOCKED'] = '${stringTableActorWindowVentUnblocked}'; +elvST['ACTOR_WINDOW|STATUSINFO_MINDELAY'] = '${stringTableActorWindowStatusInfoMinDelay}'; +elvST['ACTOR_WINDOW|STATUSINFO_MINDELAY=NOT_USED'] = '${stringTableActorWindowStatusInfoNotUsed}'; +elvST['ACTOR_WINDOW|STATUSINFO_RANDOM'] = '${stringTableActorWindowStatusInfoRandom}'; +elvST['ACTOR_WINDOW|STICKY_ERR_TTM_OVERVOLT=OVERVOLT'] = '${stringTableActorWindowErrorVoltageOver}'; +elvST['ACTOR_WINDOW|STICKY_ERR_TTM_OVERVOLT=WAS_OVERVOLT'] = '${stringTableActorWindowErrorStickyWasVoltageOver}'; +elvST['ACTOR_WINDOW|STICKY_ERR_TTM_UNDERVOLT=UNDERVOLT'] = '${stringTableActorWindowErrorVoltageUnder}'; +elvST['ACTOR_WINDOW|STICKY_ERR_TTM_UNDERVOLT=WAS_UNDERVOLT'] = '${stringTableActorWindowErrorStickyWasVoltageUnder}'; +elvST['ACTOR_WINDOW|STOP'] = '${stringTableActorWindowStop}'; +elvST['ACTOR_WINDOW|WINTER_MODE'] = '${stringTableActorWindowWinterMode}'; +elvST['ACTOR_WINDOW|WINTER_MODE=NOT_USED'] = '${stringTableActorWindowWinterModeNotUsed}'; +elvST['ACTOR_WINDOW|WIN_RELEASE=FALSE'] = '${stringTableActorWindowReleaseFalse}'; +elvST['ACTOR_WINDOW|WIN_RELEASE=TRUE'] = '${stringTableActorWindowReleaseTrue}'; +elvST['ACTOR_WINDOW|WIN_RELEASE_ACT'] = '${stringTableActorWindowReleaseAction}'; +elvST['ACTUAL_HUMIDITY'] = '${stringTableWeatherHumidity}'; +elvST['ACTUAL_TEMPERATURE'] = '${stringTableClimateControlRTTransceiverActualTemp}'; +elvST['ACTUAL_TEMPERATURE_STATUS=NORMAL'] = '${lblValue} ${stringTableClimateControlRTTransceiverActualTemp}: ${lblNormal}'; +elvST['ACTUAL_TEMPERATURE_STATUS=0'] = '${lblValue} ${stringTableClimateControlRTTransceiverActualTemp}: ${lblNormal}'; +elvST['ACTUAL_TEMPERATURE_STATUS=UNKNOWN'] = '${lblValue} ${stringTableClimateControlRTTransceiverActualTemp}: ${lblUnknown}'; +elvST['ACTUAL_TEMPERATURE_STATUS=1'] = '${lblValue} ${stringTableClimateControlRTTransceiverActualTemp}: ${lblUnknown}'; +elvST['ACTUAL_TEMPERATURE_STATUS=OVERFLOW'] = '${lblValue} ${stringTableClimateControlRTTransceiverActualTemp}: ${lblOverflow}'; +elvST['ACTUAL_TEMPERATURE_STATUS=2'] = '${lblValue} ${stringTableClimateControlRTTransceiverActualTemp}: ${lblOverflow}'; +elvST['ACTUAL_TEMPERATURE_STATUS=UNDERFLOW'] = '${lblValue} ${stringTableClimateControlRTTransceiverActualTemp}: ${lblUnderflow}'; +elvST['ACTUAL_TEMPERATURE_STATUS=3'] = '${lblValue} ${stringTableClimateControlRTTransceiverActualTemp}: ${lblUnderflow}'; +elvST['AKKU|LEVEL'] = '${stringTableAccuLevel}'; +elvST['AKKU|STATUS=CHARGE'] = '${stringTableAccuCharging}'; +elvST['AKKU|STATUS=DISCHARGE'] = '${stringTableAccuDischarge}'; +elvST['AKKU|STATUS=STATE_UNKNOWN'] = '${stringTableAccuStateUnkown}'; +elvST['AKKU|STATUS=TRICKLE_CHARGE'] = '${stringTableAccuTrickleCharg}'; +elvST['ALARMACTUATOR'] = '${stringTableAlarmActuatorTitle}'; +elvST['ALARMACTUATOR|CYCLIC_INFO_MSG'] = '${stringTableAlarmActuatorCyclicInfoMsg}'; +elvST['ALARMACTUATOR|ERROR_BATTERY=BATTERY_DEFECT'] = '${stringTableBatteryDefect}'; +elvST['ALARMACTUATOR|ERROR_BATTERY=NO_ERROR'] = '${stringTableBatteryNotDefect}'; +elvST['ALARMACTUATOR|ON_TIME'] = '${stringTableAlarmActuatorOnTime}'; +elvST['ALARMACTUATOR|SABOTAGE_MSG'] = '${stringTableAlarmActuatorSabotageMsg}'; +elvST['ALARMACTUATOR|STATE=FALSE'] = '${stringTableAlarmActuatorStateFalse}'; +elvST['ALARMACTUATOR|STATE=TRUE'] = '${stringTableAlarmActuatorStateTrue}'; +elvST['ALARMTIME_MAX'] = '${stringTableAlarmTimeMax}'; +elvST['ALARM_SWITCH_VIRTUAL_RECEIVER'] = '${stringTableSwitchSensorTitle}'; +elvST['ALL_LEDS'] = '${stringTableAllLEDs}'; +elvST['ANALOG_INPUT'] = '${stringTableAnalog}'; +elvST['ANALOG_INPUT_TRANSMITTER|FILTER_SIZE'] = '${stringTableAnalogInputTransmitterFilterSize}'; +elvST['ANALOG_INPUT_TRANSMITTER|VOLTAGE'] = '${stringTableAnalogInputTransmitterVoltage}'; +elvST['ANALOG_INPUT_TRANSMITTER|VOLTAGE_STATUS=NORMAL'] = '${stringTableAnalogInputVoltageStatus}: ${lblNormal}'; +elvST['ANALOG_INPUT_TRANSMITTER|VOLTAGE_STATUS=0'] = '${stringTableAnalogInputVoltageStatus}: ${lblNormal}'; +elvST['ANALOG_INPUT_TRANSMITTER|VOLTAGE_STATUS=OVERFLOW'] = '${stringTableAnalogInputVoltageStatus}: ${lblOverflow}'; +elvST['ANALOG_INPUT_TRANSMITTER|VOLTAGE_STATUS=2'] = '${stringTableAnalogInputVoltageStatus}: ${lblOverflow}'; +elvST['ANALOG_INPUT_TRANSMITTER|VOLTAGE_STATUS=UNDERFLOW'] = '${stringTableAnalogInputVoltageStatus}: ${lblUnderflow}'; +elvST['ANALOG_INPUT_TRANSMITTER|VOLTAGE_STATUS=3'] = '${stringTableAnalogInputVoltageStatus}: ${lblUnderflow}'; +elvST['ANALOG_OUTPUT'] = '${stringTableAnalog}'; +elvST['ANALOG_OUTPUT_TRANSCEIVER'] = '${stringTableAnalogOutputTransceiverTitle}'; +elvST['ANALOG_OUTPUT_TRANSCEIVER|LEVEL'] = '${stringTableAnalogOutputTransceiverLevel}'; +elvST['ARMING'] = '${stringTableSirenArmingTitle}'; +elvST['ARMING|ACOUSTIC_ALLSENS_ARM'] = '${stringTableAcousticAllSensArm}'; +elvST['ARMING|ACOUSTIC_ALLSENS_DELAY_ARM'] = '${stringTableAcousticAllsensDelayArm}'; +elvST['ARMING|ACOUSTIC_DISARM'] = '${stringTableAcousticDisarm}'; +elvST['ARMING|ACOUSTIC_EXTSENS_ARM'] = '${stringTableAcousticExtsensArm}'; +elvST['ARMING|ACOUSTIC_EXTSENS_DELAY_ARM'] = '${stringTableAcousticExtsensDelayArm}'; +elvST['ARMING|ACOUSTIC_MULTI_DELAY_ARM'] = '${stringTableAcousticMultiDelayArm}'; +elvST['ARMING|OPTIC_ALLSENS_ARM'] = '${stringTableOpticAllSensArm}'; +elvST['ARMING|OPTIC_ALLSENS_DELAY_ARM'] = '${stringTableOpticAllSensDelayArm}'; +elvST['ARMING|OPTIC_DISARM'] = '${stringTableOpticDisarm}'; +elvST['ARMING|OPTIC_EXTSENS_ARM'] = '${stringTableOpticExtsensArm}'; +elvST['ARMING|OPTIC_EXTSENS_DELAY_ARM'] = '${stringTableOpticExtsensDelayArm}'; +elvST['ARMING|OPTIC_MULTI_DELAY_ARM'] = '${stringTableOpticMultiDelayArm}'; +elvST['ARMSTATE=ALARM_BLOCKED'] = '${stringTableAlarmBlocked}'; +elvST['ARMSTATE=ALLSENS_ARMED'] = '${stringTableAlarmExtSensArmed}'; +elvST['ARMSTATE=DISARMED'] = '${stringTableAlarmDisarmed}'; +elvST['ARMSTATE=EXTSENS_ARMED'] = '${stringTableAlarmAllSensArmed}'; +elvST['ARR_TIMEOUT'] = '${stringTableArrTimeout}'; +elvST['ATC_ADAPTION_INTERVAL'] = '${stringTableATCAdaptionInterval}'; +elvST['ATC_MODE'] = '${stringTableATCMode}'; +elvST['ATC_OFF'] = '${stringTableOFF}'; +elvST['ATC_ON'] = '${stringTableON}'; +elvST['AUTO_HYDRAULIC_ADJUSTMENT'] = '${stringTableAutoHydraulicAdjustment}'; +elvST['AUTO_MODE'] = '${stringTableClimateControlRTTransceiverAutoMode}'; +elvST['AVERAGE_ILLUMINATION'] = '${stringTableAverageIllumination}'; +elvST['AVERAGE_ILLUMINATION_STATUS=NORMAL'] = '${lblValue} ${stringTableAverageIllumination}: ${lblNormal}'; +elvST['AVERAGE_ILLUMINATION_STATUS=0'] = '${lblValue} ${stringTableAverageIllumination}: ${lblNormal}'; +elvST['AVERAGE_ILLUMINATION_STATUS=UNKNOWN'] = '${lblValue} ${stringTableAverageIllumination}: ${lblUnknown}'; +elvST['AVERAGE_ILLUMINATION_STATUS=1'] = '${lblValue} ${stringTableAverageIllumination}: ${lblUnknown}'; +elvST['AVERAGE_ILLUMINATION_STATUS=OVERFLOW'] = '${lblValue} ${stringTableAverageIllumination}: ${lblOverflow}'; +elvST['AVERAGE_ILLUMINATION_STATUS=2'] = '${lblValue} ${stringTableAverageIllumination}: ${lblOverflow}'; +elvST['BACKLIGHT_AT_CHARGE'] = '${stringTableBackLightAtCharge}'; +elvST['BACKLIGHT_AT_KEYSTROKE'] = '${stringTableBackLightAtKeystroke}'; +elvST['BACKLIGHT_AT_MOTION'] = '${stringTableBackLightAtMotion}'; +elvST['BACKLIGHT_ON_TIME'] = '${stringTableBackLightOnTime}'; +elvST['BATTERY_POWERED'] = '${stringTableBatteryPowered}'; +elvST['BATTERY_STATE'] = '${stringTableClimateControlRTTransceiverBatteryState}'; +elvST['BAT_DEFECT_LIMIT'] = '${stringTableBatDefectLimit}'; +elvST['BLIND'] = '${stringTableBlindTitle}'; +elvST['BLIND|CHANGE_OVER_DELAY'] = '${stringTableBlindChangeOverDelay}'; +elvST['BLIND|LEVEL'] = '${stringTableBlindLevel}'; +elvST['BLIND|REFERENCE_RUNNING_TIME_BOTTOM_TOP'] = '${stringTableBlindRunnintTimeBottomTop}'; +elvST['BLIND|REFERENCE_RUNNING_TIME_TOP_BOTTOM'] = '${stringTableBlindRunningTimeTopBottom}'; +elvST['BLIND|REFERENCE_RUN_COUNTER'] = '${stringTableBlindRefRunCounter}'; +elvST['BLIND|STOP'] = '${stringTableBlindStop}'; +elvST['BLIND_TRANSMITTER|ACTIVITY_STATE=DOWN'] = '${stringTableBlindActivityStateDown}'; +elvST['BLIND_TRANSMITTER|ACTIVITY_STATE=UNKNOWN'] = '${stringTableBlindActivityStateUnknown}'; +elvST['BLIND_TRANSMITTER|ACTIVITY_STATE=UP'] = '${stringTableBlindActivityStateUp}'; +elvST['BLIND_TRANSMITTER|ACTIVITY_STATE=STABLE'] = '${stringTableProcessStableBlindTransmitter}'; +elvST['BLIND_TRANSMITTER|LEVEL'] = '${stringTableBlindLevel}'; +elvST['BLIND_TRANSMITTER|LEVEL_STATUS=ERROR'] = '${lblValue} ${stringTableBlindLevel}: ${lblError}'; +elvST['BLIND_TRANSMITTER|LEVEL_STATUS=4'] = '${lblValue} ${stringTableBlindLevel}: ${lblError}'; +elvST['BLIND_TRANSMITTER|LEVEL_STATUS=NORMAL'] = '${lblValue} ${stringTableBlindLevel}: ${lblNormal}'; +elvST['BLIND_TRANSMITTER|LEVEL_STATUS=0'] = '${lblValue} ${stringTableBlindLevel}: ${lblNormal}'; +elvST['BLIND_TRANSMITTER|LEVEL_STATUS=OVERFLOW'] = '${lblValue} ${stringTableBlindLevel}: ${lblOverflow}'; +elvST['BLIND_TRANSMITTER|LEVEL_STATUS=2'] = '${lblValue} ${stringTableBlindLevel}: ${lblOverflow}'; +elvST['BLIND_TRANSMITTER|LEVEL_STATUS=UNDERFLOW'] = '${lblValue} ${stringTableBlindLevel}: ${lblUnderflow}'; +elvST['BLIND_TRANSMITTER|LEVEL_STATUS=3'] = '${lblValue} ${stringTableBlindLevel}: ${lblUnderflow}'; +elvST['BLIND_TRANSMITTER|LEVEL_STATUS=UNKNOWN'] = '${lblValue} ${stringTableBlindLevel}: ${lblUnknown}'; +elvST['BLIND_TRANSMITTER|LEVEL_STATUS=1'] = '${lblValue} ${stringTableBlindLevel}: ${lblUnknown}'; +elvST['BLIND_TRANSMITTER|LEVEL_2'] = '${stringTableJalousieSlatsLevel}'; +elvST['BLIND_TRANSMITTER|LEVEL_2_STATUS=ERROR'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblError}'; +elvST['BLIND_TRANSMITTER|LEVEL_2_STATUS=4'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblError}'; +elvST['BLIND_TRANSMITTER|LEVEL_2_STATUS=NORMAL'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblNormal}'; +elvST['BLIND_TRANSMITTER|LEVEL_2_STATUS=0'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblNormal}'; +elvST['BLIND_TRANSMITTER|LEVEL_2_STATUS=OVERFLOW'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblOverflow}'; +elvST['BLIND_TRANSMITTER|LEVEL_2_STATUS=2'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblOverflow}'; +elvST['BLIND_TRANSMITTER|LEVEL_2_STATUS=UNDERFLOW'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblUnderflow}'; +elvST['BLIND_TRANSMITTER|LEVEL_2_STATUS=3'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblUnderflow}'; +elvST['BLIND_TRANSMITTER|LEVEL_2_STATUS=UNKNOWN'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblUnknown}'; +elvST['BLIND_TRANSMITTER|LEVEL_2_STATUS=1'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblUnknown}'; +elvST['BLIND_VIRTUAL_RECEIVER'] = '${stringTableBlindVirtualReceiverTitle}'; +elvST['BLIND_VIRTUAL_RECEIVER|ACTIVITY_STATE=DOWN'] = '${stringTableBlindActivityStateDown}'; +elvST['BLIND_VIRTUAL_RECEIVER|ACTIVITY_STATE=UNKNOWN'] = '${stringTableBlindActivityStateUnknown}'; +elvST['BLIND_VIRTUAL_RECEIVER|ACTIVITY_STATE=UP'] = '${stringTableBlindActivityStateUp}'; +elvST['BLIND_VIRTUAL_RECEIVER|ACTIVITY_STATE=STABLE'] = '${stringTableProcessStableBlindTransmitter}'; +elvST['BLIND_VIRTUAL_RECEIVER|LEVEL'] = '${stringTableBlindLevel}'; +elvST['BLIND_VIRTUAL_RECEIVER|LEVEL_STATUS=ERROR'] = '${lblValue} ${stringTableBlindLevel}: ${lblError}'; +elvST['BLIND_VIRTUAL_RECEIVER|LEVEL_STATUS=4'] = '${lblValue} ${stringTableBlindLevel}: ${lblError}'; +elvST['BLIND_VIRTUAL_RECEIVER|LEVEL_STATUS=NORMAL'] = '${lblValue} ${stringTableBlindLevel}: ${lblNormal}'; +elvST['BLIND_VIRTUAL_RECEIVER|LEVEL_STATUS=0'] = '${lblValue} ${stringTableBlindLevel}: ${lblNormal}'; +elvST['BLIND_VIRTUAL_RECEIVER|LEVEL_STATUS=OVERFLOW'] = '${lblValue} ${stringTableBlindLevel}: ${lblOverflow}'; +elvST['BLIND_VIRTUAL_RECEIVER|LEVEL_STATUS=2'] = '${lblValue} ${stringTableBlindLevel}: ${lblOverflow}'; +elvST['BLIND_VIRTUAL_RECEIVER|LEVEL_STATUS=UNDERFLOW'] = '${lblValue} ${stringTableBlindLevel}: ${lblUnderflow}'; +elvST['BLIND_VIRTUAL_RECEIVER|LEVEL_STATUS=3'] = '${lblValue} ${stringTableBlindLevel}: ${lblUnderflow}'; +elvST['BLIND_VIRTUAL_RECEIVER|LEVEL_STATUS=UNKNOWN'] = '${lblValue} ${stringTableBlindLevel}: ${lblUnknown}'; +elvST['BLIND_VIRTUAL_RECEIVER|LEVEL_STATUS=1'] = '${lblValue} ${stringTableBlindLevel}: ${lblUnknown}'; +elvST['BLIND_VIRTUAL_RECEIVER|LEVEL_2'] = '${stringTableJalousieSlatsLevel}'; +elvST['BLIND_VIRTUAL_RECEIVER|LEVEL_2_STATUS=ERROR'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblError}'; +elvST['BLIND_VIRTUAL_RECEIVER|LEVEL_2_STATUS=4'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblError}'; +elvST['BLIND_VIRTUAL_RECEIVER|LEVEL_2_STATUS=NORMAL'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblNormal}'; +elvST['BLIND_VIRTUAL_RECEIVER|LEVEL_2_STATUS=0'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblNormal}'; +elvST['BLIND_VIRTUAL_RECEIVER|LEVEL_2_STATUS=OVERFLOW'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblOverflow}'; +elvST['BLIND_VIRTUAL_RECEIVER|LEVEL_2_STATUS=2'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblOverflow}'; +elvST['BLIND_VIRTUAL_RECEIVER|LEVEL_2_STATUS=UNDERFLOW'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblUnderflow}'; +elvST['BLIND_VIRTUAL_RECEIVER|LEVEL_2_STATUS=3'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblUnderflow}'; +elvST['BLIND_VIRTUAL_RECEIVER|LEVEL_2_STATUS=UNKNOWN'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblUnknown}'; +elvST['BLIND_VIRTUAL_RECEIVER|LEVEL_2_STATUS=1'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblUnknown}'; +elvST['BLIND_VIRTUAL_RECEIVER|STOP'] = '${stringTableBlindStop}'; +elvST['BLIND_TRANSMITTER|PROCESS=NOT_STABLE'] = '${stringTableProcessNotStableBlindTransmitter}'; +elvST['BLIND_TRANSMITTER|PROCESS=STABLE'] = '${stringTableProcessStableBlindTransmitter}'; +elvST['BLIND_VIRTUAL_RECEIVER|PROCESS=STABLE'] = '${stringTableProcessStableBlindTransmitter}'; +elvST['BLIND_VIRTUAL_RECEIVER|PROCESS=NOT_STABLE'] = '${stringTableProcessNotStableBlindTransmitter}'; +elvST['BLOCKING_PERIOD_UNIT'] = '${stringTableBlockingPeriodUnit}'; +elvST['BLOCKING_PERIOD_UNIT=100MS'] = '${optionUnit100MS}'; +elvST['BLOCKING_PERIOD_UNIT=H'] = '${optionUnitH}'; +elvST['BLOCKING_PERIOD_UNIT=M'] = '${optionUnitM}'; +elvST['BLOCKING_PERIOD_UNIT=S'] = '${optionUnitS}'; +elvST['BLOCKING_PERIOD_VALUE'] = '${stringTableBlockingPeriodValue}'; +elvST['BOOST_MODE'] = '${stringTableClimateControlRTTransceiverBoostMode}'; +elvST['BOOST_MODE=FALSE'] = '${stringTableBoostModeFalse}'; +elvST['BOOST_MODE=TRUE'] = '${stringTableBoostModeTrue}'; +elvST['BOOST_STATE'] = '${stringTableBoostState}'; +elvST['BOOST_TIME'] = '${stringTableBoostTime}'; +elvST['BRIGHTNESS'] = '${stringTableBrightness}'; +elvST['BRIGHTNESS_FILTER'] = '${stringTableBrightnessFilter}'; +elvST['BRIGHTNESS_TRANSMITTER|FILTER_SIZE'] = '${stringTableBrightnessFilterSize}'; +elvST['BURST_RX'] = '${stringTableBurstRX}'; +elvST['BURST_LIMIT_WARNING'] = '${stringTableBurstLimit}'; +elvST['BURST_LIMIT_WARNING=FALSE'] = '${stringTableBurstLimitFalse}'; +elvST['BURST_LIMIT_WARNING=TRUE'] = '${stringTableBurstLimitTrue}'; +elvST['BUTTON_LOCK'] = '${stringTableButtonLock}'; +elvST['BUTTON_RESPONSE_WITHOUT_BACKLIGHT'] = '${stringTableButtonResponseWithoutBacklight}'; +elvST['CAPACITIVE_FILLING_LEVEL_SENSOR'] = '${stringTableCapacitiveFillingSensorTitle}'; +elvST['CAPACITIVE_FILLING_LEVEL_SENSOR|CASE_DESIGN'] = '${stringTableCapacitiveFillingSensorCaseDesign}'; +elvST['CAPACITIVE_FILLING_LEVEL_SENSOR|CASE_DESIGN=HORIZONTAL_BARREL'] = '${stringTableCapacitiveFillingSensorCaseDesignHor}'; +elvST['CAPACITIVE_FILLING_LEVEL_SENSOR|CASE_DESIGN=RECTANGLE'] = '${stringTableCapacitiveFillingSensorCaseDesginRect}'; +elvST['CAPACITIVE_FILLING_LEVEL_SENSOR|CASE_DESIGN=VERTICAL_BARREL'] = '${stringTableCapacitiveFillingSensorCaseDesignVer}'; +elvST['CAPACITIVE_FILLING_LEVEL_SENSOR|CASE_HIGH'] = '${stringTableCapacitiveFillingSensorCaseHeight}'; +elvST['CAPACITIVE_FILLING_LEVEL_SENSOR|CASE_LENGTH'] = '${stringTableCapacitiveFillingSensorCaseLength}'; +elvST['CAPACITIVE_FILLING_LEVEL_SENSOR|CASE_WIDTH'] = '${stringTableCapacitiveFillingSensorCaseWidth}'; +elvST['CAPACITIVE_FILLING_LEVEL_SENSOR|CONTROLTEXT_CALC_FILLINGLEVEL'] = '${stringTableCapacitiveFillingSensorTextCalcFillingLevel}'; +elvST['CAPACITIVE_FILLING_LEVEL_SENSOR|CONTROLTEXT_FILLINGLEVEL'] = '${stringTableCapacitiveFillingSensorTextFillingLevel}'; +elvST['CAPACITIVE_FILLING_LEVEL_SENSOR|FILLING_LEVEL'] = '${stringTableCapacitiveFillingSensorFillingLevel}'; +elvST['CAPACITIVE_FILLING_LEVEL_SENSOR|FILL_LEVEL'] = '${stringTableCapacitiveFillingSensorFillingLevel100perc}'; +elvST['CAPACITIVE_FILLING_LEVEL_SENSOR|FILL_LEVEL_LOWER_THRESHOLD'] = '${stringTableCapacitiveFillingSensorFillingLevelLowerThres}'; +elvST['CAPACITIVE_FILLING_LEVEL_SENSOR|FILL_LEVEL_UPPER_THRESHOLD'] = '${stringTableCapacitiveFillingSensorFillingLevelUpperThres}'; +elvST['CAPACITIVE_FILLING_LEVEL_SENSOR|MEA_LENGTH'] = '${stringTableCapacitiveFillingSensorMeaLength}'; +elvST['CAPACITIVE_FILLING_LEVEL_SENSOR|USE_CUSTOM'] = '${stringTableCapacitiveFillingSensorCustomCal}'; +elvST['CAPACITIVE_FILLING_LEVEL_SENSOR|WATER_LOWER_THRESHOLD_CH'] = '${stringTableCapacitiveFillingSensorWaterLowerThres}'; +elvST['CAPACITIVE_FILLING_LEVEL_SENSOR|WATER_UPPER_THRESHOLD_CH'] = '${stringTableCapacitiveFillingSensorWaterUpperThres}'; +elvST['CAPTURE_WITHIN_INTERVAL'] = '${stringTableCaptureWithinInterval}'; +elvST['CARRIER_SENSE_LEVEL'] = '${lblCarrierSense}'; +elvST['CENTRAL_KEY|DBL_PRESS_TIME'] = '${stringTableCentralKeyDblPressTime}'; +elvST['CENTRAL_KEY|LONG_PRESS_TIME'] = '${stringTableCentralKeyLongPressTime}'; +elvST['CHANGE_OVER=FALSE'] = '${stringTableChangeOverFalse}'; +elvST['CHANGE_OVER=TRUE'] = '${stringTableChangeOverTrue}'; +elvST['CHARACTERISTIC_BASETYPE'] = '${stringTableCharacteristicBaseType}'; +elvST['CHARACTERISTIC_COLOURASSIGNMENT'] = '${stringTableCharacteristicColorAssignment}'; +elvST['CHARACTERISTIC_CROSSFADE'] = '${stringTableCharacteristicCrossfade}'; +elvST['CHARACTERISTIC_DIM2HOT'] = '${stringTableCharacteristicDim2Hot}'; +elvST['CHARACTERISTIC_DIM2WARM'] = '${stringTableCharacteristicDim2Warm}'; +elvST['CHARACTERISTIC_HALF_CONSTANT'] = '${stringTableCharacteristicHalfConstant}'; +elvST['CHARACTERISTIC_LEVELLIMIT'] = '${stringTableCharacteristicLevelLimit}'; +elvST['CHARACTERISTIC_LINEAR'] = '${stringTableCharasteristicLinear}'; +elvST['CHARACTERISTIC_LINSQUARETYPE'] = '${stringTableCharacteristicLinSquareType}'; +elvST['CHARACTERISTIC_LOW_IS_COLD'] = '${stringTableCharacteristicLowIsCold}'; +elvST['CHARACTERISTIC_LOW_IS_WARM'] = '${stringTableCharacteristicLowIsWarm}'; +elvST['CHARACTERISTIC_MAXIMUM'] = '${stringTableCharacteristicMaximum}'; +elvST['CHARACTERISTIC_SQUARE'] = '${stringTableCharasteristicSquare}'; +elvST['CLIMATECONTROL_DEHUMIDIFIER_TRANSMITER'] = '${stringTableClimateControlDehumidifierTitle}'; +elvST['CLIMATECONTROL_FLOOR_DIRECT_TRANSMITTER|COOLING_DISABLE'] = '${stringTableCoolingDisable}'; +elvST['CLIMATECONTROL_FLOOR_DIRECT_TRANSMITTER|FLOOR_HEATING_MODE'] = '${stringTableFloorHeatingMode}'; +elvST['CLIMATECONTROL_FLOOR_DIRECT_TRANSMITTER|HEATING_DISABLE'] = '${stringTableHeatingDisable}'; +elvST['CLIMATECONTROL_FLOOR_DIRECT_TRANSMITTER|HEATING_MODE_SELECTION'] = '${stringTableHeatingModeSelection}'; +elvST['CLIMATECONTROL_FLOOR_DIRECT_TRANSMITTER|HEATING_VALVE_TYPE'] = '${stringTableHeatingValveType}'; +elvST['CLIMATECONTROL_FLOOR_DIRECT_TRANSMITTER|HUMIDITY_LIMIT_DISABLE'] = '${stringTableHumidityLimitDisable}'; +elvST['CLIMATECONTROL_FLOOR_DIRECT_TRANSMITTER|HUMIDITY_LIMIT_VALUE'] = '${stringTableHumidityLimitValue}'; +elvST['CLIMATECONTROL_FLOOR_DIRECT_TRANSMITTER|MINIMAL_FLOOR_TEMPERATURE'] = '${stringTableMinimalFloorTemperature}'; +elvST['CLIMATECONTROL_FLOOR_TRANSCEIVER'] = '${stringTableClimateControlFloorTransceiverTitle}'; +elvST['CLIMATECONTROL_FLOOR_TRANSCEIVER|EMERGENCY_OPERATION=FALSE'] = '${stringTableEmergencyOperationFalse}'; +elvST['CLIMATECONTROL_FLOOR_TRANSCEIVER|EMERGENCY_OPERATION=TRUE'] = '${stringTableEmergencyOperationTrue}'; +elvST['CLIMATECONTROL_FLOOR_PUMP_TRANSCEIVER'] = '${stringTableClimateControlFloorPumpTransceiverTitle}'; +elvST['CLIMATECONTROL_FLOOR_PUMP_TRANSCEIVER|EMERGENCY_OPERATION=FALSE'] = '${stringTableEmergencyOperationFalse}'; +elvST['CLIMATECONTROL_FLOOR_PUMP_TRANSCEIVER|EMERGENCY_OPERATION=TRUE'] = '${stringTableEmergencyOperationTrue}'; +elvST['CLIMATECONTROL_FLOOR_TRANSMITTER'] = '${stringTableClimateControlFloorTransmitterTitle}'; +elvST['CLIMATECONTROL_FLOOR_TRANSMITTER|EMERGENCY_OPERATION=FALSE'] = '${stringTableEmergencyOperationFalse}'; +elvST['CLIMATECONTROL_FLOOR_TRANSMITTER|EMERGENCY_OPERATION=TRUE'] = '${stringTableEmergencyOperationTrue}'; +elvST['CLIMATECONTROL_HEAT_DEMAND_TRANSMITER'] = '${stringTableClimateControlHeatDemandTransmitterTitle}'; +elvST['CLIMATECONTROL_HEAT_DEMAND_BOILER_TRANSMITTER'] = '${stringTableClimateControlHeatDemandBoilerTransmitterTitle}'; +elvST['CLIMATECONTROL_HEAT_DEMAND_PUMP_TRANSMITTER'] = '${stringTableClimateControlHeatDemandPumpTransmitterTitle}'; +elvST['CLIMATECONTROL_INPUT_RECEIVER'] = '${stringTableClimateControlInputReceiverTitle}'; +elvST['CLIMATECONTROL_INPUT_TRANSMITTER'] = '${stringTableClimateControlInputTransmitterTitle}'; +elvST['CLIMATECONTROL_RECEIVER'] = '${stringTableClimateControlReceiver}'; +elvST['CLIMATECONTROL_REGULATOR'] = '${stringTableClimateControlRegTitle}'; +elvST['CLIMATECONTROL_REGULATOR|ADJUSTING_COMMAND'] = '${stringTableClimateControlRegAdjCommand}'; +elvST['CLIMATECONTROL_REGULATOR|ADJUSTING_DATA'] = '${stringTableClimateControlRegAdjData}'; +elvST['CLIMATECONTROL_REGULATOR|DECALCIFICATION_DAY'] = '${stringTableClimateControlRegDecalcDay}'; +elvST['CLIMATECONTROL_REGULATOR|DECALCIFICATION_HOUR'] = '${stringTableClimateControlRegDecalcHour}'; +elvST['CLIMATECONTROL_REGULATOR|DECALCIFICATION_MINUTE'] = '${stringTableClimateControlRegDecalcMin}'; +elvST['CLIMATECONTROL_REGULATOR|DISPLAY_TEMPERATUR_HUMIDITY_CHANGE'] = '${stringTableClimateControlRegDisplayTempHum}'; +elvST['CLIMATECONTROL_REGULATOR|DISPLAY_TEMPERATUR_HUMIDITY_CHANGE=TEMPERATUR_AND_HUMIDITY'] = '${stringTableClimateControlRegDisplayTempHumTH}'; +elvST['CLIMATECONTROL_REGULATOR|DISPLAY_TEMPERATUR_HUMIDITY_CHANGE=TEMPERATUR_ONLY'] = '${stringTableClimateControlRegDisplayTempHumT}'; +elvST['CLIMATECONTROL_REGULATOR|DISPLAY_TEMPERATUR_INFORMATION'] = '${stringTableClimateControlRegDisplayTempInfo}'; +elvST['CLIMATECONTROL_REGULATOR|DISPLAY_TEMPERATUR_INFORMATION=ACTUAL_VALUE'] = '${stringTableClimateControlRegDisplayTempInfoActualTemp}'; +elvST['CLIMATECONTROL_REGULATOR|DISPLAY_TEMPERATUR_INFORMATION=SET_POINT'] = '${stringTableClimateControlRegDisplayTempInfoSetPoint}'; +elvST['CLIMATECONTROL_REGULATOR|DISPLAY_TEMPERATUR_UNIT'] = '${stringTableClimateControlRegTempUnit}'; +elvST['CLIMATECONTROL_REGULATOR|DISPLAY_TEMPERATUR_UNIT=CELSIUS'] = '${stringTableClimateControlRegTempUnitC}'; +elvST['CLIMATECONTROL_REGULATOR|DISPLAY_TEMPERATUR_UNIT=FAHRENHEIT'] = '${stringTableClimateControlRegTempUnitF}'; +elvST['CLIMATECONTROL_REGULATOR|MODE_TEMPERATUR_REGULATOR'] = '${stringTableClimateControlRegRegulator}'; +elvST['CLIMATECONTROL_REGULATOR|MODE_TEMPERATUR_REGULATOR=AUTO'] = '${stringTableClimateControlRegRegulatorAuto}'; +elvST['CLIMATECONTROL_REGULATOR|MODE_TEMPERATUR_REGULATOR=CENTRAL'] = '${stringTableClimateControlRegRegulatorCentral}'; +elvST['CLIMATECONTROL_REGULATOR|MODE_TEMPERATUR_REGULATOR=MANUAL'] = '${stringTableClimateControlRegRegulatorManu}'; +elvST['CLIMATECONTROL_REGULATOR|MODE_TEMPERATUR_REGULATOR=PARTY'] = '${stringTableClimateControlRegRegulatorParty}'; +elvST['CLIMATECONTROL_REGULATOR|MODE_TEMPERATUR_VALVE'] = '${stringTableClimateControlRegValve}'; +elvST['CLIMATECONTROL_REGULATOR|MODE_TEMPERATUR_VALVE=AUTO'] = '${stringTableClimateControlRegValveAuto}'; +elvST['CLIMATECONTROL_REGULATOR|MODE_TEMPERATUR_VALVE=CLOSE_VALVE'] = '${stringTableClimateControlRegValveClose}'; +elvST['CLIMATECONTROL_REGULATOR|MODE_TEMPERATUR_VALVE=OPEN_VALVE'] = '${stringTableClimateControlRegValveOpen}'; +elvST['CLIMATECONTROL_REGULATOR|PARTY_END_TIME'] = '${stringTableClimateControlRegPartyEndTime}'; +elvST['CLIMATECONTROL_REGULATOR|SETPOINT'] = '${stringTableClimateControlRegSetpoint}'; +elvST['CLIMATECONTROL_REGULATOR|SETPOINT=VENT_CLOSED'] = '${stringTableClimateControlRegSetpointVentClosed}'; +elvST['CLIMATECONTROL_REGULATOR|SETPOINT=VENT_OPEN'] = '${stringTableClimateControlRegSetpointVentOpen}'; +elvST['CLIMATECONTROL_REGULATOR|STATE=FALSE'] = '${stringTableClimateControlRegStateFalse}'; +elvST['CLIMATECONTROL_REGULATOR|STATE=TRUE'] = '${stringTableClimateControlRegStateTrue}'; +elvST['CLIMATECONTROL_REGULATOR|TEMPERATUR_COMFORT_VALUE'] = '${stringTableClimateControlRegComfortValue}'; +elvST['CLIMATECONTROL_REGULATOR|TEMPERATUR_LOWERING_VALUE'] = '${stringTableClimateControlRegLoweringValue}'; +elvST['CLIMATECONTROL_REGULATOR|TEMPERATUR_PARTY_VALUE'] = '${stringTableClimateControlRegPartyValue}'; +elvST['CLIMATECONTROL_REGULATOR|TEMPERATUR_SET_POINT'] = '${stringTableClimateControlRegSetPoint}'; +elvST['CLIMATECONTROL_REGULATOR|TEMPERATUR_WINDOW_OPEN_VALUE'] = '${stringTableClimateControlRegWindowOpenValue}'; +elvST['CLIMATECONTROL_RT_RECEIVER'] = '${stringTableClimateControlRTReceiver}'; +elvST['CLIMATECONTROL_RT_TRANSCEIVER'] = '${stringTableClimateControlRTTransceiver}'; +elvST['CLIMATECONTROL_RT_TRANSCEIVER|FAULT_REPORTING=ADJUSTING_RANGE_TOO_LARGE'] = '${stringTableClimateControlRTTransceiverAdjustingRangeTooLarge}'; +elvST['CLIMATECONTROL_RT_TRANSCEIVER|FAULT_REPORTING=ADJUSTING_RANGE_TOO_SMALL'] = '${stringTableClimateControlRTTransceiverAdjustingRangeTooSmall}'; +elvST['CLIMATECONTROL_RT_TRANSCEIVER|FAULT_REPORTING=COMMUNICATION_ERROR'] = '${stringTableClimateControlRTTransceiverCommunicationError}'; +elvST['CLIMATECONTROL_RT_TRANSCEIVER|FAULT_REPORTING=LOWBAT'] = '${stringTableClimateControlRTTransceiverLowBat}'; +elvST['CLIMATECONTROL_RT_TRANSCEIVER|FAULT_REPORTING=NO_FAULT'] = '${stringTableClimateControlRTTransceiverNoFault}'; +elvST['CLIMATECONTROL_RT_TRANSCEIVER|FAULT_REPORTING=VALVE_ERROR_POSITION'] = '${stringTableClimateControlRTTransceiverValveErrorPosition}'; +elvST['CLIMATECONTROL_RT_TRANSCEIVER|FAULT_REPORTING=VALVE_TIGHT'] = '${stringTableClimateControlRTTransceiverValveTight}'; +elvST['CLIMATECONTROL_VENT_DRIVE'] = '${stringTableClimateControlVentDriveTitle}'; +elvST['CLIMATECONTROL_VENT_DRIVE|ERROR=ADJUSTING_RANGE_TO_SMALL'] = '${stringTableClimateControlVentDriveErrorAdjRangeToSmall}'; +elvST['CLIMATECONTROL_VENT_DRIVE|ERROR=LOWBAT'] = '${stringTableClimateControlVentDriveErrorLowBat}'; +elvST['CLIMATECONTROL_VENT_DRIVE|ERROR=VALVE_DRIVE_BLOCKED'] = '${stringTableClimateControlVentDriveErrorValveDriveBlocked}'; +elvST['CLIMATECONTROL_VENT_DRIVE|ERROR=VALVE_DRIVE_LOOSE'] = '${stringTableClimateControlVentDriveErrorValveDriveLoose}'; +elvST['CLIMATECONTROL_VENT_DRIVE|VALVE_ERROR_POSITION'] = '${stringTableClimateControlVentDriveValveErrorPos}'; +elvST['CLIMATECONTROL_VENT_DRIVE|VALVE_OFFSET_VALUE'] = '${stringTableClimateControlVentDriveValveOffsetVal}'; +elvST['CLIMATECONTROL_VENT_DRIVE|VALVE_STATE'] = '${stringTableClimateControlVentDriveValveState}'; +elvST['COLOR=BLACK'] = '${optionColorBLACK}'; +elvST['COLOR=BLUE'] = '${optionColorBLUE}'; +elvST['COLOR=GREEN'] = '${optionColorGREEN}'; +elvST['COLOR=TURQUOISE'] = '${optionColorTURQUOISE}'; +elvST['COLOR=RED'] = '${optionColorRED}'; +elvST['COLOR=PURPLE'] = '${optionColorPURPLE}'; +elvST['COLOR=YELLOW'] = '${optionColorYELLOW}'; +elvST['COLOR=WHITE'] = '${optionColorWHITE}'; +elvST['COLOR=LEVEL'] = '${stringTableBrightness}'; +elvST['COLOR=OLD_VALUE'] = '${stringTableColorOldValue}'; +elvST['COLOR=DO_NOT_CARE'] = '${stringTableColorNoChange}'; +elvST['COLOR_BEHAVIOUR=OFF'] = '${stringTableColorBehaviourOff}'; +elvST['COLOR_BEHAVIOUR=ON'] = '${stringTableColorBehaviourOn}'; +elvST['COLOR_BEHAVIOUR=BLINKING_SLOW'] = '${stringTableColorBehaviourBlinkingSlow}'; +elvST['COLOR_BEHAVIOUR=BLINKING_MIDDLE'] = '${stringTableColorBehaviourBlinkingMiddle}'; +elvST['COLOR_BEHAVIOUR=BLINKING_FAST'] = '${stringTableColorBehaviourBlinkingFast}'; +elvST['COLOR_BEHAVIOUR=FLASH_SLOW'] = '${stringTableColorBehaviourFlashSlow}'; +elvST['COLOR_BEHAVIOUR=FLASH_MIDDLE'] = '${stringTableColorBehaviourFlashMiddle}'; +elvST['COLOR_BEHAVIOUR=FLASH_FAST'] = '${stringTableColorBehaviourFlashFast}'; +elvST['COLOR_BEHAVIOUR=BILLOW_SLOW'] = '${stringTableColorBehaviourBillowSlow}'; +elvST['COLOR_BEHAVIOUR=BILLOW_MIDDLE'] = '${stringTableColorBehaviourBillowMiddle}'; +elvST['COLOR_BEHAVIOUR=BILLOW_FAST'] = '${stringTableColorBehaviourBillowFast}'; +elvST['COLOR_BEHAVIOUR=OLD_VALUE'] = '${stringTableColorBehaviourOldValue}'; +elvST['COLOR_BEHAVIOUR=DO_NOT_CARE'] = '${stringTableColorBehaviourDoNotCare}'; +elvST['COLOR_BEHAVIOUR_STATUS=NORMAL'] = '${stringTableColorBehaviourStatus}: ${lblNormal}'; +elvST['COLOR_BEHAVIOUR_STATUS=UNKNOWN'] = '${stringTableColorBehaviourStatus}: ${lblUnknown}'; +elvST['COLOR_STATUS=NORMAL'] = '${optionColorStateNormal}'; +elvST['COLOR_STATUS=UNKNOWN'] = '${optionColorStateUnknown}'; +elvST['COMBINED_PARAMETER'] = '${stringTableSubmit}'; +elvST['COMFORT_MODE'] = '${stringTableClimateControlRTTransceiverComfortMode}'; +elvST['COMMUNICATION_REPORTING'] = '${stringTableCommunicatingReporting}'; +elvST['COMMUNICATION_REPORTING=FALSE'] = '${stringTableCommunicatingReportingFalse}'; +elvST['COMMUNICATION_REPORTING=TRUE'] = '${stringTableCommunicatingReportingTrue}'; +elvST['COMPATIBILITY_MODE'] = '${stringTableCompatibilityMode}'; +elvST['CONCENTRATION'] = '${lblValue} ${stringTableConcentration}'; +elvST['CONCENTRATION_STATUS=NORMAL'] = '${stringTableConcentrationStatus}: ${lblNormal}'; +elvST['CONCENTRATION_STATUS=0'] = '${stringTableConcentrationStatus}: ${lblNormal}'; +elvST['CONCENTRATION_STATUS=UNKNOWN'] = '${stringTableConcentrationStatus}: ${lblUnknown}'; +elvST['CONCENTRATION_STATUS=1'] = '${stringTableConcentrationStatus}: ${lblUnknown}'; +elvST['CONCENTRATION_STATUS=OVERFLOW'] = '${stringTableConcentrationStatus}: ${lblOverflow}'; +elvST['CONCENTRATION_STATUS=2'] = '${stringTableConcentrationStatus}: ${lblOverflow}'; +elvST['CONDITION_CURRENT'] = '${stringTableConditionCurrentTitle}'; +elvST['CONDITION_FREQUENCY'] = '${stringTableConditionFrequencyTitle}'; +elvST['CONDITION_POWER'] = '${stringTableConditionPowerTitle}'; +elvST['CONDITION_VOLTAGE'] = '${stringTableConditionVoltageTitle}'; +elvST['COND_SWITCH_TRANSMITTER'] = '${stringTableConditionSwitchTransmitter}'; +elvST['COND_SWITCH_TRANSMITTER_WIND_SPEED'] = '${stringTableConditionSwitchTransmitterWindSpeed}'; +elvST['COND_SWITCH_TRANSMITTER_TEMPERATURE'] = '${stringTableConditionSwitchTransmitterTemperature}'; +elvST['COND_SWITCH_TRANSMITTER_HUMIDITY'] = '${stringTableConditionSwitchTransmitterHumidity}'; +elvST['COND_SWITCH_TRANSMITTER_BRIGHTNESS'] = '${stringTableConditionSwitchTransmitterBrightness}'; +elvST['COND_SWITCH_TRANSMITTER_PARTICULATE_MATTER'] = '${stringTableConditionSwitchTransmitterParticulateMatter}'; +elvST['COND_SWITCH_TRANSMITTER_RAIN_QUANTITY'] = '${stringTableConditionSwitchTransmitterRainQuantity}'; +elvST['COND_SWITCH_TRANSMITTER_RAIN_DROP'] = '${stringTableConditionSwitchTransmitterRainDrop}'; +elvST['COND_SWITCH_TRANSMITTER_WIND_DIRECTION'] = '${stringTableConditionSwitchTransmitterWindDirection}'; +elvST['COND_TX_CYCLIC_ABOVE'] = '${stringTableCondTxCyclicAbove}'; +elvST['COND_TX_CYCLIC_BELOW'] = '${stringTableCondTxCyclicBelow}'; +elvST['COND_TX_DECISION_ABOVE'] = '${stringTableCondTxDecisionAbove}'; +elvST['COND_TX_DECISION_BELOW'] = '${stringTableCondTxDecisionBelow}'; +elvST['COND_TX_FALLING'] = '${stringTableCondTxFalling}'; +elvST['COND_TX_RISING'] = '${stringTableCondTxRising}'; +elvST['COND_TX_THRESHOLD_HI'] = '${stringTableCondThresholdHi}'; +elvST['COND_TX_THRESHOLD_HI_POWER'] = '${stringTableCondThresholdHiPower}'; +elvST['COND_TX_THRESHOLD_LO'] = '${stringTableCondThresholdLo}'; +elvST['COND_TX_THRESHOLD_LO_POWER'] = '${stringTableCondThresholdLoPower}'; +elvST['CONFIG_PENDING=FALSE'] = '${stringTableConfigPendingFalse}'; +elvST['CONFIG_PENDING=TRUE'] = '${stringTableConfigPendingTrue}'; +elvST['STICKY_UNREACH=FALSE'] = '${stringTableStickyUnreachFalse}'; +elvST['STICKY_UNREACH=TRUE'] = '${stringTableStickyUnreachTrue}'; +elvST['CONF_BUTTON_TIME'] = '${stringTableConfButtonTime}'; +elvST['CONF_BUTTON_TIME=PERMANENT'] = '${stringTableConfButtonTimePermanent}'; +elvST['CONTROL_MODE=AUTO-MODE'] = '${stringTableClimateControlRTTransceiverAutoMode}'; +elvST['CONTROL_MODE=BOOST-MODE'] = '${stringTableClimateControlRTTransceiverBoostMode}'; +elvST['CONTROL_MODE=MANU-MODE'] = '${stringTableClimateControlRTTransceiverManuMode}'; +elvST['CONTROL_MODE=PARTY-MODE'] = '${stringTableClimateControlRTTransceiverPartyMode}'; +elvST['CURRENT'] = '${stringTableCurrent}'; +elvST['CURRENTDETECTION_BEHAVIOR'] = '${stringTableCurrentDetectionBehavior}'; +elvST['CURRENTDETECTION_BEHAVIOR="CURRENTDETECTION_ACTIVE"'] = '${stringTableCurrentDetectionBehaviorActive}'; +elvST['CURRENTDETECTION_BEHAVIOR="CURRENTDETECTION_INACTIVE_VALUE_OUTPUT_1"'] = '${stringTableCurrentDetectionBehaviorOutput1}'; +elvST['CURRENTDETECTION_BEHAVIOR="CURRENTDETECTION_INACTIVE_VALUE_OUTPUT_2"'] = '${stringTableCurrentDetectionBehaviorOutput2}'; +elvST['CURRENT_ILLUMINATION'] = '${stringTableCurrentIllumination}'; +elvST['CURRENT_ILLUMINATION_STATUS=NORMAL'] = '${lblValue} ${stringTableCurrentIllumination}: ${lblNormal}'; +elvST['CURRENT_ILLUMINATION_STATUS=0'] = '${lblValue} ${stringTableCurrentIllumination}: ${lblNormal}'; +elvST['CURRENT_ILLUMINATION_STATUS=UNKNOWN'] = '${lblValue} ${stringTableCurrentIllumination}: ${lblUnknown}'; +elvST['CURRENT_ILLUMINATION_STATUS=1'] = '${lblValue} ${stringTableCurrentIllumination}: ${lblUnknown}'; +elvST['CURRENT_ILLUMINATION_STATUS=OVERFLOW'] = '${lblValue} ${stringTableCurrentIllumination}: ${lblOverflow}'; +elvST['CURRENT_ILLUMINATION_STATUS=2'] = '${lblValue} ${stringTableCurrentIllumination}: ${lblOverflow}'; +elvST['CURRENT_STATUS=NORMAL'] = '${lblValue} ${stringTableCurrent}: ${lblNormal}'; +elvST['CURRENT_STATUS=0'] = '${lblValue} ${stringTableCurrent}: ${lblNormal}'; +elvST['CURRENT_STATUS=OVERFLOW'] = '${lblValue} ${stringTableCurrent}: ${lblOverflow}'; +elvST['CURRENT_STATUS=1'] = '${lblValue} ${stringTableCurrent}: ${lblOverflow}'; +elvST['CURRENT_STATUS=UNDERFLOW'] = '${lblValue} ${stringTableCurrent}: ${lblUnderflow}'; +elvST['CURRENT_STATUS=2'] = '${lblValue} ${stringTableCurrent}: ${lblUnderflow}'; +elvST['CURRENT_STATUS=UNKNOWN'] = '${lblValue} ${stringTableCurrent}: ${lblUnknown}'; +elvST['CURRENT_STATUS=3'] = '${lblValue} ${stringTableCurrent}: ${lblUnknown}'; +elvST['CYCLIC_INFO_MSG'] = '${stringTableCyclicInfoMsg}'; +elvST['CYCLIC_INFO_MSG_DIS'] = '${stringTableCyclicInfoMsgDis}'; +elvST['CYCLIC_INFO_MSG_DIS_UNCHANGED'] = '${stringTableCyclicInfoMsgDisUnChanged}'; +elvST['CYCLIC_INFO_MSG_OVERDUE_THRESHOLD'] = '${stringTableCyclicInfoMsgOverdueThreshold}'; +elvST['CYCLIC_INFO_MSG_PAUSE'] = '${stringTableCyclicInfoMsgPause}'; +elvST['DATE_TIME_UNKNOWN=FALSE'] = '${stringTableDateTimeUnknownFalse}'; +elvST['DATE_TIME_UNKNOWN=TRUE'] = '${stringTableDateTimeUnknownTrue}'; +elvST['DAYLIGHT_SAVINGS_TIME'] = '${stringTableDST}'; +elvST['DDC|STATE'] = '${stringTableDDCState}'; +elvST['DECISION_VALUE'] = '${stringTableConditionValue}'; +elvST['DEVICE_IN_BOOTLOADER'] = '${stringTableDeviceInBootloader}'; +elvST['DEVICE_LED_MODE'] = '${stringTableDeviceLEDMode}'; +elvST['DEVICE_LED_MODE=OFF'] = '${stringTableDeviceLEDModeOff}'; +elvST['DEVICE_LED_MODE=ON'] = '${stringTableDeviceLEDModeOn}'; +elvST['DEV_RPT_CNT_MAX'] = '${stringTableDevRptCntMax}'; +elvST['DEW_POINT_ALARM=FALSE'] = '${stringTableDewPointAlarmFalse}'; +elvST['DEW_POINT_ALARM=TRUE'] = '${stringTableDewPointAlarmTrue}'; +elvST['DIGITAL_ANALOG_INPUT|BEHAVIOUR'] = '${stringTableDigitalAnalogInputBehaviour}'; +elvST['DIGITAL_ANALOG_INPUT|CALIBRATION'] = '${stringTableDigitalAnalogInputCalibration}'; +elvST['DIGITAL_ANALOG_INPUT|STATE=FALSE'] = '${stringTableDigitalAnalogInputStateFalse}'; +elvST['DIGITAL_ANALOG_INPUT|STATE=TRUE'] = '${stringTableDigitalAnalogInputStateTrue}'; +elvST['DIGITAL_ANALOG_INPUT|VALUE'] = '${stringTableDigitalAnalogInputValue}'; +elvST['DIGITAL_ANALOG_OUTPUT|BEHAVIOUR'] = '${stringTableDigitalAnalogOutputBehaviour}'; +elvST['DIGITAL_ANALOG_OUTPUT|FREQUENCY'] = '${stringTableDigitalAnalogOutputFrequency}'; +elvST['DIGITAL_ANALOG_OUTPUT|PULSETIME'] = '${stringTableDigitalAnalogOutputPulseTime}'; +elvST['DIGITAL_ANALOG_OUTPUT|STATE=FALSE'] = '${stringTableDigitalAnalogOutputStateFalse}'; +elvST['DIGITAL_ANALOG_OUTPUT|STATE=TRUE'] = '${stringTableDigitalAnalogOutputStateTrue}'; +elvST['DIGITAL_INPUT'] = '${stringTableDigitalInput}'; +elvST['DIGITAL_INPUT|BEHAVIOUR'] = '${stringTableDigitalInputBehaviour}'; +elvST['DIGITAL_INPUT|FREQUENCY'] = '${stringTableDigitalInputFrequency}'; +elvST['DIGITAL_INPUT|STATE=FALSE'] = '${stringTableDigitalInputStateFalse}'; +elvST['DIGITAL_INPUT|STATE=TRUE'] = '${stringTableDigitalInputStateTrue}'; +elvST['DIGITAL_OUTPUT'] = '${stringTableDigitalOutput}'; +elvST['DIGITAL_OUTPUT|STATE=FALSE'] = '${stringTableDigitalOutputStateFalse}'; +elvST['DIGITAL_OUTPUT|STATE=TRUE'] = '${stringTableDigitalOutputStateTrue}'; +elvST['DIMMER'] = '${stringTableDimmerTitle}'; +elvST['DIMMER_VIRTUAL_RECEIVER'] = '${stringTableDimmerTitle}'; +elvST['DIMMER|CHARACTERISTIC'] = '${stringTableDimmerCharacteristic}'; +elvST['DIMMER|ERROR=LOAD_FAILURE'] = '${stringTableDimmerErrorLoad}'; +elvST['DIMMER|ERROR_OVERHEAT'] = '${stringTableDimmerErrorOverheat}'; +elvST['DIMMER|ERROR_OVERLOAD'] = '${stringTableDimmerErrorOverload}'; +elvST['DIMMER|ERROR_REDUCED'] = '${stringTableDimmerErrorReduced}'; +elvST['DIMMER|FUSE_DELAY'] = '${stringTableDimmerFuseDelay}'; +elvST['DIMMER|LEVEL'] = '${stringTableDimmerLevel}'; +elvST['DIMMER|LOAD_APPEAR_BEHAVIOUR'] = '${stringTableDimmerLoadAppearBehaviour}'; +elvST['DIMMER|LOAD_ERROR_CALIB'] = '${stringTableDimmerLoadErrorCal}'; +elvST['DIMMER|LOGIC_COMBINATION'] = '${stringTableLogicCombination}'; +elvST['DIMMER|OLD_LEVEL'] = '${stringTableDimmerOldLevel}'; +elvST['DIMMER|ON_TIME'] = '${stringTableDimmerOnTime}'; +elvST['DIMMER|OVERTEMP_LEVEL'] = '${stringTableDimmerOverTempLevel}'; +elvST['DIMMER|POWERUP_ACTION'] = '${stringTableDimmerPowerUpAction}'; +elvST['DIMMER|RAMP_STOP'] = '${stringTableDimmerRampStop}'; +elvST['DIMMER|RAMP_TIME'] = '${stringTableDimmerRampTime}'; +elvST['DIMMER|REDUCE_LEVEL'] = '${stringTableDimmerReduceLevel}'; +elvST['DIMMER|REDUCE_TEMP_LEVEL'] = '${stringTableDimmerReduceTempLevel}'; +elvST['DIMMER|RELAY_OFFDELAY_TIME'] = '${stringTableRelayOffdelayTime}'; +elvST['DIMMER_TRANSMITTER|ACTIVITY_STATE=DOWN'] = '${stringTableDimmerActivityStateDown}'; +elvST['DIMMER_TRANSMITTER|ACTIVITY_STATE=UNKNOWN'] = '${stringTableDimmerActivityStateUnknown}'; +elvST['DIMMER_TRANSMITTER|ACTIVITY_STATE=UP'] = '${stringTableDimmerActivityStateUp}'; +elvST['DIMMER_TRANSMITTER|ACTIVITY_STATE=STABLE'] = '${stringTableProcessStableBlindDimmerTransmitter}'; +elvST['DIMMER_TRANSMITTER|LEVEL_STATUS=ERROR'] = '${lblValue} ${stringTableDimmerLevel}: ${lblError}'; +elvST['DIMMER_TRANSMITTER|LEVEL_STATUS=4'] = '${lblValue} ${stringTableDimmerLevel}: ${lblError}'; +elvST['DIMMER_TRANSMITTER|LEVEL_STATUS=NORMAL'] = '${lblValue} ${stringTableDimmerLevel}: ${lblNormal}'; +elvST['DIMMER_TRANSMITTER|LEVEL_STATUS=0'] = '${lblValue} ${stringTableDimmerLevel}: ${lblNormal}'; +elvST['DIMMER_TRANSMITTER|LEVEL_STATUS=OVERFLOW'] = '${lblValue} ${stringTableDimmerLevel}: ${lblOverflow}'; +elvST['DIMMER_TRANSMITTER|LEVEL_STATUS=2'] = '${lblValue} ${stringTableDimmerLevel}: ${lblOverflow}'; +elvST['DIMMER_TRANSMITTER|LEVEL_STATUS=UNDERFLOW'] = '${lblValue} ${stringTableDimmerLevel}: ${lblUnderflow}'; +elvST['DIMMER_TRANSMITTER|LEVEL_STATUS=3'] = '${lblValue} ${stringTableDimmerLevel}: ${lblUnderflow}'; +elvST['DIMMER_TRANSMITTER|LEVEL_STATUS=UNKNOWN'] = '${lblValue} ${stringTableDimmerLevel}: ${lblUnknown}'; +elvST['DIMMER_TRANSMITTER|LEVEL_STATUS=1'] = '${lblValue} ${stringTableDimmerLevel}: ${lblUnknown}'; +elvST['DIMMER_TRANSMITTER|PROCESS=NOT_STABLE'] = '${stringTableProcessNotStableDimmerTransmitter}'; +elvST['DIMMER_TRANSMITTER|PROCESS=STABLE'] = '${stringTableProcessStableBlindDimmerTransmitter}'; +elvST['DIMMER_VIRTUAL_RECEIVER|ACTIVITY_STATE=DOWN'] = '${stringTableDimmerActivityStateDown}'; +elvST['DIMMER_VIRTUAL_RECEIVER|ACTIVITY_STATE=UNKNOWN'] = '${stringTableDimmerActivityStateUnknown}'; +elvST['DIMMER_VIRTUAL_RECEIVER|ACTIVITY_STATE=UP'] = '${stringTableDimmerActivityStateUp}'; +elvST['DIMMER_VIRTUAL_RECEIVER|ACTIVITY_STATE=STABLE'] = '${stringTableProcessStableBlindDimmerTransmitter}'; +elvST['DIMMER_VIRTUAL_RECEIVER|PROCESS=NOT_STABLE'] = '${stringTableProcessNotStableDimmerTransmitter}'; +elvST['DIMMER_VIRTUAL_RECEIVER|PROCESS=STABLE'] = '${stringTableProcessStableBlindDimmerTransmitter}'; +elvST['DIMMER_VIRTUAL_RECEIVER|LEVEL_STATUS=ERROR'] = '${lblValue} ${stringTableDimmerLevel}: ${lblError}'; +elvST['DIMMER_VIRTUAL_RECEIVER|LEVEL_STATUS=4'] = '${lblValue} ${stringTableDimmerLevel}: ${lblError}'; +elvST['DIMMER_VIRTUAL_RECEIVER|LEVEL_STATUS=NORMAL'] = '${lblValue} ${stringTableDimmerLevel}: ${lblNormal}'; +elvST['DIMMER_VIRTUAL_RECEIVER|LEVEL_STATUS=0'] = '${lblValue} ${stringTableDimmerLevel}: ${lblNormal}'; +elvST['DIMMER_VIRTUAL_RECEIVER|LEVEL_STATUS=OVERFLOW'] = '${lblValue} ${stringTableDimmerLevel}: ${lblOverflow}'; +elvST['DIMMER_VIRTUAL_RECEIVER|LEVEL_STATUS=2'] = '${lblValue} ${stringTableDimmerLevel}: ${lblOverflow}'; +elvST['DIMMER_VIRTUAL_RECEIVER|LEVEL_STATUS=UNDERFLOW'] = '${lblValue} ${stringTableDimmerLevel}: ${lblUnderflow}'; +elvST['DIMMER_VIRTUAL_RECEIVER|LEVEL_STATUS=3'] = '${lblValue} ${stringTableDimmerLevel}: ${lblUnderflow}'; +elvST['DIMMER_VIRTUAL_RECEIVER|LEVEL_STATUS=UNKNOWN'] = '${lblValue} ${stringTableDimmerLevel}: ${lblUnknown}'; +elvST['DIMMER_VIRTUAL_RECEIVER|LEVEL_STATUS=1'] = '${lblValue} ${stringTableDimmerLevel}: ${lblUnknown}'; +elvST['DIRT_LEVEL'] = '${stringTableDirtLevel}'; +elvST['DISABLE_ACOUSTIC_CHANNELSTATE'] = '${stringTableDisableAcousticChannelState}'; +elvST['DISABLE_ACOUSTIC_SENDSTATE'] = '${stringTableDisableAcousticSendState}'; +elvST['DISPLAY_BACKLIGHT_MODE'] = '${stringTableDisplayBacklightMode}'; +elvST['DISPLAY_BACKLIGHT_MODE=AUTO'] = '${stringTableDisplayBacklightModeAuto}'; +elvST['DISPLAY_BACKLIGHT_MODE=OFF'] = '${stringTableDisplayBacklightModeOff}'; +elvST['DISPLAY_BACKLIGHT_MODE=ON'] = '${stringTableDisplayBacklightModeOn}'; +elvST['DISPLAY_BACKLIGHT_TIME'] = '${stringTableDisplayBacklightTime}'; +elvST['DISPLAY_BRIGHTNESS'] = '${stringTableDisplayBrightness}'; +elvST['DISPLAY_CONTRAST'] = '${stringTableDisplayContrast}'; +elvST['DISPLAY_ENERGYOPTIONS'] = '${stringTableDisplayEnergyOptions}'; +elvST['DISPLAY_INVERTING'] = '${stringTableDisplayInverting}'; +elvST['DISPLAY|ALARM_COUNT'] = '${stringTableDisplayAlarmCount}'; +elvST['DISPLAY|ARROW_DOWN'] = '${stringTableDisplayArrowDown}'; +elvST['DISPLAY|ARROW_UP'] = '${stringTableDisplayArrowUp}'; +elvST['DISPLAY|BACKLIGHT'] = '${stringTableDisplayBacklight}'; +elvST['DISPLAY|BACKLIGHT=BLINK_FAST'] = '${stringTableDisplayBacklightBlinkFast}'; +elvST['DISPLAY|BACKLIGHT=BLINK_SLOW'] = '${stringTableDisplayBacklightBlinkSlow}'; +elvST['DISPLAY|BACKLIGHT=OFF'] = '${stringTableDisplayBacklightOff}'; +elvST['DISPLAY|BACKLIGHT=ON'] = '${stringTableDisplayBacklightOn}'; +elvST['DISPLAY|BACKLIGHT_AT_ALARM'] = '${stringTableDisplayBacklightAtAlarm}'; +elvST['DISPLAY|BACKLIGHT_AT_ALARM=BLINK_FAST'] = '${stringTableDisplayBacklightAtAlarmBlinkFast}'; +elvST['DISPLAY|BACKLIGHT_AT_ALARM=BLINK_SLOW'] = '${stringTableDisplayBacklightAtAlarmBlinkSlow}'; +elvST['DISPLAY|BACKLIGHT_AT_ALARM=OFF'] = '${stringTableDisplayBacklightAtAlarmOff}'; +elvST['DISPLAY|BACKLIGHT_AT_ALARM=ON'] = '${stringTableDisplayBacklightAtAlarmOn}'; +elvST['DISPLAY|BACKLIGHT_AT_SERVICE'] = '${stringTableDisplayBacklightAtService}'; +elvST['DISPLAY|BACKLIGHT_AT_SERVICE=BLINK_FAST'] = '${stringTableDisplayBacklightAtServiceBlinkFast}'; +elvST['DISPLAY|BACKLIGHT_AT_SERVICE=BLINK_SLOW'] = '${stringTableDisplayBacklightAtServiceBlinkSlow}'; +elvST['DISPLAY|BACKLIGHT_AT_SERVICE=OFF'] = '${stringTableDisplayBacklightAtServiceOff}'; +elvST['DISPLAY|BACKLIGHT_AT_SERVICE=ON'] = '${stringTableDisplayBacklightAtServiceOn}'; +elvST['DISPLAY|BACKLIGHT_AT_STATUS'] = '${stringTableDisplayBacklightAtState}'; +elvST['DISPLAY|BACKLIGHT_AT_STATUS=BLINK_FAST'] = '${stringTableDisplayBacklightAtStateBlinkFast}'; +elvST['DISPLAY|BACKLIGHT_AT_STATUS=BLINK_SLOW'] = '${stringTableDisplayBacklightAtStateBlinkSlow}'; +elvST['DISPLAY|BACKLIGHT_AT_STATUS=OFF'] = '${stringTableDisplayBacklightAtStateOff}'; +elvST['DISPLAY|BACKLIGHT_AT_STATUS=ON'] = '${stringTableDisplayBacklightAtStateOn}'; +elvST['DISPLAY|BEEP=NONE'] = '${stringTableDisplayBeepNone}'; +elvST['DISPLAY|BEEP=TONE1'] = '${stringTableDisplayBeepTone1}'; +elvST['DISPLAY|BEEP=TONE2'] = '${stringTableDisplayBeepTone2}'; +elvST['DISPLAY|BEEP=TONE3'] = '${stringTableDisplayBeepTone3}'; +elvST['DISPLAY|BEEP_AT_ALARM'] = '${stringTableDisplayBeepAtAlarm}'; +elvST['DISPLAY|BEEP_AT_ALARM=NONE'] = '${stringTableDisplayBeepAtAlarmNone}'; +elvST['DISPLAY|BEEP_AT_ALARM=TONE1'] = '${stringTableDisplayBeepAtAlarmTone1}'; +elvST['DISPLAY|BEEP_AT_ALARM=TONE2'] = '${stringTableDisplayBeepAtAlarmTone2}'; +elvST['DISPLAY|BEEP_AT_ALARM=TONE3'] = '${stringTableDisplayBeepAtAlarmTone3}'; +elvST['DISPLAY|BEEP_AT_SERVICE'] = '${stringTableDisplayBeepAtService}'; +elvST['DISPLAY|BEEP_AT_SERVICE=NONE'] = '${stringTableDisplayBeepAtServiceNone}'; +elvST['DISPLAY|BEEP_AT_SERVICE=TONE1'] = '${stringTableDisplayBeepAtServiceTone1}'; +elvST['DISPLAY|BEEP_AT_SERVICE=TONE2'] = '${stringTableDisplayBeepAtServiceTone2}'; +elvST['DISPLAY|BEEP_AT_SERVICE=TONE3'] = '${stringTableDisplayBeepAtServiceTone3}'; +elvST['DISPLAY|BEEP_AT_STATUSINFO'] = '${stringTableDisplayBeepAtStatusInfo}'; +elvST['DISPLAY|BEEP_AT_STATUSINFO=NONE'] = '${stringTableDisplayBeepAtStatusInfoNone}'; +elvST['DISPLAY|BEEP_AT_STATUSINFO=TONE1'] = '${stringTableDisplayBeepAtStatusInfoTone1}'; +elvST['DISPLAY|BEEP_AT_STATUSINFO=TONE2'] = '${stringTableDisplayBeepAtStatusInfoTone2}'; +elvST['DISPLAY|BEEP_AT_STATUSINFO=TONE3'] = '${stringTableDisplayBeepAtStatusInfoTone3}'; +elvST['DISPLAY|BELL'] = '${stringTableDisplayBell}'; +elvST['DISPLAY|BLIND'] = '${stringTableDisplayBlind}'; +elvST['DISPLAY|BULB'] = '${stringTableDisplayBulb}'; +elvST['DISPLAY|CLOCK'] = '${stringTableDisplayClock}'; +elvST['DISPLAY|DOOR'] = '${stringTableDisplayDoor}'; +elvST['DISPLAY|MESSAGE_SHOW_TIME'] = '${stringTableDisplayMessageShowTime}'; +elvST['DISPLAY|MESSAGE_SHOW_TIME=PERMANENT'] = '${stringTableDisplayMessageShowTimePermanent}'; +elvST['DISPLAY|PHONE'] = '${stringTableDisplayPhone}'; +elvST['DISPLAY|SCENE'] = '${stringTableDisplayScene}'; +elvST['DISPLAY|SERVICE_COUNT'] = '${stringTableDisplayServiceCount}'; +elvST['DISPLAY|SUBMIT'] = '${stringTableDisplaySubmit}'; +elvST['DISPLAY|SWITCH'] = '${stringTableDisplaySwitch}'; +elvST['DISPLAY|TEXT'] = '${stringTableDisplayText}'; +elvST['DISPLAY|UNIT=CELSIUS'] = '${stringTableDisplayUnitCelsius}'; +elvST['DISPLAY|UNIT=FAHRENHEIT'] = '${stringTableDisplayUnitFahrenheit}'; +elvST['DISPLAY|UNIT=NONE'] = '${stringTableDisplayUnitNone}'; +elvST['DISPLAY|UNIT=PERCENT'] = '${stringTableDisplayUnitPercent}'; +elvST['DISPLAY|UNIT=WATT'] = '${stringTableDisplayUnitWatt}'; +elvST['DISPLAY|WINDOW'] = '${stringTableDisplayWindow}'; +elvST['DISPLAY_INPUT_TRANSMITTER'] = '${stringTableDisplayInputTransmitterTitle}'; +elvST['DISPLAY_INPUT_TRANSMITTER|DISPLAY_DATA_STRING'] = '${stringTableWGDDisplayDataString}'; +elvST['DISPLAY_LEVEL_INPUT_TRANSMITTER'] = '${stringTableDisplayInputLevelTransmitterTitle}'; +elvST['DISPLAY_THERMOSTAT_INPUT_TRANSMITTER'] = '${stringTableDisplayInputThermostatTransmitterTitle}'; +elvST['DISPLAY_UPDATE_REQUEST_0=FALSE'] = '${stringTableDisplayUpdateRequest} 0: ${lblNo}'; +elvST['DISPLAY_UPDATE_REQUEST_0=TRUE'] = '${stringTableDisplayUpdateRequest} 0: ${lblYes}'; +elvST['DISPLAY_UPDATE_REQUEST_01=FALSE'] = '${stringTableDisplayUpdateRequest} 1: ${lblNo}'; +elvST['DISPLAY_UPDATE_REQUEST_01=TRUE'] = '${stringTableDisplayUpdateRequest} 1: ${lblYes}'; +elvST['DISPLAY_UPDATE_REQUEST_03=FALSE'] = '${stringTableDisplayUpdateRequest} 3: ${lblNo}'; +elvST['DISPLAY_UPDATE_REQUEST_03=TRUE'] = '${stringTableDisplayUpdateRequest} 3: ${lblYes}'; +elvST['DISPLAY_UPDATE_REQUEST_05=FALSE'] = '${stringTableDisplayUpdateRequest} 5: ${lblNo}'; +elvST['DISPLAY_UPDATE_REQUEST_05=TRUE'] = '${stringTableDisplayUpdateRequest} 5: ${lblYes}'; +elvST['DISPLAY_UPDATE_REQUEST_07=FALSE'] = '${stringTableDisplayUpdateRequest} 7: ${lblNo}'; +elvST['DISPLAY_UPDATE_REQUEST_07=TRUE'] = '${stringTableDisplayUpdateRequest} 7: ${lblYes}'; +elvST['DISPLAY_UPDATE_REQUEST_09=FALSE'] = '${stringTableDisplayUpdateRequest} 9: ${lblNo}'; +elvST['DISPLAY_UPDATE_REQUEST_09=TRUE'] = '${stringTableDisplayUpdateRequest} 9: ${lblYes}'; +elvST['DISPLAY_UPDATE_REQUEST_11=FALSE'] = '${stringTableDisplayUpdateRequest} 11: ${lblNo}'; +elvST['DISPLAY_UPDATE_REQUEST_11=TRUE'] = '${stringTableDisplayUpdateRequest} 11: ${lblYes}'; +elvST['DISPLAY_UPDATE_REQUEST_13=FALSE'] = '${stringTableDisplayUpdateRequest} 13: ${lblNo}'; +elvST['DISPLAY_UPDATE_REQUEST_13=TRUE'] = '${stringTableDisplayUpdateRequest} 13: ${lblYes}'; +elvST['DISPLAY_UPDATE_REQUEST_15=FALSE'] = '${stringTableDisplayUpdateRequest} 15: ${lblNo}'; +elvST['DISPLAY_UPDATE_REQUEST_15=TRUE'] = '${stringTableDisplayUpdateRequest} 15: ${lblYes}'; +elvST['DISPLAY_UPDATE_REQUEST_17=FALSE'] = '${stringTableDisplayUpdateRequest} 17: ${lblNo}'; +elvST['DISPLAY_UPDATE_REQUEST_17=TRUE'] = '${stringTableDisplayUpdateRequest} 17: ${lblYes}'; +elvST['DISPLAY_UPDATE_REQUEST_19=FALSE'] = '${stringTableDisplayUpdateRequest} 19: ${lblNo}'; +elvST['DISPLAY_UPDATE_REQUEST_19=TRUE'] = '${stringTableDisplayUpdateRequest} 19: ${lblYes}'; +elvST['DISPLAY_UPDATE_REQUEST_21=FALSE'] = '${stringTableDisplayUpdateRequest} 21: ${lblNo}'; +elvST['DISPLAY_UPDATE_REQUEST_21=TRUE'] = '${stringTableDisplayUpdateRequest} 21: ${lblYes}'; +elvST['DISPLAY_UPDATE_REQUEST_23=FALSE'] = '${stringTableDisplayUpdateRequest} 23: ${lblNo}'; +elvST['DISPLAY_UPDATE_REQUEST_23=TRUE'] = '${stringTableDisplayUpdateRequest} 23: ${lblYes}'; +elvST['DOOR_COMMAND=CLOSE'] = '${stringTableDoorCommandClose}'; +elvST['DOOR_COMMAND=NOP'] = '${stringTableDoorCommandNOP}'; +elvST['DOOR_COMMAND=OPEN'] = '${stringTableDoorCommandOpen}'; +elvST['DOOR_COMMAND=PARTIAL_OPEN'] = '${stringTableDoorCommandPartialOpen}'; +elvST['DOOR_COMMAND=STOP'] = '${stringTableDoorCommandStop}'; +elvST['DOOR_LOCK_STATE_TRANSCEIVER'] = '${stringTableDoorLockStateTransmitterTitle}'; +elvST['DOOR_LOCK_STATE_TRANSCEIVER|LOCK_STATE=LOCKED'] = '${stringTableDoorLockStateTransmitterLockStateLocked}'; +elvST['DOOR_LOCK_STATE_TRANSCEIVER|LOCK_STATE=UNLOCKED'] = '${stringTableDoorLockStateTransmitterLockStateUnlocked}'; +elvST['DOOR_LOCK_STATE_TRANSCEIVER|LOCK_STATE=UNKNOWN'] = '${stringTableDoorLockStateTransmitterLockStateUnknown}'; +elvST['DOOR_LOCK_STATE_TRANSCEIVER|MSG_FOR_POS_A=NO_MSG'] = '${stringTableTiltSensorMsgPosA2}'; +elvST['DOOR_LOCK_STATE_TRANSCEIVER|MSG_FOR_POS_A=LOCKED'] = '${stringTableDoorLockStateTransmitterLockStateLocked}'; +elvST['DOOR_LOCK_STATE_TRANSCEIVER|MSG_FOR_POS_A=UNLOCKED'] = '${stringTableDoorLockStateTransmitterLockStateUnlocked}'; +elvST['DOOR_LOCK_STATE_TRANSCEIVER|MSG_FOR_POS_B=NO_MSG'] = '${stringTableTiltSensorMsgPosB2}'; +elvST['DOOR_LOCK_STATE_TRANSCEIVER|MSG_FOR_POS_B=LOCKED'] = '${stringTableDoorLockStateTransmitterLockStateLocked}'; +elvST['DOOR_LOCK_STATE_TRANSCEIVER|MSG_FOR_POS_B=UNLOCKED'] = '${stringTableDoorLockStateTransmitterLockStateUnlocked}'; +elvST['DOOR_LOCK_STATE_TRANSMITTER|LOCK_STATE=LOCKED'] = '${stringTableDoorLockStateTransmitterLockStateLocked}'; +elvST['DOOR_LOCK_STATE_TRANSMITTER|LOCK_STATE=UNLOCKED'] = '${stringTableDoorLockStateTransmitterLockStateUnlocked}'; +elvST['DOOR_LOCK_STATE_TRANSMITTER|LOCK_STATE=UNKNOWN'] = '${stringTableDoorLockStateTransmitterLockStateUnknown}'; +elvST['DOOR_LOCK_STATE_TRANSMITTER|ACTIVITY_STATE=DOWN'] = '${stringTableDoorLockStateTransmitterActivityStateDown}'; +elvST['DOOR_LOCK_STATE_TRANSMITTER|ACTIVITY_STATE=UNKNOWN'] = '${stringTableDoorLockStateTransmitterActivityStateUnknown}'; +elvST['DOOR_LOCK_STATE_TRANSMITTER|ACTIVITY_STATE=STABLE'] = '${stringTableDoorLockStateTransmitterActivityStateStable}'; +elvST['DOOR_LOCK_STATE_TRANSMITTER|ACTIVITY_STATE=UP'] = '${stringTableDoorLockStateTransmitterActivityStateUp}'; +elvST['DOOR_LOCK_STATE_TRANSMITTER|LOCK_TARGET_LEVEL=LOCKED'] = '${stringTableDoorLockStateTransmitterLockTargetLevelLocked}'; +elvST['DOOR_LOCK_STATE_TRANSMITTER|LOCK_TARGET_LEVEL=UNLOCKED'] = '${stringTableDoorLockStateTransmitterLockTargetLevelUnlocked}'; +elvST['DOOR_LOCK_STATE_TRANSMITTER|LOCK_TARGET_LEVEL=OPEN'] = '${stringTableDoorLockStateTransmitterLockTargetLevelOpen}'; +elvST['DOOR_RECEIVER'] = '${stringTableDoorReceiverTitle}'; +elvST['DOOR_STATE=CLOSED'] = '${stringTableDoorStateClose}'; +elvST['DOOR_STATE=OPEN'] = '${stringTableDoorStateOpen}'; +elvST['DOOR_STATE=POSITION_UNKNOWN'] = '${stringTableDoorStateUnknown}'; +elvST['DOOR_STATE=VENTILATION_POSITION'] = '${stringTableDoorStateVentilationPosition}'; +elvST['DUAL_WHITE_BRIGHTNESS'] = '${stringTableDualWhiteBrightnessTitle}'; +elvST['DUAL_WHITE_COLOR'] = '${stringTableDualWhiteColorTitle}'; +elvST['DUAL_WHITE_COLOR|LEVEL'] = '${stringTableDualWhiteColorLevel}'; +elvST['DUAL_WHITE_COLOR|LEVEL_REAL'] = '${stringTableDualWhiteColorLevelReal}'; +elvST['DUAL_WHITE_COLOR|OLD_LEVEL'] = '${stringTableDualWhiteColorOldLevel}'; +elvST['DUAL_WHITE_COLOR|RAMP_STOP'] = '${stringTableDualWhiteColorRampStop}'; +elvST['DUAL_WHITE_COLOR|RAMP_TIME'] = '${stringTableDualWhiteColorRampTime}'; +elvST['DURATION_UNIT'] = '${stringTableDurationUnit}'; +elvST['DURATION_UNIT=D'] = '${stringTableDurationUnitD}'; +elvST['DURATION_UNIT=H'] = '${stringTableDurationUnitH}'; +elvST['DURATION_UNIT=M'] = '${stringTableDurationUnitM}'; +elvST['DURATION_UNIT=S'] = '${stringTableDurationUnitS}'; +elvST['DURATION_UNIT=10MS'] = '${stringTableDurationUnit10MS}'; +elvST['DURATION_VALUE'] = '${stringTableDurationValue}'; +elvST['DUTYCYCLE_LIMIT'] = '${stringTableDutyCycleLimit}'; +elvST['DUTY_CYCLE_LEVEL'] = '${lblDutyCycle}'; +elvST['DUTY_CYCLE=FALSE'] = '${stringTableDutyCycleFalse}'; +elvST['DUTY_CYCLE=TRUE'] = '${stringTableDutyCycleTrue}'; +elvST['EMERGENCY_OPERATION=FALSE'] = '${stringTableEmergencyOperationFalse}'; +elvST['EMERGENCY_OPERATION=TRUE'] = '${stringTableEmergencyOperationTrue}'; +elvST['ENABLE_ROUTING'] = '${stringTableEnableRouting}'; +elvST['ENERGIE_METER_TRANSMITTER|AVERAGING'] = '${stringTablePowerMeterAveraging}'; +elvST['ENERGIE_METER_TRANSMITTER|ENERGY_COUNTER'] = '${stringTablePowerMeterEnergyCounter}'; +elvST['ENERGIE_METER_TRANSMITTER|ENERGY_COUNTER_FEED_IN'] = '${stringTablePowerMeterEnergyCounterFeedIn}'; +elvST['ENERGIE_METER_TRANSMITTER|POWER'] = '${stringTablePowerMeterPower}'; +elvST['ENERGIE_METER_TRANSMITTER|ENERGY_COUNTER_STATUS=NORMAL'] = '${lblStatus} ${chType_POWERMETER}: ${lblNormal}'; +elvST['ENERGIE_METER_TRANSMITTER|ENERGY_COUNTER_STATUS=0'] = '${lblStatus} ${chType_POWERMETER}: ${lblNormal}'; +elvST['ENERGIE_METER_TRANSMITTER|ENERGY_COUNTER_STATUS=UNKNOWN'] = '${lblStatus} ${chType_POWERMETER}: ${lblUnknown}'; +elvST['ENERGIE_METER_TRANSMITTER|ENERGY_COUNTER_STATUS=1'] = '${lblStatus} ${chType_POWERMETER}: ${lblUnknown}'; +elvST['ENERGIE_METER_TRANSMITTER|ENERGY_COUNTER_STATUS=OVERFLOW'] = '${lblStatus} ${chType_POWERMETER}: ${lblOverflow}'; +elvST['ENERGIE_METER_TRANSMITTER|ENERGY_COUNTER_STATUS=2'] = '${lblStatus} ${chType_POWERMETER}: ${lblOverflow}'; +elvST['ENERGIE_METER_TRANSMITTER|ENERGY_COUNTER_OVERFLOW=FALSE'] = '${stringTablePowerMeterOverflowFalse}'; +elvST['ENERGIE_METER_TRANSMITTER|ENERGY_COUNTER_OVERFLOW=TRUE'] = '${stringTablePowerMeterOverflowTrue}'; +elvST['ENERGIE_METER_TRANSMITTER|FREQUENCY'] = '${stringTablePowerMeterFrequency}'; +elvST['ENERGIE_METER_TRANSMITTER|GAS_FLOW'] = '${stringTablePowerMeterGasFlow}'; +elvST['ENERGIE_METER_TRANSMITTER|GAS_FLOW_STATUS=NORMAL'] = '${lblValue} ${stringTablePowerMeterGasFlow}: ${lblNormal}'; +elvST['ENERGIE_METER_TRANSMITTER|GAS_FLOW_STATUS=UNKNOWN'] = '${lblValue} ${stringTablePowerMeterGasFlow}: ${lblUnknown}'; +elvST['ENERGIE_METER_TRANSMITTER|GAS_FLOW_STATUS=OVERFLOW'] = '${lblValue} ${stringTablePowerMeterGasFlow}: ${lblOverflow}'; +elvST['ENERGIE_METER_TRANSMITTER|GAS_VOLUME'] = '${stringTablePowerMeterGasVolume}'; +elvST['ENERGIE_METER_TRANSMITTER|GAS_VOLUME_STATUS=NORMAL'] = '${lblValue} ${stringTablePowerMeterGasVolume}: ${lblNormal}'; +elvST['ENERGIE_METER_TRANSMITTER|GAS_VOLUME_STATUS=UNKNOWN'] = '${lblValue} ${stringTablePowerMeterGasVolume}: ${lblUnknown}'; +elvST['ENERGIE_METER_TRANSMITTER|GAS_VOLUME_STATUS=OVERFLOW'] = '${lblValue} ${stringTablePowerMeterGasVolume}: ${lblOverflow}'; +elvST['ENERGIE_METER_TRANSMITTER|POWER'] = '${stringTablePowerMeterPower}'; +elvST['ENERGIE_METER_TRANSMITTER|POWER_STATUS=NORMAL'] = '${lblValue} ${stringTablePowerMeterPower}: ${lblNormal}'; +elvST['ENERGIE_METER_TRANSMITTER|POWER_STATUS=0'] = '${lblValue} ${stringTablePowerMeterPower}: ${lblNormal}'; +elvST['ENERGIE_METER_TRANSMITTER|POWER_STATUS=UNKNOWN'] = '${lblValue} ${stringTablePowerMeterPower}: ${lblUnknown}'; +elvST['ENERGIE_METER_TRANSMITTER|POWER_STATUS=1'] = '${lblValue} ${stringTablePowerMeterPower}: ${lblUnknown}'; +elvST['ENERGIE_METER_TRANSMITTER|POWER_STATUS=OVERFLOW'] = '${lblValue} ${stringTablePowerMeterPower}: ${lblOverflow}'; +elvST['ENERGIE_METER_TRANSMITTER|POWER_STATUS=2'] = '${lblValue} ${stringTablePowerMeterPower}: ${lblOverflow}'; +elvST['ENERGIE_METER_TRANSMITTER|TX_THRESHOLD_POWER'] = '${stringTablePowerMeterTxThresholdPower}'; +elvST['ERROR'] = '${stringTableError}'; +elvST['ERROR=NO_ERROR'] = '${stringTableErrorNoError}'; +elvST['ERROR_BAD_RECHARGEABLE_BATTERY_HEALTH'] = '${stringTableErrorBadRechargeableBatteryHealthTrue}'; +elvST['ERROR_BAD_RECHARGEABLE_BATTERY_HEALTH=FALSE'] = '${stringTableErrorBadRechargeableBatteryHealthFalse}'; +elvST['ERROR_BAD_RECHARGEABLE_BATTERY_HEALTH=TRUE'] = '${stringTableErrorBadRechargeableBatteryHealthTrue}'; +elvST['ERROR_BATTERY=FALSE'] = '${stringTableBatteryFailure}'; +elvST['ERROR_BATTERY=TRUE'] = '${stringTableBatteryOk}'; +elvST['ERROR_BUS_CONFIG_MISMATCH'] = '${stringTablelErrorBusConfigMismatchTrue}'; +elvST['ERROR_BUS_CONFIG_MISMATCH=FALSE'] = '${stringTablelErrorBusConfigMismatchFalse}'; +elvST['ERROR_BUS_CONFIG_MISMATCH=TRUE'] = '${stringTablelErrorBusConfigMismatchTrue}'; +elvST['ERROR_CODE'] = '${stringTableErrorCode}'; +elvST['ERROR_COMMUNICATION_PARTICULATE_MATTER_SENSOR'] = '${stringTableErrorCommunicationParticulateMatterSensor}'; +elvST['ERROR_COMMUNICATION_PARTICULATE_MATTER_SENSOR=FALSE'] = '${stringTableErrorCommunicationParticulateMatterSensorFalse}'; +elvST['ERROR_COMMUNICATION_PARTICULATE_MATTER_SENSOR=TRUE'] = '${stringTableErrorCommunicationParticulateMatterSensorTrue}'; +elvST['ERROR_COMMUNICATION_SENSOR'] = '${stringTableErrorCommunicationSensor}'; +elvST['ERROR_COMMUNICATION_SENSOR=TRUE'] = '${stringTableErrorCommunicationSensorTrue}'; +elvST['ERROR_COMMUNICATION_SENSOR=FALSE'] = '${stringTableErrorCommunicationSensorFalse}'; +elvST['ERROR_COMMUNICATION_TEMP_AND_HUMIDITY_SENSOR'] = '${stringTableErrorCommunicationTempAndHumiditySensor}'; +elvST['ERROR_COMMUNICATION_TEMP_AND_HUMIDITY_SENSOR=FALSE'] = '${stringTableErrorCommunicationTempAndHumiditySensorFalse}'; +elvST['ERROR_COMMUNICATION_TEMP_AND_HUMIDITY_SENSOR=TRUE'] = '${stringTableErrorCommunicationTempAndHumiditySensorTrue}'; +elvST['ERROR_COPROCESSOR'] = '${stringTableErrorCoProcessor}'; +elvST['ERROR_COPROCESSOR=TRUE'] = '${stringTableErrorCoprocessorTrue}'; +elvST['ERROR_COPROCESSOR=FALSE'] = '${stringTableErrorCoprocessorFalse}'; +elvST['ERROR_DALI_BUS'] = '${stringTableErrorDaliBus}'; +elvST['ERROR_DALI_BUS=FALSE'] = '${stringTableErrorDaliBusFalse}'; +elvST['ERROR_DALI_BUS=TRUE'] = '${stringTableErrorDaliBusTrue}'; +elvST['ERROR_DEGRADED_CHAMBER'] = '${stringTableErrorDegradedChamber}'; +elvST['ERROR_DEGRADED_CHAMBER=FALSE'] = '${stringTableErrorDegradedChamberFalse}'; +elvST['ERROR_DEGRADED_CHAMBER=TRUE'] = '${stringTableErrorDegradedChamberTrue}'; +elvST['ERROR_NON_FLAT_POSITIONING'] = '${stringTableErrorNonFlatPositioning}'; +elvST['ERROR_NON_FLAT_POSITIONING=FALSE'] = '${stringTableErrorNonFlatPositioningFalse}'; +elvST['ERROR_NON_FLAT_POSITIONING=TRUE'] = '${stringTableErrorNonFlatPositioningTrue}'; +elvST['ERROR_OVERHEAT'] = '${stringTableErrorOverheatTrue}'; +elvST['ERROR_OVERHEAT=FALSE'] = '${stringTableErrorOverheatFalse}'; +elvST['ERROR_OVERHEAT=TRUE'] = '${stringTableErrorOverheatTrue}'; +elvST['ERROR_OVERLOAD'] = '${stringTableErrorOverloadTrue}'; +elvST['ERROR_OVERLOAD=FALSE'] = '${stringTableErrorOverloadFalse}'; +elvST['ERROR_OVERLOAD=TRUE'] = '${stringTableErrorOverloadTrue}'; +elvST['ERROR_PARTICULATE_MATTER_MEASUREMENT=FALSE'] = '${stringTableErrorParticulateMatterMeasurementFalse}'; +elvST['ERROR_PARTICULATE_MATTER_MEASUREMENT=TRUE'] = '${stringTableErrorParticulateMatterMeasurementTrue}'; +elvST['ERROR_POWER=FALSE'] = '${stringTableErrorPowerFalse}'; +elvST['ERROR_POWER=NO_ERROR'] = '${stringTablePowerAvailable}'; +elvST['ERROR_POWER=POWER_FAILURE'] = '${stringTablePowerNotAvailable}'; +elvST['ERROR_POWER=TRUE'] = '${stringTableErrorPowerTrue}'; +elvST['ERROR_POWER_FAILURE'] = '${stringTableErrorPowerFailureTrue}'; +elvST['ERROR_POWER_FAILURE=FALSE'] = '${stringTableErrorPowerFailureFalse}'; +elvST['ERROR_POWER_FAILURE=TRUE'] = '${stringTableErrorPowerFailureTrue}'; +elvST['ERROR_POWER_SHORT_CIRCUIT_BUS_1'] = '${stringTableErrorPowerShortCircuitBus1True}'; +elvST['ERROR_POWER_SHORT_CIRCUIT_BUS_1=FALSE'] = '${stringTableErrorPowerShortCircuitBus1False}'; +elvST['ERROR_POWER_SHORT_CIRCUIT_BUS_1=TRUE'] = '${stringTableErrorPowerShortCircuitBus1True}'; +elvST['ERROR_POWER_SHORT_CIRCUIT_BUS_2'] = '${stringTableErrorPowerShortCircuitBus2True}'; +elvST['ERROR_POWER_SHORT_CIRCUIT_BUS_2=FALSE'] = '${stringTableErrorPowerShortCircuitBus2False}'; +elvST['ERROR_POWER_SHORT_CIRCUIT_BUS_2=TRUE'] = '${stringTableErrorPowerShortCircuitBus2True}'; +elvST['ERROR_REDUCED=FALSE'] = '${stringTableErrorReducedFalse}'; +elvST['ERROR_REDUCED=TRUE'] = '${stringTableErrorReducedTrue}'; +elvST['ERROR_RESTART_NEEDED'] = '${stringTableErrorRestartNeeded}'; +elvST['ERROR_RESTART_NEEDED=TRUE'] = '${stringTableErrorRestartNeededTrue}'; +elvST['ERROR_RESTART_NEEDED=FALSE'] = '${stringTableErrorRestartNeededFalse}'; +elvST['ERROR_SABOTAGE=FALSE'] = '${stringTableErrorSabotageFalse}'; +elvST['ERROR_SABOTAGE=NO_ERROR'] = '${stringTableSabotageContactOk}'; +elvST['ERROR_SABOTAGE=SABOTAGE'] = '${stringTableSabotage}'; +elvST['ERROR_SABOTAGE=TRUE'] = '${stringTableErrorSabotageTrue}'; +elvST['ERROR_SHORT_CIRCUIT_DATA_LINE_BUS_1'] = '${stringTableErrorShortCircuitDataLineBus1True}'; +elvST['ERROR_SHORT_CIRCUIT_DATA_LINE_BUS_1=FALSE'] = '${stringTableErrorShortCircuitDataLineBus1False}'; +elvST['ERROR_SHORT_CIRCUIT_DATA_LINE_BUS_1=TRUE'] = '${stringTableErrorShortCircuitDataLineBus1True}'; +elvST['ERROR_SHORT_CIRCUIT_DATA_LINE_BUS_2'] = '${stringTableErrorShortCircuitDataLineBus2True}'; +elvST['ERROR_SHORT_CIRCUIT_DATA_LINE_BUS_2=FALSE'] = '${stringTableErrorShortCircuitDataLineBus2False}'; +elvST['ERROR_SHORT_CIRCUIT_DATA_LINE_BUS_2=TRUE'] = '${stringTableErrorShortCircuitDataLineBus2True}'; +elvST['ERROR_TEMP_OR_HUMIDITY_MEASUREMENT=FALSE'] = '${stringTableErrorTempOrHumidityMeasurementFalse}'; +elvST['ERROR_TEMP_OR_HUMIDITY_MEASUREMENT=TRUE'] = '${stringTableErrorTempOrHumidityMeasurementTrue}'; +elvST['ERROR_UNDERVOLTAGE'] = '${stringTableErrorUndervoltageTrue}'; +elvST['ERROR_UNDERVOLTAGE=FALSE'] = '${stringTableErrorUndervoltageFalse}'; +elvST['ERROR_UNDERVOLTAGE=TRUE'] = '${stringTableErrorUndervoltageTrue}'; +elvST['ERROR_UPDATE'] = '${stringTableErrorUpdateTrue}'; +elvST['ERROR_UPDATE=TRUE'] = '${stringTableErrorUpdateTrue}'; +elvST['ERROR_UPDATE=FALSE'] = '${stringTableErrorUpdateFalse}'; +elvST['ERROR_WIND_COMMUNICATION=FALSE'] = '${stringTableErrorWindCommunicationFalse}'; +elvST['ERROR_WIND_COMMUNICATION=TRUE'] = '${stringTableErrorWindCommunicationTrue}'; +elvST['ERROR_WIND_NORTH=TRUE'] = '${stringTableErrorWindNorthTrue}'; +elvST['ERROR_WIND_NORTH=FALSE'] = '${stringTableErrorWindNorthFalse}'; +elvST['EVENT_DELAYTIME'] = '${stringTableEventDelayTime}'; +elvST['EVENT_DELAY_UNIT'] = '${stringTableEventDelayUnit}'; +elvST['EVENT_DELAY_UNIT=100MS'] = '${optionUnit100MS}'; +elvST['EVENT_DELAY_UNIT=H'] = '${optionUnitH}'; +elvST['EVENT_DELAY_UNIT=M'] = '${optionUnitM}'; +elvST['EVENT_DELAY_UNIT=S'] = '${optionUnitS}'; +elvST['EVENT_DELAY_VALUE'] = '${stringTableEventDelayValue}'; +elvST['EVENT_FILTER_NUMBER'] = '${stringTableEventFilterNumber}'; +elvST['EVENT_FILTER_PERIOD'] = '${stringTableEventFilterPeriod}'; +elvST['EVENT_RANDOMTIME_UNIT'] = '${stringTableEventRandomTimeUnit}'; +elvST['EVENT_RANDOMTIME_UNIT=100MS'] = '${optionUnit100MS}'; +elvST['EVENT_RANDOMTIME_UNIT=H'] = '${optionUnitH}'; +elvST['EVENT_RANDOMTIME_UNIT=M'] = '${optionUnitM}'; +elvST['EVENT_RANDOMTIME_UNIT=S'] = '${optionUnitS}'; +elvST['EVENT_RANDOMTIME_VALUE'] = '${stringTableStatusInfoRandom}'; +elvST['EXPECT_AES'] = '${stringTableExpectAES}'; +elvST['EXTERNAL_CLOCK=FALSE'] = '${stringTableExternalClockFalse}'; +elvST['EXTERNAL_CLOCK=TRUE'] = '${stringTableExternalClockTrue}'; +elvST['FREQUENCY_ALTERNATING_LOW_HIGH'] = '${stringTableAlarmFrequencyAlternatingLowHigh}'; +elvST['FREQUENCY_ALTERNATING_LOW_MID_HIGH'] = '${stringTableAlarmFrequencyAlternatingLowMidHigh}'; +elvST['FREQUENCY_FALLING'] = '${stringTableAlarmFrequencyFalling}'; +elvST['FREQUENCY_HIGHON_LONGOFF'] = '${stringTableAlarmFrequencyHighOnLongOff}'; +elvST['FREQUENCY_HIGHON_OFF'] = '${stringTableAlarmFrequencyHighOnOff}'; +elvST['FREQUENCY_INPUT'] = '${stringTableFrequencyInput}'; +elvST['FREQUENCY_LOWON_LONGOFF_HIGHON_LONGOFF'] = '${stringTableAlarmFrequencyLowOnLongOffHighOnLongOff}'; +elvST['FREQUENCY_LOWON_OFF_HIGHON_OFF'] = '${stringTableAlarmFrequencyLowOnOffHighonOff}'; +elvST['FREQUENCY_RISING'] = '${stringTableAlarmFrequencyRising}'; +elvST['FREQUENCY_RISING_AND_FALLING'] = '${stringTableAlarmFrequencyRisingAndFalling}'; +elvST['FREQUENCY'] = '${stringTablePowerMeterFrequency}'; +elvST['FREQUENCY_STATUS=ERROR'] = '${lblValue} ${stringTablePowerMeterFrequency}: ${lblError}'; +elvST['FREQUENCY_STATUS=4'] = '${lblValue} ${stringTablePowerMeterFrequency}: ${lblError}'; +elvST['FREQUENCY_STATUS=NORMAL'] = '${lblValue} ${stringTablePowerMeterFrequency}: ${lblNormal}'; +elvST['FREQUENCY_STATUS=0'] = '${lblValue} ${stringTablePowerMeterFrequency}: ${lblNormal}'; +elvST['FREQUENCY_STATUS=OVERFLOW'] = '${lblValue} ${stringTablePowerMeterFrequency}: ${lblOverflow}'; +elvST['FREQUENCY_STATUS=2'] = '${lblValue} ${stringTablePowerMeterFrequency}: ${lblOverflow}'; +elvST['FREQUENCY_STATUS=UNDERFLOW'] = '${lblValue} ${stringTablePowerMeterFrequency}: ${lblUnderflow}'; +elvST['FREQUENCY_STATUS=3'] = '${lblValue} ${stringTablePowerMeterFrequency}: ${lblUnderflow}'; +elvST['FREQUENCY_STATUS=UNKNOWN'] = '${lblValue} ${stringTablePowerMeterFrequency}: ${lblUnknown}'; +elvST['FREQUENCY_STATUS=1'] = '${lblValue} ${stringTablePowerMeterFrequency}: ${lblUnknown}'; +elvST['FROST_PROTECTION=FALSE'] = '${stringTableFrostProtectionFalse}'; +elvST['FROST_PROTECTION=TRUE'] = '${stringTableFrostProtectionTrue}'; +elvST['FROST_PROTECTION_TEMPERATURE'] = '${stringTableFrostProtectionTemperature}'; +elvST['FUSE_DELAY'] = '${stringTableDimmerFuseDelay}'; +elvST['GENERIC_INPUT_TRANSMITER'] = '${stringTableGenericTransmitterTitle}'; +elvST['GLOBAL_BUTTON_LOCK'] = '${stringTableGlobalButtonLock}'; +elvST['HEATER_STATE=FALSE'] = '${stringTableRainDetectorHeatingOff}'; +elvST['HEATER_STATE=TRUE'] = '${stringTableRainDetectorHeatingOn}'; +elvST['HEATING_CLIMATECONTROL_CL_RECEIVER'] = '${stringTableClimateControlCLReceiverTitle}'; +elvST['HEATING_CLIMATECONTROL_CL_TRANSMITTER'] = '${stringTableHeatingClimateControlCLTransmitterTitle}'; +elvST['HEATING_CLIMATECONTROL_RECEIVER'] = '${stringTableClimateControlReceiverTitle}'; +elvST['HEATING_CLIMATECONTROL_SWITCH_TRANSMITTER'] = '${stringTableHeatingClimateControlSwitchTransmitterTitle}'; +elvST['HEATING_CLIMATECONTROL_TRANSCEIVER'] = '${stringTableClimateControlTransceiverTitle}'; +elvST['HEATING_CLIMATECONTROL_TRANSCEIVER|ACTIVE_PROFILE'] = '${stringTableActiveProfile}'; +elvST['HEATING_CLIMATECONTROL_TRANSCEIVER|CONTROL_MODE'] = '${stringTableControlMode}'; +elvST['HEATING_CLIMATECONTROL_TRANSCEIVER|FROST_PROTECTION=FALSE'] = '${stringTableFrostProtectFalse}'; +elvST['HEATING_CLIMATECONTROL_TRANSCEIVER|FROST_PROTECTION=TRUE'] = '${stringTableFrostProtectTrue}'; +elvST['HEATING_CLIMATECONTROL_TRANSCEIVER|HUMIDITY'] = '${stringTableWeatherHumidity}'; +elvST['HEATING_CLIMATECONTROL_TRANSCEIVER|LEVEL'] = '${stringTableHeatingLevel}'; +elvST['HEATING_CLIMATECONTROL_TRANSCEIVER|PARTY_MODE=FALSE'] = '${stringTablePartyModeFalse}'; +elvST['HEATING_CLIMATECONTROL_TRANSCEIVER|PARTY_MODE=TRUE'] = '${stringTablePartyModeTrue}'; +elvST['HEATING_CLIMATECONTROL_TRANSCEIVER|SET_POINT_MODE'] = '${stringTableSetPointMode}'; +elvST['HEATING_CLIMATECONTROL_TRANSCEIVER|SET_POINT_TEMPERATURE'] = '${stringTableSetPointTemperature}'; +elvST['HEATING_CLIMATECONTROL_TRANSCEIVER|SWITCH_POINT_OCCURED=FALSE'] = '${stringTableSwitchPointOccuredFalse}'; +elvST['HEATING_CLIMATECONTROL_TRANSCEIVER|SWITCH_POINT_OCCURED=TRUE'] = '${stringTableSwitchPointOccurredTrue}'; +elvST['HEATING_CLIMATECONTROL_TRANSCEIVER|VALVE_ADAPTION=FALSE'] = '${stringTableValveAdaptionFalse}'; +elvST['HEATING_CLIMATECONTROL_TRANSCEIVER|VALVE_ADAPTION=TRUE'] = '${stringTableValveAdaptionTrue}'; +elvST['HEATING_CLIMATECONTROL_TRANSCEIVER|WINDOW_STATE=CLOSED'] = '${stringTableWindowStateClosed}'; +elvST['HEATING_CLIMATECONTROL_TRANSCEIVER|WINDOW_STATE=OPEN'] = '${stringTableWindowStateOpen}'; +elvST['HEATING_COOLING=COOLING'] = '${stringTableCooling}'; +elvST['HEATING_COOLING=HEATING'] = '${stringTableHeating}'; +elvST['HEATING_COOLING=1'] = '${stringTableCooling}'; +elvST['HEATING_COOLING=0'] = '${stringTableHeating}'; +elvST['HEATING_KEY_RECEIVER'] = '${stringTableHeatingKeyReceiverTitle}'; +elvST['HEATING_ROOM_TH_RECEIVER'] = '${stringTableHeatingRoomTHReceiverTitle}'; +elvST['HEATING_ROOM_TH_TRANSCEIVER'] = '${stringTableHeatingRoomTHTransceiverTitle}'; +elvST['HEATING_SHUTTER_CONTACT_RECEIVER'] = '${stringTableHeatingShutterContactReceiverTitle}'; +elvST['HIGHEST_ILLUMINATION'] = '${stringTableHighestIllumination}'; +elvST['HIGHEST_ILLUMINATION_STATUS=NORMAL'] = '${lblValue} ${stringTableHighestIllumination}: ${lblNormal}'; +elvST['HIGHEST_ILLUMINATION_STATUS=0'] = '${lblValue} ${stringTableHighestIllumination}: ${lblNormal}'; +elvST['HIGHEST_ILLUMINATION_STATUS=UNKNOWN'] = '${lblValue} ${stringTableHighestIllumination}: ${lblUnknown}'; +elvST['HIGHEST_ILLUMINATION_STATUS=1'] = '${lblValue} ${stringTableHighestIllumination}: ${lblUnknown}'; +elvST['HIGHEST_ILLUMINATION_STATUS=OVERFLOW'] = '${lblValue} ${stringTableHighestIllumination}: ${lblOverflow}'; +elvST['HIGHEST_ILLUMINATION_STATUS=2'] = '${lblValue} ${stringTableHighestIllumination}: ${lblOverflow}'; +elvST['HUMIDITY_ALARM=FALSE'] = '${stringTableHumidityAlarmFalse}'; +elvST['HUMIDITY_ALARM=TRUE'] = '${stringTableHumidityAlarmTrue}'; +elvST['HUMIDITY_LIMITER=FALSE'] = '${stringTableHumidityLimiterFalse}'; +elvST['HUMIDITY_LIMITER=TRUE'] = '${stringTableHumidityLimiterTrue}'; +elvST['HUMIDITY'] = '${stringTableWeatherHumidity}'; +elvST['HUMIDITY_STATUS=NORMAL'] = '${lblValue} ${stringTableWeatherHumidity}: ${lblNormal}'; +elvST['HUMIDITY_STATUS=0'] = '${lblValue} ${stringTableWeatherHumidity}: ${lblNormal}'; +elvST['HUMIDITY_STATUS=UNKNOWN'] = '${lblValue} ${stringTableWeatherHumidity}: ${lblUnknown}'; +elvST['HUMIDITY_STATUS=1'] = '${lblValue} ${stringTableWeatherHumidity}: ${lblUnknown}'; +elvST['HUMIDITY_STATUS=OVERFLOW'] = '${lblValue} ${stringTableWeatherHumidity}: ${lblOverflow}'; +elvST['HUMIDITY_STATUS=2'] = '${lblValue} ${stringTableWeatherHumidity}: ${lblOverflow}'; +elvST['HUMIDITY_STATUS=UNDERFLOW'] = '${lblValue} ${stringTableWeatherHumidity}: ${lblUnderflow}'; +elvST['HUMIDITY_STATUS=3'] = '${lblValue} ${stringTableWeatherHumidity}: ${lblUnderflow}'; +elvST['IDENTIFICATION_MODE_KEY_VISUAL=FALSE'] = '${stringTableIdentificationModeKeyVisualFalse}'; +elvST['IDENTIFICATION_MODE_KEY_VISUAL=TRUE'] = '${stringTableIdentificationModeKeyVisualTrue}'; +elvST['IDENTIFICATION_MODE_LCD_BACKLIGHT=FALSE'] = '${stringTableIdentificationModeLCDBacklightFalse}'; +elvST['IDENTIFICATION_MODE_LCD_BACKLIGHT=TRUE'] = '${stringTableIdentificationModeLCDBacklightTrue}'; +elvST['IDENTIFY_DURATION'] = '${stringTableIdentifyDuration}'; +elvST['IDENTIFY_TARGET_LEVEL'] = '${stringTableIdentifyTargetLevel}'; +elvST['ILLUMINATION'] = '${stringTableBrightness}'; +elvST['ILLUMINATION_STATUS=NORMAL'] = '${lblValue} ${stringTableBrightness}: ${lblNormal}'; +elvST['ILLUMINATION_STATUS=0'] = '${lblValue} ${stringTableBrightness}: ${lblNormal}'; +elvST['ILLUMINATION_STATUS=UNKNOWN'] = '${lblValue} ${stringTableBrightness}: ${lblUnknown}'; +elvST['ILLUMINATION_STATUS=1'] = '${lblValue} ${stringTableBrightness}: ${lblUnknown}'; +elvST['ILLUMINATION_STATUS=OVERFLOW'] = '${lblValue} ${stringTableBrightness}: ${lblOverflow}'; +elvST['ILLUMINATION_STATUS=2'] = '${lblValue} ${stringTableBrightness}: ${lblOverflow}'; +elvST['INHIBIT'] = '${stringTableInhibit}'; +elvST['INHIBIT=FALSE'] = '${stringTableInhibitFalse}'; +elvST['INHIBIT=TRUE'] = '${stringTableInhibitTrue}'; +elvST['INPUT_OUTPUT'] = '${stringTableInputOutput}'; +elvST['INPUT_OUTPUT|BEHAVIOUR'] = '${stringTableInputOutputBehaviour}'; +elvST['INPUT_OUTPUT|BEHAVIOUR=INPUT'] = '${stringTableInputOutputBehaviourInput}'; +elvST['INPUT_OUTPUT|BEHAVIOUR=OUTPUT'] = '${stringTableInputOutputBehaviourOutput}'; +elvST['INPUT_OUTPUT|INPUT_LOCKED'] = '${stringTableInputOutputInputLocked}'; +elvST['INPUT_OUTPUT|INPUT_TYPE'] = '${stringTableInputOutputInputType}'; +elvST['INPUT_OUTPUT|INPUT_TYPE=PUSHBUTTON'] = '${stringTableInputOutputTypePushButton}'; +elvST['INPUT_OUTPUT|INPUT_TYPE=SWITCH'] = '${stringTableInputOutputTypeSwitch}'; +elvST['INPUT_OUTPUT|LONGPRESS_TIME'] = '${stringTableInputOutputLongPressA}'; +elvST['INPUT_OUTPUT|LONG_PRESS_TIME'] = '${stringTableInputOutputLongPressB}'; +elvST['INPUT_OUTPUT|STATE=FALSE'] = '${stringTableInputOutputStateFalse}'; +elvST['INPUT_OUTPUT|STATE=TRUE'] = '${stringTableInputOutputStateTrue}'; +elvST['IP_ADDRESS'] = '${lblIPAddress}'; +elvST['JALOUSIE'] = '${stringTableJalousieTitle}'; +elvST['JALOUSIE|CHANGE_OVER_DELAY'] = '${stringTableBlindChangeOverDelay}'; +elvST['JALOUSIE|LEVEL'] = '${stringTableBlindLevel}'; +elvST['JALOUSIE|LEVEL=OLD_LEVEL'] = '${stringTableJalousieOldLevel}'; +elvST['JALOUSIE|LEVEL=NO_MODIFICATION'] = '${stringTableJalousieNoModification}'; +elvST['JALOUSIE|LEVEL_COMBINED'] = '${stringTableJalousieLevelCombined}'; +elvST['JALOUSIE|LEVEL_SLATS'] = '${stringTableJalousieSlatsLevel}'; +elvST['JALOUSIE|LEVEL_SLATS=OLD_LEVEL'] = '${stringTableJalousieSlatsOldLevel}'; +elvST['JALOUSIE|LEVEL_SLATS=NO_MODIFICATION'] = '${stringTableJalousieSlatsNoModification}'; +elvST['JALOUSIE|REFERENCE_RUNNING_TIME_SLATS'] = '${stringTableJalousieRunningTimeSlats}'; +elvST['JALOUSIE|REFERENCE_RUNNING_TIME_TOP_BOTTOM'] = '${stringTableBlindRunningTimeTopBottom}'; +elvST['JALOUSIE|REFERENCE_RUNNING_TIME_BOTTOM_TOP'] = '${stringTableBlindRunnintTimeBottomTop}'; +elvST['JALOUSIE|REFERENCE_RUN_COUNTER'] = '${stringTableBlindRefRunCounter}'; +elvST['JALOUSIE|STOP'] = '${stringTableBlindStop}'; +elvST['KEY'] = '${stringTableKeyTitle}'; +elvST['KEYMATIC'] = '${stringTableKeyMaticTitle}'; +elvST['KEYMATIC|ANGLE_LOCKED'] = '${stringTableKeyMaticAngleLocked}'; +elvST['KEYMATIC|ANGLE_MAX'] = '${stringTableKeyMaticAngleMax}'; +elvST['KEYMATIC|ANGLE_OPEN'] = '${stringTableKeyMaticAngleOpen}'; +elvST['KEYMATIC|ERROR=CLUTCH_FAILURE'] = '${stringTableKeyMaticErrorClutch}'; +elvST['KEYMATIC|ERROR=MOTOR_ABORTED'] = '${stringTableKeyMaticErrorMotorAborted}'; +elvST['KEYMATIC|HOLD_PWM'] = '${stringTableKeyMaticHoldPWM}'; +elvST['KEYMATIC|HOLD_TIME'] = '${stringTableKeyMaticHoldTime}'; +elvST['KEYMATIC|LED_FLASH_LOCKED'] = '${stringTableKeyMaticLEDFlashLocked}'; +elvST['KEYMATIC|LED_FLASH_UNLOCKED'] = '${stringTableKeyMaticLEDFlashUnlocked}'; +elvST['KEYMATIC|OPEN'] = '${stringTableKeyMaticOpen}'; +elvST['KEYMATIC|RELOCK_DELAY'] = '${stringTableKeyMaticRelockDelay}'; +elvST['KEYMATIC|RELOCK_DELAY=NOT_USED'] = '${stringTableKeyMaticRelockDelayNotUsed}'; +elvST['KEYMATIC|SETUP_DIR'] = '${stringTableKeyMaticSetupDir}'; +elvST['KEYMATIC|SETUP_DIR=LEFT'] = '${stringTableKeyMaticSetupDirLeft}'; +elvST['KEYMATIC|SETUP_DIR=RIGHT'] = '${stringTableKeyMaticSetupDirRight}'; +elvST['KEYMATIC|SETUP_POSITION'] = '${stringTableKeyMaticSetupPosition}'; +elvST['KEYMATIC|STATE=FALSE'] = '${stringTableKeyMaticStateFalse}'; +elvST['KEYMATIC|STATE=TRUE'] = '${stringTableKeyMaticStateTrue}'; +elvST['KEYMATIC|STATE_UNCERTAIN=FALSE'] = '${stringTableKeyMaticStateUncertainFalse}'; +elvST['KEYMATIC|STATE_UNCERTAIN=TRUE'] = '${stringTableKeyMaticStateUncertainTrue}'; +elvST['KEYPRESS_SIGNAL'] = '${stringTableKeyPressSignal}'; +elvST['KEY_TRANSCEIVER'] = '${stringTableKeyTranseiverTitle}'; +elvST['KEY_TRANSCEIVER|CHANNEL_OPERATION_MODE'] = '${stringTableKeyTransceiverChannelOperationMode}'; +elvST['KEY_TRANSCEIVER|CHANNEL_OPERATION_MODE=INACTIVE'] = '${stringTableKeyInactive}'; +elvST['KEY_TRANSCEIVER|CHANNEL_OPERATION_MODE=KEY_BEHAVIOR'] = '${stringTableKeyTransceiverChannelOperationModeKeyBehavior}'; +elvST['KEY_TRANSCEIVER|CHANNEL_OPERATION_MODE=SWITCH_BEHAVIOR'] = '${stringTableKeyTransceiverChannelOperationModeSwitchBehavior}'; +elvST['KEY_TRANSCEIVER|CHANNEL_OPERATION_MODE=BINARY_BEHAVIOR'] = '${stringTableKeyTransceiverChannelOperationModeBinaryBehavior}'; +elvST['KEY_TRANSCEIVER|DBL_PRESS_TIME'] = '${stringTableKeyDblPressTime}'; +elvST['KEY_TRANSCEIVER|LONG_PRESS_TIME'] = '${stringTableKeyLongPressTimeA}'; +elvST['KEY|CHANNEL_FUNCTION'] = '${stringTableKeyChannelFunction}'; +elvST['KEY|CHANNEL_FUNCTION=BINARY_BEHAVIOR'] = '${stringTableKeyBinaryBehavior}'; +elvST['KEY|CHANNEL_FUNCTION=BUTTON_BEHAVIOR'] = '${stringTableKeyButtonBehavior}'; +elvST['KEY|CHANNEL_FUNCTION=INACTIVE'] = '${stringTableKeyInactive}'; +elvST['KEY|CHANNEL_FUNCTION=SWITCH_BEHAVIOR'] = '${stringTableKeySwitchBehavior}'; +elvST['KEY|DBL_PRESS_TIME'] = '${stringTableKeyDblPressTime}'; +elvST['KEY|INPUT_LOCKED'] = '${stringTableKeyInputLocked}'; +elvST['KEY|INPUT_TYPE'] = '${stringTableKeyInputType}'; +elvST['KEY|INPUT_TYPE=PUSHBUTTON'] = '${stringTableKeyInputTypePushButton}'; +elvST['KEY|INPUT_TYPE=SWITCH'] = '${stringTableKeyInputTypeSwitch}'; +elvST['KEY|LCD_LEVEL_INTERP'] = '${stringTableKeyLCDLevelInterp}'; +elvST['KEY|LCD_SYMBOL'] = '${stringTableKeyLCDSymbol}'; +elvST['KEY|LONGPRESS_TIME'] = '${stringTableKeyLongPressTimeB}'; +elvST['KEY|LONG_PRESS_TIME'] = '${stringTableKeyLongPressTimeA}'; +elvST['KEY|MSG_FOR_POS_A'] = '${stringTableKeyMsgPosClosed}'; +elvST['KEY|MSG_FOR_POS_A=CLOSED'] = '${stringTableKeyMsgPosA0}'; +elvST['KEY|MSG_FOR_POS_A=NO_MSG'] = '${stringTableKeyMsgPosA1}'; +elvST['KEY|MSG_FOR_POS_A=OPEN'] = '${stringTableKeyMsgPosA2}'; +elvST['KEY|MSG_FOR_POS_B'] = '${stringTableKeyMsgPosOpen}'; +elvST['KEY|MSG_FOR_POS_B=CLOSED'] = '${stringTableKeyMsgPosA0}'; +elvST['KEY|MSG_FOR_POS_B=NO_MSG'] = '${stringTableKeyMsgPosA1}'; +elvST['KEY|MSG_FOR_POS_B=OPEN'] = '${stringTableKeyMsgPosA2}'; +elvST['KEY|TEXT1'] = '${stringTableKeyText1}'; +elvST['KEY|TEXT2'] = '${stringTableKeyText2}'; +elvST['KEY|TEXTLINE_1'] = '${stringTableKeyTextLine}'; +elvST['KEY|TEXTLINE_2'] = '${stringTableKeyTextLine}'; +elvST['LANGUAGE'] = '${stringTableLanguage}'; +elvST['LANGUAGE=ENGLISH'] = '${stringTableLanguageEnglish}'; +elvST['LANGUAGE=GERMAN'] = '${stringTableLanguageGerman}'; +elvST['LED_DISABLE_CHANNELSTATE'] = '${stringTableLEDDisableChannelState}'; +elvST['LED_DISABLE_LED_DISABLE_SENDSTATE'] = '${stringTableLEDDisableSendState}'; +elvST['LED_ONTIME'] = '${stringTableLEDOnTime}'; +elvST['LED_SLEEP_MODE=OFF'] = '${stringTableLEDSleepModeOff}'; +elvST['LED_SLEEP_MODE=ON'] = '${stringTableLEDSleepModeOn}'; +elvST['LED_STATUS=GREEN'] = '${stringTableLEDStatusGreen}'; +elvST['LED_STATUS=OFF'] = '${stringTableLEDStatusOff}'; +elvST['LED_STATUS=ORANGE'] = '${stringTableLEDStatusOrange}'; +elvST['LED_STATUS=RED'] = '${stringTableLEDStatusRed}'; +elvST['LEVEL'] = '${stringTableLevel}'; +elvST['LEVEL_REAL'] = '${stringTableLevelReal}'; +elvST['LEVEL_STATUS=ERROR'] = '${lblValue} ${stringTableLevelStatus}: ${lblError}'; +elvST['LEVEL_STATUS=4'] = '${lblValue} ${stringTableLevelStatus}: ${lblError}'; +elvST['LEVEL_STATUS=NORMAL'] = '${lblValue} ${stringTableLevelStatus}: ${lblNormal}'; +elvST['LEVEL_STATUS=0'] = '${lblValue} ${stringTableLevelStatus}: ${lblNormal}'; +elvST['LEVEL_STATUS=OVERFLOW'] = '${lblValue} ${stringTableLevelStatus}: ${lblOverflow}'; +elvST['LEVEL_STATUS=2'] = '${lblValue} ${stringTableLevelStatus}: ${lblOverflow}'; +elvST['LEVEL_STATUS=UNDERFLOW'] = '${lblValue} ${stringTableLevelStatus}: ${lblUnderflow}'; +elvST['LEVEL_STATUS=3'] = '${lblValue} ${stringTableLevelStatus}: ${lblUnderflow}'; +elvST['LEVEL_STATUS=UNKNOWN'] = '${lblValue} ${stringTableLevelStatus}: ${lblUnknown}'; +elvST['LEVEL_STATUS=1'] = '${lblValue} ${stringTableLevelStatus}: ${lblUnknown}'; +elvST['LIVE_MODE_RX'] = '${stringTableLiveModeRX}'; +elvST['LOCAL_RESET_DISABLE'] = '${stringTableLocalResetDisable}'; +elvST['LOCAL_RESET_DISABLED'] = '${stringTableLocalResetDisable}'; +elvST['LOGGING'] = '${stringTableLogging}'; +elvST['LOGGING=FALSE'] = '${stringTableLoggingFalse}'; +elvST['LOGGING=OFF'] = '${stringTableLoggingOff}'; +elvST['LOGGING=ON'] = '${stringTableLoggingOn}'; +elvST['LOGGING=TRUE'] = '${stringTableLoggingTrue}'; +elvST['LOGGING_TIME'] = '${stringTableLoggingTime}'; +elvST['LOGIC_AND'] = '${stringTableLogicAND}'; +elvST['LOGIC_ANDINVERS'] = '${stringTableLogicANDINVERS}'; +elvST['LOGIC_COMBINATION'] = '${stringTableLogicCombination}'; +elvST['LOGIC_INACTIVE'] = '${stringTableLogicInactive}'; +elvST['LOGIC_INVERSMINUS'] = '${stringTableLogicINVERSMINUS}'; +elvST['LOGIC_INVERSMUL'] = '${stringTableLogicINVERSMUL}'; +elvST['LOGIC_INVERSPLUS'] = '${stringTableLogicINVERSPLUS}'; +elvST['LOGIC_MINUS'] = '${stringTableLogicMINUS}'; +elvST['LOGIC_MINUSINVERS'] = '${stringTableLogicMINUSINVERS}'; +elvST['LOGIC_MUL'] = '${stringTableLogicMUL}'; +elvST['LOGIC_MULINVERS'] = '${stringTableLogicMULINVERS}'; +elvST['LOGIC_NAND'] = '${stringTableLogicNAND}'; +elvST['LOGIC_NOR'] = '${stringTableLogicNOR}'; +elvST['LOGIC_OR'] = '${stringTableLogicOR}'; +elvST['LOGIC_ORINVERS'] = '${stringTableLogicORINVERS}'; +elvST['LOGIC_PLUS'] = '${stringTableLogicPLUS}'; +elvST['LOGIC_PLUSINVERS'] = '${stringTableLogicPLUSINVERS}'; +elvST['LOGIC_XOR'] = '${stringTableLogicXOR}'; +elvST['LOWBAT=FALSE'] = '${stringTableBatteryOk}'; +elvST['LOWBAT=TRUE'] = '${stringTableBatteryEmpty}'; +elvST['LOWBAT_REPORTING'] = '${stringTableLowbatReporting}'; +elvST['LOWBAT_REPORTING=FALSE'] = '${stringTableLowbatReportingFalse}'; +elvST['LOWBAT_REPORTING=TRUE'] = '${stringTableLowbatReportingTrue}'; +elvST['LOWBAT_SIGNAL'] = '${stringTableLowbatSignal}'; +elvST['LOWERING_MODE'] = '${stringTableClimateControlRTTransceiverLoweringMode}'; +elvST['LOW_BAT=FALSE'] = '${stringTableBatteryOk}'; +elvST['LOW_BAT=TRUE'] = '${stringTableBatteryEmpty}'; +elvST['LOW_BAT_LIMIT'] = '${stringTableBatteryLowBatLimit}'; +elvST['LOWEST_ILLUMINATION'] = '${stringTableLowestIllumination}'; +elvST['LOWEST_ILLUMINATION_STATUS=NORMAL'] = '${lblValue} ${stringTableLowestIllumination}: ${lblNormal}'; +elvST['LOWEST_ILLUMINATION_STATUS=0'] = '${lblValue} ${stringTableLowestIllumination}: ${lblNormal}'; +elvST['LOWEST_ILLUMINATION_STATUS=UNKNOWN'] = '${lblValue} ${stringTableLowestIllumination}: ${lblUnknown}'; +elvST['LOWEST_ILLUMINATION_STATUS=1'] = '${lblValue} ${stringTableLowestIllumination}: ${lblUnknown}'; +elvST['LOWEST_ILLUMINATION_STATUS=OVERFLOW'] = '${lblValue} ${stringTableLowestIllumination}: ${lblOverflow}'; +elvST['LOWEST_ILLUMINATION_STATUS=2'] = '${lblValue} ${stringTableLowestIllumination}: ${lblOverflow}'; +elvST['LUX'] = '${stringTableLux}'; +elvST['MAINS_POWERED'] = '${stringTableMainsPowered}'; +elvST['MAINTENANCE|BLOCKED_PERMANENT'] = '${stringTableBlockedPermanently}'; +elvST['MAINTENANCE|BLOCKED_PERMANENT=FALSE'] = '${stringTableBlockedPermanentFalse}'; +elvST['MAINTENANCE|BLOCKED_PERMANENT=TRUE'] = '${stringTableBlockedPermanentTrue}'; +elvST['MAINTENANCE|BLOCKED_TEMPORARY'] = '${stringTableBlockedTemporarily}'; +elvST['MAINTENANCE|BLOCKED_TEMPORARY=FALSE'] = '${stringTableBlockedTemporaryFalse}'; +elvST['MAINTENANCE|BLOCKED_TEMPORARY=TRUE'] = '${stringTableBlockedTemporaryTrue}'; +elvST['MAINTENANCE|CLEAR_ERROR=ALL'] = '${stringTableClearErrorAll}'; +elvST['MAINTENANCE|CLEAR_ERROR=BLOCKED_PERMANENT'] = '${stringTableClearErrorBlockedPermanent}'; +elvST['MAINTENANCE|CLEAR_ERROR=BLOCKED_TEMPORARY'] = '${stringTableClearErrorBlockedTemporary}'; +elvST['MAINTENANCE|CLEAR_ERROR=SABOTAGE'] = '${stringTableClearErrorSabotage}'; +elvST['MAINTENANCE|CLEAR_ERROR=SABOTAGE_STICKY'] = '${stringTableClearErrorSabotageSticky}'; +elvST['MAINTENANCE|CODE_COMMAND=ERASE'] = '${stringTableCodeCommandErase}'; +elvST['MAINTENANCE|CODE_COMMAND=START_OF_LEARN'] = '${stringTableCodeCommandStartOfLearn}'; +elvST['MAINTENANCE|CODE_COMMAND=STOP_OF_LEARN'] = '${stringTableCodeCommandStopOfLearn}'; +elvST['MAINTENANCE|CODE_ID'] = '${stringTableAccessTransCodeID}'; +elvST['MAINTENANCE|CODE_STATE=CODE_ERASED'] = '${stringTableAccessTransCodeStateCodeErased}'; +elvST['MAINTENANCE|CODE_STATE=IDLE'] = '${stringTableAccessTransCodeStateIdle}'; +elvST['MAINTENANCE|CODE_STATE=KNOWN_CODE_ID_RECEIVED'] = '${stringTableAccessTransCodeStateKnownCodeIDReceived}'; +elvST['MAINTENANCE|CODE_STATE=LEARN_MODE_EXIT_FOR_CODE_WITH_ERROR_DUPLICATE_CODE'] = '${stringTableAccessTransCodeStateLearnModeLearnModeExitWithErrorDuplicateCode}'; +elvST['MAINTENANCE|CODE_STATE=LEARN_MODE_EXIT_FOR_CODE_WITH_SUCCESS'] = '${stringTableAccessTransCodeStateLearnModeLearnModeExitWithSuccess}'; +elvST['MAINTENANCE|CODE_STATE=LEARN_MODE_EXIT_FOR_CODE_WITH_TIMEOUT'] = '${stringTableAccessTransCodeStateLearnModeLearnModeExitWithTimeout}'; +elvST['MAINTENANCE|CODE_STATE=LEARN_MODE_FOR_CODE_ID_STARTED'] = '${stringTableAccessTransCodeStateLearnModeForCodeIDStarted}'; +elvST['MAINTENANCE|CODE_STATE=UNKNOWN_CODE_DETECTED'] = '${stringTableAccessTransCodeStateUnknownCodeDetected}'; +elvST['MAINTENANCE|CODE_USED_01=FALSE'] = '${stringTableAccessTransCodeSCodeUsed01False}'; +elvST['MAINTENANCE|CODE_USED_01=TRUE'] = '${stringTableAccessTransCodeSCodeUsed01True}'; +elvST['MAINTENANCE|CODE_USED_02=FALSE'] = '${stringTableAccessTransCodeSCodeUsed02False}'; +elvST['MAINTENANCE|CODE_USED_02=TRUE'] = '${stringTableAccessTransCodeSCodeUsed02True}'; +elvST['MAINTENANCE|CODE_USED_03=FALSE'] = '${stringTableAccessTransCodeSCodeUsed03False}'; +elvST['MAINTENANCE|CODE_USED_03=TRUE'] = '${stringTableAccessTransCodeSCodeUsed03True}'; +elvST['MAINTENANCE|CODE_USED_04=FALSE'] = '${stringTableAccessTransCodeSCodeUsed04False}'; +elvST['MAINTENANCE|CODE_USED_04=TRUE'] = '${stringTableAccessTransCodeSCodeUsed04True}'; +elvST['MAINTENANCE|CODE_USED_05=FALSE'] = '${stringTableAccessTransCodeSCodeUsed05False}'; +elvST['MAINTENANCE|CODE_USED_05=TRUE'] = '${stringTableAccessTransCodeSCodeUsed05True}'; +elvST['MAINTENANCE|CODE_USED_06=FALSE'] = '${stringTableAccessTransCodeSCodeUsed06False}'; +elvST['MAINTENANCE|CODE_USED_06=TRUE'] = '${stringTableAccessTransCodeSCodeUsed06True}'; +elvST['MAINTENANCE|CODE_USED_07=FALSE'] = '${stringTableAccessTransCodeSCodeUsed07False}'; +elvST['MAINTENANCE|CODE_USED_07=TRUE'] = '${stringTableAccessTransCodeSCodeUsed07True}'; +elvST['MAINTENANCE|CODE_USED_08=FALSE'] = '${stringTableAccessTransCodeSCodeUsed08False}'; +elvST['MAINTENANCE|CODE_USED_08=TRUE'] = '${stringTableAccessTransCodeSCodeUsed08True}'; +elvST['MAINTENANCE|CODE_USED_09=FALSE'] = '${stringTableAccessTransCodeSCodeUsed09False}'; +elvST['MAINTENANCE|CODE_USED_09=TRUE'] = '${stringTableAccessTransCodeSCodeUsed09True}'; +elvST['MAINTENANCE|CODE_USED_10=FALSE'] = '${stringTableAccessTransCodeSCodeUsed10False}'; +elvST['MAINTENANCE|CODE_USED_10=TRUE'] = '${stringTableAccessTransCodeSCodeUsed10True}'; +elvST['MAINTENANCE|CODE_USED_11=FALSE'] = '${stringTableAccessTransCodeSCodeUsed11False}'; +elvST['MAINTENANCE|CODE_USED_11=TRUE'] = '${stringTableAccessTransCodeSCodeUsed11True}'; +elvST['MAINTENANCE|CODE_USED_12=FALSE'] = '${stringTableAccessTransCodeSCodeUsed12False}'; +elvST['MAINTENANCE|CODE_USED_12=TRUE'] = '${stringTableAccessTransCodeSCodeUsed12True}'; +elvST['MAINTENANCE|CODE_USED_13=FALSE'] = '${stringTableAccessTransCodeSCodeUsed13False}'; +elvST['MAINTENANCE|CODE_USED_13=TRUE'] = '${stringTableAccessTransCodeSCodeUsed13True}'; +elvST['MAINTENANCE|CODE_USED_14=FALSE'] = '${stringTableAccessTransCodeSCodeUsed14False}'; +elvST['MAINTENANCE|CODE_USED_14=TRUE'] = '${stringTableAccessTransCodeSCodeUsed14True}'; +elvST['MAINTENANCE|CODE_USED_15=FALSE'] = '${stringTableAccessTransCodeSCodeUsed15False}'; +elvST['MAINTENANCE|CODE_USED_15=TRUE'] = '${stringTableAccessTransCodeSCodeUsed15True}'; +elvST['MAINTENANCE|CODE_USED_16=FALSE'] = '${stringTableAccessTransCodeSCodeUsed16False}'; +elvST['MAINTENANCE|CODE_USED_16=TRUE'] = '${stringTableAccessTransCodeSCodeUsed16True}'; +elvST['MAINTENANCE|CODE_USED_17=FALSE'] = '${stringTableAccessTransCodeSCodeUsed17False}'; +elvST['MAINTENANCE|CODE_USED_17=TRUE'] = '${stringTableAccessTransCodeSCodeUsed17True}'; +elvST['MAINTENANCE|CODE_USED_18=FALSE'] = '${stringTableAccessTransCodeSCodeUsed18False}'; +elvST['MAINTENANCE|CODE_USED_18=TRUE'] = '${stringTableAccessTransCodeSCodeUsed18True}'; +elvST['MAINTENANCE|CODE_USED_19=FALSE'] = '${stringTableAccessTransCodeSCodeUsed19False}'; +elvST['MAINTENANCE|CODE_USED_19=TRUE'] = '${stringTableAccessTransCodeSCodeUsed19True}'; +elvST['MAINTENANCE|CODE_USED_20=FALSE'] = '${stringTableAccessTransCodeSCodeUsed20False}'; +elvST['MAINTENANCE|CODE_USED_20=TRUE'] = '${stringTableAccessTransCodeSCodeUsed20True}'; +elvST['MAINTENANCE|CONFIG_PENDING'] = '${stringTableConfigPending}'; +elvST['MAINTENANCE|ERROR_BATTERY=BATTERY_DEFECT'] = '${stringTableBatteryFailure}'; +elvST['MAINTENANCE|ERROR_BATTERY=NO_ERROR'] = '${stringTableBatteryOk}'; +elvST['MAINTENANCE|ERROR_JAMMED'] = '${stringTableErrorJammed}'; +elvST['MAINTENANCE|ERROR_JAMMED=FALSE'] = '${stringTableErrorJammedFalse}'; +elvST['MAINTENANCE|ERROR_JAMMED=TRUE'] = '${stringTableErrorJammedTrue}'; +elvST['MAINTENANCE|ERROR_OVERHEAT'] = '${stringTableErrorOverheatTrue}'; +elvST['MAINTENANCE|HMW_STICKY_UNREACH'] = '${stringTableStickyUnreach}'; +elvST['MAINTENANCE|LOWBAT'] = '${stringTableBatteryLow}'; +elvST['MAINTENANCE|LOW_BAT'] = '${stringTableBatteryLow}'; +elvST['MAINTENANCE|ON_MIN_LEVEL'] = '${stringTableOnMinLevel}'; +elvST['MAINTENANCE|PWM_AT_LOW_VALVE_POSITION'] = '${stringTablePWMatLowValvePosition}'; +elvST['MAINTENANCE|SABOTAGE'] = '${stringTableSabotage}'; +elvST['MAINTENANCE|SABOTAGE'] = '${stringTableSabotage}'; +elvST['MAINTENANCE|SABOTAGE_STICKY'] = '${stringTableSabotageSticky}'; +elvST['MAINTENANCE|SABOTAGE_STICKY=FALSE'] = '${stringTableSabotageStickyFalse}'; +elvST['MAINTENANCE|SABOTAGE_STICKY=TRUE'] = '${stringTableSabotageStickyTrue}'; +elvST['MAINTENANCE|SENSOR_ERROR'] = '${stringTableSensorError}'; +elvST['MAINTENANCE|STICKY_BATTERY=BATTERY_DEFECT'] = '${stringTableBatteryFailure}'; +elvST['MAINTENANCE|STICKY_BATTERY=BATTERY_WAS_DEFECT'] = '${stringTableBatteryWasDefect}'; +elvST['MAINTENANCE|STICKY_POWER=POWER_FAILURE'] = '${stringTablePowerNotAvailable}'; +elvST['MAINTENANCE|STICKY_POWER=WAS_POWER_FAILURE'] = '${stringTablePowerWasNotAvailable}'; +elvST['MAINTENANCE|STICKY_SABOTAGE=SABOTAGE'] = '${stringTableSabotage}'; +elvST['MAINTENANCE|STICKY_SABOTAGE=WAS_SABOTAGED'] = '${stringTableSabotageContactWasActive}'; +elvST['MAINTENANCE|STICKY_UNREACH'] = '${stringTableStickyUnreach}'; +elvST['MAINTENANCE|UNREACH'] = '${stringTableUnreach}'; +elvST['MAINTENANCE|USER_AUTHORIZATION_01'] = '${stringTableUserAuthorization01}'; +elvST['MAINTENANCE|USER_AUTHORIZATION_01=FALSE'] = '${stringTableUserAuthorization01false}'; +elvST['MAINTENANCE|USER_AUTHORIZATION_01=TRUE'] = '${stringTableUserAuthorization01true}'; +elvST['MAINTENANCE|USER_AUTHORIZATION_02'] = '${stringTableUserAuthorization02}'; +elvST['MAINTENANCE|USER_AUTHORIZATION_02=FALSE'] = '${stringTableUserAuthorization02false}'; +elvST['MAINTENANCE|USER_AUTHORIZATION_02=TRUE'] = '${stringTableUserAuthorization02true}'; +elvST['MAINTENANCE|USER_AUTHORIZATION_03'] = '${stringTableUserAuthorization03}'; +elvST['MAINTENANCE|USER_AUTHORIZATION_03=FALSE'] = '${stringTableUserAuthorization03false}'; +elvST['MAINTENANCE|USER_AUTHORIZATION_03=TRUE'] = '${stringTableUserAuthorization03true}'; +elvST['MAINTENANCE|USER_AUTHORIZATION_04'] = '${stringTableUserAuthorization04}'; +elvST['MAINTENANCE|USER_AUTHORIZATION_04=FALSE'] = '${stringTableUserAuthorization04false}'; +elvST['MAINTENANCE|USER_AUTHORIZATION_04=TRUE'] = '${stringTableUserAuthorization04true}'; +elvST['MAINTENANCE|USER_AUTHORIZATION_05'] = '${stringTableUserAuthorization05}'; +elvST['MAINTENANCE|USER_AUTHORIZATION_05=FALSE'] = '${stringTableUserAuthorization05false}'; +elvST['MAINTENANCE|USER_AUTHORIZATION_05=TRUE'] = '${stringTableUserAuthorization05true}'; +elvST['MAINTENANCE|USER_AUTHORIZATION_06'] = '${stringTableUserAuthorization06}'; +elvST['MAINTENANCE|USER_AUTHORIZATION_06=FALSE'] = '${stringTableUserAuthorization06false}'; +elvST['MAINTENANCE|USER_AUTHORIZATION_06=TRUE'] = '${stringTableUserAuthorization06true}'; +elvST['MAINTENANCE|USER_AUTHORIZATION_07'] = '${stringTableUserAuthorization07}'; +elvST['MAINTENANCE|USER_AUTHORIZATION_07=FALSE'] = '${stringTableUserAuthorization07false}'; +elvST['MAINTENANCE|USER_AUTHORIZATION_07=TRUE'] = '${stringTableUserAuthorization07true}'; +elvST['MAINTENANCE|USER_AUTHORIZATION_08'] = '${stringTableUserAuthorization08}'; +elvST['MAINTENANCE|USER_AUTHORIZATION_08=FALSE'] = '${stringTableUserAuthorization08false}'; +elvST['MAINTENANCE|USER_AUTHORIZATION_08=TRUE'] = '${stringTableUserAuthorization08true}'; +elvST['MANU_MODE'] = '${stringTableClimateControlRTTransceiverManuMode}'; +elvST['MEASURED_VALUE'] = '${lblReading}'; +elvST['MEASURED_VALUE_STATUS=ERROR'] = '${lblReading}: ${lblError}'; +elvST['MEASURED_VALUE_STATUS=NORMAL'] = '${lblReading}: ${lblNormal}'; +elvST['MEASURED_VALUE_STATUS=OVERFLOW'] = '${lblReading}: ${lblOverflow}'; +elvST['MEASURED_VALUE_STATUS=UNDERFLOW'] = '${lblReading}: ${lblUnderflow}'; +elvST['MEASURED_VALUE_STATUS=UNKNOWN'] = '${lblReading}: ${lblUnknown}'; +elvST['MIN_MAX_VALUE_NOT_RELEVANT_FOR_MANU_MODE'] = '${stringTableMinMaxNotRelevantForManuMode}'; +elvST['MIOB_DIN_CONFIG'] = '${stringTableMiobDinConfig}'; +elvST['MOD_EM8BIT_TRANSMITTER'] = '${stringTable8BitTransmitterTitle}'; +elvST['MOD_EM8BIT_TRANSMITTER|DATA_INPUT_PROPERTIE_IN0'] = '${stringTableTransmitterDataInputPropertie0}'; +elvST['MOD_EM8BIT_TRANSMITTER|DATA_INPUT_PROPERTIE_IN1'] = '${stringTableTransmitterDataInputPropertie1}'; +elvST['MOD_EM8BIT_TRANSMITTER|DATA_INPUT_PROPERTIE_IN2'] = '${stringTableTransmitterDataInputPropertie2}'; +elvST['MOD_EM8BIT_TRANSMITTER|DATA_INPUT_PROPERTIE_IN3'] = '${stringTableTransmitterDataInputPropertie3}'; +elvST['MOD_EM8BIT_TRANSMITTER|DATA_INPUT_PROPERTIE_IN4'] = '${stringTableTransmitterDataInputPropertie4}'; +elvST['MOD_EM8BIT_TRANSMITTER|DATA_INPUT_PROPERTIE_IN5'] = '${stringTableTransmitterDataInputPropertie5}'; +elvST['MOD_EM8BIT_TRANSMITTER|DATA_INPUT_PROPERTIE_IN6'] = '${stringTableTransmitterDataInputPropertie6}'; +elvST['MOD_EM8BIT_TRANSMITTER|DATA_INPUT_PROPERTIE_IN7'] = '${stringTableTransmitterDataInputPropertie7}'; +elvST['MOD_EM8BIT_TRANSMITTER|DATA_STABILITY_FILTER_TIME'] = '${stringTableTransmitterDataStabilityFilterTime}'; +elvST['MOD_EM8BIT_TRANSMITTER|DATA_TRANSMISSION_CONDITION'] = '${stringTableTransmitterDataTransmissionCondition}'; +elvST['MOD_EM8BIT_TRANSMITTER|DATA_TRANSMISSION_CONDITION=LEVEL_CHANGE_DATA[HIGH_to_LOW]'] = '${stringTableTransmitterDataTransmissionCondition0}'; +elvST['MOD_EM8BIT_TRANSMITTER|DATA_TRANSMISSION_CONDITION=LEVEL_CHANGE_DATA[LOW_to_HIGH]'] = '${stringTableTransmitterDataTransmissionCondition1}'; +elvST['MOD_EM8BIT_TRANSMITTER|DATA_TRANSMISSION_CONDITION=LEVEL_CHANGE_DATA[LOW_to_HIGH_and_HIGH_to_LOW]'] = '${stringTableTransmitterDataTransmissionCondition2}'; +elvST['MOD_EM8BIT_TRANSMITTER|DATA_TRANSMISSION_CONDITION=NEW_DATA_STABLE_FOR_TIME_DEFAULT_ENABLE'] = '${stringTableTransmitterDataTransmissionCondition3}'; +elvST['MOD_EM8BIT_TRANSMITTER|DATA_TRANSMISSION_CONDITION=NEW_DATA_SEND_IMMEDIATELY_DEFAULT_ENABLE'] = '${stringTableTransmitterDataTransmissionCondition4}'; +elvST['MOD_EM8BIT_TRANSMITTER|DATA_TRANSMISSION_CONDITION=NEW_DATA_STABLE_FOR_TIME_DEFAULT_DISABLE'] = '${stringTableTransmitterDataTransmissionCondition5}'; +elvST['MOD_EM8BIT_TRANSMITTER|DATA_TRANSMISSION_CONDITION=NEW_DATA_SEND_IMMEDIATELY_DEFAULT_DISABLE'] = '${stringTableTransmitterDataTransmissionCondition6}'; +elvST['MOD_EM8BIT_TRANSMITTER|STATE'] = '${stringTableTransmitterState}'; +elvST['MODUS_BUTTON_LOCK'] = '${stringTableModusButtonLock}'; +elvST['MOISTURE_DETECTED=TRUE'] = '${stringTableMoistureDetectedTrue}'; +elvST['MOISTURE_DETECTED=FALSE'] = '${stringTableMoistureDetectedFalse}'; +elvST['MOTION=FALSE'] = '${stringTableMotionDetectorMotionFalse}'; +elvST['MOTION=TRUE'] = '${stringTableMotionDetectorMotionTrue}'; +elvST['MOTIONDETECTOR_TRANSCEIVER'] = '${stringTableMotionDetectorTitle}'; +elvST['MOTION_ACTIVE_TIME'] = '${stringTableMotionDetectorMotionActiveTime}'; +elvST['MOTION_DETECTION_ACTIVE=FALSE'] = '${stringTableMotionDetectorMotionDetectionActiveFalse}'; +elvST['MOTION_DETECTION_ACTIVE=TRUE'] = '${stringTableMotionDetectorMotionDetectionActiveTrue}'; +elvST['MOTION_DETECTOR'] = '${stringTableMotionDetectorTitle}'; +elvST['MOTION_DETECTOR'] = '${stringTableMotionDetectorTitle}'; +elvST['MOTION_DETECTOR|ERROR=0'] = '${stringTableSabotageContactOk}'; +elvST['MOTION_DETECTOR|ERROR=7'] = '${stringTableMotionDetectorErrorSabotage}'; +elvST['MOTION_DETECTOR|ERROR=SABOTAGE'] = '${stringTableMotionDetectorErrorSabotage}'; +elvST['MOTION_DETECTOR|MIN_INTERVAL'] = '${stringTableMotionDetectorMinInterval}'; +elvST['MULTI_MODE_INPUT_TRANSMITTER'] = '${stringTableMultiModeInputTransmitterTitle}'; +elvST['MULTICAST_ROUTER_MODULE_ENABLED'] = '${stringTableMulticastRouterModuleEnabled}'; +elvST['NOT_USED'] = '${stringTableNotUsed}'; +elvST['OLD_LEVEL'] = '${stringTableDimmerOldLevel}'; +elvST['ON_TIME'] = '${stringTableDimmerOnTime}'; +elvST['OPERATING_VOLTAGE'] = '${stringTableOperationVoltage}'; +elvST['OPERATING_VOLTAGE_STATUS'] = '${stringTableOperationVoltageState}'; +elvST['OPERATING_VOLTAGE_STATUS=EXTERNAL'] = '${lblValue} ${stringTableOperationVoltageState}: ${lblExternal}'; +elvST['OPERATING_VOLTAGE_STATUS=3'] = '${stringTableOperationVoltageState}: ${lblExternal}'; +elvST['OPERATING_VOLTAGE_STATUS=NORMAL'] = '${stringTableOperationVoltageState}: ${lblNormal}'; +elvST['OPERATING_VOLTAGE_STATUS=0'] = '${stringTableOperationVoltageState}: ${lblNormal}'; +elvST['OPERATING_VOLTAGE_STATUS=UNKNOWN'] = '${stringTableOperationVoltageState}: ${lblUnknown}'; +elvST['OPERATING_VOLTAGE_STATUS=1'] = '${stringTableOperationVoltageState}: ${lblUnknown}'; +elvST['OPERATING_VOLTAGE_STATUS=OVERFLOW'] = '${stringTableOperationVoltageState}: ${lblOverflow}'; +elvST['OPERATING_VOLTAGE_STATUS=2'] = '${stringTableOperationVoltageState}: ${lblOverflow}'; +elvST['OPTICAL_ALARM_SELECTION=BLINKING_ALTERNATELY_REPEATING'] = '${stringTableAlarmBlinkingAlternatelyRepeating}'; +elvST['OPTICAL_ALARM_SELECTION=BLINKING_BOTH_REPEATING'] = '${stringTableAlarmBlinkingBothRepeating}'; +elvST['OPTICAL_ALARM_SELECTION=CONFIRMATION_SIGNAL_0'] = '${stringTableAlarmConfirmingSignal0}'; +elvST['OPTICAL_ALARM_SELECTION=CONFIRMATION_SIGNAL_1'] = '${stringTableAlarmConfirmingSignal1}'; +elvST['OPTICAL_ALARM_SELECTION=CONFIRMATION_SIGNAL_2'] = '${stringTableAlarmConfirmingSignal2}'; +elvST['OPTICAL_ALARM_SELECTION=DISABLE_OPTICAL_SIGNAL'] = '${stringTableAlarmDisableOpticalSignal}'; +elvST['OPTICAL_ALARM_SELECTION=DOUBLE_FLASHING_REPEATING'] = '${stringTableAlarmDoubleFlashingRepeating}'; +elvST['OPTICAL_ALARM_SELECTION=FLASHING_BOTH_REPEATING'] = '${stringTableAlarmFlashingBothRepeating}'; +elvST['OPTICAL_SIGNAL_RECEIVER'] = '${stringTableOpticalSignalReceiver}'; +elvST['OVERTEMP_LEVEL'] = '${stringTableDimmerOverTempLevel}'; +elvST['PARAM_SELECT'] = '${stringTableParamSelect}'; +elvST['PARAM_SELECT=INACTIVE'] = '${stringTableParamSelectInactive}'; +elvST['PARAM_SELECT=T1'] = '${stringTableParamSelectT1}'; +elvST['PARAM_SELECT=T1-T2'] = '${stringTableParamSelectT1MinusT2}'; +elvST['PARAM_SELECT=T2'] = '${stringTableParamSelectT2}'; +elvST['PARAM_SELECT=T2-T1'] = '${stringTableParamSelectT2MinusT1}'; +elvST['PARTY_MODE_SUBMIT'] = '${stringTablePartyModeSubmit}'; +elvST['PARTY_SET_POINT_TEMPERATURE'] = '${stringTableClimateControlRegPartyValue}'; +elvST['PARTY_START_DAY'] = '${stringTablePartyStartDay}'; +elvST['PARTY_START_MONTH'] = '${stringTablePartyStartMonth}'; +elvST['PARTY_START_TIME'] = '${stringTablePartyStartTime}'; +elvST['PARTY_START_YEAR'] = '${stringTablePartyStartYear}'; +elvST['PARTY_STOP_DAY'] = '${stringTablePartyStopDay}'; +elvST['PARTY_STOP_MONTH'] = '${stringTablePartyStopMonth}'; +elvST['PARTY_STOP_TIME'] = '${stringTablePartyStopTime}'; +elvST['PARTY_STOP_YEAR'] = '${stringTablePartyStopYear}'; +elvST['PARTY_TEMPERATURE'] = '${stringTablePartyTemperature}'; +elvST['PARTY_TIME_END'] = '${stringTableClimateControlRegPartyEndTime}'; +elvST['PARTY_TIME_START'] = '${stringTableClimateControlRegPartyStartTime}'; +elvST['PASSAGE_COUNTER_VALUE'] = '${stringTablePassageCounterValue}'; +elvST['PASSAGE_COUNTER_OVERFLOW=FALSE'] = '${stringTablePassageCounterOverflowFalse}'; +elvST['PASSAGE_COUNTER_OVERFLOW=TRUE'] = '${stringTablePassageCounterOverflowTrue}'; +elvST['LAST_PASSAGE_DIRECTION=TRUE'] = '${stringTableLastPassageDirectionTrue}'; +elvST['LAST_PASSAGE_DIRECTION=FALSE'] = '${stringTableLastPassageDirectionFalse}'; +elvST['CURRENT_PASSAGE_DIRECTION=FALSE'] = '${stringTableCurrentPassageDirectionFalse}'; +elvST['CURRENT_PASSAGE_DIRECTION=TRUE'] = '${stringTableCurrentPassageDirectionTrue}'; +elvST['PASSAGE_DETECTOR_COUNTER_TRANSMITTER'] = '${stringTablePassageDetectorCounterTransmitterTitle}'; +elvST['PASSAGE_DETECTOR_COUNTER_TRANSMITTER|CHANNEL_OPERATION_MODE'] = '${stringTablePassageDetectorCounterTransmitterChannelOperationMode}'; +elvST['PASSAGE_DETECTOR_COUNTER_TRANSMITTER|COND_TX_DECISION_ABOVE'] = '${stringTablePassageDetectorCounterTransmitterCondTxCondTXDecisionAbove}'; +elvST['PASSAGE_DETECTOR_COUNTER_TRANSMITTER|COND_TX_DECISION_BELOW'] = '${stringTablePassageDetectorCounterTransmitterCondTxCondTXDecisionBelow}'; +elvST['PASSAGE_DETECTOR_COUNTER_TRANSMITTER|COND_TX_THRESHOLD_HI'] = '${stringTablePassageDetectorCounterTransmitterCondTxThresholdHi}'; +elvST['PASSAGE_DETECTOR_COUNTER_TRANSMITTER|COND_TX_THRESHOLD_LO'] = '${stringTablePassageDetectorCounterTransmitterCondTxThresholdLo}'; +elvST['PASSAGE_DETECTOR_DIRECTION_TRANSMITTER'] = '${stringTablePassageDetectorDirectionTitle}'; +elvST['PERMISSION_STATE=FALSE'] = '${stringTablePermissionStateFalse}'; +elvST['PERMISSION_STATE=TRUE'] = '${stringTablePermissionStateTrue}'; +elvST['PEER_NEEDS_BURST'] = '${stringTablePeerNeedsBurst}'; +elvST['PIR_OPERATION_MODE'] = '${stringTablePirOperationMode}'; +elvST['PIR_SENSITIVITY'] = '${stringTableSensorSensivity}'; +elvST['PIR_OPERATION_MODE_ECO'] = '${pirOperationModeEco}'; +elvST['PIR_OPERATION_MODE_NORMAL'] = '${pirOperationModeNormal}'; +elvST['PIR_OPERATION_MODE_OFF'] = '${lblOff}'; +elvST['POSITION_SAVE_TIME'] = '${stringTablePositionSaveTime}'; +elvST['POWER_MAINS_FAILURE=FALSE'] = '${stringTablePowerMainsFailureFalse}'; +elvST['POWER_MAINS_FAILURE=TRUE'] = '${stringTablePowerMainsFailureTrue}'; +elvST['POWERMETER_IEC1|ENERGY_COUNTER'] = '${stringTablePowerMeterEnergyCounter}'; +elvST['POWERMETER_IEC1|GAS_ENERGY_COUNTER'] = '${stringTablePowerMeterEnergyCounterGas}'; +elvST['POWERMETER_IEC1|GAS_POWER'] = '${stringTableGasConsumption}'; +elvST['POWERMETER_IEC1|IEC_ENERGY_COUNTER'] = '${stringTablePowerMeterIECEnergyCounter}'; +elvST['POWERMETER_IEC1|IEC_POWER'] = '${stringTableIECPowerMeterPower}'; +elvST['POWERMETER_IEC1|POWER'] = '${stringTablePowerMeterPower}'; +elvST['POWERMETER_IEC2|IEC_ENERGY_COUNTER'] = '${stringTablePowerMeterIECEnergyCounter}'; +elvST['POWERMETER_IEC2|IEC_POWER'] = '${stringTableIECPowerMeterPower}'; +elvST['POWERMETER_IGL|ENERGY_COUNTER'] = '${stringTablePowerMeterEnergyCounter}'; +elvST['POWERMETER_IGL|GAS_ENERGY_COUNTER'] = '${stringTablePowerMeterEnergyCounterGas}'; +elvST['POWERMETER_IGL|GAS_POWER'] = '${stringTableGasConsumption}'; +elvST['POWERMETER_IGL|POWER'] = '${stringTablePowerMeterPower}'; +elvST['POWERMETER|AVERAGING'] = '${stringTablePowerMeterAveraging}'; +elvST['POWERMETER|CURRENT'] = '${stringTableCurrent}'; +elvST['POWERMETER|ENERGY_COUNTER'] = '${stringTablePowerMeterEnergyCounter}'; +elvST['POWERMETER|FREQUENCY'] = '${stringTablePowerMeterFrequency}'; +elvST['POWERMETER|POWER'] = '${stringTablePowerMeterPower}'; +elvST['POWERMETER|TX_MINDELAY'] = '${stringTablePowerMeterTxMinDelay}'; +elvST['POWERMETER|TX_THRESHOLD_CURRENT'] = '${stringTablePowerMeterTxThresholdCurrent}'; +elvST['POWERMETER|TX_THRESHOLD_FREQUENCY'] = '${stringTablePowerMeterTxThresholdFrequency}'; +elvST['POWERMETER|TX_THRESHOLD_POWER'] = '${stringTablePowerMeterTxThresholdPower}'; +elvST['POWERMETER|TX_THRESHOLD_VOLTAGE'] = '${stringTablePowerMeterTxThresholdVoltage}'; +elvST['POWERMETER|VOLTAGE'] = '${stringTableVoltage}'; +elvST['POWERUP_ACTION'] = '${stringTableDimmerPowerUpAction}'; +elvST['POWERUP_JUMPTARGET'] = '${stringTableDimmerPowerUpAction}'; +elvST['POWERUP_OFF'] = '${stringTablePowerUpOFF}'; +elvST['POWERUP_OFFDELAY_VALUE'] = '${stringTableOffDelayValue}'; +elvST['POWERUP_ON'] = '${stringTablePowerUpON}'; +elvST['POWERUP_ONDELAY_UNIT'] = '${stringTableOnDelayUnit}'; +elvST['POWERUP_ONDELAY_UNIT=10M'] = '${optionUnit10M}'; +elvST['POWERUP_ONDELAY_UNIT=10S'] = '${optionUnit10S}'; +elvST['POWERUP_ONDELAY_UNIT=1M'] = '${optionUnit1M}'; +elvST['POWERUP_ONDELAY_UNIT=1S'] = '${optionUnit1S}'; +elvST['POWERUP_ONDELAY_UNIT=5M'] = '${optionUnit5M}'; +elvST['POWERUP_ONDELAY_UNIT=5S'] = '${optionUnit5S}'; +elvST['POWERUP_ONDELAY_VALUE'] = '${stringTableOnDelayValue}'; +elvST['POWERUP_OFFTIME_UNIT'] = '${stringTableOffTimeUnit}'; +elvST['POWERUP_ONTIME_UNIT'] = '${stringTableOnTimeUnit}'; +elvST['POWERUP_ONTIME_UNIT=10M'] = '${optionUnit10M}'; +elvST['POWERUP_ONTIME_UNIT=10S'] = '${optionUnit10S}'; +elvST['POWERUP_ONTIME_UNIT=1M'] = '${optionUnit1M}'; +elvST['POWERUP_ONTIME_UNIT=1S'] = '${optionUnit1S}'; +elvST['POWERUP_ONTIME_UNIT=5M'] = '${optionUnit5M}'; +elvST['POWERUP_ONTIME_UNIT=5S'] = '${optionUnit5S}'; +elvST['POWERUP_ONTIME_UNIT=H'] = '${optionUnitH}'; +elvST['POWERUP_ONTIME_VALUE'] = '${stringTableOnTimeValue}'; +elvST['POWER_SUPPLY'] = '${stringTablePowerSupply}'; +elvST['POWER|BAT_LEVEL'] = '${stringTableBatteryCapacity}'; +elvST['POWER|LOWBAT=FALSE'] = '${stringTableBatteryOk}'; +elvST['POWER|LOWBAT=TRUE'] = '${stringTableBatteryEmpty}'; +elvST['POWER|USBH_POWERFAIL=FALSE'] = '${stringTableUSBHostActive}'; +elvST['POWER|USBH_POWERFAIL=TRUE'] = '${stringTableUSBHostNotActive}'; +elvST['POWER|U_SOURCE_FAIL=FALSE'] = '${stringTablePowerSupplyOk}'; +elvST['POWER|U_SOURCE_FAIL=TRUE'] = '${stringTablePowerSupplyNotOk}'; +elvST['POWER|U_USBD_OK=FALSE'] = '${stringTableUSBNotActive}'; +elvST['POWER|U_USBD_OK=TRUE'] = '${stringTableUSBActive}'; +elvST['PRESENCEDETECTOR_TRANSCEIVER'] = '${stringTablePresenceDetectorTitle}'; +elvST['PRESENCEDETECTOR_TRANSCEIVER|MIN_INTERVAL'] = '${stringTableMotionDetectorMinInterval}'; +elvST['PRESENCE_DETECTION_ACTIVE=FALSE'] = '${stringTablePresenceDetectionActiveFalse}'; +elvST['PRESENCE_DETECTION_ACTIVE=TRUE'] = '${stringTablePresenceDetectionActiveTrue}'; +elvST['PRESENCE_DETECTION_STATE=FALSE'] = '${stringTablePresenceDetectionStateFalse}'; +elvST['PRESENCE_DETECTION_STATE=TRUE'] = '${stringTablePresenceDetectionStateTrue}'; +elvST['PRESS_LONG'] = '${stringTableKeyPressLong}'; +elvST['PRESS_LONG=TRUE'] = '${stringTableKeyPressLongTrue}'; +elvST['PRESS_LONG_RELEASE'] = '${stringTableKeyPressLongRelease}'; +elvST['PRESS_LONG_RELEASE=TRUE'] = '${stringTableKeyPressLongRelease}'; +elvST['PRESS_LONG_START'] = '${stringTableKeyPressLongStart}'; +elvST['PRESS_LONG_START=TRUE'] = '${stringTableKeyPressLongStart}'; +elvST['PRESS_SHORT'] = '${stringTableKeyPressShort}'; +elvST['PRESS_SHORT=TRUE'] = '${stringTableKeyPressShortTrue}'; +elvST['PROCESS=NOT_STABLE'] = '${stringTableProcessNotStableGeneric}'; +elvST['PROCESS=STABLE'] = '${stringTableProcessStableGeneric}'; +elvST['PROCESS=STABLE'] = '${stringTableProcessStableGeneric}'; +elvST['PULSE_SENSOR'] = '${stringTablePulseSensorTitle}'; +elvST['PULSE_SENSOR|SEQUENCE_OK'] = '${stringTablePulseSensorSequenceOk}'; +elvST['PULSE_SENSOR|SEQUENCE_PULSE_1'] = '${stringTablePulseSensorSequencePulse1}'; +elvST['PULSE_SENSOR|SEQUENCE_PULSE_1=NOT_USED'] = '${stringTablePulseSensorSequencePulse1Unused}'; +elvST['PULSE_SENSOR|SEQUENCE_PULSE_2'] = '${stringTablePulseSensorSequencePulse2}'; +elvST['PULSE_SENSOR|SEQUENCE_PULSE_2=NOT_USED'] = '${stringTablePulseSensorSequencePulse2Unused}'; +elvST['PULSE_SENSOR|SEQUENCE_PULSE_3'] = '${stringTablePulseSensorSequencePulse3}'; +elvST['PULSE_SENSOR|SEQUENCE_PULSE_3=NOT_USED'] = '${stringTablePulseSensorSequencePulse3Unused}'; +elvST['PULSE_SENSOR|SEQUENCE_PULSE_4'] = '${stringTablePulseSensorSequencePulse4}'; +elvST['PULSE_SENSOR|SEQUENCE_PULSE_4=NOT_USED'] = '${stringTablePulseSensorSequencePulse4Unused}'; +elvST['PULSE_SENSOR|SEQUENCE_PULSE_5'] = '${stringTablePulseSensorSequencePulse5}'; +elvST['PULSE_SENSOR|SEQUENCE_PULSE_5=NOT_USED'] = '${stringTablePulseSensorSequencePulse5Unused}'; +elvST['PULSE_SENSOR|SEQUENCE_TOLERANCE'] = '${stringTablePulseSensorSequenceTolerance}'; +elvST['RADIATOR_THERMOSTAT'] = '${stringTableRadiatorThermostatTitle}'; +elvST['RAIN_DETECTION_TRANSMITTER'] = '${stringTableRainDetector}'; +elvST['RAINDETECTOR'] = '${stringTableRainDetector}'; +elvST['RAINDETECTOR_HEAT|STATE=FALSE'] = '${stringTableRainDetectorHeatingOff}'; +elvST['RAINDETECTOR_HEAT|STATE=TRUE'] = '${stringTableRainDetectorHeatingOn}'; +elvST['RAINDETECTOR|COND_TX_THRESHOLD_HI'] = '${stringTableRainDetectorCondTxThresholdHi}'; +elvST['RAINDETECTOR|COND_TX_THRESHOLD_LO'] = '${stringTableRainDetectorCondTxThresholdLo}'; +elvST['RAINDETECTOR|EVENT_FILTERTIME'] = '${stringTableRainDetectorEventFilterTime}'; +elvST['RAINDETECTOR|EVENT_RELEASE_FILTER_TIME'] = '${stringTableRainDetectorEventReleaseFilterTime}'; +elvST['RAINDETECTOR|STATE=DRY'] = '${stringTableRainDetectorDry}'; +elvST['RAINDETECTOR|STATE=RAIN'] = '${stringTableRainDetectorRain}'; +elvST['RAINDETECTOR|STATE_HIGH_HOLD_TIME'] = '${stringTableRainDetectorStateHighHoldTime}'; +elvST['RAMP_STOP'] = '${stringTableDimmerRampStop}'; +elvST['RAMP_TIME'] = '${stringTableDimmerRampTime}'; +elvST['RAMP_TIME_UNIT'] = '${stringTableRampTimeUnit}'; +elvST['RAMP_TIME_UNIT=D'] = '${stringTableRampTimeUnitD}'; +elvST['RAMP_TIME_UNIT=H'] = '${stringTableRampTimeUnitH}'; +elvST['RAMP_TIME_UNIT=M'] = '${stringTableRampTimeUnitM}'; +elvST['RAMP_TIME_UNIT=S'] = '${stringTableRampTimeUnitS}'; +elvST['RAMP_TIME_UNIT=10MS'] = '${stringTableRampTimeUnit10MS}'; +elvST['RAMP_TIME_VALUE'] = '${stringTableRampTimeValue}'; +elvST['REDUCE_LEVEL'] = '${stringTableDimmerReduceLevel}'; +elvST['REDUCE_TEMP_LEVEL'] = '${stringTableDimmerReduceTempLevel}'; +elvST['REFERENCE_RUNNING_TIME_BOTTOM_TOP_UNIT'] = '${stringTableTimeBottomTopUnit}'; +elvST['REFERENCE_RUNNING_TIME_BOTTOM_TOP_VALUE'] = '${stringTableTimeBottomTopValue}'; +elvST['REFERENCE_RUNNING_TIME_TOP_BOTTOM_UNIT'] = '${stringTableTimeTopBottomUnit}'; +elvST['REFERENCE_RUNNING_TIME_TOP_BOTTOM_VALUE'] = '${stringTableTimeTopBottomValue}'; +elvST['REFERENCE_RUNNING_TIME_SLATS_UNIT'] = '${stringTableTimeSlatsUnit}'; +elvST['REFERENCE_RUNNING_TIME_SLATS_VALUE'] = '${stringTableTimeSlatsValue}'; +elvST['REMOTECONTROL_RECEIVER'] = '${stringTableRemoteControlReceiver}'; +elvST['REPEATED_LONG_PRESS_TIMEOUT_UNIT'] = '${stringTableKeyLongPressTimeOutUnit}'; +elvST['REPEATED_LONG_PRESS_TIMEOUT_UNIT=100ms'] = '${optionUnit100MS}'; +elvST['REPEATED_LONG_PRESS_TIMEOUT_UNIT=H'] = '${optionUnitH}'; +elvST['REPEATED_LONG_PRESS_TIMEOUT_UNIT=M'] = '${optionUnitM}'; +elvST['REPEATED_LONG_PRESS_TIMEOUT_UNIT=S'] = '${optionUnitS}'; +elvST['REPEATED_LONG_PRESS_TIMEOUT_VALUE'] = '${stringTableKeyLongPressTimeOutValue}'; +elvST['RESET_MOTION'] = '${stringTableResetStatus}'; +elvST['RESET_PRESENCE'] = '${stringTableResetStatus}'; +elvST['RESTART_BUTTONPRESS'] = '${stringTableRestartButtonPress}'; +elvST['RESTART_BUTTONPRESS_IF_WAS_ON'] = '${stringTableRestartButtonPressIfWasOn}'; +elvST['RESTART_LAST'] = '${stringTableRestartLast}'; +elvST['RESTART_OFF'] = '${stringTableRestartOff}'; +elvST['RGB'] = '${stringTableRGBWColorValue}'; +elvST['RGBW'] = '${stringTableRGBWColorValue}'; +elvST['RGBW_AUTOMATIC'] = '${stringTableRGBWAutomaticTitle}'; +elvST['RGBW_AUTOMATIC|COLOR_CHANGE_SPEED'] = '${stringTableRGBWColorChangeSpeed}'; +elvST['RGBW_AUTOMATIC|PROGRAM'] = '${stringTableRGBWProgram}'; +elvST['RGBW_COLOR'] = '${stringTableRGBWColorTitle}'; +elvST['RGBW_COLOR|COLOR'] = '${stringTableRGBWColorValue}'; +elvST['RGBW_COLOR|WHITE_ADJUSTMENT_VALUE_BLUE'] = '${stringTableRGBWWhiteAdjustmentBlue}'; +elvST['RGBW_COLOR|WHITE_ADJUSTMENT_VALUE_GREEN'] = '${stringTableRGBWWhiteAdjustmentGreen}'; +elvST['RGBW_COLOR|WHITE_ADJUSTMENT_VALUE_RED'] = '${stringTableRGBWWhiteAdjustmentRed}'; +elvST['ROTARY_CONTROL_TRANSCEIVER'] = '${stringTableRotaryControlTransceiverTitle}'; +elvST['ROTARY_HANDLE_SENSOR'] = '${stringTableRHSTitle}'; +elvST['ROTARY_HANDLE_SENSOR|ERROR=SABOTAGE'] = '${stringTableRHSErrorSabotage}'; +elvST['ROTARY_HANDLE_SENSOR|MSG_FOR_POS_A'] = '${stringTableRHSMsgPosA}'; +elvST['ROTARY_HANDLE_SENSOR|MSG_FOR_POS_A=CLOSED'] = '${stringTableRHSMsgPosClosed}'; +elvST['ROTARY_HANDLE_SENSOR|MSG_FOR_POS_A=NO_MSG'] = '${stringTableRHSMsgPosNoMsg}'; +elvST['ROTARY_HANDLE_SENSOR|MSG_FOR_POS_A=OPEN'] = '${stringTableRHSMsgPosOpen}'; +elvST['ROTARY_HANDLE_SENSOR|MSG_FOR_POS_A=TILTED'] = '${stringTableRHSMsgPosTilted}'; +elvST['ROTARY_HANDLE_SENSOR|MSG_FOR_POS_B'] = '${stringTableRHSMsgPosB}'; +elvST['ROTARY_HANDLE_SENSOR|MSG_FOR_POS_B=CLOSED'] = '${stringTableRHSMsgPosClosed}'; +elvST['ROTARY_HANDLE_SENSOR|MSG_FOR_POS_B=NO_MSG'] = '${stringTableRHSMsgPosNoMsg}'; +elvST['ROTARY_HANDLE_SENSOR|MSG_FOR_POS_B=OPEN'] = '${stringTableRHSMsgPosOpen}'; +elvST['ROTARY_HANDLE_SENSOR|MSG_FOR_POS_B=TILTED'] = '${stringTableRHSMsgPosTilted}'; +elvST['ROTARY_HANDLE_SENSOR|MSG_FOR_POS_C'] = '${stringTableRHSMsgPosC}'; +elvST['ROTARY_HANDLE_SENSOR|MSG_FOR_POS_C=CLOSED'] = '${stringTableRHSMsgPosClosed}'; +elvST['ROTARY_HANDLE_SENSOR|MSG_FOR_POS_C=NO_MSG'] = '${stringTableRHSMsgPosNoMsg}'; +elvST['ROTARY_HANDLE_SENSOR|MSG_FOR_POS_C=OPEN'] = '${stringTableRHSMsgPosOpen}'; +elvST['ROTARY_HANDLE_SENSOR|MSG_FOR_POS_C=TILTED'] = '${stringTableRHSMsgPosTilted}'; +elvST['ROTARY_HANDLE_SENSOR|STATE=CLOSED'] = '${stringTableRHSStateClosed}'; +elvST['ROTARY_HANDLE_SENSOR|STATE=OPEN'] = '${stringTableRHSStateOpen}'; +elvST['ROTARY_HANDLE_SENSOR|STATE=TILTED'] = '${stringTableRHSStateTilted}'; +elvST['ROTARY_HANDLE_TRANSCEIVER'] = '${stringTableRHSTitle}'; +elvST['ROTARY_HANDLE_TRANSCEIVER|MSG_FOR_POS_A'] = '${stringTableRHSMsgPosA}'; +elvST['ROTARY_HANDLE_TRANSCEIVER|MSG_FOR_POS_A=CLOSED'] = '${stringTableRHSMsgPosClosed}'; +elvST['ROTARY_HANDLE_TRANSCEIVER|MSG_FOR_POS_A=NO_MSG'] = '${stringTableRHSMsgPosNoMsg}'; +elvST['ROTARY_HANDLE_TRANSCEIVER|MSG_FOR_POS_A=OPEN'] = '${stringTableRHSMsgPosOpen}'; +elvST['ROTARY_HANDLE_TRANSCEIVER|MSG_FOR_POS_A=TILTED'] = '${stringTableRHSMsgPosTilted}'; +elvST['ROTARY_HANDLE_TRANSCEIVER|MSG_FOR_POS_B'] = '${stringTableRHSMsgPosB}'; +elvST['ROTARY_HANDLE_TRANSCEIVER|MSG_FOR_POS_B=CLOSED'] = '${stringTableRHSMsgPosClosed}'; +elvST['ROTARY_HANDLE_TRANSCEIVER|MSG_FOR_POS_B=NO_MSG'] = '${stringTableRHSMsgPosNoMsg}'; +elvST['ROTARY_HANDLE_TRANSCEIVER|MSG_FOR_POS_B=OPEN'] = '${stringTableRHSMsgPosOpen}'; +elvST['ROTARY_HANDLE_TRANSCEIVER|MSG_FOR_POS_B=TILTED'] = '${stringTableRHSMsgPosTilted}'; +elvST['ROTARY_HANDLE_TRANSCEIVER|MSG_FOR_POS_C'] = '${stringTableRHSMsgPosC}'; +elvST['ROTARY_HANDLE_TRANSCEIVER|MSG_FOR_POS_C=CLOSED'] = '${stringTableRHSMsgPosClosed}'; +elvST['ROTARY_HANDLE_TRANSCEIVER|MSG_FOR_POS_C=NO_MSG'] = '${stringTableRHSMsgPosNoMsg}'; +elvST['ROTARY_HANDLE_TRANSCEIVER|MSG_FOR_POS_C=OPEN'] = '${stringTableRHSMsgPosOpen}'; +elvST['ROTARY_HANDLE_TRANSCEIVER|MSG_FOR_POS_C=TILTED'] = '${stringTableRHSMsgPosTilted}'; +elvST['ROTARY_HANDLE_TRANSCEIVER|STATE=CLOSED'] = '${stringTableRHSStateClosed}'; +elvST['ROTARY_HANDLE_TRANSCEIVER|STATE=OPEN'] = '${stringTableRHSStateOpen}'; +elvST['ROTARY_HANDLE_TRANSCEIVER|STATE=TILTED'] = '${stringTableRHSStateTilted}'; +elvST['ROTARY_HANDLE_TRANSCEIVER|STATE=UNKNOWN'] = '${stringTableRHSStateUnknown}'; +elvST['ROUTER_MODULE_ENABLED'] = '${stringTableRouterModuleEnabled}'; +elvST['RS485_IDLE_TIME'] = '${stringTableRS485IdleTime}'; +elvST['RSSI_DEVICE'] = '${stringTableRSSIDevice}'; +elvST['RSSI_PEER'] = '${stringTableRSSIPeer}'; +elvST['SABOTAGE=FALSE'] = '${stringTableSabotageContactOk}'; +elvST['SABOTAGE=TRUE'] = '${stringTableSabotageContactWasActive}'; +elvST['SABOTAGE_MSG'] = '${stringTableSabotageMsg}'; +elvST['SABOTAGE|SHAKING'] = '${stringTableSabotageContact}'; +elvST['SECTION'] = '${stringTableSection}'; +elvST['SECTION_STATUS=NORMAL'] = '${stringTableSectionStatusNormal}'; +elvST['SECTION_STATUS=UNKNOWN'] = '${stringTableSectionStatusUnknown}'; +elvST['SELF_CALIBRATION_RESULT=FALSE'] = '${stringTableSelfCalibrationResultFalse}'; +elvST['SELF_CALIBRATION_RESULT=TRUE'] = '${stringTableSelfCalibrationResultTrue}'; +elvST['SELF_CALIBRATION=START'] = '${stringTableSelfCalibrationStart}'; +elvST['SELF_CALIBRATION=STOP'] = '${stringTableSelfCalibrationStop}'; +elvST['SENSOR=FALSE'] = '${stringTableSensorFalse}'; +elvST['SENSOR=TRUE'] = '${stringTableSensorTrue}'; +elvST['SENSOR_ERROR=FALSE'] = '${stringTableSensorErrorFalse}'; +elvST['SENSOR_ERROR=TRUE'] = '${stringTableSensorErrorTrue}'; +elvST['SENSOR_FOR_CARBON_DIOXIDE'] = '${stringTableSensorCO2Title}'; +elvST['SENSOR_FOR_CARBON_DIOXIDE|EVENT_FILTERTIME'] = '${stringTableSensorCO2EventFilterTime}'; +elvST['SENSOR_FOR_CARBON_DIOXIDE|MSG_FOR_POS_A'] = '${stringTableSensorCO2MsgPosA0}'; +elvST['SENSOR_FOR_CARBON_DIOXIDE|MSG_FOR_POS_A=LEVEL_NORMAL'] = '${stringTableSensorCO2MsgPosA1}'; +elvST['SENSOR_FOR_CARBON_DIOXIDE|MSG_FOR_POS_A=NO_MSG'] = '${stringTableSensorCO2MsgPosA2}'; +elvST['SENSOR_FOR_CARBON_DIOXIDE|MSG_FOR_POS_B'] = '${stringTableSensorCO2MsgPosB0}'; +elvST['SENSOR_FOR_CARBON_DIOXIDE|MSG_FOR_POS_B=LEVEL_ADDED'] = '${stringTableSensorCO2MsgPosB3}'; +elvST['SENSOR_FOR_CARBON_DIOXIDE|MSG_FOR_POS_B=LEVEL_ADDED_STRONG'] = '${stringTableSensorCO2MsgPosB4}'; +elvST['SENSOR_FOR_CARBON_DIOXIDE|MSG_FOR_POS_B=LEVEL_NORMAL'] = '${stringTableSensorCO2MsgPosB2}'; +elvST['SENSOR_FOR_CARBON_DIOXIDE|MSG_FOR_POS_B=NO_MSG'] = '${stringTableSensorCO2MsgPosB1}'; +elvST['SENSOR_FOR_CARBON_DIOXIDE|MSG_FOR_POS_C'] = '${stringTableSensorCO2MsgPosC0}'; +elvST['SENSOR_FOR_CARBON_DIOXIDE|MSG_FOR_POS_C=LEVEL_ADDED'] = '${stringTableSensorCO2MsgPosC3}'; +elvST['SENSOR_FOR_CARBON_DIOXIDE|MSG_FOR_POS_C=LEVEL_ADDED_STRONG'] = '${stringTableSensorCO2MsgPosC4}'; +elvST['SENSOR_FOR_CARBON_DIOXIDE|MSG_FOR_POS_C=LEVEL_NORMAL'] = '${stringTableSensorCO2MsgPosC2}'; +elvST['SENSOR_FOR_CARBON_DIOXIDE|MSG_FOR_POS_C=NO_MSG'] = '${stringTableSensorCO2MsgPosC1}'; +elvST['SENSOR_FOR_CARBON_DIOXIDE|MSG_FOR_POS_D'] = '${stringTableSensorCO2MsgPosD0}'; +elvST['SENSOR_FOR_CARBON_DIOXIDE|MSG_FOR_POS_D=LEVEL_ADDED'] = '${stringTableSensorCO2MsgPosD3}'; +elvST['SENSOR_FOR_CARBON_DIOXIDE|MSG_FOR_POS_D=LEVEL_ADDED_STRONG'] = '${stringTableSensorCO2MsgPosD4}'; +elvST['SENSOR_FOR_CARBON_DIOXIDE|MSG_FOR_POS_D=LEVEL_NORMAL'] = '${stringTableSensorCO2MsgPosD2}'; +elvST['SENSOR_FOR_CARBON_DIOXIDE|MSG_FOR_POS_D=NO_MSG'] = '${stringTableSensorCO2MsgPosD1}'; +elvST['SENSOR_FOR_CARBON_DIOXIDE|STATE=LEVEL_ADDED'] = '${stringTableSensorCO2LevelHigh}'; +elvST['SENSOR_FOR_CARBON_DIOXIDE|STATE=LEVEL_ADDED_STRONG'] = '${stringTableSensorCO2LevelStrong}'; +elvST['SENSOR_FOR_CARBON_DIOXIDE|STATE=LEVEL_NORMAL'] = '${stringTableSensorCO2LevelOk}'; +elvST['SENSOR_RANGE_2G'] = '${stringTableSensorRange2G}'; +elvST['SENSOR_RANGE_4G'] = '${stringTableSensorRange4G}'; +elvST['SENSOR_RANGE_8G'] = '${stringTableSensorRange8G}'; +elvST['SENSOR_RANGE_16G'] = '${stringTableSensorRange16G}'; +elvST['SENSOR_SENSITIVITY'] = '${stringTableSensorSensivity}'; +elvST['SENSOR_WINDOW'] = '${stringTableSensorWindowTitle}'; +elvST['SENSOR_WINDOW|EVENT_DELAYTIME'] = '${stringTableSensorWindowEventDelayTime}'; +elvST['SENSOR_WINDOW|EVENT_DELAYTIME=NOT_USED'] = '${stringTableActorWindowStatusInfoNotUsed}'; +elvST['SENSOR_WINDOW|LEVEL'] = '${stringTableActorWindowLevel}'; +elvST['SENSOR_WINDOW|TIPTRONIC_STATE=TIPTRONIC_UNKNOWN_STATE1'] = '${stringTableActorWindowTT_12}'; +elvST['SENSOR_WINDOW|TIPTRONIC_STATE=TIPTRONIC_UNKNOWN_STATE2'] = '${stringTableActorWindowTT_13}'; +elvST['SENSOR_WINDOW|TIPTRONIC_STATE=TIPTRONIC_WINDOW_IN_SHEV_POSITION'] = '${stringTableActorWindowTT_14}'; +elvST['SENSOR_WINDOW|TIPTRONIC_STATE=TT_CLOSES_FROM_TILT_POSITION'] = '${stringTableActorWindowTT_6}'; +elvST['SENSOR_WINDOW|TIPTRONIC_STATE=TT_COULT_BE_OPEND_MANUAL_IN_TURN_POSITION'] = '${stringTableActorWindowTT_10}'; +elvST['SENSOR_WINDOW|TIPTRONIC_STATE=TT_INITIAL_OPERATION'] = '${stringTableActorWindowTT_15}'; +elvST['SENSOR_WINDOW|TIPTRONIC_STATE=TT_IS_IN_TILT_POSITION_FULL_OPEND'] = '${stringTableActorWindowTT_5}'; +elvST['SENSOR_WINDOW|TIPTRONIC_STATE=TT_IS_IN_TILT_POSITION_PARTITIAL_OPEND'] = '${stringTableActorWindowTT_4}'; +elvST['SENSOR_WINDOW|TIPTRONIC_STATE=TT_IS_UNLOCKED_IN_TILT_POSITION_VENT_FRAME_IS_DUE'] = '${stringTableActorWindowTT_2}'; +elvST['SENSOR_WINDOW|TIPTRONIC_STATE=TT_IS_UNLOCKED_IN_TURN_POSITION_VENT_FRAME_IS_DUE'] = '${stringTableActorWindowTT_9}'; +elvST['SENSOR_WINDOW|TIPTRONIC_STATE=TT_LOCKED'] = '${stringTableActorWindowTT_0}'; +elvST['SENSOR_WINDOW|TIPTRONIC_STATE=TT_LOCKS_FROM_TILT_POSITION'] = '${stringTableActorWindowTT_7}'; +elvST['SENSOR_WINDOW|TIPTRONIC_STATE=TT_OPENS_IN_TILT_POSITION'] = '${stringTableActorWindowTT_3}'; +elvST['SENSOR_WINDOW|TIPTRONIC_STATE=TT_UNLOCKS_IN_TILT_POSITION'] = '${stringTableActorWindowTT_1}'; +elvST['SENSOR_WINDOW|TIPTRONIC_STATE=TT_UNLOCKS_IN_TURN_POSITION'] = '${stringTableActorWindowTT_8}'; +elvST['SENSOR_WINDOW|TIPTRONIC_STATE=TT_VENT_FRAME_IS_DUE_WINDOW_LOCKS_FROM_TURN_POSITION'] = '${stringTableActorWindowTT_11}'; +elvST['SENSOR_WINDOW|WINDOW_TYPE=TIPTRONIC_SHEV_TILT'] = '${stringTableSensorWindowType_6}'; +elvST['SENSOR_WINDOW|WINDOW_TYPE=TIPTRONIC_SHEV_TURN'] = '${stringTableSensorWindowType_5}'; +elvST['SENSOR_WINDOW|WINDOW_TYPE=TIPTRONIC_TOPLIGHT'] = '${stringTableSensorWindowType_3}'; +elvST['SENSOR_WINDOW|WINDOW_TYPE=TIPTRONIC_TURN'] = '${stringTableSensorWindowType_4}'; +elvST['SENSOR_WINDOW|WINDOW_TYPE=TIPTRONIC_TURN_AND_TILT'] = '${stringTableSensorWindowType_1}'; +elvST['SENSOR_WINDOW|WINDOW_TYPE=TIPTRONIC_TURN_AND_TILT_TURN_LOCKED'] = '${stringTableSensorWindowType_2}'; +elvST['SENSOR_WINDOW|WINDOW_TYPE=TIPTRONIC_UNKNOWN_WINDOW_TYPE'] = '${stringTableSensorWindowType_0}'; +elvST['SENSOR_WINDOW|WIN_RELEASE=FALSE'] = '${stringTableActorWindowReleaseFalse}'; +elvST['SENSOR_WINDOW|WIN_RELEASE=TRUE'] = '${stringTableActorWindowReleaseTrue}'; +elvST['SENSOR|INPUT_LOCKED'] = '${stringTableSensorInputLocked}'; +elvST['SERVO_TRANSMITTER|LEVEL'] = '${stringTableServoLevel}'; +elvST['SERVO_TRANSMITTER|ACTIVITY_STATE=DOWN'] = '${stringTableDimmerActivityStateDown}'; +elvST['SERVO_TRANSMITTER|ACTIVITY_STATE=UNKNOWN'] = '${stringTableServoActivityStateUnknown}'; +elvST['SERVO_TRANSMITTER|ACTIVITY_STATE=UP'] = '${stringTableDimmerActivityStateUp}'; +elvST['SERVO_TRANSMITTER|ACTIVITY_STATE=STABLE'] = '${stringTableProcessStableBlindDimmerTransmitter}'; +elvST['SERVO_VIRTUAL_RECEIVER'] = '${stringTableServoTitle}'; +elvST['SERVO_VIRTUAL_RECEIVER|LEVEL'] = '${stringTableServoLevel}'; +elvST['SERVO_VIRTUAL_RECEIVER|RAMP_TIME'] = '${stringTableServoRamp}'; +elvST['SET_TEMPERATURE'] = '${stringTableClimateControlRTTransceiverSetTemperature}'; +elvST['SHUTTER_CONTACT'] = '${stringTableShutterContactTitle}'; +elvST['SHUTTER_CONTACT_HMIP'] = '${stringTableShutterContactTitle}'; +elvST['SHUTTER_CONTACT_HMIP|ERROR=SABOTAGE'] = '${stringTableShutterContactErrorSabotage}'; +elvST['SHUTTER_CONTACT_HMIP|MSG_FOR_POS_A'] = '${stringTableShutterContactHmIPMsgPosA0}'; +elvST['SHUTTER_CONTACT_HMIP|MSG_FOR_POS_A=CLOSED'] = '${stringTableShutterContactHmMsgPosA1}'; +elvST['SHUTTER_CONTACT_HMIP|MSG_FOR_POS_A=NO_MSG'] = '${stringTableShutterContactMsgPosA2}'; +elvST['SHUTTER_CONTACT_HMIP|MSG_FOR_POS_A=OPEN'] = '${stringTableShutterContactMsgPosA3}'; +elvST['SHUTTER_CONTACT_HMIP|MSG_FOR_POS_B'] = '${stringTableShutterContactHmIPMsgPosB0}'; +elvST['SHUTTER_CONTACT_HMIP|MSG_FOR_POS_B=CLOSED'] = '${stringTableShutterContactMsgPosB1}'; +elvST['SHUTTER_CONTACT_HMIP|MSG_FOR_POS_B=NO_MSG'] = '${stringTableShutterContactMsgPosB2}'; +elvST['SHUTTER_CONTACT_HMIP|MSG_FOR_POS_B=OPEN'] = '${stringTableShutterContactMsgPosB3}'; +elvST['SHUTTER_CONTACT_HMIP|STATE=CLOSED'] = '${stringTableShutterContactStateFalse}'; +elvST['SHUTTER_CONTACT_HMIP|STATE=FALSE'] = '${stringTableShutterContactStateFalse}'; +elvST['SHUTTER_CONTACT_HMIP|STATE=OPEN'] = '${stringTableShutterContactStateTrue}'; +elvST['SHUTTER_CONTACT_HMIP|STATE=TRUE'] = '${stringTableShutterContactStateTrue}'; +elvST['SHUTTER_CONTACT|ERROR=SABOTAGE'] = '${stringTableShutterContactErrorSabotage}'; +elvST['SHUTTER_CONTACT|MSG_FOR_POS_A'] = '${stringTableShutterContactMsgPosA0}'; +elvST['SHUTTER_CONTACT|MSG_FOR_POS_A=CLOSED'] = '${stringTableShutterContactMsgPosA1}'; +elvST['SHUTTER_CONTACT|MSG_FOR_POS_A=NO_MSG'] = '${stringTableShutterContactMsgPosA2}'; +elvST['SHUTTER_CONTACT|MSG_FOR_POS_A=OPEN'] = '${stringTableShutterContactMsgPosA3}'; +elvST['SHUTTER_CONTACT|MSG_FOR_POS_B'] = '${stringTableShutterContactMsgPosB0}'; +elvST['SHUTTER_CONTACT|MSG_FOR_POS_B=CLOSED'] = '${stringTableShutterContactMsgPosB1}'; +elvST['SHUTTER_CONTACT|MSG_FOR_POS_B=NO_MSG'] = '${stringTableShutterContactMsgPosB2}'; +elvST['SHUTTER_CONTACT|MSG_FOR_POS_B=OPEN'] = '${stringTableShutterContactMsgPosB3}'; +elvST['SHUTTER_CONTACT|STATE=CLOSED'] = '${stringTableShutterContactStateFalse}'; +elvST['SHUTTER_CONTACT|STATE=FALSE'] = '${stringTableShutterContactStateFalse}'; +elvST['SHUTTER_CONTACT|STATE=OPEN'] = '${stringTableShutterContactStateTrue}'; +elvST['SHUTTER_CONTACT|STATE=TRUE'] = '${stringTableShutterContactStateTrue}'; +elvST['SHUTTER_TRANSMITTER|ACTIVITY_STATE=DOWN'] = '${stringTableShutterActivityStateDown}'; +elvST['SHUTTER_TRANSMITTER|ACTIVITY_STATE=UNKNOWN'] = '${stringTableShutterActivityStateUnknown}'; +elvST['SHUTTER_TRANSMITTER|ACTIVITY_STATE=UP'] = '${stringTableShutterActivityStateUp}'; +elvST['SHUTTER_TRANSMITTER|ACTIVITY_STATE=STABLE'] = '${stringTableProcessStableShutterTransmitter}'; +elvST['SHUTTER_TRANSMITTER|LEVEL'] = '${stringTableBlindLevel}'; +elvST['SHUTTER_TRANSMITTER|LEVEL_STATUS=ERROR'] = '${lblValue} ${stringTableBlindLevel}: ${lblError}'; +elvST['SHUTTER_TRANSMITTER|LEVEL_STATUS=4'] = '${lblValue} ${stringTableBlindLevel}: ${lblError}'; +elvST['SHUTTER_TRANSMITTER|LEVEL_STATUS=NORMAL'] = '${lblValue} ${stringTableBlindLevel}: ${lblNormal}'; +elvST['SHUTTER_TRANSMITTER|LEVEL_STATUS=0'] = '${lblValue} ${stringTableBlindLevel}: ${lblNormal}'; +elvST['SHUTTER_TRANSMITTER|LEVEL_STATUS=OVERFLOW'] = '${lblValue} ${stringTableBlindLevel}: ${lblOverflow}'; +elvST['SHUTTER_TRANSMITTER|LEVEL_STATUS=2'] = '${lblValue} ${stringTableBlindLevel}: ${lblOverflow}'; +elvST['SHUTTER_TRANSMITTER|LEVEL_STATUS=UNDERFLOW'] = '${lblValue} ${stringTableBlindLevel}: ${lblUnderflow}'; +elvST['SHUTTER_TRANSMITTER|LEVEL_STATUS=3'] = '${lblValue} ${stringTableBlindLevel}: ${lblUnderflow}'; +elvST['SHUTTER_TRANSMITTER|LEVEL_STATUS=UNKNOWN'] = '${lblValue} ${stringTableBlindLevel}: ${lblUnknown}'; +elvST['SHUTTER_TRANSMITTER|LEVEL_STATUS=1'] = '${lblValue} ${stringTableBlindLevel}: ${lblUnknown}'; +elvST['SHUTTER_TRANSMITTER|LEVEL_2'] = '${stringTableJalousieSlatsLevel}'; +elvST['SHUTTER_TRANSMITTER|LEVEL_2_STATUS=ERROR'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblError}'; +elvST['SHUTTER_TRANSMITTER|LEVEL_2_STATUS=4'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblError}'; +elvST['SHUTTER_TRANSMITTER|LEVEL_2_STATUS=NORMAL'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblNormal}'; +elvST['SHUTTER_TRANSMITTER|LEVEL_2_STATUS=0'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblNormal}'; +elvST['SHUTTER_TRANSMITTER|LEVEL_2_STATUS=OVERFLOW'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblOverflow}'; +elvST['SHUTTER_TRANSMITTER|LEVEL_2_STATUS=2'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblOverflow}'; +elvST['SHUTTER_TRANSMITTER|LEVEL_2_STATUS=UNDERFLOW'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblUnderflow}'; +elvST['SHUTTER_TRANSMITTER|LEVEL_2_STATUS=3'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblUnderflow}'; +elvST['SHUTTER_TRANSMITTER|LEVEL_2_STATUS=UNKNOWN'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblUnknown}'; +elvST['SHUTTER_TRANSMITTER|LEVEL_2_STATUS=1'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblUnknown}'; +elvST['SHUTTER_TRANSMITTER|PROCESS=NOT_STABLE'] = '${stringTableProcessNotStableShutterTransmitter}'; +elvST['SHUTTER_TRANSMITTER|PROCESS=STABLE'] = '${stringTableProcessStableShutterTransmitter}'; +elvST['SHUTTER_VIRTUAL_RECEIVER'] = '${stringTableShutterVirtualReceiverTitle}'; +elvST['SHUTTER_VIRTUAL_RECEIVER|ACTIVITY_STATE=DOWN'] = '${stringTableShutterActivityStateDown}'; +elvST['SHUTTER_VIRTUAL_RECEIVER|ACTIVITY_STATE=UNKNOWN'] = '${stringTableShutterActivityStateUnknown}'; +elvST['SHUTTER_VIRTUAL_RECEIVER|ACTIVITY_STATE=UP'] = '${stringTableShutterActivityStateUp}'; +elvST['SHUTTER_VIRTUAL_RECEIVER|ACTIVITY_STATE=STABLE'] = '${stringTableProcessStableShutterTransmitter}'; +elvST['SHUTTER_VIRTUAL_RECEIVER|LEVEL'] = '${stringTableBlindLevel}'; +elvST['SHUTTER_VIRTUAL_RECEIVER|LEVEL_STATUS=ERROR'] = '${lblValue} ${stringTableBlindLevel}: ${lblError}'; +elvST['SHUTTER_VIRTUAL_RECEIVER|LEVEL_STATUS=4'] = '${lblValue} ${stringTableBlindLevel}: ${lblError}'; +elvST['SHUTTER_VIRTUAL_RECEIVER|LEVEL_STATUS=NORMAL'] = '${lblValue} ${stringTableBlindLevel}: ${lblNormal}'; +elvST['SHUTTER_VIRTUAL_RECEIVER|LEVEL_STATUS=0'] = '${lblValue} ${stringTableBlindLevel}: ${lblNormal}'; +elvST['SHUTTER_VIRTUAL_RECEIVER|LEVEL_STATUS=OVERFLOW'] = '${lblValue} ${stringTableBlindLevel}: ${lblOverflow}'; +elvST['SHUTTER_VIRTUAL_RECEIVER|LEVEL_STATUS=2'] = '${lblValue} ${stringTableBlindLevel}: ${lblOverflow}'; +elvST['SHUTTER_VIRTUAL_RECEIVER|LEVEL_STATUS=UNDERFLOW'] = '${lblValue} ${stringTableBlindLevel}: ${lblUnderflow}'; +elvST['SHUTTER_VIRTUAL_RECEIVER|LEVEL_STATUS=3'] = '${lblValue} ${stringTableBlindLevel}: ${lblUnderflow}'; +elvST['SHUTTER_VIRTUAL_RECEIVER|LEVEL_STATUS=UNKNOWN'] = '${lblValue} ${stringTableBlindLevel}: ${lblUnknown}'; +elvST['SHUTTER_VIRTUAL_RECEIVER|LEVEL_STATUS=1'] = '${lblValue} ${stringTableBlindLevel}: ${lblUnknown}'; +elvST['SHUTTER_VIRTUAL_RECEIVER|LEVEL_2'] = '${stringTableJalousieSlatsLevel}'; +elvST['SHUTTER_VIRTUAL_RECEIVER|LEVEL_2_STATUS=ERROR'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblError}'; +elvST['SHUTTER_VIRTUAL_RECEIVER|LEVEL_2_STATUS=4'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblError}'; +elvST['SHUTTER_VIRTUAL_RECEIVER|LEVEL_2_STATUS=NORMAL'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblNormal}'; +elvST['SHUTTER_VIRTUAL_RECEIVER|LEVEL_2_STATUS=0'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblNormal}'; +elvST['SHUTTER_VIRTUAL_RECEIVER|LEVEL_2_STATUS=OVERFLOW'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblOverflow}'; +elvST['SHUTTER_VIRTUAL_RECEIVER|LEVEL_2_STATUS=2'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblOverflow}'; +elvST['SHUTTER_VIRTUAL_RECEIVER|LEVEL_2_STATUS=UNDERFLOW'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblUnderflow}'; +elvST['SHUTTER_VIRTUAL_RECEIVER|LEVEL_2_STATUS=3'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblUnderflow}'; +elvST['SHUTTER_VIRTUAL_RECEIVER|LEVEL_2_STATUS=UNKNOWN'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblUnknown}'; +elvST['SHUTTER_VIRTUAL_RECEIVER|LEVEL_2_STATUS=1'] = '${lblValue} ${stringTableJalousieSlatsLevel}: ${lblUnknown}'; +elvST['SHUTTER_VIRTUAL_RECEIVER|STOP'] = '${stringTableBlindStop}'; +elvST['SHUTTER_VIRTUAL_RECEIVER|PROCESS=STABLE'] = '${stringTableProcessStableShutterTransmitter}'; +elvST['SHUTTER_VIRTUAL_RECEIVER|PROCESS=NOT_STABLE'] = '${stringTableProcessNotStableShutterTransmitter}'; +elvST['SIGNAL'] = '${stringTableSignal}'; +elvST['SIGNAL_CHIME'] = '${stringTableSignalChimeTitle}'; +elvST['SIGNAL_CHIME|ACT_NUM'] = '${stringTableSignalChimeActNum}'; +elvST['SIGNAL_CHIME|ACT_TYP'] = '${stringTableSignalChimeActType}'; +elvST['SIGNAL_CHIME|ON_TIME'] = '${stringTableSignalChimeOnTime}'; +elvST['SIGNAL_CHIME|STATE=FALSE'] = '${stringTableSignalChimeStateFalse}'; +elvST['SIGNAL_CHIME|STATE=TRUE'] = '${stringTableSignalChimeStateTrue}'; +elvST['SIGNAL_LED'] = '${stringTableSignalLEDTitle}'; +elvST['SIGNAL_LED|ACT_NUM'] = '${stringTableSignalLEDActNum}'; +elvST['SIGNAL_LED|ACT_TYP'] = '${stringTableSignalLEDActType}'; +elvST['SIGNAL_LED|ON_TIME'] = '${stringTableSignalLEDOnTime}'; +elvST['SIGNAL_LED|STATE=FALSE'] = '${stringTableSignalLEDStateFalse}'; +elvST['SIGNAL_LED|STATE=TRUE'] = '${stringTableSignalLEDStateTrue}'; +elvST['SIGNAL_TONE'] = '${stringTableSignalTone}'; +elvST['SIGNAL_TONE=HIGH'] = '${stringTableSignalToneHigh}'; +elvST['SIGNAL_TONE=LOW'] = '${stringTableSignalToneLow}'; +elvST['SIGNAL_TONE=MID'] = '${stringTableSignalToneMid}'; +elvST['SIGNAL_TONE=VERY_HIGH'] = '${stringTableSignalToneVeryHigh}'; +elvST['SIMPLE_SWITCH_RECEIVER'] = '${stringTableSimpleSwitchReceiverTitle}'; +elvST['SMOKE_DETECTOR_ALARM_STATUS=IDLE_OFF'] = '${stringTableStateIdleOff}'; +elvST['SMOKE_DETECTOR_ALARM_STATUS=INTRUSION_ALARM'] = '${stringTableStateIntrusionAlarm}'; +elvST['SMOKE_DETECTOR_ALARM_STATUS=PRIMARY_ALARM'] = '${stringTableStatePrimaryAlarm}'; +elvST['SMOKE_DETECTOR_ALARM_STATUS=SECONDARY_ALARM'] = '${stringTableStateSecondaryAlarm}'; +elvST['SMOKE_DETECTOR_COMMAND=COMMUNICATION_TEST'] = '${stringTableCommandCommunicationTest}'; +elvST['SMOKE_DETECTOR_COMMAND=COMMUNICATION_TEST_REPEATED'] = '${stringTableCommandCommunicationTestRepeated}'; +elvST['SMOKE_DETECTOR_COMMAND=INTRUSION_ALARM'] = '${stringTableCommandIntrusionAlarm}'; +elvST['SMOKE_DETECTOR_COMMAND=INTRUSION_ALARM_OFF'] = '${stringTableCommandIntrusionAlarmOff}'; +elvST['SMOKE_DETECTOR_COMMAND=SMOKE_TEST'] = '${stringTableCommandSmokeTest}'; +elvST['SMOKE_DETECTOR_EVENT=ALARM_OFF'] = '${stringTableEventAlarmOff}'; +elvST['SMOKE_DETECTOR_EVENT=ALARM_OFF_REPEATED'] = '${stringTableEventAlarmOffRepeated}'; +elvST['SMOKE_DETECTOR_EVENT=INTRUSION_ALARM'] = '${stringTableEventIntrusionAlarm}'; +elvST['SMOKE_DETECTOR_EVENT=INTRUSION_ALARM_REPEATED'] = '${stringTableEventIntrusionAlarmRepeated}'; +elvST['SMOKE_DETECTOR_EVENT=LOW_BAT'] = '${stringTableEventLowBat}'; +elvST['SMOKE_DETECTOR_EVENT=LOW_BAT_REPEATED'] = '${stringTableEventLowBatRepeated}'; +elvST['SMOKE_DETECTOR_EVENT=PRIMARY_ALARM'] = '${stringTableEventPrimaryAlarm}'; +elvST['SMOKE_DETECTOR_EVENT=SECONDARY_ALARM'] = '${stringTableEventSecondaryAlarm}'; +elvST['SMOKE_DETECTOR_TEAM'] = '${stringTableSmokeDetectorTitle}'; +elvST['SMOKE_DETECTOR_TEAM_V2'] = '${stringTableSmokeDetectorTitle}'; +elvST['SMOKE_DETECTOR_TEAM_V2|STATE=FALSE'] = '${stringTableSmokeDetectorStateFalse}'; +elvST['SMOKE_DETECTOR_TEAM_V2|STATE=TRUE'] = '${stringTableSmokeDetectorStateTrue}'; +elvST['SMOKE_DETECTOR_TEAM|STATE=FALSE'] = '${stringTableSmokeDetectorStateFalse}'; +elvST['SMOKE_DETECTOR_TEAM|STATE=TRUE'] = '${stringTableSmokeDetectorStateTrue}'; +elvST['SMOKE_DETECTOR_TEST_RESULT=COMMUNICATION_TEST_OK'] = '${stringTableCommunicatingTestOK}'; +elvST['SMOKE_DETECTOR_TEST_RESULT=COMMUNICATION_TEST_SENT'] = '${stringTableCommunicatingTestSent}'; +elvST['SMOKE_DETECTOR_TEST_RESULT=NONE'] = '${stringTableSystemTestNone}'; +elvST['SMOKE_DETECTOR_TEST_RESULT=SMOKE_TEST_FAILED'] = '${stringTableSystemTestFailure}'; +elvST['SMOKE_DETECTOR_TEST_RESULT=SMOKE_TEST_OK'] = '${stringTableSystemTestOK}'; +elvST['SMOKE_DETECTOR|ERROR_ALARM_TEST=ALARM_TEST_FAILED'] = '${stringTableSmokeDetectorAlarmTestFailure}'; +elvST['SMOKE_DETECTOR|ERROR_ALARM_TEST=NO_ERROR'] = '${stringTableSmokeDetectorAlarmTestOK}'; +elvST['SMOKE_DETECTOR|ERROR_SMOKE_CHAMBER=DEGRADED_SMOKE_CHAMBER'] = '${stringTableSmokeDetectorSmokeChamberFailure}'; +elvST['SMOKE_DETECTOR|ERROR_SMOKE_CHAMBER=NO_ERROR'] = '${stringTableSmokeDetectorSmokeChamberOK}'; +elvST['SMOKE_DETECTOR|REPEAT_ENABLE'] = '${stringTableSmokeDetectorRepeatEnable}'; +elvST['SMOKE_DETECTOR|STATE=FALSE'] = '${stringTableSmokeDetectorStateFalse}'; +elvST['SMOKE_DETECTOR|STATE=TRUE'] = '${stringTableSmokeDetectorStateTrue}'; +elvST['SOFTONOFF'] = '${stringTableSoftOnOff}'; +elvST['SOUND_ID'] = '${stringTableSoundID}'; +elvST['SMOKE_LEVEL'] = '${stringTableSmokeLevel}'; +elvST['SOUND_LONG'] = '${stringTableSoundLong}'; +elvST['SOUND_LONG_LONG'] = '${stringTableSoundLongLong}'; +elvST['SOUND_LONG_SHORT'] = '${stringTableSoundLongShort}'; +elvST['SOUND_LONG_SHORT_SHORT'] = '${stringTableSoundLongShortShort}'; +elvST['SOUND_NO_SOUND'] = '${stringTableSoundNoSound}'; +elvST['SOUND_SHORT'] = '${stringTableSoundShort}'; +elvST['SOUND_SHORT_SHORT'] = '${stringTableSoundShortShort}'; +elvST['SPEED_MULTIPLIER'] = '${stringTableSpeedMultiplier}'; +elvST['STANDBY_TIME'] = '${stringTableStandByTime}'; +elvST['STATE=FALSE'] = '${stringTableStateFalse}'; +elvST['STATE=TRUE'] = '${stringTableStateTrue}'; +elvST['STATE_RESET_RECEIVER'] = '${stringTableStateResetReceiverTitle}'; +elvST['STATUSINFO_MINDELAY'] = '${stringTableStatusInfoMinDelay}'; +elvST['STATUSINFO_RANDOM'] = '${stringTableStatusInfoRandom}'; +elvST['STATUS_INDICATOR'] = '${stringTableStatusIndicatorTitle}'; +elvST['STATUS_INDICATOR|INHIBIT=FALSE'] = '${stringTableStatusIndicatorInhibitFalse}'; +elvST['STATUS_INDICATOR|INHIBIT=TRUE'] = '${stringTableStatusIndicatorInhibitTrue}'; +elvST['STATUS_INDICATOR|ON_TIME'] = '${stringTableStatusIndicatorOnTime}'; +elvST['STATUS_INDICATOR|STATE=FALSE'] = '${stringTableStatusIndicatorStateFalse}'; +elvST['STATUS_INDICATOR|STATE=TRUE'] = '${stringTableStatusIndicatorStateTrue}'; +elvST['STATUS_MESSAGE_TEXT_ALIGNMENT_LEFT_ALIGNED'] = '${stringTableStatusMessageTextAligmentLeftAligned}'; +elvST['SUBMIT'] = '${stringTableSubmit}'; +elvST['SWITCH'] = '${stringTableSwitchTitle}'; +elvST['SWITCH_ACTUATOR'] = '${stringTableSwitchTitle}'; +elvST['SWITCH_INTERFACE'] = '${stringTableSwitchInterfaceTitle}'; +elvST['SWITCH_INTERFACE|PRESS'] = '${stringTableSwitchInterfacePress}'; +elvST['SWITCH_INTERFACE|STATE=FALSE'] = '${stringTableSwitchInterfaceStateFalse}'; +elvST['SWITCH_INTERFACE|STATE=TRUE'] = '${stringTableSwitchInterfaceStateTrue}'; +elvST['SWITCH_PANIC'] = '${stringTableSirenSwitchPanicTitle}'; +elvST['SWITCH_SENSOR'] = '${stringTableSwitchSensorTitle}'; +elvST['SWITCH_TRANSMIT'] = '${stringTableSwitchTransmitTitle}'; +elvST['SWITCH_TRANSMIT|TWO_POINT_HYSTERESIS'] = '${stringTableSwitchTransmitTwoPointHysteresis}'; +elvST['SWITCH_VIRTUAL_RECEIVER'] = '${stringTableSwitchVirtualReceiverTitle}'; +elvST['SWITCH|AES_ACTIVE'] = '${stringTableSwitchAESActive}'; +elvST['SWITCH|ON_TIME'] = '${stringTableSwitchOnTime}'; +elvST['SWITCH|STATE=FALSE'] = '${stringTableSwitchStateFalse}'; +elvST['SWITCH|STATE=TRUE'] = '${stringTableSwitchStateTrue}'; +elvST['SWITCH|STATUSINFO_RANDOM_A'] = '${stringTableStatusInfoRandomA}'; +elvST['TACTILE_SWITCH'] = '${stringTableTactileSwitch}'; +elvST['TACTILE_SWITCH=FALSE'] = '${stringTableTactileSwitchFalse}'; +elvST['TACTILE_SWITCH=TRUE'] = '${stringTableTactileSwitchTrue}'; +elvST['TEMP_HUMIDITY_PARTICULATE_MATTER_TRANSMITTER|INTERVAL_UNIT'] = '${stringTableTempHumidityParticulateMatterUnit}'; +elvST['TEMP_HUMIDITY_PARTICULATE_MATTER_TRANSMITTER|INTERVAL_VALUE'] = '${stringTableTempHumidityParticulateMatterValue}'; +elvST['TEMPERATUREFALL_MODUS'] = '${stringTableTemperatureModus}'; +elvST['TEMPERATUREFALL_VALUE'] = '${stringTableTemperatureValue}'; +elvST['TEMPERATUREFALL_WINDOW_OPEN'] = '${stringTableTemperatureWindowOpen}'; +elvST['TEMPERATUREFALL_WINDOW_OPEN_TIME_PERIOD'] = '${stringTableTemperatureOpenTimePeriod}'; +elvST['TEMPERATURE_COMFORT'] = '${stringTableTemperatureComfort}'; +elvST['TEMPERATURE_LIMITER=FALSE'] = '${stringTableTemperatureLimiterFalse}'; +elvST['TEMPERATURE_LIMITER=TRUE'] = '${stringTableTemperatureLimiterTrue}'; +elvST['TEMPERATURE_LOWERING'] = '${stringTableTemperatureLowering}'; +elvST['TEMPERATURE_MAXIMUM'] = '${stringTableTemperatureMaximum}'; +elvST['TEMPERATURE_MINIMUM'] = '${stringTableTemperatureMinimum}'; +elvST['TEMPERATURE_OFFSET'] = '${stringTableTemperatureOffset}'; +elvST['TEMPERATURE_OUT_OF_RANGE=FALSE'] = '${stringTableTemperatureOutOfRangeFalse}'; +elvST['TEMPERATURE_OUT_OF_RANGE=TRUE'] = '${stringTableTemperatureOutOfRangeTrue}'; +elvST['THERMALCONTROL_TRANSMIT'] = '${stringTableThermalControlTitle}'; +elvST['TILT_SENSOR'] = '${stringTableTiltSensorTitle}'; +elvST['TILT_SENSOR|EVENT_FILTERTIME'] = '${stringTableTiltSensorEventFilterTime}'; +elvST['TILT_SENSOR|MSG_FOR_POS_A'] = '${stringTableTiltSensorMsgPosA0}'; +elvST['TILT_SENSOR|MSG_FOR_POS_A=CLOSED'] = '${stringTableTiltSensorMsgPosA1}'; +elvST['TILT_SENSOR|MSG_FOR_POS_A=NO_MSG'] = '${stringTableTiltSensorMsgPosA2}'; +elvST['TILT_SENSOR|MSG_FOR_POS_A=OPEN'] = '${stringTableTiltSensorMsgPosA3}'; +elvST['TILT_SENSOR|MSG_FOR_POS_B'] = '${stringTableTiltSensorMsgPosB0}'; +elvST['TILT_SENSOR|MSG_FOR_POS_B=CLOSED'] = '${stringTableTiltSensorMsgPosB1}'; +elvST['TILT_SENSOR|MSG_FOR_POS_B=NO_MSG'] = '${stringTableTiltSensorMsgPosB2}'; +elvST['TILT_SENSOR|MSG_FOR_POS_B=OPEN'] = '${stringTableTiltSensorMsgPosB3}'; +elvST['TILT_SENSOR|STATE=FALSE'] = '${stringTableTiltSensorStateFalse}'; +elvST['TILT_SENSOR|STATE=TRUE'] = ' ${stringTableTiltSensorStateTrue}'; +elvST['TIME_OF_OPERATION'] = '${stringTableTimeOfOperation}'; +elvST['TIME_OF_OPERATION_STATUS=NORMAL'] = '${lblValue} ${stringTableTimeOfOperation}: ${lblNormal}'; +elvST['TIME_OF_OPERATION_STATUS=0'] = '${lblValue} ${stringTableTimeOfOperation}: ${lblNormal}'; +elvST['TIME_OF_OPERATION_STATUS=UNKNOWN'] = '${lblValue} ${stringTableTimeOfOperation}: ${lblUnknown}'; +elvST['TIME_OF_OPERATION_STATUS=1'] = '${lblValue} ${stringTableTimeOfOperation}: ${lblUnknown}'; +elvST['TIME_OF_OPERATION_STATUS=OVERFLOW'] = '${lblValue} ${stringTableTimeOfOperation}: ${lblOverflow}'; +elvST['TIME_OF_OPERATION_STATUS=2'] = '${lblValue} ${stringTableTimeOfOperation}: ${lblOverflow}'; +elvST['TRANSMIT_DEV_TRY_MAX'] = '${stringTableTransmitDevTryMax}'; +elvST['TRANSMIT_TRY_MAX'] = '${stringTableTransmitTryMax}'; +elvST['TX_MINDELAY'] = '${stringTableTxMinDelay}'; +elvST['TX_MINDELAY_UNIT'] = '${stringTableTxMinDelayUnit}'; +elvST['TX_MINDELAY_UNIT=100MS'] = '${optionUnit100MS}'; +elvST['TX_MINDELAY_UNIT=H'] = '${optionUnitH}'; +elvST['TX_MINDELAY_UNIT=M'] = '${optionUnitM}'; +elvST['TX_MINDELAY_UNIT=S'] = '${optionUnitS}'; +elvST['TX_MINDELAY_VALUE'] = '${stringTableTxMinDelayValue}'; +elvST['TX_THRESHOLD_PERCENT'] = '${stringTableTxThresholdPercent}'; +elvST['TX_THRESHOLD_POWER'] = '${stringTablePowerMeterTxThresholdPower}'; +elvST['UNIVERSAL_LIGHT_RECEIVER'] = '${stringTableUniversalLightReceiverTitle}'; +elvST['UNIVERSAL_LIGHT_RECEIVER|ERROR_LIMIT'] = '${stringTableErrorLimitULR}'; +elvST['UNIVERSAL_LIGHT_RECEIVER|ERROR_LIMIT=FALSE'] = '${stringTableErrorLimitULR_False}'; +elvST['UNIVERSAL_LIGHT_RECEIVER|ERROR_LIMIT=TRUE'] = '${stringTableErrorLimitULR_True}'; +elvST['UNIVERSAL_LIGHT_RECEIVER|ERROR_CONTROL_GEAR_FAILURE'] = '${stringTableErrorGearFailure}'; +elvST['UNIVERSAL_LIGHT_RECEIVER|ERROR_CONTROL_GEAR_FAILURE=FALSE'] = '${stringTableErrorGearFailure_False}'; +elvST['UNIVERSAL_LIGHT_RECEIVER|ERROR_CONTROL_GEAR_FAILURE=TRUE'] = '${stringTableErrorGearFailure_True}'; +elvST['UNIVERSAL_LIGHT_RECEIVER|ERROR_LAMP_FAILURE'] = '${stringTableErrorLampFailureULR}'; +elvST['UNIVERSAL_LIGHT_RECEIVER|ERROR_LAMP_FAILURE=FALSE'] = '${stringTableErrorLampFailureULR_False}'; +elvST['UNIVERSAL_LIGHT_RECEIVER|ERROR_LAMP_FAILURE=TRUE'] = '${stringTableErrorLampFailureULR_True}'; +elvST['UNIVERSAL_LIGHT_RECEIVER|LEVEL'] = '${lblColorBrightness}'; +elvST['UNREACH=FALSE'] = '${stringTableUnreachFalse}'; +elvST['UNREACH=TRUE'] = '${stringTableUnreachTrue}'; +elvST['UPDATE_PENDING'] = '${stringTableUpdatePending}'; +elvST['UPDATE_PENDING=FALSE'] = '${stringTableUpdatePendingFalse}'; +elvST['UPDATE_PENDING=TRUE'] = '${stringTableUpdatePendingTrue}'; +elvST['USER_COLOR'] = '${stringTableSubmit}'; +elvST['USER_PROGRAM'] = '${stringTableSubmit}'; +elvST['VALUE_8BIT'] = '${lblValue}'; +elvST['VALVE_MAXIMUM_POSITION'] = '${stringTableValveMaximumPosition}'; +elvST['VALVE_STATE'] = '${stringTableClimateControlRTTransceiverVentPos}'; +elvST['VALVE_STATE=ADAPTION_DONE'] = '${stringTableValveStateAdaptionDone}'; +elvST['VALVE_STATE=ADAPTION_IN_PROGRESS'] = '${stringTableValveStateAdaptionInProgress}'; +elvST['VALVE_STATE=ADJUSTMENT_TOO_BIG'] = '${stringTableValveStateAdjTooBig}'; +elvST['VALVE_STATE=ADJUSTMENT_TOO_SMALL'] = '${stringTableValveStateAdjToSmall}'; +elvST['VALVE_STATE=ERROR_POSITION'] = '${stringTableValveStateErrorPosition}'; +elvST['VALVE_STATE=RUN_TO_START'] = '${stringTableValveStateRunToStart}'; +elvST['VALVE_STATE=STATE_NOT_AVAILABLE'] = '${stringTableValveStateNotAvailable}'; +elvST['VALVE_STATE=TOO_TIGHT'] = '${stringTableValveStateToTight}'; +elvST['VALVE_STATE=WAIT_FOR_ADAPTION'] = '${stringTableValveStateWaitForAdaption}'; +elvST['VENT_CLOSED'] = '${stringTableVentClosed}'; +elvST['VENT_OPEN'] = '${stringTableVentOpen}'; +elvST['VIR-LG-ONOFF-CH|LEVEL=FALSE'] = '${stringTableStateFalse}'; +elvST['VIR-LG-ONOFF-CH|LEVEL=TRUE'] = '${stringTableStateTrue}'; +elvST['VIRTUAL_DIMMER'] = '${stringTableVirtualDimmerTitle}'; +elvST['VIRTUAL_DIMMER|ERROR=LOAD_FAILURE'] = '${stringTableVirtualDimmerErrorLoadFailure}'; +elvST['VIRTUAL_DIMMER|ERROR_OVERHEAT'] = '${stringTableDimmerErrorOverheat}'; +elvST['VIRTUAL_DIMMER|ERROR_OVERLOAD'] = '${stringTableDimmerErrorOverload}'; +elvST['VIRTUAL_DIMMER|ERROR_REDUCED'] = '${stringTableDimmerErrorReduced}'; +elvST['VIRTUAL_DIMMER|LOGIC_COMBINATION'] = '${stringTableLogicCombination}'; +elvST['VIRTUAL_DIMMER|POWERUP_ACTION'] = '${stringTableVirtualDimmerPowerUpAction}'; +elvST['VIRTUAL_DIMMER|RAMP_STOP'] = '${stringTableDimmerRampStop}'; +elvST['VIRTUAL_DIMMER|STATUSINFO_RANDOM'] = '${stringTableVirtualDimmerStatusInfoRandom}'; +elvST['VIRTUAL_DUAL_WHITE_COLOR|LEVEL'] = '${stringTableDualWhiteColorLevel}'; +elvST['VIRTUAL_DUAL_WHITE_COLOR|LEVEL_REAL'] = '${stringTableDualWhiteColorLevelReal}'; +elvST['VIRTUAL_DUAL_WHITE_COLOR|OLD_LEVEL'] = '${stringTableDualWhiteColorOldLevel}'; +elvST['VIRTUAL_DUAL_WHITE_COLOR|RAMP_STOP'] = '${stringTableDualWhiteColorRampStop}'; +elvST['VIRTUAL_DUAL_WHITE_COLOR|RAMP_TIME'] = '${stringTableDualWhiteColorRampTime}'; +elvST['VIRTUAL_KEY'] = '${stringTableVirtualKeyTitle}'; +elvST['VIRTUAL_KEY|LEVEL'] = '${stringTableVirtualKeyLevel}'; +elvST['VOLTAGE'] = '${stringTableVoltage}'; +elvST['VOLTAGE_0'] = '${stringTableVoltage0}'; +elvST['VOLTAGE_100'] = '${stringTableVoltage100}'; +elvST['VOLTAGE_STATUS=NORMAL'] = '${lblValue} ${stringTableVoltage}: ${lblNormal}'; +elvST['VOLTAGE_STATUS=0'] = '${lblValue} ${stringTableVoltage}: ${lblNormal}'; +elvST['VOLTAGE_STATUS=OVERFLOW'] = '${lblValue} ${stringTableVoltage}: ${lblOverflow}'; +elvST['VOLTAGE_STATUS=1'] = '${lblValue} ${stringTableVoltage}: ${lblOverflow}'; +elvST['VOLTAGE_STATUS=UNDERFLOW'] = '${lblValue} ${stringTableVoltage}: ${lblUnderflow}'; +elvST['VOLTAGE_STATUS=2'] = '${lblValue} ${stringTableVoltage}: ${lblUnderflow}'; +elvST['VOLTAGE_STATUS=UNKNOWN'] = '${lblValue} ${stringTableVoltage}: ${lblUnknown}'; +elvST['VOLTAGE_STATUS=3'] = '${lblValue} ${stringTableVoltage}: ${lblUnknown}'; +elvST['VOLUME_0'] = '{stringTableVolume0}'; +elvST['VOLUME_10'] = '{stringTableVolume1}'; +elvST['VOLUME_100$'] = '{stringTableVolume10}'; +elvST['VOLUME_20'] = '{stringTableVolume2}'; +elvST['VOLUME_30'] = '{stringTableVolume3}'; +elvST['VOLUME_40'] = '{stringTableVolume4}'; +elvST['VOLUME_50'] = '{stringTableVolume5}'; +elvST['VOLUME_60'] = '{stringTableVolume6}'; +elvST['VOLUME_70'] = '{stringTableVolume7}'; +elvST['VOLUME_80'] = '{stringTableVolume8}'; +elvST['VOLUME_90'] = '{stringTableVolume9}'; +elvST['WAKEUP_BEHAVIOUR'] = '${stringTableButtonResponseWithoutChannelChooser}'; +elvST['WAKEUP_BEHAVIOUR_STATUS_MSG_CONFIRMATION'] = '${stringTableBehaviourStatusMsgConfirmation}'; +elvST['WAKEUP_BEHAVIOUR_STATUS_MSG_RESISTANCE'] = '${stringTableBehaviourStatusMsgResistance}'; +elvST['WAKEUP_BEHAVIOUR_STATUS_SIGNALIZATION_CONFIRMATION'] = '${stringTableBehaviourStatusSignalizationConfirmation}'; +elvST['WAKEUP_DEFAULT_CHANNEL'] = '${stringTableWakeupDefaultChannel}'; +elvST['WALLMOUNTED_THERMOSTAT'] = '${stringTableWallMountedThermostatTitle}'; +elvST['WATERDETECTIONSENSOR'] = '${stringTableWDSTitle}'; +elvST['WATERDETECTIONSENSOR|EVENT_FILTERTIME'] = '${stringTableWDSEventFilterTime}'; +elvST['WATERDETECTIONSENSOR|EVENT_FILTERTIME'] = '${stringTableWDSEventFilterTime}'; +elvST['WATERDETECTIONSENSOR|MSG_FOR_POS_A'] = '${stringTableWDSMsgPosA0}'; +elvST['WATERDETECTIONSENSOR|MSG_FOR_POS_A=DRY'] = '${stringTableWDSMsgPosA1}'; +elvST['WATERDETECTIONSENSOR|MSG_FOR_POS_A=NO_MSG'] = '${stringTableWDSMsgPosA2}'; +elvST['WATERDETECTIONSENSOR|MSG_FOR_POS_B'] = '${stringTableWDSMsgPosB0}'; +elvST['WATERDETECTIONSENSOR|MSG_FOR_POS_B=DRY'] = '${stringTableWDSMsgPosB1}'; +elvST['WATERDETECTIONSENSOR|MSG_FOR_POS_B=NO_MSG'] = '${stringTableWDSMsgPosB2}'; +elvST['WATERDETECTIONSENSOR|MSG_FOR_POS_B=WATER'] = '${stringTableWDSMsgPosB3}'; +elvST['WATERDETECTIONSENSOR|MSG_FOR_POS_B=WET'] = '${stringTableWDSMsgPosB4}'; +elvST['WATERDETECTIONSENSOR|MSG_FOR_POS_C'] = '${stringTableWDSMsgPosC0}'; +elvST['WATERDETECTIONSENSOR|MSG_FOR_POS_C=NO_MSG'] = '${stringTableWDSMsgPosC1}'; +elvST['WATERDETECTIONSENSOR|MSG_FOR_POS_C=WATER'] = '${stringTableWDSMsgPosC2}'; +elvST['WATERDETECTIONSENSOR|MSG_FOR_POS_C=WET'] = '${stringTableWDSMsgPosC3}'; +elvST['WATERDETECTIONSENSOR|STATE=DRY'] = '${stringTableWDSStateDry}'; +elvST['WATERDETECTIONSENSOR|STATE=WATER'] = '${stringTableWDSStateWater}'; +elvST['WATER_DETECTION_TRANSMITTER'] = '${stringTableWaterDetectionTransmitterTitle}'; +elvST['WATER_DETECTION_TRANSMITTER|ALARMSTATE=FALSE'] = '${stringTableWeatherTransmitAlarmEventFalse}'; +elvST['WATER_DETECTION_TRANSMITTER|ALARMSTATE=TRUE'] = '${stringTableWeatherTransmitAlarmEventTrue}'; +elvST['WATERDETECTIONSENSOR|STATE=WET'] = '${stringTableWDSStateWet}'; +elvST['WATERLEVEL_DETECTED=TRUE'] = '${stringTableWaterLevelDetectedTrue}'; +elvST['WATERLEVEL_DETECTED=FALSE'] = '${stringTableWaterLevelDetectedFalse}'; +elvST['WEATHER'] = '${stringTableWeatherTitle}'; +elvST['WEATHER_RECEIVER'] = '${stringTableWeatherReceiver}'; +elvST['WEATHER_TRANSMIT|ALARMSTATE=FALSE'] = '${stringTableWeatherTransmitAlarmEventFalse}'; +elvST['WEATHER_TRANSMIT|ALARMSTATE=TRUE'] = '${stringTableWeatherTransmitAlarmEventTrue}'; +elvST['WEATHER_TRANSMIT|HUMIDITY'] = '${stringTableWeatherHumidity}'; +elvST['WEATHER_TRANSMIT|TEMPERATURE'] = '${stringTableWeatherTemperature}'; +elvST['# WEATHER SENSOR'] = ''; +elvST['AIR_PRESSURE'] = '${stringTableWeatherAirPressure}'; +elvST['BRIGHTNESS'] = '${stringTableWeatherBrightness}'; +elvST['RAINING'] = '${stringTableWeatherRaining}'; +elvST['RAINING=FALSE'] = '${stringTableWeatherRainingFalse}'; +elvST['RAINING=TRUE'] = '${stringTableWeatherRainingTrue}'; +elvST['RAIN_COUNTER'] = '${stringTableWeatherRainCounter}'; +elvST['RAIN_COUNTER_OVERFLOW=TRUE'] = '${stringTableWeatherRainCounterOverflowTrue}'; +elvST['RAIN_COUNTER_OVERFLOW=FALSE'] = '${stringTableWeatherRainCounterOverflowFalse}'; +elvST['RAIN_COUNTER_STATUS=NORMAL'] = '${lblValue} ${stringTableWeatherRainCounter}: ${lblNormal}'; +elvST['RAIN_COUNTER_STATUS=0'] = '${lblValue} ${stringTableWeatherRainCounter}: ${lblNormal}'; +elvST['RAIN_COUNTER_STATUS=UNKNOWN'] = '${lblValue} ${stringTableWeatherRainCounter}: ${lblUnknown}'; +elvST['RAIN_COUNTER_STATUS=1'] = '${lblValue} ${stringTableWeatherRainCounter}: ${lblUnknown}'; +elvST['STORM_LOWER_THRESHOLD'] = '${stringTableWeatherStormLowerThres}'; +elvST['STORM_UPPER_THRESHOLD'] = '${stringTableWeatherStormUpperThres}'; +elvST['SUNSHINEDURATION'] = '${stringTableWeatherSunshineDuration}'; +elvST['SUNSHINEDURATION_OVERFLOW=FALSE'] = '${stringTableWeatherSunshineDurationOverflowFalse}'; +elvST['SUNSHINEDURATION_OVERFLOW=TRUE'] = '${stringTableWeatherSunshineDurationOverflowTrue}'; +elvST['SUNSHINE_THRESHOLD'] = '${stringTableWeatherSunshineThres}'; +elvST['SUNSHINE_THRESHOLD_OVERRUN'] = '${stringTableWeatherSunshineThresOverrunTitle}'; +elvST['SUNSHINE_THRESHOLD_OVERRUN=FALSE'] = '${stringTableWeatherSunshineThresOverrunFalse}'; +elvST['SUNSHINE_THRESHOLD_OVERRUN=TRUE'] = '${stringTableWeatherSunshineThresOverrunTrue}'; +elvST['TEMPERATURE'] = '${stringTableWeatherTemperature}'; +elvST['WIND_DIR'] = '${stringTableWeatherWindDir}'; +elvST['WIND_DIR_STATUS=NORMAL'] = '${lblValue} ${stringTableWeatherWindDir}: ${lblNormal}'; +elvST['WIND_DIR_STATUS=0'] = '${lblValue} ${stringTableWeatherWindDir}: ${lblNormal}'; +elvST['WIND_DIR_STATUS=UNKNOWN'] = '${lblValue} ${stringTableWeatherWindDir}: ${lblUnknown}'; +elvST['WIND_DIR_STATUS=1'] = '${lblValue} ${stringTableWeatherWindDir}: ${lblUnknown}'; +elvST['WIND_DIRECTION'] = '${stringTableWeatherWindDir}'; +elvST['WIND_DIR_RANGE'] = '${stringTableWeatherWindDirRange}'; +elvST['WIND_DIR_RANGE_STATUS=NORMAL'] = '${lblValue} ${stringTableWeatherWindDirRange}: ${lblNormal}'; +elvST['WIND_DIR_RANGE_STATUS=0'] = '${lblValue} ${stringTableWeatherWindDirRange}: ${lblNormal}'; +elvST['WIND_DIR_RANGE_STATUS=UNKNOWN'] = '${lblValue} ${stringTableWeatherWindDirRange}: ${lblUnknown}'; +elvST['WIND_DIR_RANGE_STATUS=1'] = '${lblValue} ${stringTableWeatherWindDirRange}: ${lblUnknown}'; +elvST['WIND_DIR_RANGE_STATUS=OVERFLOW'] = '${lblValue} ${stringTableWeatherWindDirRange}: ${lblOverflow}'; +elvST['WIND_DIR_RANGE_STATUS=2'] = '${lblValue} ${stringTableWeatherWindDirRange}: ${lblOverflow}'; +elvST['WIND_DIRECTION_RANGE'] = '${stringTableWeatherWindDirRange}'; +elvST['WIND_SPEED'] = '${stringTableWeatherWindSpeed}'; +elvST['WIND_SPEED_STATUS=NORMAL'] = '${lblValue} ${stringTableWeatherWindSpeed}: ${lblNormal}'; +elvST['WIND_SPEED_STATUS=0'] = '${lblValue} ${stringTableWeatherWindSpeed}: ${lblNormal}'; +elvST['WIND_SPEED_STATUS=UNKNOWN'] = '${lblValue} ${stringTableWeatherWindSpeed}: ${lblUnknown}'; +elvST['WIND_SPEED_STATUS=1'] = '${lblValue} ${stringTableWeatherWindSpeed}: ${lblUnknown}'; +elvST['WIND_SPEED_STATUS=OVERFLOW'] = '${lblValue} ${stringTableWeatherWindSpeed}: ${lblOverflow}'; +elvST['WIND_SPEED_STATUS=2'] = '${lblValue} ${stringTableWeatherWindSpeed}: ${lblOverflow}'; +elvST['WIND_SPEED_RESULT_SOURCE'] = '${stringTableWeatherWindSpeedResultSource}'; +elvST['WIND_SPEED_RESULT_SOURCE=AVERAGE_VALUE'] = '${stringTableWeatherWindSpeedResultSourceAverage}'; +elvST['WIND_SPEED_RESULT_SOURCE=MAX_VALUE'] = '${stringTableWeatherWindSpeedResultSourceMax}'; +elvST['WIND_THRESHOLD_OVERRUN=FALSE'] = '${stringTableWeatherWindThresholdOverrunFalse}'; +elvST['WIND_THRESHOLD_OVERRUN=TRUE'] = '${stringTableWeatherWindThresholdOverrunTrue}'; +elvST['# END WEATHER SENSOR'] = ''; +elvST['WEEK_PROGRAM_CHANNEL_LOCKS'] = '${stringTableWeekProgramChannelLocks}'; +elvST['WEEK_PROGRAM_TARGET_CHANNEL_LOCKS'] = '${stringTableWeekProgramTargetChannelLocks}'; +elvST['WEEK_PROGRAM_TARGET_CHANNEL_LOCK=MANU_MODE'] = '${stringTableWeekProgramTargetChannelLockManu}'; +elvST['WEEK_PROGRAM_TARGET_CHANNEL_LOCK=AUTO_MODE_WITH_RESET'] = '${stringTableWeekProgramTargetChannelLockAutoReset}'; +elvST['WEEK_PROGRAM_TARGET_CHANNEL_LOCK=AUTO_MODE_WITHOUT_RESET'] = '${stringTableWeekProgramTargetChannelLockAuto}'; +elvST['WHITE'] = '${stringTableColorTemperature}'; +elvST['WINDOW_DRIVE_RECEIVER'] = '${stringTableDoorWindowDriveReceiverTitle}'; +elvST['WINDOW_DRIVE_RECEIVER|STOP'] = '${stringTableDoorCommandStop}'; +elvST['WINDOW_DRIVE_RECEIVER|LEVEL=NO_VENTILATION'] = '${stringTableWindowStateClosed}'; +elvST['WINDOW_DRIVE_RECEIVER|LEVEL=VENTILATION'] = '${stringTableWindowStateOpen}'; +elvST['WINDOW_OPEN_REPORTING'] = '${stringTableWindowOpenReporting}'; +elvST['WINDOW_OPEN_REPORTING=FALSE'] = '${stringTableWindowOpenReportingFalse}'; +elvST['WINDOW_OPEN_REPORTING=TRUE'] = '${stringTableWindowOpenReportingTrue}'; +elvST['WINDOW_STATE'] = '${stringTableWindowState}'; +elvST['WINDOW_SWITCH_RECEIVER'] = '${stringTableWindowSwitchReceiver}'; +elvST['WINMATIC'] = '${stringTableWinMaticTitle}'; +elvST['WINMATIC|ERROR=MOTOR_TILT_ERROR'] = '${stringTableWinMaticErrorMotorTilt}'; +elvST['WINMATIC|ERROR=MOTOR_TURN_ERROR'] = '${stringTableWinMaticErrorMotorTurn}'; +elvST['WINMATIC|LEVEL'] = '${stringTableWinMaticLevel}'; +elvST['WINMATIC|LEVEL=LOCKED'] = '${stringTableWinMaticLevelLocked}'; +elvST['WINMATIC|MOUNT_SIDE'] = '${stringTableWinMaticMountSide}'; +elvST['WINMATIC|MOUNT_SIDE=LEFT'] = '${stringTableWinMaticMountSideLeft}'; +elvST['WINMATIC|MOUNT_SIDE=RIGHT'] = '${stringTableWinMaticMountSideRight}'; +elvST['WINMATIC|PULL_FORCE'] = '${stringTableWinMaticPullForce}'; +elvST['WINMATIC|PUSH_FORCE'] = '${stringTableWinMaticPushForce}'; +elvST['WINMATIC|RELOCK_DELAY'] = '${stringTableWinMaticReLockDelay}'; +elvST['WINMATIC|RELOCK_DELAY=NOT_USED'] = '${stringTableWinMaticReLockDelayNotUsed}'; +elvST['WINMATIC|SPEED'] = '${stringTableWinMaticSpeed}'; +elvST['WINMATIC|STATE_UNCERTAIN=FALSE'] = '${stringTableWinMaticStateUncertainFalse}'; +elvST['WINMATIC|STATE_UNCERTAIN=TRUE'] = '${stringTableWinMaticStateUncertainTrue}'; +elvST['WINMATIC|STOP'] = '${stringTableWinMaticStop}'; +elvST['WINMATIC|TILT_MAX'] = '${stringTableWinMaticTiltMax}'; +elvST['WP_OPTIONS=NOP'] = '${stringTableWPOptionsNop}'; +elvST['WP_OPTIONS=OFF'] = '${stringTableWPOptionsOff}'; +elvST['WP_OPTIONS=ON'] = '${stringTableWPOptionsOn}'; +elvST['WS_CS'] = '${stringTableWSCS}'; +elvST['WS_TH'] = '${stringTableWSTH}'; +elvST['minutes'] = '${stringTableMinute}'; +elvST['15Min'] = '${optionUnit15M}'; +elvST['30Min'] = '${optionUnit30M}'; +elvST['60Min'] = '${optionUnit60M}'; +elvST['120Min'] = '${optionUnit120M}'; +elvST['ACTIVITY_STATE=DOWN'] = '${stringTableActivityStateDown}'; +elvST['ACTIVITY_STATE=UNKNOWN'] = '${stringTableActivityStateUnknown}'; +elvST['ACTIVITY_STATE=UP'] = '${stringTableActivityStateUp}'; +elvST['ACTIVITY_STATE=STABLE'] = '${stringTableActivityStable}'; +elvST['COLOR_TEMPERATURE'] = '${optionColorTemperature}'; +elvST['HUE'] = '${optionHue}'; +elvST['SATURATION'] = '${optionSaturation}'; +elvST['SOUNDFILE=INTERNAL_SOUNDFILE'] = '${stringTableInternalSoundFile}'; +elvST['SOUNDFILE=RANDOM_SOUNDFILE'] = '${stringTableRandomSoundFile}'; +elvST['SOUNDFILE=OLD_VALUE'] = '${stringTableOldValueSoundFile}'; +elvST['SOUNDFILE=DO_NOT_CARE'] = '${stringTableDoNotCareSoundFile}'; +elvST['MASS_CONCENTRATION_PM_1'] = '${stringTableMassConc10}'; +elvST['MASS_CONCENTRATION_PM_1_STATUS=NORMAL'] = '${stringTableMassConc10} ${lblStatus} ${lblNormal}'; +elvST['MASS_CONCENTRATION_PM_1_STATUS=UNKNOWN'] = '${stringTableMassConc10} ${lblStatus} ${lblUnknown}'; +elvST['MASS_CONCENTRATION_PM_1_STATUS=OVERFLOW'] = '${stringTableMassConc10} ${lblStatus} ${lblOverflow}'; +elvST['MASS_CONCENTRATION_PM_1_24H_AVERAGE'] = '${stringTableMassConc10} ${lbl24Average}'; +elvST['MASS_CONCENTRATION_PM_1_24H_AVERAGE_STATUS=NORMAL'] = '${stringTableMassConc10} ${lbl24Average} ${lblStatus} ${lblNormal}'; +elvST['MASS_CONCENTRATION_PM_1_24H_AVERAGE_STATUS=UNKNOWN'] = '${stringTableMassConc10} ${lbl24Average} ${lblStatus} ${lblUnknown}'; +elvST['MASS_CONCENTRATION_PM_1_24H_AVERAGE_STATUS=OVERFLOW'] = '${stringTableMassConc10} ${lbl24Average} ${lblStatus} ${lblOverflow}'; +elvST['MASS_CONCENTRATION_PM_2_5'] = '${stringTableMassConc25}'; +elvST['MASS_CONCENTRATION_PM_2_5_STATUS=NORMAL'] = '${stringTableMassConc25} ${lblStatus} ${lblNormal}'; +elvST['MASS_CONCENTRATION_PM_2_5_STATUS=UNKNOWN'] = '${stringTableMassConc25} ${lblStatus} ${lblUnknown}'; +elvST['MASS_CONCENTRATION_PM_2_5_STATUS=OVERFLOW'] = '${stringTableMassConc25} ${lblStatus} ${lblOverflow}'; +elvST['MASS_CONCENTRATION_PM_2_5_24H_AVERAGE'] = '${stringTableMassConc25} ${lbl24Average}'; +elvST['MASS_CONCENTRATION_PM_2_5_24H_AVERAGE_STATUS=NORMAL'] = '${stringTableMassConc25} ${lbl24Average} ${lblStatus} ${lblNormal}'; +elvST['MASS_CONCENTRATION_PM_2_5_24H_AVERAGE_STATUS=UNKNOWN'] = '${stringTableMassConc25} ${lbl24Average} ${lblStatus} ${lblUnknown}'; +elvST['MASS_CONCENTRATION_PM_2_5_24H_AVERAGE_STATUS=OVERFLOW'] = '${stringTableMassConc25} ${lbl24Average} ${lblStatus} ${lblOverflow}'; +elvST['MASS_CONCENTRATION_PM_10'] = '${stringTableMassConc100}'; +elvST['MASS_CONCENTRATION_PM_10_STATUS=NORMAL'] = '${stringTableMassConc100} ${lblStatus} ${lblNormal}'; +elvST['MASS_CONCENTRATION_PM_10_STATUS=UNKNOWN'] = '${stringTableMassConc100} ${lblStatus} ${lblUnknown}'; +elvST['MASS_CONCENTRATION_PM_10_STATUS=OVERFLOW'] = '${stringTableMassConc100} ${lblStatus} ${lblOverflow}'; +elvST['MASS_CONCENTRATION_PM_10_24H_AVERAGE'] = '${stringTableMassConc100} ${lbl24Average}'; +elvST['MASS_CONCENTRATION_PM_10_24H_AVERAGE_STATUS=NORMAL'] = '${stringTableMassConc100} ${lbl24Average} ${lblStatus} ${lblNormal}'; +elvST['MASS_CONCENTRATION_PM_10_24H_AVERAGE_STATUS=UNKNOWN'] = '${stringTableMassConc100} ${lbl24Average} ${lblStatus} ${lblUnknown}'; +elvST['MASS_CONCENTRATION_PM_10_24H_AVERAGE_STATUS=OVERFLOW'] = '${stringTableMassConc100} ${lbl24Average} ${lblStatus} ${lblOverflow}'; +elvST['NUMBER_CONCENTRATION_PM_1'] = '${stringTableNumberConc10}'; +elvST['NUMBER_CONCENTRATION_PM_1_STATUS=NORMAL'] = '${stringTableNumberConc10} ${lblStatus} ${lblNormal}'; +elvST['NUMBER_CONCENTRATION_PM_1_STATUS=UNKNOWN'] = '${stringTableNumberConc10} ${lblStatus} ${lblUnknown}'; +elvST['NUMBER_CONCENTRATION_PM_1_STATUS=OVERFLOW'] = '${stringTableNumberConc10} ${lblStatus} ${lblOverflow}'; +elvST['NUMBER_CONCENTRATION_PM_2_5'] = '${stringTableNumberConc25}'; +elvST['NUMBER_CONCENTRATION_PM_2_5_STATUS=NORMAL'] = '${stringTableNumberConc25} ${lblStatus} ${lblNormal}'; +elvST['NUMBER_CONCENTRATION_PM_2_5_STATUS=UNKNOWN'] = '${stringTableNumberConc25} ${lblStatus} ${lblUnknown}'; +elvST['NUMBER_CONCENTRATION_PM_2_5_STATUS=OVERFLOW'] = '${stringTableNumberConc25} ${lblStatus} ${lblOverflow}'; +elvST['NUMBER_CONCENTRATION_PM_10'] = '${stringTableNumberConc100}'; +elvST['NUMBER_CONCENTRATION_PM_10_STATUS=NORMAL'] = '${stringTableNumberConc100} ${lblStatus} ${lblNormal}'; +elvST['NUMBER_CONCENTRATION_PM_10_STATUS=UNKNOWN'] = '${stringTableNumberConc100} ${lblStatus} ${lblUnknown}'; +elvST['NUMBER_CONCENTRATION_PM_10_STATUS=OVERFLOW'] = '${stringTableNumberConc100} ${lblStatus} ${lblOverflow}'; +elvST['TYPICAL_PARTICLE_SIZE'] = '${stringTableTypicalParticelSize}'; +elvST['TYPICAL_PARTICLE_SIZE_STATUS=NORMAL'] = '${stringTableTypicalParticelSize} ${lblStatus} ${lblNormal}'; +elvST['TYPICAL_PARTICLE_SIZE_STATUS=UNKNOWN'] = '${stringTableTypicalParticelSize} ${lblStatus} ${lblUnknown}'; +elvST['TYPICAL_PARTICLE_SIZE_STATUS=OVERFLOW'] = '${stringTableTypicalParticelSize} ${lblStatus} ${lblOverflow}'; +/* +Übersetzt den Inhalt der HTML-Elemente ... +und +*/ +st_setStringTableValues = function() +{ + var translation; + + //In ... eingeschlossene Wörter übersetzen + var temp = document.getElementsByClassName('stringtable_value'); + + var wrappers = new Array(); + for (var i=0; i... + var temp = document.getElementsByClassName('stringtable_select'); + + var selboxes = new Array(); + for (var i = 0, len = temp.length; i < len; i++) + { + selboxes[i] = temp[i]; + } + + for (var i=0; i + var temp = document.getElementsByClassName('stringtable_input'); + + var input = new Array(); + for (var i = 0, len = temp.length; i < len; i++) + { + input[i] = temp[i]; + } + + for (var i = 0; i < input.length; i ++) + { + input[i].value = st_getValue(input[i].value).escapeHTML(); + input[i].className += "_translated"; + } + +}; + +//Eingabeparameter +//context: |(=)? +//context: | +//context: +//Rückgabeparameter: +//return: übersetzung, wenn context gefunden in den Spezialisierungsgraden: +// 1. |(=)? +// 2. | +// 3. +// sonst: value, wenn value aus dem context extrahiert werden kann +// sonst: context wird wieder zurückgegeben. +st_getValue = function(context) +{ + var translation; + var tokens; + var channel_type; + var value_id_assign; //Inhalt: = + var value_id; + var value; + + //Voller context vorhanden?========================================= + translation = elvST[context]; + + if (translation && translation != "") return translation; + //================================================================== + + //Gibt es einen Eintrag nur mit value_id_assign?==================== + tokens = context.split('|'); + value_id_assign = ""; + + if (tokens.length > 1) + { + //channel_type = tokens[0]; + value_id_assign = tokens[1]; + translation = elvST[ value_id_assign ]; + if (translation && translation != "") return translation; + } + //================================================================== + + //Gibt es einen Eintrag nur mit dem Variablennamen?================= + tokens = context.split('='); + value = ""; + + if (tokens.length > 1) + { + //value_id = tokens[0]; + value = tokens[1]; + translation = elvST[ value ]; + if (translation && translation != "") return translation; + else if (value && value != "") return value; + } + //================================================================== + + //Gibt es einen Eintrag im INPUT-Feld?============================== + + tokens = context.split(" "); + translation = ""; + + for (var i = 0; i < tokens.length; i++) + { + if (typeof elvST[tokens[i]] != 'undefined') + { + tokens[i] = elvST[tokens[i]]; + } + translation += tokens[i] + " "; + } + if (translation && translation != "") return translation; + //================================================================== + + if (value_id_assign && value_id_assign != "") return value_id_assign; + else return context; +}; +/** + * expand.js + * JavaScript Erweiterungen. + **/ + +Singleton = { + create: function(base, members) + { + var _members = ""; + if (typeof(members) != "undefined") { var _members = members; } + var singleton = Class.create(base, _members); + return new singleton(); + } +}; + +Interface = { + + /** + * Erstellt eine neue Schnittstelle + **/ + create: function(members) + { + return members; + }, + + /** + * Prüft, ob ein Objekt eine spezielle Schnittstelle implementiert + **/ + isImplemented: function(obj, iface) + { + for (name in iface) + { + if (typeof(obj[name]) == "undefined") { return false; } + } + return true; + } + +}; + +Array.prototype.ex_joinItem = function(name, separator) +{ + var _separator = " "; + var result = ""; + + if (typeof(separator) != "undefined") { _separator = separator; } + + if (0 < this.length) + { + result = this[0][name]; + for (var i = 1, len = this.length; i < len; i++) + { + result += separator + this[i][name]; + } + } + + return result; +}; + +/** + * Wie join, nur dass jeweils eine Eigenschaft verkettet wird + **/ +Array.prototype.ex_joinProperty = function(name, separator) +{ + var _separator = " "; + var result = ""; + + if (typeof(separator) != "undefined") { _separator = separator; } + + if (0 < this.length) + { + result = this[0][name](); + for (var i = 1, len = this.length; i < len; i++) + { + result += separator + this[i][name](); + } + } + + return result; +}; + +/** + * Sortiert ein Array anhand eines Elements + * name: Bezeichnung des Elements + * sortReverse: Optional. Dreht die Sortierreihenfolge um + **/ +Array.prototype.ex_sortBy = function(name, sortReverse) +{ + this.sort(function(a,b) { return Object.ex_compare(a[name], b[name]); }); + if (sortReverse) { this.reverse(); } + + return this; +}; + +/** + * Sortiert eine Array anhand einer Eigenschaft + * name: Bezeichnung der Eigenschaft + * sortReverse: Optional. Dreht die Sortierreihenfolge um + **/ +Array.prototype.ex_sortByProperty = function(name, sortReverse) +{ + this.sort(function(a, b) { return Object.ex_compare(a[name](), b[name]()); }); + if (sortReverse) { this.reverse(); } + + return this; +}; + +/** + * Vergleicht zwei Objekte + **/ +Object.ex_compare = function(objA, objB) +{ + if (typeof(objA.ex_compareTo) != "undefined") { return objA.ex_compareTo(objB); } + else { return 0; } +}; + +/** + * Vergleicht eine Zahl mit einer anderen + **/ +Number.prototype.ex_compareTo = function(other) +{ + if (typeof(other) == "number") { return (this - other); } + else { return 0; } +}; + +/** + * Vergleicht zwei Zeichenketten (case-insensitiv) + **/ +String.prototype.ex_compareTo = function(other) +{ + if (typeof(other) == "string") + { + var strA = this.toLowerCase(); + var strB = other.toLowerCase(); + + return strA.localeCompare(strB, undefined, {numeric: true, sensitivity: 'base'}); + } + + return 0; +}; + +/** + * Ermittelt, ob ein Element in einem Array vorhanden ist + **/ +Array.prototype.ex_contains = function(item) +{ + return (0 <= this.indexOf(item)); +}; + +/** + * Fügt einem Array ein Element hinzu, falls + * dieses noch nicht enthalten ist. + **/ +Array.prototype.ex_pushUnique = function(item) +{ + if (!this.ex_contains(item)) { this.push(item); } + return this; +}; + +String.prototype.reverse = function () { + var result = ""; + for (var i = (this.length-1); i >= 0 ; i--) { + result += this[i]; + } + return result; +};/******************************************************************************* + * xmlhttprequest.js + * Browserunabhängiger Zugriff auf das XMLHttpRequest-Objekt. + * + * Autor : Falk Werner + * Erstellt am: 04.06.2008 + ******************************************************************************/ + +/*############################################################################*/ +/*# Funktionen #*/ +/*############################################################################*/ + +/******************************************************************************* + * XMLHttpRequest_create () + * Erstellt browserunabhängig ein neuen XMLHttpRequest-Objekt. + * + * Dieser Code wurde inspiriert von folgendem Buch: + * Titel : Ajax - schnell und kompakt + * Autor : Christian Wenz + * Verlag: entwickler.press (Software & Support verlag GmbH) + * ISBN : 978-3-939084-81-5 + ******************************************************************************/ +XMLHttpRequest_create = function () +{ + var xmlHttp = null; + + if ( window.XMLHttpRequest ) + { + xmlHttp = new XMLHttpRequest(); + } + else if ( window.ActiveXObject ) + { + try + { + xmlHttp = new ActiveXObject("Msxml2.XMLHTTP"); + } + catch (ex) + { + try + { + xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); + } + catch (ex) + { + // leer + } + } + } + + return xmlHttp; +}; + +/******************************************************************************* + * XMLHttpRequest_supported () + * Prüft, ob das XMLHttpRequest-Objekt verfügbar ist. + * + * Rückgabe: + * true - Das XMLHttpRequest-Objekt ist verfügbar. + * false - Das XMLHttpRequest-Objekt ist NICHT verfügbar. + ******************************************************************************/ +XMLHttpRequest_supported = function () +{ + var request = XMLHttpRequest_create(); + + if (null !== xmlHttpRequest) { return true; } + else { return false; } +}; +/** + * httploader.js + **/ + +/** + * Lädt XML- bzw Textdateien synchron. + **/ +HttpLoader = new function() +{ + /*####################*/ + /*# Private Elemente #*/ + /*####################*/ + + /** + * Lädt synchron Daten und gibt das XMLHttpRequest-Objekt zurück. + **/ + var load = function(method, url, data) + { + var xhr = XMLHttpRequest_create(); + + if (null !== xhr) + { + xhr.open(method, url, false); + xhr.send(data); + if ((xhr.status != 200) && (xhr.status !== 0)) { xhr = null; } + } + + return xhr; + }; + + /*########################*/ + /*# Öffentliche Elemente #*/ + /*########################*/ + + /** + * Lädt einen Text synchron. + **/ + this.getText = function(url) + { + var xhr = load("GET", url, null); + + if (null !== xhr) { return xhr.responseText; } + else { return ""; } + }; + + /** + * Lädt ein XML-Dokument synchron. + **/ + this.getXML = function(url) + { + var xhr = load("GET", url, null); + + if (null !== xhr) { return xhr.responseXML; } + else { return null; } + }; + +}(); +/** + * eq3.js + **/ + +/** + * Namensraum eQ3 + **/ +eQ3 = {}; + +/** + * Singleton für systemweite Hilfsfunktionen + **/ +eQ3.system = { + + MAX_OBJECT_ID: 1000000, //< größte Id, die ein Objekt haben kann + + m_objects: {}, //< Enthält alle registierten Objekte + m_id: 0, //< vorgeschlagene Id für das nächste Objekt + m_objectCount: 0, //< Aktuelle Anzahl der registrieten Objekte (zu Debug-Zwecken) + + /** + * @fn m_getNextFreeId + * @brief Liefert die nächste freie Id, die einem Objekt zugewiesen + * werden kann. + **/ + m_getNextFreeId: function() + { + var MAX_OBJECT_ID = eQ3.system.MAX_OBJECT_ID; + var objects = eQ3.system.m_objects; + var id = eQ3.system.m_id; + var count = 0; + + while ( typeof(objects[id]) != "undefined" ) + { + id++; + if (id > MAX_OBJECT_ID) { id = 0; } + + count++; + if (count > MAX_OBJECT_ID) { throw new Error("max. object count reached"); } + } + + if (id < MAX_OBJECT_ID) { eQ3.system.m_id = id + 1; } + else { eQ3.system.m_id = 0; } + + return id; + }, + + /** + * @fn registerObject + * @brief Weist einem Objekt eine Id zu, über die es angesprochen werden kann + */ + registerObject: function(object) + { + var id = eQ3.system.m_getNextFreeId(); + eQ3.system.m_objects[id] = object; + eQ3.system.m_objectCount++; + + return id; + }, + + /** + * @fn unregisterObject + * @brief Gibt eine Objekt-Id frei. + **/ + unregisterObject: function(id) + { + if ( typeof(eQ3.system.m_objects[id]) != "undefined" ) + { + eQ3.system.m_objects[id] = undefined; + eQ3.system.m_objectCount--; + } + }, + + /** + * @fn getObjectById + * @brief liefert ein registriertes Objekt anhand seiner Id. + **/ + getObjectById: function(id) + { + return eQ3.system.m_objects[id]; + } + +}; + +/** + * @fn $o + * @brief Shortcut für eq3.system.getObjectById + **/ +$o = eQ3.system.getObjectById; + + +/** + * Klasse für allgemeine Ereignisse + **/ +eQ3.Event = Class.create({ + + /** + * Konstruktor. Erstellt ein neues Ereignis. + **/ + initialize: function() + { + this.reset(); + }, + + /** + * Fügt einen neuen Event-Listener hinzu. + * Falls ein Listener bereits existiert, wird er kein zweites Mal hinzugefügt. + **/ + add: function(listener) + { + if (!this.m_listeners.ex_contains(listener)) + { + this.m_listeners.push(listener); + } + return this; + }, + + /** + * Entfernt einen Event-Listener. + **/ + remove: function(listener) + { + this.m_listeners = this.m_listeners.without(listener); + return this; + }, + + /** + * Löst das Ereinigs aus + **/ + fire: function(source, event) + { + var listeners = this.m_listeners.clone(); + listeners.each(function(listener) { listener(source, event); }); + return this; + }, + + /** + * Setzt das Ereignis zurück. + * Löscht alle angemeldeten Event-Handler. + **/ + reset: function() + { + this.m_listeners = []; + return this; + } + +}); +/** + * debug.js + **/ + +/** + * Debug-Schnittstelle + **/ +Debug = Singleton.create({ + isEnabled: true, + + /** + * Wirft eine Exception, falls eine Zusicherung nicht + * eingehalten werden kann. + **/ + assert: function(expression, message) + { + if (true !== expression) + { + if (typeof(message) != "undefined") { throw new Error("assertion failed: " + message); } + else { throw new Error("assertions failed"); } + } + } +}); +/** + * jsonrpc.js + * JSON-RPC + * + * JSON-RPC Spezifikation: http://json-rpc.org/wiki/specification + * + * Autor: Falk Werner + **/ + +/** + * Allgemeine JSON-RPC Fehler + **/ +JSONRPC_ERROR = +{ + INVALID_JSON: + { + "result": null, + "error" : {"code": 200, "text": "invalid response"}, + "id" : null + } +}; + +/** + * + **/ +jsonrpc_check = function(response) +{ + if ((null === response) || + ("undefined" == typeof(response["result"])) || + ("undefined" == typeof(response["error"]))) + { + response = JSONRPC_ERROR.INVALID_JSON; + } + + return response; +}; + +/** + * JSON-RPC Aufruf. + * Falls der Parameter callback nicht angegeben ist, handelt es sich um + * einen asynchronen Aufruf. + **/ +jsonrpc = function(url, method, params, callback) +{ + if (typeof(callback) != "undefined") { return jsonrpc_async(url, method, params, callback); } + else { return jsonrpc_sync(url, method, params); } +}; + +/** + * Asynchroner JSON-RPC Aufruf. + **/ +jsonrpc_async = function(url, method, params, callback) +{ + var user_callback = callback; + var xhr = XMLHttpRequest_create(); + + xhr.open("POST", url, true); + xhr.setRequestHeader("Content-Type", "application/json"); + xhr.onreadystatechange = function() + { + if (4 == xhr.readyState) + { + var result = null; + if ((0 === xhr.status) || (200 == xhr.status)) + { + try { result = eval("(" + xhr.responseText + ")"); } + catch (ex) { result = null; } + } + if (user_callback) { user_callback(jsonrpc_check(result)); } + } + }; + xhr.send(Object.toJSON({"version": "1.1", "method": method, "params": params })); + + return true; +}; + +/** + * Sychroner JSON-RPC Aufruf. + **/ +jsonrpc_sync = function(url, method, params) +{ + var result = null; + var xhr = XMLHttpRequest_create(); + + xhr.open("POST", url, false); + xhr.setRequestHeader("Content-Type", "application/json"); + xhr.send(Object.toJSON({"version": "1.1", "method": method, "params": params })); + if ((0 === xhr.status) || (200 == xhr.status)) + { + try { result = eval("(" + xhr.responseText + ")"); } + catch (ex) { result = null; } + } + return jsonrpc_check(result); +}; + +/** + * JSON-RPC Aufruf ohne Rückgabewert. + **/ +jsonrpc_notify = function(url, method, params) +{ + var xhr = XMLHttpRequest_create(); + xhr.open("POST", url, true); + xhr.setRequestHeader("Content-Type", "application/json"); + xhr.send(Object.toJSON({"version": "1.1", "method": method, "params": params})); +}; +function showSecurityDialog() { + + var fileSecHint = "/etc/config/userAckSecurityHint", + result = homematic('CCU.existsFile', {'file': fileSecHint}); + + if(! result) { + + var lang = getLang(); + + var url = "/pages/msg/securityFirstStart_"+lang+".htm"; + + var req = jQuery.ajax({ + url : url +"?sid=" + SessionId, + cache: false, + dataType: "html" + }); + + req.done(function(data) { + //new FirstSecurityDialog(translateKey("thSafetyNote"), translateKey("dialogSecurityFirstStart"), function (action) { + var dlg = new FirstSecurityDialog(translateKey("thSafetyNote"), data, function (action) { + /* + action can be + 0 - user selected NO + 1 - user selected YES + */ + if (action == 1) { + jQuery(".Layer0").show(); + homematic("CCU.setSecurityHint"); + if (getProduct() >= 3) { + WebUI.enter(StartPage); + new InstallWizard(); + } else { + WebUI.enter(StartPage); + } + } + }, "html"); + }); + + req.fail(function(data) { + conInfo("Security not available"); + }); + } +}; + +/** + * drag.js + * Drag & Drop + **/ + +Drag = function(element, event, callback) +{ + + var m_x = (document.all) ? window.event.clientX : event.pageX; + var m_y = (document.all) ? window.event.clientY : event.pageY; + var m_element = element; + var m_callback = callback; + var m_top = m_y - element.offsetTop; + var m_left = m_x - element.offsetLeft; + + /** + * Callback. Wird beim Bewegen der Maus aufgerufen + **/ + var onMouseMove = function(event) + { + m_x = (document.all) ? window.event.clientX : event.pageX; + m_y = (document.all) ? window.event.clientY : event.pageY; + + if (m_element !== null) + { + Element.setStyle(m_element, { + top : (m_y - m_top ) + "px", + left: (m_x - m_left) + "px" + }); + } + }; + + /** + * Callback. Wird beim Loslassen der Maus aufgerufen + **/ + var onMouseUp = function(event) + { + var x = (document.all) ? window.event.clientX : event.pageX; + var y = (document.all) ? window.event.clientY : event.pageY; + + Event.stopObserving(document, "mousemove", onMouseMove); + Event.stopObserving(document, "mouseip", onMouseUp); + + if (m_callback) { m_callback(m_element, x, y); } + }; + + Element.absolutize(m_element); + Element.setStyle(m_element, {marginTop: "0px", marginLeft: "0px"}); // BugFix: relativ positionierte Elemente werden über margin ausgerichtet, absolutize() setzz dies jedoch nicht zurück + Element.observe(document, "mousemove", onMouseMove); + Element.observe(document, "mouseup", onMouseUp); + +}; +/** + * configdata.js + **/ + +/** + * @fileOverview Daten für die Konfgurationsseiten + * @author F. Werner (eQ-3) + **/ + +ConfigData = Singleton.create({ + + initialize: function() + { + this.isPresent = false; + this.showMessage = false; + }, + + check: function(callback) + { + this.callback = callback; + if (this.isPresent === false) + { + this.isPresent = true; + new ConfigDataLoader(callback); + //this.configDataLoader.showMessage(); + //this.showMessage = true; + } + else + { + if (callback) { callback(); } + } + }, + + reload: function(callback) { + //var loader = new ConfigDataLoader(callback); + this.isPresent = false; + this.showMessage = true; + this.configDataLoader = new ConfigDataLoader(callback); + this.configDataLoader.showMessage(); + }, + + handleReloadDone: function() { + //Shall be called in callback function of reload function + this.isPresent = true; + if (this.showMessage) { this.configDataLoader.hideMessage(); } + }, + + + load: function() { + if ((typeof measureLoadingConfigData != "undefined") && (measureLoadingConfigData == true)) {console.log("Start ConfigDataLoader"); console.time(); } + this.configDataLoader = new ConfigDataLoader(function() { + if ((typeof measureLoadingConfigData != "undefined") && (measureLoadingConfigData == true)) {console.timeEnd(); } + conInfo("Config data ready to use"); + jQuery("#PagePath").css('color',"white"); + // With a CCU without devices the elem PagePath isn't available sometimes at this point, + // so the color doesn't change to white. The next line prevents that. + window.setTimeout(function() {jQuery("#PagePath").css('color',"white");},100); + ConfigData.isPresent = true; + if (ConfigData.showMessage) { this.hideMessage(); } + if (ConfigData.callback) { ConfigData.callback(); } + }); + }, + + destroy: function() + { + this.isPresent = false; + } + +}); + +ConfigDataLoader = Class.create({ + + initialize: function(callback) + { + var that = this; + + this.TASKLIST = [ + {name: "WEBUILOADER_DEVICES" , action: function() { DeviceList.reload(that); }}, + {name: "WEBUILOADER_ROOMS" , action: function() { RoomList.reload(that); }}, + {name: "WEBUILOADER_FUNCTIONS", action: function() { SubsectionList.reload(that); }} + ]; + this.m_currentTask = -1; + this.m_callback = callback; + this.ready(); + }, + + showMessage: function() { + var screenWidth = WebUI.getWidth(); + var screenHeight = WebUI.getHeight(); + var frameWidth = ConfigDataLoader.CONTENT_WIDTH; + var frameHeight = ConfigDataLoader.CONTENT_HEIGHT; + var frameX = parseInt((screenWidth - frameWidth ) / 2); + var frameY = parseInt((screenHeight - frameHeight) / 2); + + this.m_layer = document.createElement("div"); + this.m_layer.className = "DialogLayer"; + + this.m_frame = new UI.Frame() + .setTitle(translateKey('infoLoadConfigData')) + .setContentSize(frameWidth, frameHeight) + .setPosition(frameX, frameY) + .add(new UI.Text() + .setPosition(10, 10) + .setWidth(frameWidth - 10) + //.setHtml(ConfigDataLoader.CONTENT) + .setHtml("" + translateKey('infoLoadConfigDataPlsWait')) + ); + + this.m_layer.appendChild(this.m_frame.getElement()); + Layer.add(this.m_layer); + }, + + hideMessage: function() { + this.m_frame.dispose(); + Layer.remove(this.m_layer); + }, + + ready: function() + { + this.m_currentTask++; + if (this.m_currentTask < this.TASKLIST.length) + { + this.TASKLIST[this.m_currentTask].action(); + } + else + { + if (this.m_callback) { this.m_callback(); } + } + }, + + reportLoadingState: function(state) + { + var width = parseInt((this.m_currentTask + state) * 100); + //this.m_frame.setTitle(ConfigDataLoader.TITLE + " (" + width + "%)"); + this.m_frame.setTitle(translateKey('infoLoadConfigData') + " (" + width + "%)"); + } + +}); + +ConfigDataLoader.CONTENT_WIDTH = 320; +ConfigDataLoader.CONTENT_HEIGHT = 60; +ConfigDataLoader.TITLE = translateKey('infoLoadConfigData'); +ConfigDataLoader.CONTENT = "" + translateKey('infoLoadConfigDataPlsWait'); +/** + * webui.js + * Allgemeine Funktionen der Web-Oberfläche. + **/ + +WebUI = Singleton.create({ + HEADER_HEIGHT: 72, // Höhe der Kopfzeile + MENUBAR_HEIGHT: 34, // Höhe der Navigationsleiste + FOOTER_HEIGHT: 47, // Höhe der Fußleiste + BOTTOM_HEIGHT: 27, // Höhe des weißen Bereichs unter der Seite + MIN_WIDTH: 750, + MIN_HEIGHT: 400, + + serviceMessageCount: 0, + + initialize: function() + { + this.STATIC_HEIGHT = this.HEADER_HEIGHT + this.MENUBAR_HEIGHT + this.FOOTER_HEIGHT + this.BOTTOM_HEIGHT; + + this.currentPage = null; // Aktuelle Seite + this.currentPageOptions = null; // Argumente der aktuellen Seite + this.previousPage = null; // Vorherige Seite + this.previousPageOptions = null; // Argumente der vorherigen Seite + }, + + /*########################*/ + /*# Öffentliche Elemente #*/ + /*########################*/ + + start: function() + { + + var isFF = navigator.userAgent.indexOf("Firefox") !== -1; + + if (! ConfigData.isPresent) { + ConfigData.load(); + } else { + window.setTimeout(function() { + jQuery("#PagePath").text(translateKey('startPage')).css('color',"white"); + jQuery("#footer table tbody tr").html(""); + }, 100); + } + this.USERNAME = jQuery.trim(homematic('User.getUserFirstName', {'userID': userId})); + + if ((this.USERNAME == "") || (typeof this.USERNAME == "undefined")) { + this.USERNAME = jQuery.trim(homematic('User.getUserName', {'userID': userId})); + } + + this.USERLANGUAGE = homematic('User.getLanguage', {'userID': userId}); + this.HIDESTICKYUNREACH = (homematic("CCU.getStickyUnreachState", {}) == 0 ) ? false : true ; + userIsNoExpert = homematic('User.isNoExpert', {"id": userId}); + + // Refresher starten + iseRefrCycle = 3; + conInfo("Refreshing started."); + if (((typeof preventInterfaceCheck == "undefined") || (! preventInterfaceCheck)) && (PLATFORM == 'Central')) {new iseRefresher(iseRefrCycle);} + iseRefrTimer = 0; + checkDutyCycleInterval = 60; + + var bodyElem = $("body"); + + if (!isFF) { + bodyElem.innerHTML = ""; + } + // Dummy-Element + var dummyElement = document.createElement("div"); + dummyElement.id = "dummy"; + Element.setStyle(dummyElement, {display:"none"}); + bodyElem.appendChild(dummyElement); + + // Globale Werte (SessionId) + var globalValues = document.createElement("div"); + globalValues.id = "global_values"; + Element.setStyle(globalValues, {display: "none", visibility: "hidden"}); + var globalValuesForm = document.createElement("form"); + globalValuesForm.action = "#"; + var globalValuesSid = document.createElement("global_sid"); + globalValuesSid.id = "global_sid"; + globalValuesSid.type = "hidden"; + globalValuesSid.name = "sid"; + globalValuesSid.value = SessionId; + globalValuesForm.appendChild(globalValuesSid); + globalValues.appendChild(globalValuesForm); + bodyElem.appendChild(globalValues); + + // picDiv: Vergrößerte Bild von HomeMatic Geräten und Kanälen + var picDiv = document.createElement("div"); + picDiv.id = "picDiv"; + Element.setStyle(picDiv, { + position: "absolute", + left: "0px", + top: "0px", + width: "250px", + height: "250px", + zIndex: "9999", + visibility: "hidden", + margin: "0", + padding: "0", + backgroundColor: WebUI.getColor("white") + }); + bodyElem.appendChild(picDiv); + jg_250 = new jsGraphics("picDiv"); + InitGD(jg_250, 250); + + // Elemente für Popup-Fenster der ersten Ebene + var trLayer = document.createElement("div"); + trLayer.id = "trlayer"; + Element.setStyle(trLayer, { + position: "absolute", + top: "0", + left: "0", + width: "100%", + height: "100%", + zIndex: "149", // 259 + backgroundImage: "url('/ise/img/tr50.gif')", + display: "none" + }); + bodyElem.appendChild(trLayer); + + var centerBox = document.createElement("div"); + centerBox.id = "centerbox"; + Element.setStyle(centerBox, { + position: "absolute", + zIndex: "159", // 299 + width: "100%", + top: "50%", + display: "none" + }); + bodyElem.appendChild(centerBox); + + var progressBox = document.createElement("div"); + progressBox.id = "progressbox"; + Element.setStyle(progressBox, { + position: "absolute", + zIndex: "159", // 299 + width: "100%", + top: "50%", + display: "none" + }); + bodyElem.appendChild(progressBox); + + // Elemente für Popup-Fenster der zweiten Ebene + var trLayer2 = document.createElement("div"); + trLayer2.id = "trlayer2"; + Element.setStyle(trLayer2, { + position: "absolute", + top: "0", + left: "0", + width: "100%", + height: "100%", + backgroundImage: "url('/ise/img/tr50.gif')", + display: "none" + }); + bodyElem.appendChild(trLayer2); + + var centerBox2 = document.createElement("div"); + centerBox2.id = "centerbox2"; + Element.setStyle(centerBox2, { + position: "absolute", + zIndex: "299", + width: "100%", + top: "50%", + display: "none" + }); + bodyElem.appendChild(centerBox2); + + // Elemente für den Seiteninhalt + Layer.init(); + var layer0 = document.createElement("div"); + Element.addClassName(layer0, "Layer0"); + Layer.add(layer0); + + var header = document.createElement("div"); + header.id = "header"; + header.lang = this.USERLANGUAGE; + layer0.appendChild(header); + + var menuBar = document.createElement("div"); + menuBar.id = "menubar"; + layer0.appendChild(menuBar); + + var content = document.createElement("div"); + content.id = "content"; + content.tabIndex = 1; + Element.setStyle(content, {cursor: "wait"}); + layer0.appendChild(content); + + var footer = document.createElement("div"); + footer.id = "footer"; + layer0.appendChild(footer); + + // Weitere Elemente + var popupContainer = document.createElement("div"); + popupContainer.id = "popup_container"; + Element.setStyle(popupContainer, {display: "none"}); + bodyElem.appendChild(popupContainer); + + var canvas = document.createElement("div"); + canvas.id = "canvas"; + Element.setStyle(canvas, {display: "none"}); + bodyElem.appendChild(canvas); + + + jQuery(".Layer0").hide(); + HeaderBar.load(); + + if (!forceUpdate) { + jQuery("#AlarmServiceMsg").show(); + MainMenu.create($("menubar")); + } + + // MainMenu.show(); + // mainMenu = createMainMenu($("menubar")); + $("content").style.cursor = "default"; + + + var fileSecHint = "/etc/config/userAckSecurityHint", + result = homematic('CCU.existsFile', {'file': fileSecHint}), + securityDialogDisplayed = false; + + + + if (result) { + if (!isFF) { + jQuery(".Layer0").show(); + WebUI.enter(StartPage); + } else { + WebUI.enter(StartPage); + jQuery(".Layer0").fadeIn(1000, function() {jQuery("#webuiloader_wrapper").remove();}); + } + + } else { + showSecurityDialog(); + securityDialogDisplayed = true; + } + if (PLATFORM == 'Central') { + if ((typeof preventInterfaceCheck == "undefined") || (! preventInterfaceCheck)) + { + regaMonitor = new ReGaMonitor(); + InterfaceMonitor.start(); + } + homematic.com.init(); + + // Initialize the clickhandler of the duty cycle element + window.setTimeout(function () { + showDutyCycle(); + }, 1); + + // Check the dutyCycle and carrierSense periodically + new PeriodicalExecuter(function () { + showDutyCycle(); + }, checkDutyCycleInterval); + + if (getProduct() >= 3) { + + /* See SPHM-566 + if (!homematic('CCU.existsFile', {'file': LegacyAPIMigrationDialog.CONFIRM_FILE})) { + + // Get the number of HmIP devices without the HmIP-RCV-50 + var countHmIPDevices = 0; + homematic("Interface.listDevices", {"interface": "HmIP-RF"}, function (deviceList) { + if (deviceList) { + for (var i = 0; i < deviceList.length; i++) { + var device = deviceList[i]; + if (device.children.length > 0 && (device.type != "HmIP-RCV-50")) { + countHmIPDevices++; + } + } + + // When the number of HmIP devices is > 0 (this is not the case with a factory new CCU) then show the HmIP-RCV-50 migration hint. + if (countHmIPDevices > 0) { + MessageBox.show(translateKey("dialogMigrationRCV50Title"), translateKey("dialogMigrationRCV50"), function () { + homematic("CCU.createFile", {'file': LegacyAPIMigrationDialog.CONFIRM_FILE}, function (result) { + conInfo("createFile " + LegacyAPIMigrationDialog.CONFIRM_FILE + " - result: " + result); + }); + }, 600, 200); + } else { + homematic("CCU.createFile", {'file': LegacyAPIMigrationDialog.CONFIRM_FILE}, function (result) { + conInfo("createFile " + LegacyAPIMigrationDialog.CONFIRM_FILE + " - result: " + result); + }); + } + } + }); + } + */ + + var usrName = userName.replace(/[ \/\xC4\xD6\xDC\xE4\xF6\xFC\xDF]/g, function(m) { + return { + ' ': ';', + '/': '', + '\xC4': 'AE', + '\xD6': 'OE', + '\xDC': 'UE', + '\xE4': 'ae', + '\xF6': 'oe', + '\xFC': 'ue', + '\xDF': 'ss' + }[m]; + }); + + var usrPwd = homematic('User.hasUserPWD', {'userID': userId}); + if (usrPwd == false) { + var result = homematic('CCU.existsFile', {'file': "/etc/config/userprofiles/userAckInstallWizard_" + usrName}); + if (!result) { + var checkUpdateContentRunning = window.setInterval(function () { + if (!bUpdateContentRunning) { + clearInterval(checkUpdateContentRunning); + new InstallWizard(getUPL()); + } + }, 100); + } else if (!homematic('CCU.existsFile', {'file': "/etc/config/firewallConfigured"})) { + new DialogChooseSecuritySettings(true); + } + } else { + // Admin password set + // Firewall settings not yet set (default) + if ((getUPL() == UPL_ADMIN) && (!homematic('CCU.existsFile', {'file': "/etc/config/firewallConfigured"}))) { + new DialogChooseSecuritySettings(true); + } + + // User password set + // The User will see a hint that new firewall settings are active + if ((getUPL() == UPL_USER) && (!homematic('CCU.existsFile', {'file': "/etc/config/userprofiles/userAckInstallWizard_" + usrName}))) { + new MessageBox.show(translateKey("dglUserNewFwSettingsTitle"), translateKey("dglUserNewFwSettingsContent")); + homematic("CCU.setUserAckInstallWizard", {'userName': usrName}); + } + + // open the systemLanguage config dialog if no systemLanguage was selected yet + if (homematic('CCU.getSystemLanguage') === 'none') { + CreatePopup(ID_SYSTEM_LANGUAGE_CONFIG); + } + } + } + } else { + WebUI.serviceMessageCount = setServiceMessage(); + new PeriodicalExecuter(function () { + var newServiceMessageCount = setServiceMessage(); + if ((newServiceMessageCount != WebUI.serviceMessageCount) && (WebUI.currentPage == ServiceMessagesPage)) { + WebUI.serviceMessageCount = newServiceMessageCount; + WebUI.reload(); + } + }, 5); + } + }, + + /** + * Read-Only. Breite des Browserfensters (Pixel). + */ + getWidth: function() + { + var width = 0; + + if (window.innerWidth) + { + width = window.innerWidth; + } + else if ((window.document.documentElement) && + (window.document.documentElement.clientWidth)) + { + width = window.document.documentElement.clientWidth; + } + else + { + width = window.document.body.offsetWidth; + } + + return width; + }, + + /** + * Read-Only. Höhe des Browserfensters (Pixel). + */ + getHeight: function() + { + var height = 0; + + if (window.innerHeight) + { + height = window.innerHeight; + } + else if ((window.document.documentElement) && + (window.document.documentElement.clientHeight)) + { + height = window.document.documentElement.clientHeight; + } + else + { + height = window.document.body.offsetHeight; + } + + return height; + }, + + setContent: function(contentElement) + { + var contentBody = $("content"); + if (contentBody) + { + contentBody.innerHTML = ""; + contentBody.appendChild(contentElement); + } + else + { + throw new Error("content not defined"); + } + }, + + /** + * Lädt eine Seite. + */ + enter: function(page, options) + { + Debug.assert(Interface.isImplemented(page, IPage), "WebUI.enter: Interface IPage not implemented"); + + if (this.currentPage) { this.currentPage.leave(); } + + this.previousPage = this.currentPage; + this.previousPageOptions = this.currentPageOptions; + this.currentPage = page; + this.currentPageOptions = options; + + this.currentPage.enter(options); + window.name = 'ccu-main-window'; + window.setTimeout(() => { + if(jQuery(':focus').length === 0) { + jQuery('#content')[0].focus(); + } + }, 200); + }, + + reload: function() + { + if (this.currentPage) + { + this.currentPage.leave(); + this.currentPage.enter(this.currentPageOptions); + } + }, + + /** + * Zurück zur vorherigen Seite. + */ + goBack: function() + { + if (null !== this.previousPage) { this.enter(this.previousPage, this.previousPageOptions); } + }, + + /** + * @var m_isColorMapLoaded + * @brief [intern] Gibt an, ob die Farbtabelle bereits geladen ist + **/ + m_isColorMapLoaded: false, + + /** + * @var m_colorMap + * @brief [intern] Farbtabelle + **/ + m_colorMap: {}, + + /** + * @fn getColor + * @brief Liefert den Wert einer Systemfarbe anhand ihrer Id. + * + * @param colorId [string] Id des Systemfarbe + * @return [string] Farbwert + **/ + getColor: function(colorId) + { + if (false == this.m_isColorMapLoaded) + { + this.m_loadColorMap(); + } + + var color = this.m_colorMap[colorId]; + + if (typeof(color) != "string") + { + throw new Error("WebUI.getColor: unknown color id (" + colorId + ")"); + } + + return color; + }, + + /** + * @fn m_loadColorMap + * @brief [intern] Lädt die Farbtabelle + **/ + m_loadColorMap: function() + { + this.m_colorMap = homematic("WebUI.getColors"); + this.m_isColorMapLoaded = true; + } + +}); +/** + * @file controlbtn.js + * @brief ControlBtn + **/ + +ControlBtn = { + + CLASSNAME_ON : "ControlBtnOn", //< CSS-Klasse "aktiv" + CLASSNAME_OFF: "ControlBtnOff", //< CSS-Klasse "inaktiv" + CLASSNAME_PUSHED: "ControlBtnPushed", //< CSS-Klasse "gedrückt" + + /** + * Entfernt alle ControlBtn-Klassenamen von dem Element + **/ + removeClassNames: function(element) + { + if (element) + { + $(element).removeClassName(this.CLASSNAME_ON); + $(element).removeClassName(this.CLASSNAME_OFF); + $(element).removeClassName(this.CLASSNAME_PUSHED); + } + }, + + /** + * Zeigt das Element als aktiven ControlBtn an + **/ + on: function(element) + { + if (element) + { + this.removeClassNames(element); + $(element).addClassName(this.CLASSNAME_ON); + } + }, + + /** + * Zeigt das Element als inaktiven ControlBrn an + **/ + off: function(element) + { + if (element) + { + this.removeClassNames(element); + $(element).addClassName(this.CLASSNAME_OFF); + } + }, + + /** + * Zeigt das Element als gedrückten ControlBtn an + **/ + pushed: function(element) + { + if (element) + { + this.removeClassNames(element); + $(element).addClassName(this.CLASSNAME_PUSHED); + } + } + +}; + +// ControlBtn for JQuery generated Ids +JControlBtn = { + CLASSNAME_ON : "ControlBtnOn", //< CSS-Klasse "aktiv" + CLASSNAME_OFF: "ControlBtnOff", //< CSS-Klasse "inaktiv" + CLASSNAME_PUSHED: "ControlBtnPushed", //< CSS-Klasse "gedrückt" + + /** + * Entfernt alle ControlBtn-Klassenamen von dem Element + **/ + removeClass: function(element) + { + if (element) + { + element.removeClass(this.CLASSNAME_ON); + element.removeClass(this.CLASSNAME_OFF); + element.removeClass(this.CLASSNAME_PUSHED); + } + }, + + /** + * Zeigt das Element als aktiven ControlBtn an + **/ + on: function(element) + { + if (element) + { + this.removeClass(element); + element.addClass(this.CLASSNAME_ON); + } + }, + + /** + * Zeigt das Element als inaktiven ControlBrn an + **/ + off: function(element) + { + if (element) + { + this.removeClass(element); + element.addClass(this.CLASSNAME_OFF); + } + }, + + /** + * Zeigt das Element als gedrückten ControlBtn an + **/ + pushed: function(element) + { + if (element) + { + this.removeClass(element); + element.addClass(this.CLASSNAME_PUSHED); + } + }, + + /** + * Zeigt das Element kurz gedrückt an und geht dann wieder in den inaktiven Zustand + */ + pressed: function(element) + { + var self = this; + if (element) + { + this.on(element); + window.setTimeout(function() {self.off(element);}, 250); + } + } +};/** + * @file cursor.js + * @brief Zugriff auf den Cursor + **/ + +/** + * Cursor-Objekt + **/ +Cursor = { + + NORMAL: "auto", //< normaler Cursor + WAIT : "wait", //< Sanduhr + + /** + * Setzt den Cursor-Typ. + * @param cursorType Cursor-Typ + **/ + set: function( cursorType) + { + document.body.style.cursor = cursorType; + } + +}; + +const isValidRegex = function(possiblyValidRegex) +{ + try + { + const r = new RegExp(possiblyValidRegex); + } + catch(err) + { + return false; + } + + return true; +} + +/** + * stringfilter.js + **/ + +/** + * Konstrukor. Filter für Zeichenketten + **/ +StringFilter = function(name, callback) +{ + /*####################*/ + /*# Private Elemente #*/ + /*####################*/ + + + var m_name = name; + var m_callback = callback; + + var m_id = name.replace(/\,/g, "_"); + var m_value = localStorage.getItem(m_id) || ""; + var m_textId = m_id + "Text"; + + var isSet = function() + { + return (m_value !== ""); + }; + + /*########################*/ + /*# Öffentliche Elemente #*/ + /*########################*/ + + /** + * Liefert den HTML-Code des Filters + **/ + this.getHTML = function(colspan) + { + var _colspan_ = colspan; + if (typeof(_colspan_) == "undefined") { _colspan_ = 1; } + + return StringFilter.TEMPLATE.process({ + colspan: _colspan_, + name : m_name, + id : m_id, + textId : m_textId, + isSet : isSet(), + value : m_value + }); + }; + + /** + * Zeigt den Filter an. + **/ + this.show = function() + { + var filterElement = $(m_id); + var textElement = $(m_textId); + + if ((typeof oFilterStorage != "undefined")) { + if (oFilterStorage[m_name] && oFilterStorage[m_name] != null) { + textElement.value = oFilterStorage[name]; + } + } else { + oFilterStorage = {}; + } + + if (typeof oTimerStorage == "undefined") { + oTimerStorage = {}; + } + + if ((filterElement) && (textElement)) + { + filterElement.show(); + textElement.focus(); + } + }; + + /** + * Prüft, ob der Filter auf einen Text zutrifft + **/ + this.match = function(text) + { + if (false === isSet()) { return true; } + + var patternList = m_value.toLowerCase().split("|"); + //var patternList = m_value.split("|"); + text = text.toLowerCase(); + + let searchString = m_value.toLowerCase(); + if(isValidRegex(searchString)) + { + var r = new RegExp(searchString); + if (r.test(text) === true) { return true; } + + return false; + } + else + { + for (var i = 0, len = patternList.length; i < len; i++) + { + if (0 <= text.indexOf(patternList[i])) { return true; } + } + + return false; + } + }; + + /** + * Schließt den Filter und ruft dei Callback-Funktion auf + **/ + this.set = function() + { + if ($(m_textId)) { + var storageTime = 300000; // 5 Minutes + m_value = $(m_textId).value; + // Store the search term for 5 Minutes + // After that, check if another search term exists. + if (typeof oFilterStorage != "undefined") { + if (oFilterStorage[m_name] != m_value) { + oFilterStorage[m_name] = m_value; + if (oTimerStorage[m_name]) { + clearTimeout(oTimerStorage[m_name]); + } + oTimerStorage[m_name] = window.setTimeout(function() { + oFilterStorage[m_name] = null; + },storageTime); + } else { + // Restart the timer + clearTimeout(oTimerStorage[m_name]); + oTimerStorage[m_name] = window.setTimeout(function() { + oFilterStorage[m_name] = null; + },storageTime); + } + } + } + if ($(m_id)) { $(m_id).hide(); } + localStorage.setItem(m_id, $(m_textId).value); + if (m_callback) { m_callback(); } + }; + + /** + * Schließt den Filter ohne Änderungen zu übernehmen + **/ + this.close = function() + { + if ($(m_textId)) { $(m_textId).value = m_value; } + if ($(m_id)) { $(m_id).hide(); } + }; + + /** + * Setzt den Filter zurück + **/ + this.reset = function() + { + m_value = ""; + localStorage.removeItem(m_id); + this.close(); + }; + + /** + * Prüft, ob Enter oder ESC gedrückt wurde und schließt den Filter entsprechend + */ + this.checkEnterEsc = function(key) + { + switch (key) { + case 13: + this.set(); + break; + case 27: + this.close(); + break; + } + }; + + /*###################*/ + /*# Initialisierung #*/ + /*###################*/ + + +}; + +StringFilter.TEMPLATE = TrimPath.parseTemplate(STRINGFILTER_JST); +/** + * listfilter.js + **/ + +/** + * Konstruktor. ListFilter + **/ +ListFilter = Class.create({ + + /** + * Konstruktor + **/ + initialize: function(name, list, callback) + { + this.name = name; + this.list = list.clone(); + this.callback = callback; + this.id = name.replace(/\./g, "_"); + this.formId = this.id + "Form"; + var self = this; + function fltrHandler() { + self.restoreFilters(); + eQ3.HomeMatic.Event.unsubscribe('DeviceListPageLoaded', fltrHandler); + } + eQ3.HomeMatic.Event.subscribe('DeviceListPageLoaded', fltrHandler); + }, + + restoreFilters: function() { + var filterValues = localStorage.getItem(this.id); + if(filterValues) { + try { + filterValues = JSON.parse(filterValues); + var values = $(this.formId).values; + for (var i = 0, len = values.length; i < len; i++) { + if(filterValues.indexOf(values[i].value) !== -1) { + values[i].checked = true; + } + } + this.set(); + } catch(e) { console.log(e); } + } + }, + + /** + * Prüft, ob der Filter aktiv ist + **/ + isSet: function() + { + for (var i = 0, len = this.list.length; i < len; i++) + { + if (true === this.list[i]._selected) { return true; } + } + return false; + }, + + /** + * Wählt ein Listenelement aus + **/ + select: function(id, selected) + { + for (var i = 0, len = this.list.length; i < len; i++) + { + if (id == this.list[i].id) + { + this.list[i]._selected = selected; + break; + } + } + }, + + /** + * Prüft, ob ein Listenelement ausgewählt ist + **/ + isSelected: function(id) + { + for (var i = 0, len = this.list.length; i < len; i++) + { + if (id == this.list[i].id) { return this.list._selected; } + } + return false; + }, + + /** + * Liefert den HTML-Code des Filters + **/ + getHTML: function() + { + return ListFilter.TEMPLATE.process({ + list : this.list, + isSet : this.isSet(), + name : this.name, + id : this.id, + formId: this.formId + }); + }, + + matchString: function(str) + { + if (false === this.isSet()) { return true; } + + for (var i = 0, len = this.list.length; i < len; i++) + { + if (true === this.list[i]._selected) + { + if (this.list[i].name == str) { return true; } + } + } + return false; + }, + + matchStringArray: function(list) + { + if (false === this.isSet()) { return true; } + + for (var i = 0, len = this.list.length; i < len; i++) + { + if (true === this.list[i]._selected) + { + var name = this.list[i].name; + if (0 <= list.indexOf(name)) { return true; } + } + } + return false; + }, + + matchArray: function(list) + { + if (false === this.isSet()) { return true; } + + for (var i = 0, len = this.list.length; i < len; i++) + { + if (true === this.list[i]._selected) + { + var id = this.list[i].id; + for (var j = 0; j < list.length; j++) + { + if (list[j].id == id) { return true; } + } + } + } + return false; + }, + + /** + * Schließt den Filter und ruft die Callback-Funktion auf + **/ + set: function() + { + if ($(this.formId)) + { + var values = $(this.formId).values; + var filterValues = []; + + for (var i = 0, len = values.length; i < len; i++) + { + this.select(values[i].value, values[i].checked); + if(values[i].checked) filterValues.push(values[i].value); + } + + if ($(this.id)) { + $(this.id).hide(); + try {jQuery("#"+ this.id).draggable("destroy");} catch (e) {} + } + // JSON.stringify encodes an array twice??? + localStorage.setItem(this.id, JSON.parse(JSON.stringify(filterValues))); + if (this.callback) { this.callback(); } + } + }, + + /** + * Schließt den Filter ohne Änderungen zu übernhemen + **/ + close: function() + { + if ($(this.formId)) + { + var values = $(this.formId).values; + + for (var i = 0, len = values.length; i < len; i++) + { + values[i].checked = this.isSelected(values[i].value); + } + } + + if ($(this.id)) { + $(this.id).hide(); + //try {jQuery("#"+ this.id).draggable("destroy");} catch (e) {} + } + //try {if (this.callback) { this.callback(); } } catch (e) {}; + }, + + /** + * Setzt den Filter zurück + **/ + reset: function() + { + for (var i = 0, len = this.list.length; i < len; i++) + { + this.list[i]._selected = false; + } + + localStorage.removeItem(this.id); + this.close(); + } + +}); + +ListFilter.TEMPLATE = TrimPath.parseTemplate(LISTFILTER_JST); +/** + * ui.js + **/ + +/** + * Namensraum für UI-Komponenten + **/ +UI = { }; + +/** + * Basisklasse für UI-Komponenten + **/ +UI.Component = Class.create({ + + /** + * Konstruktor. Erstellt eine UI-Komponente + **/ + initialize: function() + { + this.m_isEnabled = true; + this.m_element = document.createElement("div"); + }, + + /** + * Liefert das DOM-Element der Komponente + **/ + getElement: function() + { + return this.m_element; + }, + + setName: function(name) + { + this.m_element.name = name; + return this; + }, + + /** + * Setzt die Breite der Komponente in Pixeln + **/ + setWidth: function(width) + { + Element.setStyle(this.m_element, { + width: parseInt(width) + "px" + }); + return this; + }, + + /** + * Setzt die Höhe der Komponente in Pixeln + **/ + setHeight: function(height) + { + Element.setStyle(this.m_element, { + height: parseInt(height) + "px" + }); + return this; + }, + + /** + * Setzt die Position der Komponente + **/ + setPosition: function(x, y) + { + Element.setStyle(this.m_element, { + top : parseInt(y) + "px", + left: parseInt(x) + "px" + }); + return this; + }, + + /** + * Ermittelt, ob die Komponente aktiv ist + **/ + isEnabled: function() + { + return this.m_isEnabled; + }, + + /** + * Aktiviert bzw. Deaktiviert die Komponente. + **/ + setIsEnabled: function(isEnabled) + { + if (isEnabled) { this.enable(); } + else { this.disable(); } + + return this; + }, + + /** + * Setzt die Komponente auf aktiv. + **/ + enable: function() + { + if (this.m_overlay) { Element.remove(this.m_overlay); } + this.m_overlay = null; + this.m_isEnabled = true; + return this; + }, + + /** + * Setzt die Komponente auf inaktiv. + **/ + disable: function() + { + if (!this.m_overlay) + { + this.m_overlay = document.createElement("div"); + this.m_overlay.className = "UIDisabled"; + this.m_element.appendChild(this.m_overlay); + } + this.m_isEnabled = false; + return this; + }, + + /** + * Entfernt die Komponente + **/ + dispose: function() + { + Element.remove(this.m_element); + return this; + } + +}); + +UI.InputComponent = Class.create(UI.Component, { + + initialize: function() + { + this.m_isEnabled = true; + this.m_element = document.createElement("div"); + }, + + enable: function() + { + if (this.m_isEnabled === false) + { + this.m_element.disabled = false; + this.m_element.readonly = true; + this.m_isEnabled = true; + } + return this; + }, + + disable: function() + { + if (this.m_isEnabled === true) + { + this.m_element.disabled = true; + this.m_element.readonly = false; + this.m_isEnabled = false; + } + return this; + } + +}); + +/** + * Basisklasse für UI-Container + **/ +UI.Container = Class.create(UI.Component, { + + /** + * Erstellt einen UI-Container + **/ + initialize: function() + { + this.m_isEnabled = true; + this.m_element = document.createElement("div"); + this.m_content = m_element; + }, + + /** + * Fügt dem Container eine neue Komponente hinzu + **/ + add: function(component) + { + this.m_components.push(component); + this.m_content.appendChild(component.getElement()); + return this; + }, + + /** + * Entfernt eine Komponente aus dem Container + **/ + remove: function(component) + { + this.m_components = this.m_components.without(component); + component.dispose(); + return this; + }, + + /** + * Entfernt den Container und alle seine Komponenten + **/ + dispose: function() + { + var components = this.m_components; + components.each(function(component) { + this.remove(component); + }, this); + Element.remove(this.m_element); + return this; + } + +}); +/** + * frame.js + **/ + +/** + * Rahmen für Dialog-Fenster + **/ +UI.Frame = Class.create(UI.Container, { + + initialize: function() + { + var _this_ = this; + + this.m_isEnabled = true; + this.m_components = []; + + this.m_contentWidth = UI.Frame.DEFAULT_CONTENT_WIDTH; + this.m_contentHeight = UI.Frame.DEFAULT_CONTENT_HEIGHT; + + this.m_element = document.createElement("div"); + this.m_element.className = UI.Frame.CLASS_NAME; + + this.m_title = document.createElement("div"); + this.m_title.className = UI.Frame.TITLE_CLASS; + this.m_title.appendChild(document.createTextNode(UI.Frame.DEFAULT_TITLE)); + Event.observe(this.m_title, "mousedown", function(event) { + new Drag(_this_.m_element, event); + }); + this.m_element.appendChild(this.m_title); + + this.m_content = document.createElement("div"); + this.m_content.className = UI.Frame.CONTENT_CLASS; + this.m_element.appendChild(this.m_content); + + this.m_resize(); + }, + + /** + * Aktualisiert die Abmessungen des Frames + **/ + m_resize: function() + { + this.m_width = this.m_contentWidth + (2 * UI.Frame.BORDER_SIZE); + this.m_height = this.m_contentHeight + (3 * UI.Frame.BORDER_SIZE) + UI.Frame.TITLE_HEIGHT; + + Element.setStyle(this.m_element, { + width : this.m_width + "px", + height: this.m_height + "px" + }); + Element.setStyle(this.m_title, { + top : UI.Frame.BORDER_SIZE + "px", + left : UI.Frame.BORDER_SIZE + "px", + width : this.m_contentWidth + "px", + height: UI.Frame.TITLE_HEIGHT + "px", + lineHeight: UI.Frame.TITLE_HEIGHT + "px" + }); + Element.setStyle(this.m_content, { + top : ((2 * UI.Frame.BORDER_SIZE) + UI.Frame.TITLE_HEIGHT) + "px", + left : UI.Frame.BORDER_SIZE + "px", + width : this.m_contentWidth + "px", + height: this.m_contentHeight + "px" + }); + + return this; + }, + + /** + * Setzt die Höhe und Breite des Content-Bereichs. + **/ + setContentSize: function(contentWidth, contentHeight) + { + this.m_contentWidth = parseInt(contentWidth); + this.m_contentHeight = parseInt(contentHeight); + + this.m_resize(); + return this; + }, + + /** + * Liefert die Breite des Content-Bereichs in Pixeln + **/ + getContentWidth: function() + { + return this.m_contentWidth; + }, + + /** + * Liefert die Höhe des Content-Bereichs in Pixeln + **/ + getContentHeight: function() + { + return this.m_contentHeight; + }, + + /** + * Liefert die Gesamtbreite des Frames in Pixlen + **/ + getWidth: function() + { + return this.m_width; + }, + + /** + * Liefert die Gesamthöhe des Frames in Pixeln + **/ + getHeight: function() + { + return this.m_height; + }, + + /** + * Setzt den Titel + **/ + setTitle: function(title) + { + this.m_title.innerHTML = ""; + this.m_title.appendChild(document.createTextNode(title)); + return this; + }, + + _enable: function() + { + this.m_isEnabled = true; + Element.removeClassName(this.m_element, UI.Frame.CLASS_NAME_DISABLED); + Element.removeClassName(this.m_title, UI.Frame.TITLE_CLASS_DISABLED); + Element.removeClassName(this.m_content, UI.Frame.CONTENT_CLASS_DISABLED); + return this; + }, + + _disable: function() + { + this.m_isEnabled = false; + Element.addClassName(this.m_element, UI.Frame.CLASS_NAME_DISABLED); + Element.addClassName(this.m_title, UI.Frame.TITLE_CLASS_DISABLED); + Element.addClassName(this.m_content, UI.Frame.CONTENT_CLASS_DISABLED); + return this; + } + +}); + +/** + * Konstanten + **/ +UI.Frame.DEFAULT_CONTENT_WIDTH = 320; +UI.Frame.DEFAULT_CONTENT_HEIGHT = 240; +UI.Frame.DEFAULT_TITLE = "UI.Frame"; +UI.Frame.TITLE_HEIGHT = 20; +UI.Frame.BORDER_SIZE = 2; +UI.Frame.CLASS_NAME = "UIFrame"; +UI.Frame.TITLE_CLASS = "UIFrameTitle"; +UI.Frame.CONTENT_CLASS = "UIFrameContent"; +UI.Frame.CLASS_NAME_DISABLED = "UIFrameDisabled"; +UI.Frame.TITLE_CLASS_DISABLED = "UIFrameTitleDisabled"; +UI.Frame.CONTENT_CLASS_DISABLED = "UIFrameContentDisabled"; +/** + * label.js + **/ + +/** + * Einzeliges Textfeld + **/ +UI.Label = Class.create(UI.Component, { + + /** + * Konstruktor. Erstellt ein einzeiliges Textfeld. + **/ + initialize: function() + { + this.m_isEnabled = true; + + this.m_element = document.createElement("div"); + this.m_element.className = UI.Label.CLASS_NAME; + this.m_element.appendChild(document.createTextNode(UI.Label.DEFAULT_TEXT)); + }, + + /** + * Setzt den Text des Labels + **/ + setText: function(text) + { + this.m_element.innerHTML = ""; + this.m_element.appendChild(document.createTextNode(text)); + return this; + }, + + /** + * Setzt die Breite des Labels. + * Neben numerischen Angaben ist auch der Wert "auto" erlaubt. + **/ + setWidth: function(width) + { + if (width != "auto") { width = parseInt(width) + "px"; } + Element.setStyle(this.m_element, { width: width }); + return this; + }, + + /** + * Setzt die Höhe des Labels. + * Neben numerischen Angaben ist auch der Wert "auto" erlaubt. + * Es wird immer auch die Zeilenhöhe gesetzt! + **/ + setHeight: function(height) + { + var lineHeight = "100%"; + if (height != "auto") + { + height = parseInt(height) + "px"; + lineHeight = height; + } + + Element.setStyle(this.m_element, { + height : height, + lineHeight: lineHeight}); + return this; + } + +}); + +/** + * Konstanten + **/ +UI.Label.CLASS_NAME = "UILabel"; +UI.Label.DEFAULT_TEXT = "UI.Label"; +/** + * ui.text.js + **/ + +UI.Text = Class.create(UI.Component, { + + /** + * Konstruktor. Erzeugt ein neues Textfeld. + **/ + initialize: function() + { + this.m_isEnabled = true; + + this.m_text = document.createElement("span"); + this.m_text.appendChild(document.createTextNode(UI.Text.DEFAULT_TEXT)); + + this.m_element = document.createElement("div"); + this.m_element.className = UI.Text.CLASS_NAME; + this.m_element.appendChild(this.m_text); + }, + + /** + * Setzt den Text-Inhalt des Textfeldes + **/ + setText: function(text) + { + this.m_text.innerHTML = ""; + this.m_text.appendChild(document.createTextNode(text)); + return this; + }, + + /** + * Setzt den HTML-Inhalt des Textfeldes + **/ + setHtml: function(html) + { + this.m_text.innerHTML = html; + return this; + }, + + setID : function(id) { + this.m_text.setAttribute("id",id); + return this; + }, + + setAlignment: function(alignment) + { + Element.setStyle(this.m_element, {"textAlign": alignment}); + return this; + }, + + setStyle: function(style) + { + Element.setStyle(this.m_element, style); + return this; + }, + + /** + * Setzt die Breite des Labels. + * Neben numerischen Angaben ist auch der Wert "auto" erlaubt. + **/ + setWidth: function(width) + { + if (width != "auto") { width = parseInt(width) + "px"; } + Element.setStyle(this.m_element, { width: width }); + return this; + }, + + /** + * Setzt die Höhe des Labels. + * Neben numerischen Angaben ist auch der Wert "auto" erlaubt. + **/ + setHeight: function(height) + { + if (height != "auto") { height = parseInt(height) + "px"; } + Element.setStyle(this.m_element, { height : height }); + return this; + }, + + setClass: function(name) + { + this.m_element.className = name; + return this; + }, +}); + +/** + * Konstanten + **/ +UI.Text.CLASS_NAME = "UIText"; +UI.Text.DEFAULT_TEXT = "UI Text"; +/** + * scrollpane.js + **/ + +UI.ScrollPane = Class.create(UI.Container, { + + /** + * Konstruktor. Erstellt eine neue ScrollPane + **/ + initialize: function() + { + this.m_isEnabled = true; + this.m_components = []; + + this.m_element = document.createElement("div"); + this.m_element.className = UI.ScrollPane.CLASS_NAME; + + this.m_content = document.createElement("div"); + this.m_content.className = UI.ScrollPane.CONTENT_CLASS_NAME; + this.m_element.appendChild(this.m_content); + + this.setWidth(UI.ScrollPane.DEFAULT_WIDTH) + .setHeight(UI.ScrollPane.DEFAULT_HEIGHT); + }, + + /** + * Setzt die Breite der Komponente in Pixeln + **/ + setWidth: function(width) + { + Element.setStyle(this.m_element, { + width: parseInt(width) + "px" + }); + Element.setStyle(this.m_content, { + width: parseInt(width) + "px" + }); + return this; + }, + + /** + * Setzt die Höhe der Komponente in Pixeln + **/ + setHeight: function(height) + { + Element.setStyle(this.m_element, { + height: parseInt(height) + "px" + }); + Element.setStyle(this.m_content, { + height: parseInt(height) + "px" + }); + return this; + } + +}); + +UI.ScrollPane.CLASS_NAME = "UIScrollPane"; +UI.ScrollPane.CONTENT_CLASS_NAME = "UIScrollPaneContent"; +UI.ScrollPane.DEFAULT_WIDTH = 100; +UI.ScrollPane.DEFAULT_HEIGHT = 100; + +/** + * button.js + **/ + +/** + * Button + **/ +UI.Button = Class.create(UI.Component, { + + /** + * Konstrukor. Erstellt einen neuen Button + **/ + initialize: function() + { + var _this_ = this; + + this.m_isEnabled = true; + this.m_action = null; + + this.m_element = document.createElement("div"); + this.m_element.className = UI.Button.CLASS_NAME; + Element.setStyle(this.m_element, { + width : UI.Button.DEFAULT_WIDTH + "px", + height: UI.Button.DEFAULT_HEIGHT + "px" + }); + + this.m_text = document.createElement("div"); + this.m_text.className = UI.Button.TEXT_CLASS_NAME; + this.m_text.appendChild(document.createTextNode(UI.Button.DEFAULT_TEXT)); + Element.setStyle(this.m_text, { + top: UI.Button.BORDER_SIZE + "px", + left: UI.Button.BORDER_SIZE + "px", + width: (UI.Button.DEFAULT_WIDTH - (2 * UI.Button.BORDER_SIZE)) + "px", + height: (UI.Button.DEFAULT_HEIGHT - (2 * UI.Button.BORDER_SIZE)) + "px", + lineHeight: (UI.Button.DEFAULT_HEIGHT - (2 * UI.Button.BORDER_SIZE)) + "px" + }); + Event.observe(this.m_text, "click", function(event) { + if (_this_.m_action) { _this_.m_action(event); } + }); + Event.observe(this.m_text, "mouseover", this._onMouseOver); + Event.observe(this.m_text, "mouseout" , this._onMouseOut); + Event.observe(this.m_text, "mousedown", this._onMouseDown); + Event.observe(this.m_text, "mouseup" , this._onMouseUp); + this.m_element.appendChild(this.m_text); + + }, + + /** + * Setzt den Text des Button + **/ + setText: function(text) + { + this.m_text.innerHTML = ""; + this.m_text.appendChild(document.createTextNode(text)); + return this; + }, + + setId: function(id) { + this.m_text.id = id; + return this; + }, + + /** + * Setzt den OnClick-EventHandler + **/ + setAction: function(action, context) + { + if (typeof(context) != "undefined") { this.m_action = action.bind(context); } + else { this.m_action = action; } + return this; + }, + + _onMouseOver: function(event) + { + //this.className = "UIButtonHighlight"; + }, + + _onMouseOut: function(event) + { + //this.className = "UIButtonText"; + }, + + _onMouseDown: function(event) + { + //this.className = "UIButtonPressed"; + }, + + _onMouseUp: function(event) + { + //this.className = "UIButtonHighlight"; + } + +}); + +UI.Button.TEXT_CLASS_NAME = "UIButtonText StdButton"; +UI.Button.CLASS_NAME = "UIButton"; +UI.Button.HIGHLIGHT_CLASS_NAME = "UIButtonHighlight"; +UI.Button.DEFAULT_TEXT = "UI.Button"; +UI.Button.BORDER_SIZE = 0; +UI.Button.DEFAULT_WIDTH = 150; +UI.Button.DEFAULT_HEIGHT = 22; +/** + * textedit.js + **/ + +/** + * Text-Eingabefeld + **/ +UI.TextEdit = Class.create(UI.InputComponent, { + + initialize: function() + { + this.m_isEnabled = true; + + this.m_element = document.createElement("input"); + this.m_element.className = UI.TextEdit.CLASS_NAME; + this.m_element.type = "text"; + this.m_element.value = UI.TextEdit.DEFAULT_VALUE; + }, + + setText: function(text) + { + this.m_element.value = text; + return this; + }, + + getText: function() + { + return this.m_element.value; + } + + +}); + +UI.TextEdit.CLASS_NAME = "UITextEdit"; +UI.TextEdit.DEFAULT_VALUE = "";/** + * textedit.js + **/ + +/** + * Text-Eingabefeld + **/ +UI.PasswordEdit = Class.create(UI.InputComponent, { + + initialize: function() + { + this.m_isEnabled = true; + + this.m_element = document.createElement("input"); + this.m_element.className = UI.PasswordEdit.CLASS_NAME; + this.m_element.type = "password"; + this.m_element.value = UI.PasswordEdit.DEFAULT_VALUE; + }, + + setText: function(text) + { + this.m_element.value = text; + return this; + }, + + getText: function() + { + return this.m_element.value; + } + + +}); + +UI.PasswordEdit.CLASS_NAME = "UITextEdit"; +UI.PasswordEdit.DEFAULT_VALUE = "";/** + * textarea.js + **/ + +/** + * @fileOverview UI.Textarea + * @author F. Werner (eQ-3) + **/ + +/** + * @class UI.Textarea + **/ +UI.Textarea = Class.create(UI.InputComponent, { + + initialize: function() + { + this.isEnabled = true; + + this.m_element = document.createElement("textarea"); + this.m_element.className = UI.Textarea.CLASS_NAME; + Element.writeAttribute(this.m_element, "wrap", "off"); + this.m_element.value = UI.Textarea.DEFAULT_VALUE; + }, + + setText: function(text) + { + this.m_element.value = text; + return this; + }, + + setID : function(id) { + this.m_element.setAttribute("id",id); + return this; + }, + + setName : function(name) { + this.m_element.setAttribute("name",name); + return this; + }, + + setWrap: function(isWrap) + { + if (isWrap) { Element.writeAttribute(this.m_element, "wrap", "soft"); } + else { Element.writeAttribute(this.m_element, "wrap", "off"); } + + return this; + }, + + getText: function() + { + return this.m_element.value; + }, + + enableResize: function() { + Element.setStyle(this.m_element, {"resize": "both"}); + return this; + }, + + disableResize: function() { + Element.setStyle(this.m_element, {"resize": "none"}); + return this; + } + +}); + +UI.Textarea.CLASS_NAME = "UITextArea"; +UI.Textarea.DEFAULT_VALUE = ""; +/** + * listbox.js + **/ + +/** + * Auswahl aus einer Liste + **/ +UI.ListBox = Class.create(UI.InputComponent, { + + /** + * Konstruktor. Erstellt eine neue Listbox + **/ + initialize: function() + { + this.m_isEnabled = true; + this.m_onChangeHandler = this.m_onChange.bind(this); + + this.m_items = []; + + this.m_element = document.createElement("select"); + this.m_element.className = UI.ListBox.CLASS_NAME; + Event.observe(this.m_element, "change", this.m_onChangeHandler); + }, + + m_onChange: function(event) + { + if (this.m_onChangeCallback) + { + this.m_onChangeCallback(this.getSelectedItem()); + } + }, + + getSelectedItem: function() + { + return this.m_items[this.m_element.selectedIndex]; + }, + + setOnChangeCallback: function(onChangeCallback) + { + this.m_onChangeCallback = onChangeCallback; + return this; + }, + + add: function(item) + { + var option = document.createElement("option"); + option.appendChild(document.createTextNode(item.name)); + this.m_element.appendChild(option); + this.m_items.push(item); + return this; + }, + + remove: function(item) + { + /* todo */ + }, + + selectItem: function(item) + { + return this.selectIndex(this.m_items.indexOf(item)); + }, + + /** + * @fn selectItemById + * Wählt ein + **/ + selectItemById: function(id) + { + var items = this.m_items; + + for (var i = 0, len = items.length; i < len; i++) + { + var item = items[i]; + if (item.id == id) { this.selectIndex(i); } + } + + return this; + }, + + selectIndex: function(index) + { + this.m_element.selectedIndex = index; + return this; + } + + + + +}); + +UI.ListBox.CLASS_NAME = "UIListbox";/** + * ui.checkbox.js + **/ + +UI.Checkbox = Class.create(UI.Component, { + + /** + * Konstruktor. Erzeugt eine neue Checkbox. + **/ + initialize: function() + { + this.m_isEnabled = true; + this.m_action = null; + + this.m_checkbox = document.createElement("input"); + this.m_checkbox.type = "checkbox"; + this.m_checkbox.checked = UI.Checkbox.DEFAUT_CHECKED; + Event.observe(this.m_checkbox, "click", this.onChange.bind(this)); + + this.m_text = document.createElement("span"); + this.m_text.appendChild(document.createTextNode(UI.Checkbox.DEFALUT_TEXT)); + + this.m_element = document.createElement("div"); + this.m_element.className = UI.Checkbox.CLASS_NAME; + this.m_element.appendChild(this.m_checkbox); + this.m_element.appendChild(this.m_text); + }, + + setText: function(text) + { + this.m_text.innerHTML = ""; + this.m_text.appendChild(document.createTextNode(text)); + return this; + }, + + setIsChecked: function(isChecked) + { + this.m_checkbox.checked = isChecked; + return this; + }, + + isChecked: function() + { + return this.m_checkbox.checked; + }, + + /** + * Setzt die Breite des Labels. + * Neben numerischen Angaben ist auch der Wert "auto" erlaubt. + **/ + setWidth: function(width) + { + if (width != "auto") { width = parseInt(width) + "px"; } + Element.setStyle(this.m_element, { width: width }); + return this; + }, + + /** + * Setzt die Höhe des Labels. + * Neben numerischen Angaben ist auch der Wert "auto" erlaubt. + **/ + setHeight: function(height) + { + if (height != "auto") { height = parseInt(height) + "px"; } + Element.setStyle(this.m_element, { height : height }); + return this; + }, + + setAction: function(action, context) + { + this.m_action = action.bind(context); + return this; + }, + + onChange: function() + { + if (this.m_action) + { + this.m_action(this); + } + } + +}); + +UI.Checkbox.CLASS_NAME = "UICheckbox"; +UI.Checkbox.DEFAULT_TEXT = "UI Checkbox"; +UI.Checkbox.DEFAULT_CHECKED = false;/** + * image.js + **/ + +/** + * Image + **/ +UI.Image = Class.create(UI.Component, { + + /** + * Konstruktor. Erstellt ein Image + **/ + initialize: function() + { + this.m_isEnabled = true; + + this.m_element = document.createElement("img"); + this.m_element.className = UI.Image.CLASS_NAME; + }, + + setPath: function(path) + { + this.m_element.alt = ""; + this.m_element.src = path; + return this; + }, + + setId: function(id) + { + this.m_element.id = id; + return this; + }, + + getId: function() + { + return this.m_element.id; + } +}); + +/** + * Konstanten + **/ +UI.Image.CLASS_NAME = "UIImage"; +/** + * room.js + * Raum. + **/ + +Room = Class.create({ + + /** + * Konstruktor + **/ + initialize: function(data) + { + this.id = ""; + this.name = ""; + this.description = ""; + this.channelIds = []; + + this.addChannelEvent = new eQ3.Event(); + this.removeChannelEvent = new eQ3.Event(); + + this.update(data); + }, + + /** + * Aktualisiert den Raum + **/ + update: function(data) + { + var channelIds = this.channelIds.clone(); + channelIds.each(function(id) { this.removeChannel(id); }, this); + + this.id = data["id"]; // Id + this.name = data["name"]; // Name + this.description = data["description"]; // Beschreibung + this.channelIds = []; // Ids der Kanäle + + data["channelIds"].each(function(id) { this.addChannel(id); }, this); + }, + + /** + * Fügt einen Kanal hinzu. + * writeBack: [bool] Optional: false. Falls true, wird die Änderung an die HomeMatic Zentrale übermittelt. + **/ + addChannel: function(channelId, writeBack) + { + if (!this.channelIds.ex_contains(channelId)) + { + if (writeBack) { homematic("Room.addChannel", {id: this.id, channelId: channelId}); } + this.channelIds.push(channelId); + this.addChannelEvent.fire(this, {channelId: channelId}); + } + }, + + /** + * Entfernt einen Kanal. + * writeBack: [bool] Optional: false. Falls true, wird die Änderung an die HomeMatic Zentrale übermittelt. + **/ + removeChannel: function(channelId, writeBack) + { + if (this.channelIds.ex_contains(channelId)) + { + if (writeBack) { homematic("Room.removeChannel", {id: this.id, channelId: channelId}); } + this.channelIds = this.channelIds.without(channelId); + this.removeChannelEvent.fire(this, {channelId: channelId}); + } + }, + + /** + * Prüft, ob ein Kanal in dem Raum definiert ist. + **/ + contains: function(channelId) + { + return (0 <= this.channelIds.indexOf(channelId)); + }, + + /** + * Liefert die Ids aller Programme, die wenigesten einen Kanal des Raums verwenden + **/ + listProgramIds: function() + { + return homematic("Room.listProgramIds", {id: this.id}); + } + +}); + +/** + * roomlist.js + * Raumliste. + **/ + +/** + * Raumliste. + **/ +RoomList = Singleton.create({ + + /** + * Konstruktor + **/ + initialize: function() + { + this.addEvent = new eQ3.Event(); + this.removeEvent = new eQ3.Event(); + + this.m_rooms = {}; + }, + + /** + * Callback. Aktualisiert einen Raum. + **/ + update: function(data, callback) + { + var room; + + if (data !== null) + { + var id = data["id"]; + room = this.m_rooms[id]; + + if (typeof(room) != "undefined") + { + room.update(data); + } + else + { + room = new Room(data); + this.m_rooms[id] = room; + this.addEvent.fire(this, {room: room}); + } + } + + if (callback) { callback(); } + return room; + }, + + /** + * Liefert die Liste aller Räume. + **/ + list: function() + { + return Object.values(this.m_rooms); + }, + + /** + * Initialisiert die Raumliste. + **/ + reload: function(loader) + { + var _this_ = this; + var _loader_ = loader; + + homematic("Room.getAll", null, function(rooms) { + if (rooms) + { + for (var i = 0, len = rooms.length; i < len; i++) + { + _this_.update(rooms[i]); + } + } +// _loader_.reportLoadingState(1); + _loader_.ready(); + }); + }, + + /** + * Startet die Aktualiserung eines Raums. + **/ + beginUpdate: function(id, callback) + { + var _this_ = this; + var _callback_ = callback; + + homematic("Room.get", {"id": id}, function(data) { _this_.update(data, _callback_); }); + }, + + /** + * Ermittelt einen Raum anhand seiner Id. + **/ + get: function(id) + { + var room = this.m_rooms[id]; + if (typeof(room) != "undefined") { return room; } + else { return null; } + }, + + remove: function(room) + { + var channelIds = room.channelIds.clone(); + + delete this.m_rooms[room.id]; + channelIds.each(function(id) { room.removeChannel(id); }); + this.removeEvent.fire(this, {room: room}); + } + +}); +/** + * subsection.js + * Gewerk. + **/ + +Subsection = Class.create({ + + /** + * Konstruktor + **/ + initialize: function(data) + { + this.id = ""; + this.name = ""; + this.description = ""; + this.channelIds = []; + + this.addChannelEvent = new eQ3.Event(); + this.removeChannelEvent = new eQ3.Event(); + + this.update(data); + }, + + /** + * Aktualisiert den Raum + **/ + update: function(data) + { + var channelIds = this.channelIds.clone(); + channelIds.each(function(id) { this.removeChannel(id); }, this); + + this.id = data["id"]; // Id + this.name = data["name"]; // Name + this.description = data["description"]; // Beschreibung + this.channelIds = []; // Ids der Kanäle + + data["channelIds"].each(function(id) { this.addChannel(id); }, this); + }, + + /** + * Fügt einen Kanal hinzu. + * writeback: [bool] Optional (false). Falls true, wird die Änderung an die HomeMatic Zentrale übermittelt. + **/ + addChannel: function(channelId, writeBack) + { + if (!this.channelIds.ex_contains(channelId)) + { + if (writeBack) { homematic("Subsection.addChannel", {id: this.id, channelId: channelId}); } + this.channelIds.push(channelId); + this.addChannelEvent.fire(this, {channelId: channelId}); + } + }, + + /** + * Entfernt einen Kanal. + * writeBack: [bool] Optional (false). Falls true, wird die Änderung an die HomeMatic Zentrale übermittelt. + **/ + removeChannel: function(channelId, writeBack) + { + if (this.channelIds.ex_contains(channelId)) + { + if (writeBack) { homematic("Subsection.removeChannel", {id: this.id, channelId: channelId}); } + this.channelIds = this.channelIds.without(channelId); + this.removeChannelEvent.fire(this, {channelId: channelId}); + } + }, + + /** + * Prüft, ob ein Kanal in dem Raum definiert ist. + **/ + contains: function(channelId) + { + return (0 <= this.channelIds.indexOf(channelId)); + }, + + /** + * Liefert die Ids aller Programme, die mindestens einen Kanal in dem Gewerk verwenden + **/ + listProgramIds: function() + { + return homematic("Subsection.listProgramIds", {id: this.id}); + } + +}); +/** + * SubsectionList.js + * Gewerkeliste. + **/ + +/** + * Gewerkeliste + **/ +SubsectionList = Singleton.create({ + + /** + * Konstruktor + **/ + initialize: function() + { + this.addEvent = new eQ3.Event(); + this.removeEvent = new eQ3.Event(); + + this.m_subsections = {}; + }, + + /** + * Callback. Aktualiert ein Gewerk. + **/ + update: function(data, callback) + { + var subsection; + + if (data !== null) + { + var id = data["id"]; + subsection = this.m_subsections[id]; + + if (typeof(subsection) != "undefined") + { + subsection.update(data); + } + else + { + subsection = new Subsection(data); + this.m_subsections[id] = subsection; + this.addEvent.fire(this, {subsection: subsection}); + } + } + + if (callback) { callback(); } + return subsection; + }, + + /** + * Liefert die Liste aller Gewerke. + **/ + list: function() + { + return Object.values(this.m_subsections); + }, + + /** + * Lädt die Gewerkeliste erneut + **/ + reload: function(loader) + { + var _this_ = this; + var _loader_ = loader; + + homematic("Subsection.getAll", null, function(subsections) { + if (subsections) + { + subsections.each(function (subsection) { _this_.update(subsection); }); + } +// _loader_.reportLoadingState(1); + _loader_.ready(); + }); + }, + + /** + * Startet die Aktualisierung eines Gewerks. + **/ + beginUpdate: function(id, callback) + { + var _this_ = this; + var _callback_ = callback; + + homematic("Subsection.get", {"id": id}, function(data) { _this_.update(data, _callback_); }); + }, + + /** + * Liefert ein Gewerk anhand seiner Id. + **/ + get: function(id) + { + return this.m_subsections[id]; + }, + + remove: function(subsection) + { + var channelIds = subsection.channelIds.clone(); + + delete this.m_subsections[subsection.id]; + channelIds.each(function(id) { subsection.removeChannel(id); }); + this.removeEvent.fire(this, {subsection: subsection}); + } + +}); +/** + * devicetype.js + **/ + +/** + * Gerätetyp. + **/ +DeviceType = Class.create({ + + initialize: function(id) + { + this.id = id; + this.name = id; + this.description = DEV_getDescription(id); + }, + + isDeletable: function() + { + return DeviceTypeList.isDeletable(this); + }, + + /** + * Liefert den HTML-Code eines Thumbnails für das Gerät. + **/ + getThumbnailHTML: function(formName) + { + return DeviceTypeList.getThumbnailHTML(this.id, formName); + }, + + /** + * Liefert den HTML-Code eines Bildes für das Gerät. + **/ + getImageHTML: function(formName) + { + return DeviceTypeList.getImageHTML(this.id, formName); + } + +});/** + * devicetypelist.js + **/ + +/** + * Liste der verfügbaren Gerätetypen. + **/ +DeviceTypeList = Singleton.create({ + THUMBNAIL_SIZE: 50, // Größe eines (quadratischen) Thumbnails + IMAGE_SIZE: 250, // Größe eines (quadratischen) Bildes + + /** + * Liste der nicht löschbaren Gerätetypen + **/ + m_undeletableTypeNames: [ + "HM-CCU-1", + "HM-RCV-50", + "HMW-RCV-50", + "HmIP-RCV-50", + "HM-Sec-SD-Team", + "HM-Sec-SD-2-Team", + "HmIP-CCU3", + "RPI-RF-MOD", + "HmIP-RFUSB" + ], + + /** + * Konstruktor + **/ + initialize: function() + { + this.deviceTypes = {}; // verfügbare Gerätetypen + + for (var i = 0, len = DEV_LIST.length; i < len; i++) + { + var deviceType = new DeviceType(DEV_LIST[i]); + this.deviceTypes[deviceType.id] = deviceType; + } + + this.unknownType = this.deviceTypes["DEVICE"]; + }, + + /** + * Ermittelt, ob ein Gerät von diesem Typ gelöscht werden kann. + **/ + isDeletable: function(deviceType) + { + return !this.m_undeletableTypeNames.ex_contains(deviceType.name); + }, + + /** + * Erstellt den HTML-Code zu einem Bild bzw. Thumbnail + **/ + getPictureHTML: function(typeId, formName, size) + { + var wrapper, canvas, jg, result; + + wrapper = document.createElement("div"); + Element.setStyle(wrapper, {display: "none"}); + $("body").appendChild(wrapper); + + canvas = document.createElement("div"); + wrapper.appendChild(canvas); + Element.setStyle(canvas, { + position: "absolute", + left: "0px", + top: "0px" + }); + + jg = new jsGraphics(canvas); + InitGD(jg, size); + Draw(jg, typeId, size, formName); + + result = wrapper.innerHTML; + + Element.remove(wrapper); + return result; + }, + + /** + * Liefert die Liste aller Gerätetypen. + **/ + listDeviceTypes: function() + { + return Object.values(this.deviceTypes); + }, + + /** + * Liefert einen Geratetypen anhand seiner Id + **/ + getDeviceType: function(id) + { + var deviceType = this.deviceTypes[id]; + + if (typeof(deviceType) != "undefined") { return deviceType; } + else { return this.unknownType; } + }, + + /** + * Liefert den HTML-Code eines Thumbnails + **/ + getThumbnailHTML: function(typeId, formName) + { + return this.getPictureHTML(typeId, formName, this.THUMBNAIL_SIZE); + }, + + /** + * Liefert den HTML-Code eines Bildes + **/ + getImageHTML: function(typeId, formName) + { + return this.getPictureHTML(typeId, formName, this.IMAGE_SIZE); + } + +}); + +/** + * channel.js + **/ + +/** + * Kanal + **/ +Channel = Class.create({ + /** + * Konstruktor + **/ + + initialize: function(device, data) + { + var self = this; + var devAddress = data["address"].split(":")[0], + devMode, arBlindFW; + + + // Set the master parameter UNIVERSAL_LIGHT_MAX_CAPABILITIES of the HmIP-DRG-DALI Gateway as meta data + // Channels 1 - 32 = connected dali devices. Here we need only set the meta data for those channels where a device is connected. + // The first channel with no connected device has the UNIVERSAL_LIGHT_MAX_CAPABILITIES set to 5. All following channels don't have a device connected, so we can skip the rest. + // + // For the group channels 33 - 48 we need all UNIVERSAL_LIGHT_MAX_CAPABILITIES. + if ((device.typeName == "HmIP-DRG-DALI")) { + if (data.channelType == "UNIVERSAL_LIGHT_RECEIVER") { + var maxCap = data.daliMaxCapabilities; + if ((typeof maxCap == "undefined") || (maxCap == "undefined")) { + var maxCap = homematic("Interface.getMasterValue", { + "interface": "HmIP-RF", + "address": data.address, + "valueKey": "UNIVERSAL_LIGHT_MAX_CAPABILITIES" + }); + homematic("Interface.setMetadata", { + "objectId": data.id, "dataId": "maxCap", "value": maxCap + }); + } + this.daliMaxCapabilities = maxCap; // currently used for determining the target channels of the weekly program. + } + } + + + this.updateEvent = new eQ3.Event(); + + var chType = data["channelType"]; + + // This adds the attribute virtChCounter to the virtual channels + if (chType.indexOf("_VIRTUAL_RECEIVER") != -1) { + if (typeof virtChCounter == "undefined") { + virtChCounter = 1; + this.virtChCounter = virtChCounter; + } else { + if (virtChCounter < 3) { + virtChCounter++; + this.virtChCounter = virtChCounter; + } else { + delete virtChCounter; + } + } + } else { + delete virtChCounter; + } + + window.setTimeout(function() {delete virtChCounter;},15000); // Fallback to ensure this global var is being deleted after not in use anymore. + + if ((device.deviceType.description.indexOf("HmIPW-DRBL4") != -1) + || (device.deviceType.description.indexOf("HmIP-DRBLI4") != -1) + || (device.deviceType.description.indexOf("HmIP-BBL") != -1) + || (device.deviceType.description.indexOf("HmIP-BBL-2") != -1) + || (device.deviceType.description.indexOf("HmIP-BBL-I") != -1) + || (device.deviceType.description.indexOf("HmIP-FBL") != -1) + + ) { + if (chType.indexOf("BLIND_TRANSMITTER") != -1 || chType.indexOf("BLIND_VIRTUAL_RECEIVER") != -1) { + if (typeof devToConfigure != "undefined" || typeof blindChAddress == "undefined" || blindChAddress != devAddress) { + blindChAddress = devAddress; + var devDescr = homematic("Interface.getDeviceDescription", {"interface": "HmIP-RF", "address":devAddress}); + if (devDescr) { + blindFw = devDescr.firmware; + arBlindFW = blindFw.split("."); + fwGTE16 = (arBlindFW[0] > 1 || ((arBlindFW[0] = 1) && (arBlindFW[1] >= 6))); + window.setTimeout(function() {delete blindChAddress; delete blindFw; delete fwGTE16;},10000); + } + } + + + if (typeof fwGTE16 != "undefined" && fwGTE16) { + homematic("Interface.getMetadata_crRFD", {"interface": "HmIP-RF", "objectId": data["address"], "dataId": "channelMode"}, function(result) { + if (result == "") { + self.changedMultiMode = "shutter"; + data["channelType"] = data["channelType"].replace("BLIND", "SHUTTER"); + + homematic("Interface.setMetadata_crRFD", { + "interface" : "HmIP-RF", + "objectId" : data["address"], + "dataId" : "channelMode", + "value" : self.changedMultiMode + }); + + homematic("Interface.setMetadata", { + "objectId" : data["address"], + "dataId" : "channelMode", + "value" : self.changedMultiMode + }); + + } else { + self.changedMultiMode = result; + if (result == "shutter") { + data["channelType"] = data["channelType"].replace("BLIND", "SHUTTER"); + } + } + self.update(device, data); + }); + } else { + // Fw. < 1.6 - The default channel type is always BLIND + // Check if meta data already available. If not create them. + homematic("Interface.getMetadata_crRFD", {"interface": "HmIP-RF", "objectId": data["address"], "dataId": "channelMode"}, function(result) { + if (result == "") { + devMode = "blind"; + + homematic("Interface.setMetadata_crRFD", { + "interface" : "HmIP-RF", + "objectId" : data["address"], + "dataId" : "channelMode", + "value" : devMode + }); + + homematic("Interface.setMetadata", { + "objectId" : data["address"], + "dataId" : "channelMode", + "value" : devMode + }); + } + }); + } + } + } else { + this.changedMultiMode = ""; + } + + this.update(device, data); + }, + + /** + * Aktualisiert die Kanaldaten + **/ + update: function(device, data) + { + var deviceType = device.deviceType, + chnMultiMode; + + if ((device) && (data)) + { + this.id = data["id"]; + this.name = data["name"]; + this.nameExtention = ""; + this.address = data["address"]; + this.deviceId = data["deviceId"]; + this.device = device; + this.deviceType = deviceType; + this.virtChannelType = ""; // for HmIPW-DRBLx + this.typeName = deviceType.name; + this.typeDescription = deviceType.description; + this.channelType = data["channelType"]; + this.partnerId = data["partnerId"]; + this.groupId = (this.id < this.partnerId) ? this.id + "_" + this.partnerId : this.partnerId + "_" +this.id; + this.index = data["index"]; + this.category = translateKey(Channel.getCategoryName(data["category"])); + this.mode = translateKey(Channel.getModeName(data["mode"])); + this.isAesAvailable = data["isAesAvailable"]; + this.isLogged = data["isLogged"]; + this.isVisible = data["isVisible"]; + this.isReadyConfig = data["isReady"]; + this.isVirtual = data["isVirtual"]; + this.isLogable = data["isLogable"]; + this.isReadable = data["isReadable"]; + this.isWritable = data["isWritable"]; + this.isEventable = data["isEventable"]; + this.isInternal = data["isInternal"] + + if (typeof data["mode_multi_mode"] != "undefined") { + this.multiMode = data["mode_multi_mode"]; + } else { + if (this.changedMultiMode != "") { + this.multiMode = this.changedMultiMode; + } + } + + if ((ConfigData.isPresent) && (this.channelType == "MULTI_MODE_INPUT_TRANSMITTER")) { + if (! isNaN(this.multiMode)) { + data.multiMode = this.multiMode; + homematic("Interface.setMetadata", {"objectId": data.id, "dataId": "channelMode", "value": this.multiMode}); + } + } + + this.isUsable = (this.isWritable && data["isUsable"]); + this.thumbnailHTML = deviceType.getThumbnailHTML(this.index); + this.imageHTML = deviceType.getImageHTML(this.index); + } + + this.m_extendName(); + + this.rooms = this.m_getRooms(); + this.subsections = this.m_getSubsections(); + + + }, + + m_extendName: function() { + var ext = getExtendedDescription({"deviceType":this.typeName,"channelType": this.channelType,"channelID": this.id, "channelAddress": this.address,"channelIndex" : this.index, "isVisible" : this.isVisible, "multiMode" : this.multiMode}); + if (ext.length > 0) { + this.nameExtention += "
" + ext; + } + this.m_setWiredBlind(); + }, + + /** + * Ermittelt alls Räume, in denen der Kanal definiert ist + **/ + m_getRooms: function() + { + var result = []; + var rooms = RoomList.list(); + var id = this.id; + + rooms.each(function(room) { + if (room.contains(id)) { result.push(room); } + }); + + return result; + }, + + /** + * Ermittelt alls Gewerke, in denen der Kanal definiert ist + **/ + m_getSubsections: function() + { + var result = []; + var subsections = SubsectionList.list(); + var id = this.id; + + subsections.each(function(subsection) { + if (subsection.contains(id)) { result.push(subsection); } + }); + + return result; + }, + + m_setWiredBlind: function() { + if (((this.typeDescription.indexOf("HmIPW-") != -1) && (this.channelType.indexOf("BLIND_") != -1)) + || (this.typeDescription.toLocaleLowerCase() == "hmip-drbli4") + || (this.typeDescription.toLocaleLowerCase() == "hmip-bbl-2") + ) { + + if (this.channelType.indexOf("BLIND_WEEK_PROFILE") == -1) { + var curType = ""; + + curType = (this.multiMode == "shutter") ? this.channelType.replace("BLIND", "SHUTTER") : this.channelType; + + this.virtChannelType = curType; + + var ext = getExtendedDescription({ + "deviceType": this.typeName, + "channelType": this.virtChannelType, + "channelID": this.id, + "channelAddress": this.address, + "channelIndex": this.index, + "isVisible": this.isVisible + }); + if (ext.length > 0) { + this.nameExtention = "
" + ext; + } + } + } + }, + + getVirtChannelType : function() { + return this.virtChannelType; + }, + + changeChannelDescription: function() { + this.m_setWiredBlind(); + }, + + /** + * Legt den Namen des Kanals fest + **/ + setName: function(name) + { + if (this.name != name) + { + var result = homematic("Channel.setName", {id: this.id, name: name}); + if (typeof(result) == "string") + { + this.name = result; + this.updateEvent.fire(this, {reason: "setName", isUsable: this.name}); + } + } + + return this.name; + }, + + /** + * Legt fest, ob der Kanal für normale Anwender sichtbar ist + **/ + setVisibility: function(isVisible) + { + if (this.isVisible != isVisible) + { + var result = homematic("Channel.setVisibility", {id: this.id, isVisible: isVisible}); + if (typeof(result) == "boolean") + { + this.isVisible = result; + this.updateEvent.fire(this, {reason: "setVisibility", isUsable: this.isVisible}); + } + } + + return this.isVisible; + }, + + /** + * Legt fest, ob der Kanal für normale Anwender bedienbar ist + **/ + setUsability: function(isUsable) + { + if (this.isUsable != isUsable) + { + var result = homematic("Channel.setUsability", {id: this.id, isUsable: isUsable}); + if (typeof(result) == "boolean") + { + this.isUsable = result; + this.updateEvent.fire(this, {reason: "setUsability", isUsable: this.isUsable}); + } + } + + return this.isUsable; + }, + + /** + * Legt fest, ob der Kanal protokolliert wird + **/ + setLogging: function(isLogged) + { + if (this.isLogged != isLogged) + { + var result = homematic("Channel.setLogging", {id: this.id, isLogged: isLogged}); + if (typeof(result) == "boolean") + { + this.isLogged = result; + this.updateEvent.fire(this, {reason: "setLogging", isLogged: this.isLogged}); + } + } + + return this.isLogged; + }, + + getMultiMode: function(mode) { + return this.changedMultiMode; + }, + + setMultiMode: function(mode) { + this.changedMultiMode = mode; + this.updateEvent.fire(this, {reason: "setMultiMode", changedMultiMode: this.changedMultiMode}); + }, + + + /** + * Legt den Übertragungsmodus des Kanals fest. + **/ + setMode: function(mode) + { + + if (this.mode != mode) + { + var result = homematic("Channel.setMode", {id: this.id, mode: Channel.getMode(mode)}); + if (typeof(result) == "string") + { + this.mode = translateKey(Channel.getModeName(result)); + this.updateEvent.fire(this, {reason: "setMode", mode: this.mode}); + } + } + return this.mode; + }, + + getName: function() + { + return this.name; + }, + + /** + * Liefert die Kanalgruppe + **/ + getChannelGroup: function() + { + return DeviceList.getChannelGroup(this.groupId); + }, + + addToRoom: function(room) + { + if (!this.rooms.ex_contains(room)) + { + this.rooms.push(room); + this.rooms.ex_sortBy("name"); + this.updateEvent.fire(this, {reason: "addToRoom", room: room}); + } + }, + + removeFromRoom: function(room) + { + if (this.rooms.ex_contains(room)) + { + this.rooms = this.rooms.without(room); + this.rooms.ex_sortBy("name"); + this.updateEvent.fire(this, {reason: "removeFromRoom", room: room}); + } + }, + + /** + * Fügt dem Kanal ein Gewerk hinzu. + * Diese Methode dient lediglich zur Aktualisierung des Datenmodells. + * Um den Kanal einem Gewerk hinzuzufügen, sollte + * Subsection.addChannel(channel, true) + * verwendet werden. + **/ + addToSubsection: function(subsection) + { + if (!this.subsections.ex_contains(subsection)) + { + this.subsections.push(subsection); + this.subsections.ex_sortBy("name"); + this.updateEvent.fire(this, {reason: "addToSubsection", subsection: subsection}); + } + }, + + /** + * Entfernt den Kanal aus einem Gewerk. + * Diese Methode dient lediglich zur Aktualisierung des Datenmodells. + * Um den Kanal aus dem Gewerk zu löschen, sollte + * Subsection.removeChannel(channel, true) + * verwendet werden. + **/ + removeFromSubsection: function(subsection) + { + if (this.subsections.ex_contains(subsection)) + { + this.subsections = this.subsections.without(subsection); + this.subsections.ex_sortBy("name"); + this.updateEvent.fire(this, {reason: "removeFroSubsections", subsection: subsection}); + } + }, + + + /** + * Liefert eine Liste sämtlicher Programme (Ids), die den Kanal verwenden + **/ + listProgramIds: function() + { + return homematic("Channel.listProgramIds", {"id": this.id}); + }, + + /** + * Liefert eine Liste sämtlicher Programme (Ids), die den Kanal verwenden + **/ + hasProgramIds: function() + { + return homematic("Channel.hasProgramIds", {"id": this.id}); + }, + + /** + * Ermittelt, ob der Kanal den Funktionstest unterstützt. + **/ + supportsComTest: function() + { + return this.isEventable; + } + +}); + +/*##############*/ +/*# Konstanten #*/ +/*##############*/ + +Channel.CATEGORY = +{ + NONE: "lblChannelNotLinkable", + SENDER: "lblSender", + RECEIVER: "lblReceiver" + +}; + +Channel.MODE = +{ + DEFAULT: "lblStandard", + AES : "lblSecured" +}; + +Channel.INVALID_ID = ""; + +/*########################*/ +/*# Statische Funktionen #*/ +/*########################*/ + +/** + * Liefert den Übertragungsmodus anhand seines Namens. + **/ +Channel.getMode = function(modeName) +{ + switch (modeName) + { + //case translateKey(Channel.MODE.DEFAULT): return "MODE_DEFAULT"; + //case translateKey(Channel.MODE.AES) : return "MODE_AES"; + case "Standard" : return "MODE_DEFAULT"; + case "Gesichert" : return "MODE_AES"; + default: return "MODE_DEFAULT"; + } +}; + +/** + * Liefert den Namen eines Übertragungs-Modus + **/ +Channel.getModeName = function(mode) +{ + switch (mode) + { + case "MODE_DEFAULT": return Channel.MODE.DEFAULT; + case "MODE_AES": return Channel.MODE.AES; + default: return Channel.MODE.DEFAULT; + } +}; + +/** + * Liefert den Namen einer Kategorie. + **/ +Channel.getCategoryName = function(category) +{ + switch (category) + { + case "CATEGORY_NONE": return Channel.CATEGORY.NONE; + case "CATEGORY_SENDER": return Channel.CATEGORY.SENDER; + case "CATEGORY_RECEIVER": return Channel.CATEGORY.RECEIVER; + default: return Channel.CATEGORY.NONE; + } +}; +/** + * channelgroup.js + **/ + +/** + * Kanalgruppe. + **/ +ChannelGroup = Class.create({ + + /** + * Konstruktor + **/ + initialize: function(device, channel) + { + this.m_updateChannelHandler = this.m_onUpdateChannel.bind(this); + + this.id = channel.groupId; + this.device = device; + this.typeName = device.deviceType.name; + this.typeDescription = device.deviceType.description; + this.channels = []; + this.thumbnailHTML = null; + this.imageHTML = null; + + this.update(device, channel); + }, + + /** + * Aktualisiert die Kanalgruppe + **/ + update: function(device, channel) + { + if ((device) && (channel)) + { + var deviceType = device.deviceType; + + channel.updateEvent.add(this.m_updateChannelHandler); + + this.channels.ex_pushUnique(channel); + this.channels.ex_sortBy("index"); + this.formName = this.channels.ex_joinItem("index", "+"); + this.name = this.channels.ex_joinItem("name", " "); + this.address = this.channels.ex_joinItem("address", " "); + this.thumbnailHTML = deviceType.getThumbnailHTML(this.formName); + this.imageHTML = deviceType.getImageHTML(this.formName); + } + + this.isUsable = false; + this.isVisible = false; + this.isLogged = false; + this.categories = []; + this.modes = []; + this.rooms = []; + this.subsections = []; + + this.channels.each(function(channel) { + this.isUsable |= channel.isUsable; + this.isVisible |= channel.isVisible; + this.isLogged |= channel.isLogged; + this.categories.push(channel.category); + this.modes.push(channel.mode); + this.rooms = this.rooms.concat(channel.rooms); + this.subsections = this.subsections.concat(channel.subsections); + }, this); + + this.categories = this.categories.uniq(); + this.modes = this.modes.uniq(); + this.rooms = this.rooms.uniq().ex_sortBy("name"); + this.subsections = this.subsections.uniq().ex_sortBy("name"); + }, + + m_onUpdateChannel: function(channel, eventArgs) + { + this.update(this.device, channel); + }, + + addSubsection: function(subsection) + { + if (!this.subsections.ex_contains(subsection)) + { + this.subsections.push(subsection); + this.subsections.ex_sortBy("name"); + } + }, + + removeSubsection: function(subsection) + { + if (this.subsections.ex_contains(subsection)) + { + this.subsections = this.subsections.without(subsection); + } + }, + + /** + * Liefert die Ids aller Programme, welche mindestens einen Kanal der Gruppe verwenden + **/ + listProgramIds: function() + { + var ids = []; + this.channels.each(function(channel) { + ids = ids.concat(homematic("Channel.listProgramIds", {"id": channel.id})); + }); + return ids.uniq(); + } + +}); + +/** + * device.js + **/ + +/** + * HomeMatic Gerät. + **/ +Device = Class.create({ + + /** + * Konstruktor + **/ + initialize: function(data) + { + this.m_updateChannelHandler = this.m_onUpdateChannel.bind(this); + + this.update(data); + }, + + /** + * Aktualisiert die Gerätedaten + **/ + update: function(data) + { + if (data) + { + var deviceType = DeviceTypeList.getDeviceType(data["type"]); + + this.id = data["id"]; + this.name = data["name"]; + this.address = data["address"]; + + // For debugging only + this.rfAddress = ""; + if (showRFAddress) { + var self = this; + homematic("Device.getRFAddressByAddress", {"address": this.address}, function(result) { + self.rfAddress = "

0x" + parseInt(result.split(":")[1]).toString(16); + }); + } + // End debugging + + this.interfaceName = data["interface"]; + this.interfaceDisplayName = data["interface_displayname"]; + this.isReadyConfig = data["isReady"]; + this.enabledServiceMsg = (data["enabledServiceMsg"] == "true") ? true : false; + this.thumbnailHTML = deviceType.getThumbnailHTML(); + this.imageHTML = deviceType.getImageHTML(); + this.deviceType = deviceType; + this.typeName = deviceType.name; + this.typeDescription = deviceType.description; + this.isDeletable = deviceType.isDeletable(); + this.isOperateGroupOnly = (data["operateGroupOnly"] == "true") ? true : false; + this.deviceInputCheck = false; + + this.channels = new Array(); + this.groups = new Array(); + this.singles = new Array(); + data["channels"].each(function(data) { + var channel = DeviceList.updateChannel(this, data); + channel.updateEvent.add(this.m_updateChannelHandler); + this.channels.push(channel); + + if (channel.partnerId == Channel.INVALID_ID) + { + this.singles.push(channel); + } + else + { + var group = DeviceList.updateChannelGroup(this, channel); + this.groups.ex_pushUnique(group); + } + }, this); + } + + this.isWritable = false; + this.isVisible = false; + this.isUsable = false; + this.isLogged = false; + this.isLogable = false; + this.categories = []; + this.modes = []; + this.rooms = []; + this.subsections = []; + + this.channels.each(function(channel) { + this.isWritable |= channel.isWritable; + this.isVisible |= channel.isVisible; + this.isUsable |= channel.isUsable; + this.isLogged |= channel.isLogged; + this.isLogable |= channel.isLogable; + this.categories.push(channel.category); + this.modes.push(channel.mode); + this.rooms = this.rooms.concat(channel.rooms); + this.subsections = this.subsections.concat(channel.subsections); + }, this); + + this.categories = this.categories.uniq(); + this.modes = this.modes.uniq(); + this.rooms = this.rooms.uniq().ex_sortBy("name"); + this.subsections = this.subsections.uniq().ex_sortBy("name"); + }, + + /** + * Startet die Aktualisierung der Werte des Gerätestatus + **/ + updateStatus:function(deviceStatus, rssiListHmRF) + { + // catch DUTY_CYCLE or DUTYCYCLE + if (typeof(deviceStatus.DUTY_CYCLE) !== "undefined") + this.DUTY_CYCLE = !!+deviceStatus.DUTY_CYCLE; + if (typeof(deviceStatus.DUTYCYCLE) !== "undefined") + this.DUTY_CYCLE = !!+deviceStatus.DUTYCYCLE; + + // catch OPERATING_VOLTAGE + if (typeof(deviceStatus.OPERATING_VOLTAGE) !== "undefined") + this.OPERATING_VOLTAGE = deviceStatus.OPERATING_VOLTAGE; + + // catch SABOTAGE + if (typeof(deviceStatus.SABOTAGE) !== "undefined") + this.SABOTAGE = !!+deviceStatus.SABOTAGE; + + // catch UNREACH + if (typeof(deviceStatus.UNREACH) !== "undefined") + this.UNREACH = !!+deviceStatus.UNREACH; + + // catch ERROR_OVERHEAT + if (typeof(deviceStatus.ERROR_OVERHEAT) !== "undefined") + this.ERROR_OVERHEAT = !!+deviceStatus.ERROR_OVERHEAT; + + // catch LOWBAT or LOW_BAT + if (typeof(deviceStatus.LOWBAT) !== "undefined") + this.LOWBAT = !!+deviceStatus.LOWBAT; + if (typeof(deviceStatus.LOW_BAT) !== "undefined") + this.LOWBAT = !!+deviceStatus.LOW_BAT; + + // catch CONFIG_PENDING + if (typeof(deviceStatus.CONFIG_PENDING) !== "undefined") + this.CONFIG_PENDING = !!+deviceStatus.CONFIG_PENDING; + + // catch UPDATE_PENDING + if (typeof(deviceStatus.UPDATE_PENDING) !== "undefined") + this.UPDATE_PENDING = !!+deviceStatus.UPDATE_PENDING; + + // catch RSSI_DEVICE and RSSI_PEER + // in case of a BidCos-RF device we take the RSSI + // values fron the supplied rssiListHmRF + if (this.interfaceName === 'BidCos-RF') + { + if (rssiListHmRF !== null) + { + var address = this.address; + var rssiInfo = rssiListHmRF.find(function(x) { return x.name === address }); + + if (rssiInfo !== null && typeof(rssiInfo) !== 'undefined' && + rssiInfo.partner !== null && typeof(rssiInfo.partner) !== 'undefined') + { + var rssiData = rssiInfo.partner[0].rssiData; + this.RSSI_DEVICE = rssiData[0]; + this.RSSI_PEER = rssiData[1]; + if(this.RSSI_DEVICE === 65536) + this.RSSI_DEVICE = -65535; + if(this.RSSI_PEER === 65536) + this.RSSI_PEER = -65535; + } + } + } + else + { + if (typeof(deviceStatus.RSSI_DEVICE) !== "undefined") + this.RSSI_DEVICE = deviceStatus.RSSI_DEVICE; + + if (typeof(deviceStatus.RSSI_PEER) !== "undefined") + this.RSSI_PEER = deviceStatus.RSSI_PEER; + } + + // update/calculate the web colors for displaying + // the RSSI values like in devconfig + if (this.RSSI_DEVICE !== null || this.RSSI_PEER !== null) + this.updateRssiColors(); + + // now we update the table cell with a pregenerated HTML + var cell = document.getElementById('DeviceStatus' + this.id); + if (cell !== null && typeof(cell) !== 'undefined') + { + var html = ''; + + if (this.enabledServiceMsg === false) + html += 'NO SERVICEMSG
'; + + if (this.CONFIG_PENDING === true) + html += 'CONFIG
'; + + if (this.UPDATE_PENDING === true) + html += 'UPDATE
'; + + if (this.LOWBAT === true) + html += 'LOWBAT
'; + + if (this.UNREACH === true) + html += 'UNREACH
'; + + if (this.ERROR_OVERHEAT === true) + html += 'OVERHEAT
'; + + if (this.SABOTAGE === true) + html += 'SABOTAGE
'; + + if (this.OPERATING_VOLTAGE && parseFloat(this.OPERATING_VOLTAGE) > 0) + html += parseFloat(this.OPERATING_VOLTAGE).toFixed(1) + ' V
'; + + if (this.RSSI_DEVICE && this.RSSI_DEVICE > -65535) + html += this.RSSI_DEVICE + ' dBm 
'; + + if (this.RSSI_PEER && this.RSSI_PEER > -65535) + html += this.RSSI_PEER + ' dBm 
'; + + if (this.DUTY_CYCLE === true) + html += 'DUTYCYCLE
'; + + cell.innerHTML = html; + } + }, + + /** + * Startet die Aktualisierung der RSSI Werte + **/ + updateRssiColors:function() + { + var getColorCode = function(rssi) + { + var RSSI_BAD = -120.0; + var RSSI_MEDIUM = -100.0; + var RSSI_GOOD = -20.0; + + var rssi_color = function(lower_bound, upper_bound, rssi) + { + var result = 256 * (rssi - lower_bound) / (upper_bound - lower_bound); + if (result < 0) result = 0; + if (result > 255) result = 255; + return Math.round(result); + }; + + if (rssi > -65535) + { + var red = rssi_color(RSSI_GOOD, RSSI_MEDIUM, rssi); + var green = rssi_color(RSSI_BAD, RSSI_MEDIUM, rssi); + return "#" + ('00'+(red).toString(16)).substr(-2) + + ('00'+(green).toString(16)).substr(-2) + + "00"; + } + else + return "#000000"; + }; + + this.rssiDeviceColor = getColorCode(this.RSSI_DEVICE); + this.rssiPeerColor = getColorCode(this.RSSI_PEER); + }, + + updateInterfaceDisplayName: function(interfaceDisplayName) { + this.interfaceDisplayName = interfaceDisplayName; + var devInterfaceDisplayNameCell = document.getElementById('DeviceInterfaceDisplayName' + this.id); + if (devInterfaceDisplayNameCell !== null && typeof(devInterfaceDisplayNameCell) !== 'undefined') { + devInterfaceDisplayNameCell.innerHTML = interfaceDisplayName; + } + }, + /** + * Legt den Namen des Geräts fest. + **/ + setName: function(name) + { + if (name != this.name) + { + var result = homematic("Device.setName", {id: this.id, name: name}); + if (typeof(result) == "string") + { + this.name = result; + } + } + + return this.name; + }, + + setUsable: function(isUsable) + { + }, + + setVisible: function(isVisible) + { + }, + + setLogging: function(isLogged) + { + }, + + /** + * Legt fest, ob das Geraet Servicemeldungen auslöst oder nicht + **/ + setEnabledServiceMsg: function(enabledServiceMsg) + { + if (this.enabledServiceMsg != enabledServiceMsg) + { + var result = homematic("Device.setEnabledServiceMsg", {id: this.id, isEnabled: enabledServiceMsg}); + if (typeof(result) == "boolean" && result === true) + { + this.enabledServiceMsg = enabledServiceMsg; + } + } + + return this.enabledServiceMsg; + }, + + setDeviceInputCheck: function() { + this.deviceInputCheck = true; + }, + + getDeviceInputCheck: function() { + return this.deviceInputCheck; + }, + + m_onUpdateChannel: function(channel, eventArgs) + { + this.update(); + }, + + addSubsection: function(subsection) + { + if (!this.subsections.ex_contains(subsection)) + { + this.subsections.push(subsection); + this.subsections.ex_sortBy("name"); + } + }, + + removeSubsection: function(subsection) + { + if (this.subsections.ex_contains(subsection)) + { + this.subsections = this.subsections.without(subsection); + } + }, + + getName: function() + { + return this.name; + }, + + /** + * Liefert den HTML-Code des Geräte-Vorschau-Bildes + **/ + getThumbnailHTML: function() + { + if (this.thumbnailHTML === null) + { + this.thumbnailHTML = this.deviceType.getThumbnailHTML(); + } + + return this.thumbnailHTML; + }, + + /** + * Liefert den HTML-Code des Gerätebildes + **/ + getImageHTML: function() + { + if (this.imageHTML === null) + { + this.imageHTML = this.deviceType.getImageHTML(); + } + + return this.imageHTML; + }, + + /** + * Liefert die Ids der Programme, die mindestens einen Kanal des Geräts verwenden + **/ + listProgramIds: function() + { + return homematic("Device.listProgramIds", {id: this.id}); + }, + + /** + * Ermittelt, ob das Gerät direkte Verknüpfungen oder Programme besitzt. + **/ + hasLinksOrPrograms: function(callback) + { + if (this.interfaceName != "HmIP-RF") { + homematic("Device.hasLinksOrPrograms", {id: this.id}, callback); + } else { + var self = this; + var result = false; + + var arLinkPeers = homematic("Interface.getLinkPeers", {'interface': this.interfaceName, 'address': this.address}); + jQuery.each(arLinkPeers, function(index,val) { + var linkPeerAddress = val.split(":")[0]; + if (self.address != linkPeerAddress) { + result = true; + return; // leave the each loop + } + }); + + // No links available, check if the device is used within programs + if (!result) { + result = homematic("Device.hasPrograms", {'id': this.id}); + } + + if (callback) { + callback(result); + } + } + }, + + /** + * Asynchron. Versucht ein Gerät zu löschen. + **/ + remove: function(flags, callback) + { + var _this_ = this; + var _callback_ = callback; + + homematic("Interface.deleteDevice", { + "interface": this.interfaceName, + address: this.address, + flags: flags + }, function(result, error) { + if (result === true) + { + // DeviceList.removeDevice(_this_); + } + if (_callback_) { _callback_(result, error); } + }); + } + +}); +/** + * devicelist.js + * Geräteliste. + **/ + +/** + * Geräteliste. + **/ +DeviceList = Singleton.create({ + + /** + * Konstruktor + **/ + initialize: function() + { + this.m_addRoomHandler = this.m_onAddRoom.bind(this); + this.m_removeRoomHandler = this.m_onRemoveRoom.bind(this); + this.m_addChannelToRoomHandler = this.m_onAddChannelToRoom.bind(this); + this.m_removeChannelFromRoomHandler = this.m_onRemoveChannelFromRoom.bind(this); + + this.m_addSubsectionHandler = this.m_onAddSubsection.bind(this); + this.m_removeSubsectionHandler = this.m_onRemoveSubsection.bind(this); + this.m_addChannelToSubsectionHandler = this.m_onAddChannelToSubsection.bind(this); + this.m_removeChannelFromSubsectionHandler = this.m_onRemoveChannelFromSubsection.bind(this); + + this.addEvent = new eQ3.Event(); + this.removeEvent = new eQ3.Event(); + + this.devices = {}; + this.channels = {}; + this.groups = {}; + }, + + /** + * Aktualisiert ein Gerät + **/ + updateDevice: function(data, callback) + { + var device; + + if (data !== null) + { + var id = data["id"]; + device = this.devices[id]; + data["interface_displayname"] = this.loadIfDisplayName(data); + + if (typeof(device) != "undefined") + { + device.update(data); + } + else + { + device = new Device(data); + this.devices[id] = device; + this.addEvent.fire(this, {device: device}); + } + } + + if (callback) { callback(); } + return device; + }, + + /** + * Aktualisiert einen Kanal + **/ + updateChannel: function(device, data) + { + var channel; + + if (data !== null) + { + var id = data["id"]; + channel = this.channels[id]; + + if (typeof(channel) != "undefined") + { + channel.update(device, data); + } + else + { + channel = new Channel(device, data); + this.channels[id] = channel; + } + } + + return channel; + }, + + /** + * Aktualisiert eine Kanalgruppe + **/ + updateChannelGroup: function(device, channel) + { + var id = channel.groupId; + var group = this.groups[id]; + + if (typeof(group) != "undefined") + { + group.update(device, channel); + } + else + { + group = new ChannelGroup(device, channel); + this.groups[id] = group; + } + + return group; + }, + + /** + * Entfernt ein Gerät aus dem Datenmodell + **/ + removeDevice: function(device) + { + // alert("removeDevice: " + device.id); + + delete this.devices[device.id]; + device.groups.each(function(group) { delete this.groups[group.id]; }, this); + device.channels.each(function(channel) { delete this.channels[channel.id]; }, this); + + this.removeEvent.fire(this, {device: device}); + }, + + /** + * Liefert die Liste aller Geräte. + **/ + listDevices: function() + { + return Object.values(this.devices); + }, + + /** + * Liefert die Liste aller Kanalgruppen. + **/ + listChannelGroups: function() + { + return Object.values(this.groups); + }, + + /** + * Liefert die Liste aller Kanäle. + **/ + listChannels: function() + { + return Object.values(this.channels); + }, + + /** + * Liefert die Liste aller Kanäle ohne Gruppen-Partner. + **/ + listSingleChannels: function() + { + var singles = new Array(); + for (var id in m_devices) { singles = singles.concat(m_devices[id].SingleChannels()); } + return singles; + }, + + loadBidCosGateways: function() + { + this.BidCosGateways=[]; + this.allBidCosDevsList = homematic("Interface.listDevices", {"interface": "BidCos-RF"}); + var rfGateways = homematic("BidCoS_RF.getConfigurationRF"); + if (rfGateways) { + for (i = 0, len = rfGateways.interfaces.length; i < len; i++) { + var gateway = rfGateways.interfaces[i]; + if (gateway.type === globalLGWTypes.HMLGW2) { + this.BidCosGateways.push( + new BidcosRfPage.Gateway() + .setGatewayClass("RF") + .setType(gateway.type) + .setUserName((gateway.userName.length > 0) ? gateway.userName : gateway.serialNumber) + .setAddress(gateway.serialNumber) + .setKey(gateway.encryptionKey) + .setIP(gateway.ipAddress) + ); + } + } + this.BidCosGateways.sort((a, b) => a.m_userName.localeCompare(b.m_userName, undefined, { numeric: true, sensitivity: 'base' })); + for (i = 0, len = this.BidCosGateways.length; i < len; i++) { + DeviceListPage.INTERFACES.push({id:this.BidCosGateways[i].m_userName, name:this.BidCosGateways[i].m_userName}); + } + } + }, + + loadIfDisplayName: function(data) + { + if (typeof this.BidCosGateways === 'undefined') { this.loadBidCosGateways(); } + var dispname = data["interface"]; + if ( this.allBidCosDevsList && this.BidCosGateways.length > 0 && data["interface"] === "BidCos-RF") { + var idx = this.allBidCosDevsList.findIndex(({ address }) => address === data["address"]); + if (idx > -1) { + var _device= this.allBidCosDevsList[idx]; + var gwIdx = this.BidCosGateways.findIndex(({ m_address }) => m_address === _device["interface"]); + if ( gwIdx > -1 ) { + dispname = (this.BidCosGateways[gwIdx].m_userName.length > 0) ? this.BidCosGateways[gwIdx].m_userName : _device["interface"]; + } + } + } + return dispname; + }, + /** + * Lädt die Geräteliste erneut + **/ + reload: function(loader) + { + eQ3.HomeMatic.Event.subscribe("delete", function(type, data) { + var address = data; + var device = DeviceList.getDeviceByAddress(address); + + if (device) { DeviceList.removeDevice(device); } + }); + RoomList.addEvent.add(this.m_addRoomHandler); + RoomList.removeEvent.add(this.m_removeRoomHandler); + SubsectionList.addEvent.add(this.m_addSubsectionHandler); + SubsectionList.removeEvent.add(this.m_removeSubsectionHandler); + + var _loader_ = loader; + var _this_ = this; + var _ids_ = []; + var current = 0; + + var typeCCU1 = "HM-CCU-1"; + + var loadNext = function() + { + if (current < _ids_.length) + { + _this_.beginUpdateDevice(_ids_[current], loadNext); + current++; + _loader_.reportLoadingState(current / _ids_.length); + } + else + { + _loader_.ready(); + } + }; + + this.devices = {}; + this.channels = {}; + this.groups = {}; + + var self=this; + homematic("Device.listAllDetail", null, function(deviceList) { + // alert("after listAllDetail devices: " + deviceList); + jQuery.each(deviceList, function (index, data) { + // console.dir (data); + if (data !== null && (data["type"] != typeCCU1)) + { + var id = data["id"]; + var device = self.devices[id]; + data["interface_displayname"] = self.loadIfDisplayName(data); + + if (typeof(device) != "undefined") + { + device.update(data); + } + else + { + device = new Device(data); + self.devices[id] = device; + self.addEvent.fire(this, {device: device}); + } + } + }); + loader.ready(); + }); +/** + homematic("Device.listAll", null, function(ids) { + if (ids !== null) + { + _ids_ = ids; + loadNext(); + } + else + { + loader.ready(); + } + }); + */ + }, + + /** + * Startet die Aktualisierung des Status aller Geräte. + **/ + updateDeviceStatus:function() + { + var _this_ = this; + + homematic("Interface.rssiInfo", {"interface": "BidCos-RF"}, function(rssiInfo) { + for (var id in _this_.devices) + { + var device = _this_.devices[id]; + if (device !== null && typeof(device) !== 'undefined' && device.interfaceName !== 'VirtualDevices') + { + homematic("Device.listStatus", {"id": device.id, "address": device.address, "interface": device.interfaceName}, function(data) { + if (data !== null && typeof(data) !== 'undefined') + { + var id = data["ID"]; + if (id !== null && typeof(id) !== 'undefined') + { + var device = _this_.devices[id]; + if (device !== null && typeof(device) !== 'undefined') + device.updateStatus(data, rssiInfo); + } + } + }); + } + } + }); + }, + + updateInterfaceDisplayName:function(addr,gwName) { + var _this_ = this; + for (var id in _this_.devices) { + var device = _this_.devices[id]; + if (device.address === addr) { + device.updateInterfaceDisplayName(gwName); + } + } + }, + + /** + * Startet die Akualisierung eines Geräts. + **/ + beginUpdateDevice:function(id, callback) + { + var _this_ = this; + var _callback_ = callback; + + homematic("Device.get", {"id": id}, function(data) { _this_.updateDevice(data, _callback_); }); + }, + + /** + * Liefert ein Gerät anhand seiner Id. + **/ + getDevice: function(id) + { + return this.devices[id]; + }, + + /** + * Liefert ein Gerät anhand seiner Seriennummer. + **/ + getDeviceByAddress: function(address) + { + for (var id in this.devices) + { + var device = this.devices[id]; + if (device.address == address) + { + return device; + } + } + + return undefined; + }, + + /** + * Liefert eine Kanalgruppe anhand ihrer Id + **/ + getChannelGroup: function(id) + { + return this.groups[id]; + }, + + /** + * Liefert einen Kanal anhand seiner Id. + **/ + getChannel: function(id) + { + return this.channels[id]; + }, + + /** + * Liefert einen Kanal anhand seiner Seriennummer. + **/ + getChannelByAddress: function(address) + { + for (var id in this.channels) + { + var channel = this.channels[id]; + if (channel.address == address) + { + return channel; + } + } + + return undefined; + }, + + /** + * Event-Handler. + * Wird aufgerufen, sobald ein Raum hinzugefügt wurde. + **/ + m_onAddRoom: function(roomList, eventArgs) + { + var room = eventArgs.room; + room.addChannelEvent.add(this.m_addChannelToRoomHandler); + room.removeChannelEvent.add(this.m_removeChannelFromRoomHandler); + + room.channelIds.each(function(id) { + var channel = DeviceList.getChannel(id); + if (channel) { channel.addToRoom(room); } + }); + }, + + /** + * Event-Handler. + * Wird aufgerufen, sobald ein Raum gelöscht wurde. + **/ + m_onRemoveRoom: function(roomList, eventArgs) + { + var room = eventArgs.room; + room.addChannelEvent.add(this.m_addChannelToRoomHandler); + room.removeChannelEvent.add(this.m_removeChannelFromRoomHandler); + + room.channelIds.each(function(id) { + var channel = DeviceList.getChannel(id); + if (channel) { channel.removeFromRoom(room); } + }); + }, + + /** + * Event-Handler. + * Wird aufgerufen, sobald ein Kanal einem Raum hinzugefügr wurde. + **/ + m_onAddChannelToRoom: function(room, eventArgs) + { + var channel = this.channels[eventArgs.channelId]; + if (channel) { channel.addToRoom(room); } + }, + + /** + * Event-Handler. + * Wird aufgerufen, sobald ein Kanal aus einem Raum entfernt wurde. + **/ + m_onRemoveChannelFromRoom: function(room, eventArgs) + { + var channel = this.channels[eventArgs.channelId]; + if (channel) { channel.removeFromRoom(room); } + }, + + /** + * Event-Handler. + * Wird aufgerufen, sobald ein neues Gewerk hinzugefügt wurde. + **/ + m_onAddSubsection: function(subsectionList, eventArgs) + { + var subsection = eventArgs.subsection; + subsection.addChannelEvent.add(this.m_addChannelToSubsectionHandler); + subsection.removeChannelEvent.add(this.m_removeChannelFromSubsectionHandler); + + subsection.channelIds.each(function(id) { + var channel = DeviceList.getChannel(id); + if (channel) { channel.addToSubsection(subsection); } + }); + }, + + /** + * Event-Handler. + * Wird aufgerufen, sobald ein Gewerk gelöscht wurde. + **/ + m_onRemoveSubsection: function(subsectionList, eventArgs) + { + var subsection = eventArgs.subsection; + subsection.addChannelEvent.add(this.m_addChannelToSubsectionHandler); + subsection.removeChannelEvent.add(this.m_removeChannelFromSubsectionHandler); + + subsection.channelIds.each(function(id) { + var channel = DeviceList.getChannel(id); + if (channel) { channel.removeFromSubsection(subsection); } + }); + }, + + /** + * Event-Handler. + * Wird aufgerufen, sobald ein Kanal einem Gewerk hinzugefügt wurde. + **/ + m_onAddChannelToSubsection: function(subsection, eventArgs) + { + var channel = this.channels[eventArgs.channelId]; + if (channel) { channel.addToSubsection(subsection); } + }, + + /** + * Event-Handler. + * Wird aufgerufen, sobald ein Kanal aus einem Gewerk entfernt wurde. + **/ + m_onRemoveChannelFromSubsection: function(subsection, eventArgs) + { + var channel = this.channels[eventArgs.channelId]; + if (channel) { channel.removeFromSubsection(subsection); } + } + +}); +/** + * layer.js + * Ebenen + **/ + +/** + * Ebenenverwaltung. + **/ +Layer = new function() +{ + /*####################*/ + /*# Private Elemente #*/ + /*####################*/ + + var Z_INDEX_INCR = 100; // Inkrement für den Ebenenindex + + var m_container = null; // Container für die Ebenen + var m_maxIndex = 0; // Maximal vergebener Index + var m_layer = {}; // Speichert die Indizes aller Ebenen + + /** + * Ermittelt den maximalen Z-Index. + **/ + var getMaxIndex = function() + { + var maxIndex = 0; + + for (id in m_layer) + { + var index = m_layer[id]; + if (index > maxIndex) { maxIndex = index; } + } + + return maxIndex; + }; + + /*########################*/ + /*# Öffentliche Elemente #*/ + /*########################*/ + + /** + * Initialisiert die Ebenenverwaltung. + **/ + this.init = function() + { + m_container = document.createElement("div"); + m_maxIndex = 0; + m_layer = {}; + + Element.addClassName(m_container, "LayerContainer"); + $("body").appendChild(m_container); + }; + + /** + * Fügt eine Ebene hinzu. + **/ + this.add = function(layer) + { + m_maxIndex = getMaxIndex() + Z_INDEX_INCR; + layer._layerId = m_maxIndex; + m_layer[layer._layerId] = m_maxIndex; + + Element.setStyle(layer, {"zIndex": m_maxIndex, "position": "absolute"}); + m_container.appendChild(layer); + }; + + /** + * Entfernt eine Ebene. + **/ + this.remove = function(layer) + { + try { + delete(m_layer[layer._layerId]); + m_maxIndex = getMaxIndex(); + m_container.removeChild(layer); + } catch(e) {}; + }; + +}(); +/** + * dialogbox.js + * Autor: Falk Werner, eQ-3 Entwicklung GmbH + **/ + +/** + * Allgmeine Dialogbox für die Kommunikation mit dem Benutzer. + **/ +DialogBox = function(callback, width, height) +{ + /*####################*/ + /*# Private Elemente #*/ + /*####################*/ + + var DEFAULT_CONTENT_WIDTH = 320; // Konstante. Standardbreite des Arbeitsbereichs + var DEFAULT_CONTENT_HEIGHT = 80; // Konstante. Standardhöhe des Arbeitsbereichs + var TITLE_HEIGHT = 20; // Konstante. Höhe der Titelleiste + var FOOTER_HEIGHT = 40; // Konstante. Höhe der Fußleiste + var BORDER_WIDTH = 2; // Konstante. Breite des Dialog-Rahmens + var BUTTON_HEIGHT = 32; // Konstante. Höhe eines Buttons + var BUTTON_WIDTH = 100; // Konstante. Breite eines Buttons + var BUTTON_BORDER = 1; // Konstante. Rahmenbreite eines Buttons + + var m_wrapper; // DOM-Element. Dialog-Hintergrund + var m_dialog; // DOM-Element. Dialogfenster + var m_title; // DOM-Element. Dialog-Titel + var m_content; // DOM-Element. Inhalt + var m_footer; // DOM-Element. Fußleiste + var m_callback = callback; // Rückruffunktion + + /** + * Interne Klasse. + **/ + var DialogBoxButton = function(caption, dialogResult, style) + { + /*####################*/ + /*# Private Elemente #*/ + /*####################*/ + + var m_button; // DOM-Element. Button + var m_caption; // DOM-Element. Beschriftung + var m_onClickListener; // onClick-Ereignis + var m_dialogResult = dialogResult; // Rückgabewert + + /** + * onClick-Ereignis-Handler. + **/ + var onClick = function() + { + if (m_callback) { m_callback(dialogResult); } + }; + + /*########################*/ + /*# Öffentliche Elemente #*/ + /*########################*/ + + /** + * Setzt die Beschriftung des Buttons. + **/ + this.setCaption = function(caption) + { + if ("undefined" != typeof(caption)) + { + m_caption.innerHTML = ""; + m_caption.appendChild(document.createTextNode(caption)); + } + }; + + /** + * Ermittelt das DOM-Element. + **/ + this.getElement = function() + { + return m_button; + }; + + /*###################*/ + /*# Initialisierung #*/ + /*###################*/ + + // Button-Style + if ("undefined" == typeof(style["width"])) { style["width"] = BUTTON_WIDTH + "px"; } + if ("undefined" == typeof(style["float"])) { style["float"] = "left"; } + style["height"] = BUTTON_HEIGHT + "px"; + style["margin"] = parseInt((FOOTER_HEIGHT - BUTTON_HEIGHT) / 2) + "px"; + + // Button-Beschriftung + m_caption = document.createElement("div"); + Element.addClassName(m_caption, "DialogButtonCaption"); + Element.setStyle(m_caption, + { + "margin" : BUTTON_BORDER + "px", + "lineHeight": (BUTTON_HEIGHT - (2 * BUTTON_BORDER)) + "px" + }); + m_caption.appendChild(document.createTextNode(caption)); + + // Button-Element + var margin = parseInt((FOOTER_HEIGHT - BUTTON_HEIGHT - (2 * BUTTON_BORDER)) / 2); + m_button = document.createElement("div"); + Element.addClassName(m_button, "DialogButton"); + Element.setStyle(m_button, style); + m_button.appendChild(m_caption); + + // Event-Handler + m_onClickListener = onClick.bindAsEventListener(this); + Event.observe(m_caption, "click", m_onClickListener); + }; + + /*########################*/ + /*# Öffentliche Elemente #*/ + /*########################*/ + + /** + * Zeigt die Dialogbox an. + **/ + this.show = function() + { + Layer.add(m_wrapper); + m_wrapper.show(); + }; + + /** + * Schließt die Dialogbox und entfernt sie aus dem DOM. + **/ + this.close = function() + { + Layer.remove(m_wrapper); + }; + + /** + * Setzt den Titel der Dialogbox. + **/ + this.setTitle = function(title) + { + m_title.innerHTML = ""; + m_title.appendChild(document.createTextNode(title)); + }; + + /** + * Setzt den Inhalt der Dialogbox mit einem HTML-Text. + **/ + this.setContentHTML = function(contentHTML) + { + m_content.innerHTML = contentHTML; + }; + + /** + * Setzt den Inhalt der Dialogbox mit einem DOM-Element. + **/ + this.setContent = function(content) + { + m_content.innerHTML = ""; + m_content.appendChild(content); + }; + + /** + * Fügt dem Dialog einen Button hinzu. + **/ + this.addButton = function(caption, dialogResult, style) + { + var button = new DialogBoxButton(caption, dialogResult, style); + m_footer.appendChild(button.getElement()); + + return button; + }; + + /*###################*/ + /*# Initialisierung #*/ + /*###################*/ + + var contentHeight = DEFAULT_CONTENT_HEIGHT; + var contentWidth = DEFAULT_CONTENT_WIDTH; + if ("undefined" != typeof(height)) { contentHeight = height; } + if ("undefined" != typeof(width )) { contentWidth = width; } + + var dialogWidth = contentWidth + (2 * BORDER_WIDTH); + var dialogHeight = contentHeight + TITLE_HEIGHT + FOOTER_HEIGHT + (4 * BORDER_WIDTH); + + // Titelleiste + m_title = document.createElement("div"); + Element.addClassName(m_title, "DialogBoxTitle"); + Element.setStyle(m_title, + { + "top" : BORDER_WIDTH + "px", + "left" : BORDER_WIDTH + "px", + "width" : contentWidth + "px", + "height": TITLE_HEIGHT + "px" + }); + + // Arbeitsbereich + m_content = document.createElement("div"); + Element.addClassName(m_content, "DialogBoxContent"); + Element.setStyle(m_content, + { + "top" : TITLE_HEIGHT + (2 * BORDER_WIDTH) + "px", + "left" : BORDER_WIDTH + "px", + "width" : contentWidth + "px", + "height": contentHeight + "px" + }); + + // Fußleiste + m_footer = document.createElement("div"); + Element.addClassName(m_footer, "DialogBoxFooter"); + Element.setStyle(m_footer, + { + "top" : TITLE_HEIGHT + contentHeight + (3 * BORDER_WIDTH) + "px", + "left" : BORDER_WIDTH + "px", + "width" : contentWidth + "px", + "height": FOOTER_HEIGHT + "px" + }); + + // Dialog + m_dialog = document.createElement("div"); + Element.addClassName(m_dialog, "DialogBox"); + Element.setStyle(m_dialog, + { + "top" : parseInt((WebUI.getHeight() - dialogHeight) / 2) + "px", + "left" : parseInt((WebUI.getWidth() - dialogWidth) / 2) + "px", + "width" : dialogWidth + "px", + "height": dialogHeight + "px" + }); + m_dialog.appendChild(m_title); + m_dialog.appendChild(m_content); + m_dialog.appendChild(m_footer); + new Draggable(m_dialog); + + // Dialog-Rahmen + m_wrapper = document.createElement("div"); + Element.addClassName(m_wrapper, "DialogBoxWrapper"); + m_wrapper.appendChild(m_dialog); +}; + +/** + * DialogResult + * Vordefinierte Rückgabewerte der DialogBox. + **/ +DialogResult = +{ + "ABORT" : -1, + "CANCEL": -2, + "IGNORE": -3, + "NO" : -4, + "NONE" : -5, + "OK" : -6, + "RETRY" : -7, + "YES" : -8 +}; + +/** + * messagebox.js + * Autor: Falk Werner, eQ-3 Entwicklung GmbH + **/ + + +MessageBox = Class.create({ + + initialize: function() + { + var screenWidth = WebUI.getWidth(); + var screenHeight = WebUI.getHeight(); + var frameWidth = MessageBox.DEFAULT_CONTENT_WIDTH + 20; + var frameHeight = MessageBox.DEFAULT_CONTENT_HEIGHT + 50; + var frameX = parseInt((screenWidth - frameWidth) / 2); + var frameY = parseInt((screenHeight - frameHeight) / 2); + + this.msgBox; + this.screenWidth = screenWidth; + this.screenHeight = screenHeight; + this.m_action = null; + this.frameWidth = frameWidth; + this.frameHeight = frameHeight; + + this.m_layer = document.createElement("div"); + + this.m_layer.className = "DialogLayer"; + + this.m_content = new UI.Text() + .setText("") + .setPosition(10, 10) + .setWidth(this.frameWidth - 20) + .setHeight(this.frameHeight - 50); + + this.m_okButton = new UI.Button() + .setPosition(parseInt((this.frameWidth - 150) / 2), this.frameHeight - 30) + .setText("OK") + .setAction(this.ok, this); + + this.m_frame = new UI.Frame() + .setTitle("Info") + .setContentSize(this.frameWidth, this.frameHeight) + .setPosition(frameX, frameY) + .add(this.m_content) + .add(this.m_okButton); + + this.m_layer.appendChild(this.m_frame.getElement()); + Layer.add(this.m_layer); + + }, + + setId: function(id) + { + this.m_layer.id = id; + return this; + }, + + centerBarGraph: function(id) + { + jQuery("#" + id).css("padding-left" , parseInt((this.frameWidth - 150) / 2)); + }, + + setTitle: function(title) + { + this.m_frame.setTitle(title); + return this; + }, + + setContentSize: function(width, height) + { + this.m_content.setWidth(width); + this.m_frame.setContentSize(parseInt(width) + 20, parseInt(height) + 50); + this.m_content.setWidth(width); + this.m_content.setHeight(height); + this.m_okButton.setPosition(parseInt(((width - 140) / 2)), parseInt(height) + 10); + this.m_frame.setPosition(parseInt((this.screenWidth - width) / 2),parseInt((this.screenHeight - this.m_frame.getHeight()) / 2) ); + return this; + }, + + hideOkButton: function() + { + jQuery(".UIButton").hide(); + }, + + setText: function(text) + { + this.m_content.setText(text); + return this; + }, + + centerText: function() + { + jQuery(".UIText").addClass("alignCenter"); + }, + + setHtml: function(html) + { + this.m_content.setHtml(html); + return this; + }, + + setAction: function(action, context) + { + if (typeof(context) != "undefined") { this.m_action = action.bind(context); } + else { this.m_action = action; } + + return this; + }, + + ok: function() + { + Layer.remove(this.m_layer); + if (typeof this.m_action == "function") { this.m_action(); } + }, + + setOkButtonText: function(lbl) { + this.m_okButton.setText(lbl); + } + +}); + +MessageBox.DEFAULT_CONTENT_HEIGHT = 80; +MessageBox.DEFAULT_CONTENT_WIDTH = 320; + +MessageBox.show = function(title, content, callback, width, height, id, barGraphId, btnText) +{ + this.msgBox = new MessageBox(); + this.msgBox.setTitle(title); + this.msgBox.setHtml(content); + + translatePage(".DialogLayer"); + + if (callback && callback != "") + { + this.msgBox.setAction(callback); + } + + if ((width && width != "") && (height && height != "")) + { + this.msgBox.setContentSize(width, height); + } + + if (typeof btnText != "undefined") { + this.msgBox.setOkButtonText(btnText); + } + + if (id) { + this.msgBox.setId(id); + } + + if (barGraphId) { + this.msgBox.hideOkButton(); + this.msgBox.centerBarGraph(barGraphId); + } + +}; + +MessageBox.setText = function(txt) { + this.msgBox.setText(txt); +}; + +MessageBox.centerText = function() { + this.msgBox.centerText(); +}; + +MessageBox.setHtml = function(html) { + this.msgBox.setHtml(html); +}; + +MessageBox.close = function() { + this.msgBox.ok(); +}; + +MessageBox.setContentSize =function(width, height) { + this.msgBox.setContentSize(width, height); +}; +/** + * yesnodialog.js + **/ + +/** + * Dialogbox mit den Schaltflächen "Ja" und "Neine" + * Normalerweise wird als content Text übergeben, + * wenn contentType 'html' gesetzt ist, kann auch HTML übergeben werden. + * Die Höhe des Dialoges sollte sich dynamisch der Contentgröße anpassen. + **/ +YesNoDialog = Class.create({ + + initialize: function(title, content, callback, contentType) + { + var _this_ = this; + + this.RESULT_NO = 0; + this.RESULT_YES = 1; + + this.m_contentType = contentType; + this.m_callback = callback; + this.m_layer = document.createElement("div"); + this.m_layer.className = "YesNoDialogLayer"; + this.content = content; + + var dialog = document.createElement("div"); + dialog.className = "YesNoDialog"; + + var titleElement = document.createElement("div"); + titleElement.className = "YesNoDialogTitle"; + titleElement.appendChild(document.createTextNode(title)); + titleElement.onmousedown = function(event) { new Drag(this.parentNode, event); }; + dialog.appendChild(titleElement); + + var contentWrapper = document.createElement("div"); + contentWrapper.className = "YesNoDialogContentWrapper"; + + this.contentElement = document.createElement("div"); + this.contentElement.className = "YesNoDialogContent"; + + if (this.m_contentType == "html") { + this.contentElement.innerHTML = content; + } else { + this.contentElement.appendChild(document.createTextNode(content)); + } + + contentWrapper.appendChild(this.contentElement); + + dialog.appendChild(contentWrapper); + + var footer = document.createElement("div"); + footer.className= "YesNoDialogFooter"; + + var yesButton = document.createElement("div"); + yesButton.className = "YesNoDialog_yesButton borderRadius5px colorGradient50px"; + yesButton.appendChild(document.createTextNode(translateKey('dialogYes'))); + yesButton.onclick = function() { _this_.yes(); }; + yesButton.id="btnYes"; + footer.appendChild(yesButton); + + var noButton = document.createElement("div"); + noButton.className = "YesNoDialog_noButton borderRadius5px colorGradient50px"; + noButton.appendChild(document.createTextNode(translateKey('dialogNo'))); + noButton.onclick = function() { _this_.no(); }; + noButton.id = "btnNo"; + footer.appendChild(noButton); + + dialog.appendChild(footer); + + this.m_layer.appendChild(dialog); + Layer.add(this.m_layer); + + this.run(); + + translatePage(".YesNoDialog"); + this.setHeight(); + }, + + //This is the starting point + run: function() { + + }, + + close: function(result) + { + Layer.remove(this.m_layer); + if (this.m_callback) { this.m_callback(result); } + }, + + yes: function() + { + this.close(YesNoDialog.RESULT_YES); + }, + + no: function() + { + this.close(YesNoDialog.RESULT_NO); + }, + + btnTextYes: function(btnTxt) { + jQuery(".YesNoDialog_yesButton").text(btnTxt); + }, + + btnYesHide: function() { + jQuery("#btnYes").addClass("hidden"); + }, + + btnYesShow: function() { + jQuery("#btnYes").removeClass("hidden"); + }, + + btnTextNo: function(btnTxt) { + jQuery(".YesNoDialog_noButton").text(btnTxt); + }, + + btnNoHide: function() { + jQuery("#btnNo").addClass("hidden"); + }, + + btnNoShow: function() { + jQuery("#btnNo").removeClass("hidden"); + }, + + setHeight: function() { + var heightContentWrapper = jQuery(".YesNoDialogContentWrapper").height(), + yesNoElm = jQuery(".YesNoDialog"), + footerElm = jQuery(".YesNoDialogFooter"); + + yesNoElm.css("height", heightContentWrapper + 78); + footerElm.css("top", heightContentWrapper + 26); + yesNoElm.css("top", (window.innerHeight / 2) - (yesNoElm.height() / 2)); + }, + + resetHeight: function() { + this.setHeight(); + }, + + // Here we can change the default class of the content element + setContentClass: function (cl) { + this.contentElement.className = cl; + }, + + setWidth: function(dlgWidth) { + var defaultWith = 600, + offsetWidth = 4, + offsetPosYesButton = 109, + offsetDialogHeight = 78, + offsetDialogFooterHeight = 26; + + var width = dlgWidth - offsetWidth, + yesButtonPos = dlgWidth - offsetPosYesButton, + position = jQuery(".YesNoDialog").position(); + + // dlgWidth = (defaultWith < dlgWidth) ? defaultWith : dlgWidth; + + jQuery(".YesNoDialog").width(dlgWidth).css({left: position.left + ((defaultWith - dlgWidth) / 2)}); + jQuery(".YesNoDialogTitle").width(width); + jQuery(".YesNoDialogContentWrapper").width(width); + jQuery(".YesNoDialogFooter").width(width); + jQuery(".YesNoDialog_yesButton").css("left", yesButtonPos); + + //Dialoghöhe an Content anpassen. + jQuery(".YesNoDialog").css("height", jQuery(".YesNoDialogContentWrapper").height() + offsetDialogHeight); + jQuery(".YesNoDialogFooter").css("top", jQuery(".YesNoDialogContentWrapper").height() + offsetDialogFooterHeight); + } + +}); + +YesNoDialog.RESULT_NO = 0; +YesNoDialog.RESULT_YES = 1; +/** + * euladialog.js + **/ + +/** + * Dialogbox mit den Schaltflächen "Ja" und "Neine" + * Normalerweise wird als content Text übergeben, + * wenn contentType 'html' gesetzt ist, kann auch HTML übergeben werden. + * Die Höhe des Dialoges sollte sich dynamisch der Contentgröße anpassen. + **/ +EulaDialog = Class.create({ + + initialize: function(title, content, callback, contentType) + { + var _this_ = this; + + this.m_contentType = contentType; + this.m_callback = callback; + this.m_layer = document.createElement("div"); + this.m_layer.className = "EulaDialogLayer"; + + var dialog = document.createElement("div"); + dialog.className = "EulaDialog"; + + var titleElement = document.createElement("div"); + titleElement.className = "EulaDialogTitle"; + titleElement.appendChild(document.createTextNode(title)); + titleElement.onmousedown = function(event) { new Drag(this.parentNode, event); }; + dialog.appendChild(titleElement); + + var contentWrapper = document.createElement("div"); + contentWrapper.className = "EulaDialogContentWrapper"; + + var contentElement = document.createElement("div"); + contentElement.className = "EulaDialogContent"; + + if (this.m_contentType == "html") { + contentElement.innerHTML = content; + } else { + contentElement.appendChild(document.createTextNode(content)); + } + + contentWrapper.appendChild(contentElement); + + dialog.appendChild(contentWrapper); + + var footer = document.createElement("div"); + footer.className= "EulaDialogFooter"; + + var chkBox = document.createElement("div"); + chkBox.className = "EulaDialog_checkBox"; + + var yesCheckBox = document.createElement("input"); + yesCheckBox.type = "checkBox"; + yesCheckBox.id = "eulaReadId"; + chkBox.appendChild(yesCheckBox); + + chkBox.appendChild(document.createTextNode(translateKey('acceptEula'))); + + yesCheckBox.onchange = function() { + if (jQuery(this).is(":checked")) { + jQuery("#yesBtn").show(); + } else { + jQuery("#yesBtn").hide(); + } + }; + + footer.appendChild(chkBox); + + var yesButton = document.createElement("div"); + yesButton.className = "EulaDialog_yesButton borderRadius5px colorGradient50px"; + yesButton.id = "yesBtn"; + yesButton.appendChild(document.createTextNode(translateKey('dialogEulaBtnInstall'))); + yesButton.onclick = function() { _this_.yes(); }; + footer.appendChild(yesButton); + + + var noButton = document.createElement("div"); + noButton.className = "EulaDialog_noButton borderRadius5px colorGradient50px"; + noButton.appendChild(document.createTextNode(translateKey('dialogEulaBtnCancel'))); + noButton.onclick = function() { _this_.no(); }; + footer.appendChild(noButton); + + dialog.appendChild(footer); + + this.m_layer.appendChild(dialog); + + Layer.add(this.m_layer); + + if (jQuery(".EulaDialogContentWrapper").height() >= 400) { + jQuery(".EulaDialogContentWrapper").css("height", 400); + jQuery(".EulaDialogContentWrapper").css("overflow", "scroll"); + } + + //AG sorgt dafür, daß die Dialoghöhe sich dynamisch dem Content anpasst. + jQuery(".EulaDialog").css("height", jQuery(".EulaDialogContentWrapper").height() + 108); + jQuery(".EulaDialogFooter").css("top", jQuery(".EulaDialogContentWrapper").height() + 26); + + jQuery("#yesBtn").hide(); + this.centerDialog(); + + + + }, + + close: function(result) + { + Layer.remove(this.m_layer); + if (this.m_callback) { this.m_callback(result); } + }, + + yes: function() + { + this.close(EulaDialog.RESULT_YES); + }, + + no: function() + { + this.close(EulaDialog.RESULT_NO); + }, + + centerDialog: function() { + var dialog = jQuery(".EulaDialog"), + top = ((jQuery(".EulaDialogLayer").height() / 2) - (jQuery(dialog).height() / 2)); + jQuery(dialog).css({"top":top, "margin-top": ""}); + } + +}); + +EulaDialog.RESULT_NO = 0; +EulaDialog.RESULT_YES = 1; +/** + * firstsecuritydialog.js + **/ + + +FirstSecurityDialog = Class.create({ + + initialize: function(title, content, callback, contentType) + { + var _this_ = this; + + this.m_contentType = contentType; + this.m_callback = callback; + this.m_layer = document.createElement("div"); + this.m_layer.className = "EulaDialogLayer"; + + var dialog = document.createElement("div"); + dialog.className = "EulaDialog"; + + var titleElement = document.createElement("div"); + titleElement.className = "EulaDialogTitle"; + titleElement.appendChild(document.createTextNode(title)); + titleElement.onmousedown = function(event) { new Drag(this.parentNode, event); }; + dialog.appendChild(titleElement); + + var contentWrapper = document.createElement("div"); + contentWrapper.className = "EulaDialogContentWrapper"; + var contentElement = document.createElement("div"); + contentElement.className = "EulaDialogContent"; + + + if (this.m_contentType == "html") { + contentElement.innerHTML = content; + } else { + contentElement.appendChild(document.createTextNode(content)); + } + + contentWrapper.appendChild(contentElement); + + dialog.appendChild(contentWrapper); + + var pwdElement = document.createElement("div"); + pwdElement.className = "EulaDialogContent"; + pwdElement.id = "pwdLine"; + pwdElement.style = "visibility:hidden; text-align:center"; + pwdElement.appendChild(document.createTextNode(translateKey("lblAttentionNoPasswd"))); + pwdElement.innerHTML = translateKey("lblAttentionNoPasswd"); + contentWrapper.appendChild(pwdElement); + + var pwd = homematic('User.hasUserPWD', {'userID': userId}, function(result) { + if ((result == false) || (result == null)) { + jQuery("#pwdLine").css("visibility","visible"); + } + }); + + var footer = document.createElement("div"); + footer.className= "EulaDialogFooter"; + + var chkBox = document.createElement("div"); + chkBox.className = "EulaDialog_checkBox"; + + var yesCheckBox = document.createElement("input"); + yesCheckBox.type = "checkBox"; + yesCheckBox.id = "eulaReadId"; + chkBox.appendChild(yesCheckBox); + + chkBox.appendChild(document.createTextNode(translateKey('dialogLblAckSecurityHint'))); + + yesCheckBox.onchange = function() { + if (jQuery(this).is(":checked")) { + jQuery("#yesBtn").show(); + } else { + jQuery("#yesBtn").hide(); + } + }; + + footer.appendChild(chkBox); + + var yesButton = document.createElement("div"); + yesButton.className = "EulaDialog_yesButton borderRadius5px colorGradient50px"; + yesButton.id = "yesBtn"; + yesButton.appendChild(document.createTextNode(translateKey('btnNext'))); + yesButton.onclick = function() { _this_.yes(); }; + footer.appendChild(yesButton); + + + //var noButton = document.createElement("div"); + //noButton.className = "EulaDialog_noButton borderRadius5px colorGradient50px"; + //noButton.appendChild(document.createTextNode(translateKey('dialogEulaBtnCancel'))); + //noButton.onclick = function() { _this_.no(); }; + //footer.appendChild(noButton); + + dialog.appendChild(footer); + + this.m_layer.appendChild(dialog); + + Layer.add(this.m_layer); + + if (jQuery(".EulaDialogContentWrapper").height() >= 400) { + jQuery(".EulaDialogContentWrapper").css("height", 400); + jQuery(".EulaDialogContentWrapper").css("overflow", "scroll"); + } + + //AG sorgt dafür, daß die Dialoghöhe sich dynamisch dem Content anpasst. + jQuery(".EulaDialog").css("height", jQuery(".EulaDialogContentWrapper").height() + 108); + jQuery(".EulaDialogFooter").css("top", jQuery(".EulaDialogContentWrapper").height() + 26); + + jQuery("#yesBtn").hide(); + this.centerDialog(); + + + + }, + + close: function(result) + { + Layer.remove(this.m_layer); + if (this.m_callback) { this.m_callback(result); } + }, + + yes: function() + { + this.close(EulaDialog.RESULT_YES); + }, + + no: function() + { + this.close(EulaDialog.RESULT_NO); + }, + + centerDialog: function() { + var dialog = jQuery(".EulaDialog"), + top = ((jQuery(".EulaDialogLayer").height() / 2) - (jQuery(dialog).height() / 2)); + jQuery(dialog).css({"top":top, "margin-top": ""}); + } + +}); + +EulaDialog.RESULT_NO = 0; +EulaDialog.RESULT_YES = 1; +/** + * channelchosser.js + **/ + +/** + * Einfache Kanalauswahl. + **/ + +ChannelChooser = Singleton.create({ + + SHOW_READABLE: 0x1, // zeigt lesbare Kanäle an + SHOW_WRITABLE: 0x2, // zeigt schreibbare Kanäle an + SHOW_EVENTABLE: 0x4, // zeigt Kanäle mit Ereignisbehandlung an + SHOW_ALL: 0x7, // zeigt alle Kanäle an + + FAV_CHANNELS: 0, + PRG_CONDITION: 1, + PRG_ACTIVITY: 2, + + SORT_FN: { + NAME : function(channels, reverse) { return channels.ex_sortBy("name", reverse); }, + DESCRIPTION: function(channels, reverse) { return channels.ex_sortBy("typeDescription", reverse); }, + //ADDRESS : function(channels, reverse) { return channels.ex_sortBy("address", reverse); }, + + // Sorting by serial number changed. + ADDRESS : function(channels, reverse) { + var arSortedChannels = []; + jQuery.each(channels.sort(function(a,b) { + var ar1 = a.address.split(":"), + ar2 = b.address.split(":"); + + if (ar1[0] == ar2[0]) { + return (parseInt(ar1[1]) - parseInt(ar2[1])); + } + }), function(index, ch) { + arSortedChannels.push(ch); + }); + return arSortedChannels; + }, + + ROOM_NAMES : function(channels, reverse) { + channels.sort(function(a, b) { return Object.ex_compare(a.rooms.ex_joinItem("name"), b.rooms.ex_joinItem("name")); }); + return (reverse) ? channels.reverse() : channels; + }, + FUNC_NAMES : function(channels, reverse) { + channels.sort(function(a, b) { return Object.ex_compare(a.subsections.ex_joinItem("name"), b.subsections.ex_joinItem("name")); }); + return (reverse) ? channels.reverse() : channels; + } + }, + + PREFIX: "ChannelChooser", // Prefix für Ids der Tabellenzeilen + WRAPPER_ID: "ChannelChooserWrapper", // Id des Wrapper-Elements + HIGHLIGHT_CLASS: "ChannelChooserCell_Highlight", // Klasse für hervorgehobene Tabellenzellen + + /** + * Konstruktor + **/ + initialize: function() + { + this.HmIPIdentifier = "HmIP-RF"; + this.HmIPWIdentifier = "HmIP-RF"; + this.VirtualDevicesIdentifier = "VirtualDevices"; + this.template = TrimPath.parseTemplate(CHANNELCHOOSER_JST); + this.arWGDScreenOrder = []; + this.WGDStartChannelPerScreen = {}; + this.WGDChannelInUse = []; + this.WGDdevice = ""; + this.arWGDTiles = []; + this.noMoreDaliChannels = false; + }, + + sortByAddress: function(channels) { + console.log("channels", channels); + }, + + /** + * Wendet alle Filter auf einen Kanal an. + **/ + match: function(channel) + { + return ((hasUPL(UPL_ADMIN) | channel.isVisible) && + ((this.showReadable & channel.isReadable) || + (this.showWritable & channel.isWritable) || + (this.showEventable & channel.isEventable)) && + (this.showVirtual | !channel.isVirtual) && + (this.NameFilter.match(channel.name)) && + (this.DescriptionFilter.match(channel.typeDescription)) && + (this.AddressFilter.match(channel.address)) && + (this.RoomFilter.matchArray(channel.rooms)) && + (this.FuncFilter.matchArray(channel.subsections))); + }, + + setMetaData: function(objectId, dataId, val) { + homematic("Interface.setMetadata", {"objectId": objectId, "dataId": dataId, "value": val}); + }, + + filterHmIPChannels4ProgramConditions: function(channel, arChannels) { + var channelTypeName = channel.typeName.toLowerCase(), + oDevice, oMaintChannel, deviceMode, endOfScreens = false; + + conInfo("filterHmIPChannels4ProgramConditions"); + // If the channel is visible and no KEY_TRANSCEIVER or *_WEEK_PROFILE then show the channel + if (channel + && (channel.channelType != "KEY_TRANSCEIVER") + && (channel.channelType != "UNIVERSAL_LIGHT_RECEIVER") + && (channel.channelType != "DISPLAY_INPUT_TRANSMITTER") + && (channel.channelType != "DISPLAY_LEVEL_INPUT_TRANSMITTER") + && (channel.channelType != "DISPLAY_THERMOSTAT_INPUT_TRANSMITTER") + && (channel.channelType != "MULTI_MODE_INPUT_TRANSMITTER") + && (channel.channelType.indexOf("_WEEK_PROFILE") == -1) + ) { + arChannels.push(channel); + } + + // If the channel is a KEY_TRANSCEIVER and the device type no HmIP-PS / PSM (-IT/-CH/-PE/-UK) / PDT /PCBS then show the channel + // A key press of the internal button doesn't work for the above-named devices + if ((channel.channelType == "KEY_TRANSCEIVER") + && channel + && (channelTypeName != "hmip-ps") + && (channelTypeName.indexOf("hmip-psm") == -1) + && (channelTypeName != "hmip-pdt") + && (channelTypeName != "hmip-pdt-uk") + && (channelTypeName != "hmip-pcbs") + ) { + arChannels.push(channel); + } + + if (channel.channelType == "UNIVERSAL_LIGHT_RECEIVER") { + if (channelTypeName == "hmip-rgbw") { + oMaintChannel = DeviceList.getChannelByAddress(channel.address.split(":")[0] + ":0"); // The maintenance channel stores the deviceMode + deviceMode = parseInt(homematic("Interface.getMetadata", { + "objectId": oMaintChannel.id, + "dataId": "deviceMode" + })); + + switch (deviceMode) { + case 0: + case 1: + // RGB/RGBW Mode + if (channel.index == 1) { + arChannels.push(channel); + } + break; + case 2: + // Tunable White Mode + if (channel.index == 1 || channel.index == 2) { + arChannels.push(channel); + } + break; + default: + // PWM Mode - all channels visible + arChannels.push(channel); + } + } + + if (channelTypeName == "hmip-drg-dali") { + if ((channel.index != 0) && (channel.index <= 32)) { + // Dali channels 1 - 32 + if (this.noMoreDaliChannels == false) { + chnDescription = homematic("Interface.getParamset", { + "interface": "HmIP-RF", + "address": channel.address, + "paramsetKey": "MASTER" + }); + + if (parseInt(chnDescription["DALI_ADDRESS"]) != 255) { + arChannels.push(channel); + // Store UNIVERSAL_LIGHT_MAX_CAPABILITIES as meta data + // Because the user might have connected another DALI device to this channel we must set the meta data each time + //this is not necessary anymore - this.setMetaData(channel.id, "maxCap", chnDescription["UNIVERSAL_LIGHT_MAX_CAPABILITIES"]); + } else { + this.noMoreDaliChannels = true; + } + } + + } else if ((channel.index == 0) || (channel.id >= 33)) { + // Maintenance and group channels + arChannels.push(channel); + } + } + } + + if (((channel.channelType == "DISPLAY_INPUT_TRANSMITTER") || (channel.channelType == "DISPLAY_LEVEL_INPUT_TRANSMITTER") || (channel.channelType == "DISPLAY_THERMOSTAT_INPUT_TRANSMITTER")) && ((channelTypeName == "hmipw-wgd") || (channelTypeName == "hmipw-wgd-pl"))) { + var wgdScreenOrder, screenEndID = "END", counter, chnDescription, curDevice, tilesA = [1, 3, 7], tilesB = [0, 1], + loop, + self = this; + if (channel.index == 41) { + arChannels.push(channel); + } else { + curDevice = channel.device.address; // Do this only once per device + if (this.WGDdevice != curDevice) { + this.WGDdevice = channel.device.address; + oDevice = DeviceList.getDeviceByAddress(channel.address.split(":")[0]); // The device stores the screen order + wgdScreenOrder = homematic("Interface.getMetadata", {"objectId": oDevice.id, "dataId": "screenOrder"}); + this.arWGDScreenOrder = wgdScreenOrder.split(","); + this.WGDStartChannelPerScreen = (this.arWGDScreenOrder.length < 10) ? { + 0: 1, + 1: 9, + 2: 17, + 3: 25, + 4: 33 + } : {0: 1, 1: 9, 2: 17, 3: 25, 4: 33, 5: 42, 6: 44, 7: 46, 8: 48, 9: 50}; + this.WGDChannelInUse = []; + this.arWGDTiles = []; + + // Get number of tiles + chnDescription = homematic("Interface.getParamset", { + "interface": "HmIP-RF", + "address": curDevice + ":0", + "paramsetKey": "MASTER" + }); + loop = ((this.arWGDScreenOrder.length < 10)) ? 5 : 10; + + for (var loopx = 1; loopx <= loop; loopx++) { + this.arWGDTiles.push(chnDescription["SCREEN_LAYOUT_TILE_LAYOUT_" + loopx]); + } + + jQuery.each(this.arWGDScreenOrder, function (index, screen) { + if ((!endOfScreens) && (screen != screenEndID)) { + counter = (screen <= 4) ? tilesA[self.arWGDTiles[screen]] : tilesB[self.arWGDTiles[screen]]; + for (loop = self.WGDStartChannelPerScreen[screen]; loop <= (self.WGDStartChannelPerScreen[screen] + counter); loop++) { + self.WGDChannelInUse.push(loop); + } + } else { + endOfScreens = true; + } // return false doesn't work because of a problem with the build-system + }); + } + + if (this.WGDChannelInUse.indexOf(channel.index) != -1) { + arChannels.push(channel); + } + } + } + + if (channel.channelType == "MULTI_MODE_INPUT_TRANSMITTER") { + if (channelTypeName == "elv-sh-bm-s") { + var channelMode = parseInt(homematic("Interface.getMetadata", { + "objectId": channel.id, + "dataId": "channelMode" + })); + if (channelMode != 0) { + arChannels.push(channel); + } + } else if ((channelTypeName == "hmip-flc") || (channelTypeName == "hmip-fdc")) { + var channelMode = parseInt(homematic("Interface.getMasterValue", { + "interface": this.HmIPIdentifier, + "address": channel.address, + "valueKey": "CHANNEL_OPERATION_MODE" + })); + + if (channelMode != 0) { + arChannels.push(channel); + } + + } else { + arChannels.push(channel); + } + return arChannels; + } + + }, + + filterHmIPChannels4ProgramActivities: function(channel, arChannels) { + conInfo("filterHmIPChannels4ProgramActivities"); + var channelTypeName = channel.typeName.toLowerCase(), + oMaintChannel, deviceMode, endOfScreens = false; + + if (channel) { + if (channelTypeName == "hmip-wkp") { + if ((channel.channelType == "MAINTENANCE") || ((channel.channelType == "ACCESS_TRANSCEIVER") && (channel.index % 2 != 0))) { + arChannels.push(channel); + } + } else if (channel.channelType == "UNIVERSAL_LIGHT_RECEIVER") { + if (channelTypeName == "hmip-rgbw") { + oMaintChannel = DeviceList.getChannelByAddress(channel.address.split(":")[0] + ":0"); // The maintenance channel stores the deviceMode + deviceMode = parseInt(homematic("Interface.getMetadata", { + "objectId": oMaintChannel.id, + "dataId": "deviceMode" + })); + + switch (deviceMode) { + case 0: + case 1: + // RGB/RGBW Mode + if (channel.index == 1) { + arChannels.push(channel); + } + break; + case 2: + // Tunable White Mode + if (channel.index == 1 || channel.index == 2) { + arChannels.push(channel); + } + break; + default: + // PWM Mode - all channels visible + arChannels.push(channel); + } + } + + if (channelTypeName == "hmip-drg-dali") { + if ((channel.index != 0) && (channel.index <= 32)) { + // Dali channels 1 - 32 + if (this.noMoreDaliChannels == false) { + chnDescription = homematic("Interface.getParamset", { + "interface": "HmIP-RF", + "address": channel.address, + "paramsetKey": "MASTER" + }); + + if (parseInt(chnDescription["DALI_ADDRESS"]) != 255) { + arChannels.push(channel); + // Store UNIVERSAL_LIGHT_MAX_CAPABILITIES as meta data if not yet available + // Because the user might have connected another DALI device to this channel we must set the meta data each time + //this is not necessary anymore - this.setMetaData(channel.id, "maxCap", chnDescription["UNIVERSAL_LIGHT_MAX_CAPABILITIES"]); + } else { + this.noMoreDaliChannels = true; + } + } + + } else if ((channel.index == 0) || (channel.id >=33)) { + // Maintenance and group channels + arChannels.push(channel); + } + } + + if ((channelTypeName == "hmip-lsc") && (channel.index == 1)) { + arChannels.push(channel); + } + + + } else if (((channel.channelType == "DISPLAY_INPUT_TRANSMITTER") || (channel.channelType == "DISPLAY_LEVEL_INPUT_TRANSMITTER") || (channel.channelType == "DISPLAY_THERMOSTAT_INPUT_TRANSMITTER")) && ((channelTypeName == "hmipw-wgd") || (channelTypeName == "hmipw-wgd-pl"))) { + var wgdScreenOrder, screenEndID = "END", counter, chnDescription, curDevice, tilesA = [1,3,7], tilesB = [0,1], loop, + self = this; + if (channel.index == 41) { + arChannels.push(channel); + } else { + curDevice = channel.device.address; // Do this only once per device + if (this.WGDdevice != curDevice) { + this.WGDdevice = channel.device.address; + oDevice = DeviceList.getDeviceByAddress(channel.address.split(":")[0]); // The device stores the screen order + wgdScreenOrder = homematic("Interface.getMetadata", {"objectId": oDevice.id, "dataId": "screenOrder"}); + this.arWGDScreenOrder = wgdScreenOrder.split(","); + this.WGDStartChannelPerScreen = (this.arWGDScreenOrder.length < 10) ? {0: 1, 1: 9, 2: 17, 3: 25, 4: 33} : {0: 1, 1: 9, 2: 17, 3: 25, 4: 33, 5: 42, 6: 44, 7: 46, 8: 48, 9: 50}; + this.WGDChannelInUse = []; + this.arWGDTiles = []; + + // Get number of tiles + chnDescription = homematic("Interface.getParamset", {"interface": "HmIP-RF", "address": curDevice + ":0", "paramsetKey": "MASTER"}); + loop = ((this.arWGDScreenOrder.length < 10)) ? 5 : 10; + + for(var loopx = 1; loopx <= loop; loopx++) { + this.arWGDTiles.push(chnDescription["SCREEN_LAYOUT_TILE_LAYOUT_" + loopx]); + } + + jQuery.each(this.arWGDScreenOrder, function(index,screen) { + if ((! endOfScreens) && (screen != screenEndID)) { + counter = (screen <= 4) ? tilesA[self.arWGDTiles[screen]] : tilesB[self.arWGDTiles[screen]]; + for (loop = self.WGDStartChannelPerScreen[screen]; loop <= (self.WGDStartChannelPerScreen[screen] + counter); loop++) { + self.WGDChannelInUse.push(loop); + } + } else {endOfScreens = true;} // return false doesn't work because of a problem with the build-system + }); + } + + if (this.WGDChannelInUse.indexOf(channel.index) != -1) { + arChannels.push(channel); + } + } + } else { + if (channelTypeName != "hmip-esi") { + arChannels.push(channel); + } + } + } + return arChannels; + }, + + filterOsramLightify: function(channel, arChannels) { + conInfo("filterOsramLightify"); + if (! isNonCCUDevice(channel)) { + arChannels.push(channel); + } + return arChannels; + }, + + filterGateway: function(channel, arChannels) { + conInfo("filterGateway"); + if (! isNonCCUGateway(channel)) { + arChannels.push(channel); + } + return arChannels; + }, + + /** + * Filtert eine Kanalliste + **/ + filter: function(channels) + { + this.noMoreDaliChannels = false; + var result = new Array(); + + channels.each(function(channel) { + var self = this; + if (this.match(channel)) { + + if ((channel.device.interfaceName == this.HmIPIdentifier) || (channel.device.interfaceName == this.HmIPWIdentifier)) { + if ((this.src == this.PRG_CONDITION) || (this.src == this.FAV_CHANNELS)) { + this.filterHmIPChannels4ProgramConditions(channel, result); + } else if (this.src == this.PRG_ACTIVITY) { + this.filterHmIPChannels4ProgramActivities(channel, result); + } else { + result.push(channel); + } + } else if (channel.device.interfaceName == this.VirtualDevicesIdentifier) { + if (this.src == this.PRG_CONDITION) { + this.filterOsramLightify(channel, result); + } else if (this.src == this.PRG_ACTIVITY) { + this.filterGateway(channel, result); + } else { + result.push(channel); + } + } else { + result.push(channel); + } + } + }, this); + return result; + }, + + /** + * Sortiert eine Kanalliste + **/ + sort: function(channels) + { + var sort_fn = this.SORT_FN[this.sortId]; + + if (typeof(sort_fn) != "undefined") { return sort_fn(channels, this.sortDescend); } + else { return channels; } + }, + + /** + * Schließt das Dialogfenster + **/ + close: function(result) + { + picDivHide(jg_250); + Layer.remove(this.layer); + if (this.callback) { this.callback(result); } + }, + + /** + * Startet die Aktualisierung der Anzeige + **/ + beginUpdateView: function() + { + Element.setStyle(ChannelChooser.layer, {cursor: "wait"}); + window.setTimeout("ChannelChooser.updateView();", 1); + }, + + /** + * Zeigt den Dialog an + **/ + show: function(callback, options, src) + { + if (src) { + this.src = src; + } else { + this.src = 0; + } + this.showVirtual = false; + this.sortId = "NAME"; + this.sortDescend = false; + this.callback = callback; + this.showReadable = (0 !== (options & this.SHOW_READABLE)); + this.showWritable = (0 !== (options & this.SHOW_WRITABLE)); + this.showEventable = (0 !== (options & this.SHOW_EVENTABLE)); + + + this.channels = DeviceList.listChannels(); + + var rooms = RoomList.list().ex_sortBy("name"); + var funcs = SubsectionList.list().ex_sortBy("name"); + this.NameFilter = new StringFilter("ChannelChooser.NameFilter", this.beginUpdateView); + this.DescriptionFilter = new StringFilter("ChannelChooser.DescriptionFilter", this.beginUpdateView); + this.AddressFilter = new StringFilter("ChannelChooser.AddressFilter", this.beginUpdateView); + this.RoomFilter = new ListFilter("ChannelChooser.RoomFilter", rooms, this.beginUpdateView); + this.FuncFilter = new ListFilter("ChannelChooser.FuncFilter", funcs, this.beginUpdateView); + + this.layer = document.createElement("div"); + this.layer.id = this.WRAPPER_ID; + Layer.add(this.layer); + + this.beginUpdateView(); + + + }, + + /** + * Wählt einen Kanal aus + **/ + select: function(str_id) + { + var id = str_id.substring(this.PREFIX.length); + this.close(id); + }, + + /** + * Bricht den Dialog ab + **/ + abort: function() + { + this.close(); + }, + + /** + * Setzt die Sortierreihenfolge + **/ + sortBy: function(sortId) + { + if (this.sortId == sortId) { this.sortDescend = !this.sortDescend; } + else { this.sortDescend = false; } + this.sortId = sortId; + + this.beginUpdateView(); + }, + + /** + * Blendet virtuelle Kanäle ein bzw. aus + **/ + toggleVirtualChannels: function() + { + this.showVirtual = !this.showVirtual; + + this.beginUpdateView(); + }, + + /** + * Setzt alle Filter zurück + **/ + resetFilters: function() + { + this.NameFilter.reset(); + this.DescriptionFilter.reset(); + this.AddressFilter.reset(); + this.RoomFilter.reset(); + this.FuncFilter.reset(); + + this.beginUpdateView(); + }, + + /** + * Callback. Aktualisiert die Anzeige. + **/ + updateView: function() + { + Element.setStyle(this.layer, {"cursor": "default"}); + this.layer.innerHTML = this.template.process({ + PREFIX : this.PREFIX, + sortId : this.sortId, + sortDescend : this.sortDescend, + showVirtual : this.showVirtual, + nameFilter : this.NameFilter, + descriptionFilter: this.DescriptionFilter, + addressFilter : this.AddressFilter, + roomFilter : this.RoomFilter, + funcFilter : this.FuncFilter, + channels : this.sort(this.filter(this.channels)) + //channels : this.filter(this.channels) + }); + + jQuery(".j_expertChannel").show(); + + translateJSTemplate("#ChannelChooserDialog"); + translatePage(".j_rooms, .j_functions"); + + // Add extended channel description + jQuery(".j_extChnDescr").each(function(index) { + try { + var elmDescr = jQuery(this).text().split("_"), + channelAddress = elmDescr[1], + ch = DeviceList.getChannelByAddress(channelAddress), + deviceType = ch.deviceType.id, + j_descrElem = jQuery(this); + + if ((ch.channelType != "MULTI_MODE_INPUT_TRANSMITTER") && (deviceType != "HmIP-WKP")) { + j_descrElem.html(getExtendedDescription({ + "deviceType": deviceType, + "channelAddress": channelAddress, + "channelIndex": channelAddress.split(":")[1] + })); + } else { + if (deviceType == "HmIP-WKP") { + // Channel 1 AND 2 = User 1, Channel 3 AND 4 = User 2 and so on - but we want to show only the first user channel + var chn = parseInt(channelAddress.split(":")[1]), + arUsrNr = ["","1","","2","","3","","4","","5","","6","","7","","8",""]; + + if (chn != 0) { + j_descrElem.html(translateKey("lblUser") + " " + arUsrNr[chn]); + } else { + j_descrElem.html(""); + } + } else { + // MULTI_MODE_INPUT_TRANSMITTER + homematic("Interface.getMetadata", {"objectId": ch.id, "dataId": "channelMode"}, function (result) { + result = (result == "null") ? 1 : result; + j_descrElem.html(translateKey("chType_MULTI_MODE_INPUT_TRANSMITTER_" + result)); + }); + } + } + } catch(e) { + conInfo(e); + } + }); + + DeviceList.updateDeviceStatus(); + } +}); +/** + * multichannelchosser.js + **/ + +/** + * Kanal-Mehrfachauswahl. + **/ +MultiChannelChooser = Singleton.create({ + SHOW_READABLE: 0x1, // zeigt lesbare Kanäle an + SHOW_WRITABLE: 0x2, // zeigt schreibbare Kanäle an + SHOW_EVENTABLE: 0x4, // zeigt Kanäle mit Ereignisbehandlung an + SHOW_ALL: 0x7, // zeigt alle Kanäle an + + SORT_FN: { + NAME : function(channels, reverse) { return channels.ex_sortBy("name", reverse); }, + DESCRIPTION: function(channels, reverse) { return channels.ex_sortBy("typeDescription", reverse); }, + //ADDRESS : function(channels, reverse) { return channels.ex_sortBy("address", reverse); }, + + // Sorting by serial number changed. + ADDRESS : function(channels, reverse) { + var arSortedChannels = []; + jQuery.each(channels.sort(function(a,b) { + var ar1 = a.address.split(":"), + ar2 = b.address.split(":"); + + if (ar1[0] == ar2[0]) { + return (parseInt(ar1[1]) - parseInt(ar2[1])); + } + }), function(index, ch) { + arSortedChannels.push(ch); + }); + return arSortedChannels; + }, + + ROOM_NAMES : function(channels, reverse) + { + channels.sort(function(a, b) { return Object.ex_compare(a.rooms.ex_joinItem("name"), b.rooms.ex_joinItem("name")); }); + return (reverse) ? channels.reverse() : channels; + }, + + FUNC_NAMES : function(channels, reverse) + { + channels.sort(function(a, b) { return Object.ex_compare(a.subsections.ex_joinItem("name"), b.subsections.ex_joinItem("name")); }); + return (reverse) ? channels.reverse() : channels; + } + }, + + PREFIX: "MultiChannelChooser", + WRAPPER_ID: "MultiChannelChooserWrapper", + HIGHLIGHT_CLASS: "MultiChannelChooserCell_Highlight", + + initialize: function() + { + this.HmIPIdentifier = "HmIP-RF"; + this.HmIPWIdentifier = "HmIP-Wired"; + this.template = TrimPath.parseTemplate(MULTI_CHANNELCHOOSER_JST); + this.arWGDScreenOrder = []; + this.WGDStartChannelPerScreen = {}; + this.WGDChannelInUse = []; + this.WGDdevice = ""; + this.arWGDTiles = []; + this.noMoreDaliChannels = false; + }, + + /** + * Wendet alle Filter auf einen Kanal an. + **/ + match: function(channel) + { + return ((!channel._hidden) && + (hasUPL(UPL_ADMIN) | channel.isVisible) && + ((this.showReadable & channel.isReadable) || + (this.showWritable & channel.isWritable) || + (this.showEventable & channel.isEventable)) && + (this.showVirtual | !channel.isVirtual) && + (this.NameFilter.match(channel.name)) && + (this.DescriptionFilter.match(channel.typeDescription)) && + (this.AddressFilter.match(channel.address)) && + (this.RoomFilter.matchArray(channel.rooms)) && + (this.FuncFilter.matchArray(channel.subsections))); + }, + + setMetaData: function(objectId, dataId, val) { + homematic("Interface.setMetadata", {"objectId": objectId, "dataId": dataId, "value": val}); + }, + + filterHmIPChannels: function(channel, arChannels) { + conInfo("filterHmIPChannels"); + var channelTypeName = channel.typeName.toLowerCase(), + oMaintChannel, deviceMode; + + if (channel.isVisible + && (channel.channelType != "ACCESSPOINT_GENERIC_RECEIVER") + && (channel.channelType != "DISPLAY_INPUT_TRANSMITTER") + && (channel.channelType != "DISPLAY_LEVEL_INPUT_TRANSMITTER") + && (channel.channelType != "DISPLAY_THERMOSTAT_INPUT_TRANSMITTER") + && (channel.channelType != "UNIVERSAL_LIGHT_RECEIVER") + ) {arChannels.push(channel);} + + if (((channel.channelType == "DISPLAY_INPUT_TRANSMITTER") || (channel.channelType == "DISPLAY_LEVEL_INPUT_TRANSMITTER") || (channel.channelType == "DISPLAY_THERMOSTAT_INPUT_TRANSMITTER")) && ((channelTypeName == "hmipw-wgd")) || ((channelTypeName == "hmipw-wgd-pl"))) { + var wgdScreenOrder, screenEndID = "END", counter, chnDescription, curDevice, tilesA = [1,3,7], tilesB = [0,1], loop, endOfScreens = false, + self = this; + if (channel.index == 41) { + arChannels.push(channel); + } else { + curDevice = channel.device.address; // Do this only once per device + if (this.WGDdevice != curDevice) { + this.WGDdevice = channel.device.address; + oDevice = DeviceList.getDeviceByAddress(channel.address.split(":")[0]); // The device stores the screen order + wgdScreenOrder = homematic("Interface.getMetadata", {"objectId": oDevice.id, "dataId": "screenOrder"}); + this.arWGDScreenOrder = wgdScreenOrder.split(","); + this.WGDStartChannelPerScreen = (this.arWGDScreenOrder.length < 10) ? {0: 1, 1: 9, 2: 17, 3: 25, 4: 33} : {0: 1, 1: 9, 2: 17, 3: 25, 4: 33, 5: 42, 6: 44, 7: 46, 8: 48, 9: 50}; + this.WGDChannelInUse = []; + this.arWGDTiles = []; + + // Get number of tiles + chnDescription = homematic("Interface.getParamset", {"interface": "HmIP-RF", "address": curDevice + ":0", "paramsetKey": "MASTER"}); + loop = ((this.arWGDScreenOrder.length < 10)) ? 5 : 10; + + for(var loopx = 1; loopx <= loop; loopx++) { + this.arWGDTiles.push(chnDescription["SCREEN_LAYOUT_TILE_LAYOUT_" + loopx]); + } + + jQuery.each(this.arWGDScreenOrder, function(index,screen) { + if ((! endOfScreens) && (screen != screenEndID)) { + counter = (screen <= 4) ? tilesA[self.arWGDTiles[screen]] : tilesB[self.arWGDTiles[screen]]; + for (loop = self.WGDStartChannelPerScreen[screen]; loop <= (self.WGDStartChannelPerScreen[screen] + counter); loop++) { + self.WGDChannelInUse.push(loop); + } + } else {endOfScreens = true;} // return false doesn't work because of a problem with the build-system + }); + } + + if (this.WGDChannelInUse.indexOf(channel.index) != -1) { + arChannels.push(channel); + } + } + } + + if (channel.channelType == "UNIVERSAL_LIGHT_RECEIVER") { + + if (channelTypeName == "hmip-lsc") { + arChannels.push((channel)); + } + + if (channelTypeName == "hmip-rgbw") { + oMaintChannel = DeviceList.getChannelByAddress(channel.address.split(":")[0] + ":0"); // The maintenance channel stores the deviceMode + deviceMode = parseInt(homematic("Interface.getMetadata", { + "objectId": oMaintChannel.id, + "dataId": "deviceMode" + })); + + switch (deviceMode) { + case 0: + case 1: + // RGB/RGBW Mode + if (channel.index == 1) { + arChannels.push(channel); + } + break; + case 2: + // Tunable White Mode + if (channel.index == 1 || channel.index == 2) { + arChannels.push(channel); + } + break; + default: + // PWM Mode - all channels visible + arChannels.push(channel); + } + } + + if (channelTypeName == "hmip-drg-dali") { + if ((channel.index != 0) && (channel.index <= 32)) { + // Dali channels 1 - 32 + if (this.noMoreDaliChannels == false) { + chnDescription = homematic("Interface.getParamset", { + "interface": "HmIP-RF", + "address": channel.address, + "paramsetKey": "MASTER" + }); + + if (parseInt(chnDescription["DALI_ADDRESS"]) != 255) { + arChannels.push(channel); + // Store UNIVERSAL_LIGHT_MAX_CAPABILITIES as meta data + // Because the user might have connected another DALI device to this channel we must set the meta data each time + //this is not necessary anymore - this.setMetaData(channel.id, "maxCap", chnDescription["UNIVERSAL_LIGHT_MAX_CAPABILITIES"]); + } else { + this.noMoreDaliChannels = true; + } + } + + } else if ((channel.index == 0) || (channel.id >=33)) { + // Maintenance and group channels + arChannels.push(channel); + } + } + } + + return arChannels; + }, + + filter: function(channels) + { + this.noMoreDaliChannels = false; + var result = new Array(); + + channels.each(function(channel) { + var self = this; + if (this.match(channel)) { + if (channel.device.interfaceName == this.HmIPIdentifier || channel.device.interfaceName == this.HmIPWIdentifier) { + this.filterHmIPChannels(channel, result); + } else { + result.push(channel); + } + } + }, this); + return result; + }, + + /** + * Sortiert eine Kanalliste + **/ + sort: function(channels) + { + var sort_fn = this.SORT_FN[this.sortId]; + + if (typeof(sort_fn) != "undefined") { return sort_fn(channels, this.sortDescend); } + else { return channels; } + }, + + /** + * Startet die Aktualisierung der Anzeige + **/ + beginUpdateView: function() + { + Element.setStyle(MultiChannelChooser.layer, {cursor: "wait"}); + window.setTimeout("MultiChannelChooser.updateView();", 1); + }, + + /** + * Schließt das Dialogfenster + **/ + close: function(result) + { + picDivHide(jg_250); + Layer.remove(this.layer); + if (this.callback) { this.callback(result); } + }, + + /** + * Konstruktor. Versteckter Kanal + **/ + HiddenChannel: function(id) + { + /*####################*/ + /*# Private Elemente #*/ + /*####################*/ + + var m_id = id; + + /*########################*/ + /*# Öffentliche Elemente #*/ + /*########################*/ + + this._hidden = true; // markiert den Kanal als versteckt + this._selected = true; // markiert den Kanal als ausgewählt + + /** + * Liefert die Id des Kanals + **/ + this.Id = function() + { + return m_id; + }; + + }, + + /** + * Zeigt den Dialog an + **/ + show: function(title, ids, callback, options) + { + this.showVirtual = false; + this.sortId = "NAME"; + this.sortDescend = false; + this.callback = callback; + this.options = options; + this.title = title; + this.showReadable = (0 !== (options & ChannelChooser.SHOW_READABLE)); + this.showWritable = (0 !== (options & ChannelChooser.SHOW_WRITABLE)); + this.showEventable = (0 !== (options & ChannelChooser.SHOW_EVENTABLE)); + + this.channels = DeviceList.listChannels(); + this.channels.each(function(channel) { + channel._selected = ids.ex_contains(channel.id); + channel._hidden = false; + }, this); + + // Die Kanäle, die im Posteingang schon einem Raum oder Gewerk zugeordnet + // wurden, existieren noch nicht in der Geräteliste. + // Diese Kanäle werden hier als "versteckte" Kanäle behandelt. + ids.each(function(id) { + if (null === DeviceList.getChannel(id)) + { + this.channels.push(new HiddenChannel(id)); + } + }); + + var rooms = RoomList.list().ex_sortBy("name"); + var funcs = SubsectionList.list().ex_sortBy("name"); + + this.NameFilter = new StringFilter("MultiChannelChooser.NameFilter", this.beginUpdateView); + this.DescriptionFilter = new StringFilter("MultiChannelChooser.DescriptionFilter", this.beginUpdateView); + this.AddressFilter = new StringFilter("MultiChannelChooser.AddressFilter", this.beginUpdateView); + this.RoomFilter = new ListFilter("MultiChannelChooser.RoomFilter", rooms, this.beginUpdateView); + this.FuncFilter = new ListFilter("MultiChannelChooser.FuncFilter", funcs, this.beginUpdateView); + + this.layer = document.createElement("div"); + this.layer.id = this.WRAPPER_ID; + Layer.add(this.layer); + + this.beginUpdateView(); + }, + + /** + * Wählt einen Kanal aus + **/ + ok: function() + { + var ids = new Array(); + + this.channels.each(function(channel) { + if (true === channel._selected) { ids.push(channel.id); } + }); + + this.close(ids); + }, + + /** + * Bricht den Dialog ab + **/ + abort: function() + { + this.close(); + }, + + /** + * Wählt einen Kanal aus bzw. ab + **/ + select: function(id, checkBox) + { + this.channels.each(function(channel) { + if (channel.id == id) + { + channel._selected = checkBox.checked; + } + }); + }, + + /** + * Setzt die Sortierreihenfolge + **/ + sortBy: function(sortId) + { + if (this.sortId == sortId) { this.sortDescend = !this.sortDescend; } + else { this.sortDescend = false; } + this.sortId = sortId; + + this.beginUpdateView(); + }, + + /** + * Blendet virtuelle Kanäle ein bzw. aus + **/ + toggleVirtualChannels: function() + { + this.showVirtual = !this.showVirtual; + + this.beginUpdateView(); + }, + + /** + * Setzt alle Filter zurück + **/ + resetFilters: function() + { + this.NameFilter.reset(); + this.DescriptionFilter.reset(); + this.AddressFilter.reset(); + this.RoomFilter.reset(); + this.FuncFilter.reset(); + + this.beginUpdateView(); + }, + + /** + * Callback. Aktualisiert die Anzeige. + **/ + updateView: function() + { + Element.setStyle(this.layer, {"cursor": "default"}); + this.layer.innerHTML = this.template.process({ + PREFIX : this.PREFIX, + title : this.title, + sortId : this.sortId, + sortDescend : this.sortDescend, + showVirtual : this.showVirtual, + nameFilter : this.NameFilter, + descriptionFilter: this.DescriptionFilter, + addressFilter : this.AddressFilter, + roomFilter : this.RoomFilter, + funcFilter : this.FuncFilter, + //channels : this.sort(this.filter(this.channels)) // causes problems with (multi)channelchooser.jst + channels : this.filter(this.channels) + }); + + jQuery(".j_expertChannel").show(); + + // Add extended channel description and hide the second user channel + jQuery(".j_extChnDescr").each(function(index){ + try { + var + parentCell = jQuery(this).parent(), + elmDescr = parentCell.text().split(" "), + deviceType = elmDescr[0], + tmp = elmDescr[1], + channelAddress = tmp.slice(0,17), + j_descrElem = jQuery(this); + + if (deviceType == "HmIP-WKP") { + // Channel 1 AND 2 = User 1, Channel 3 AND 4 = User 2 and so on - but we want to show only the first user + var chn = parseInt(channelAddress.split(":")[1]), + arUsrNr = ["","1","","2","","3","","4","","5","","6","","7","","8",""]; + + if ((chn != 0) && chn != 18) { + if (arUsrNr[chn] == "") { + // Channel 1 AND 2 = User 1, Channel 3 AND 4 = User 2 and so on - but we want to show only the first user channel + jQuery(parentCell).parent().hide(); + } else { + j_descrElem.html(translateKey("lblUser") + " " + arUsrNr[chn]); + } + } + } + } catch(e) { + conInfo(e); + } + }); + + translateJSTemplate("#MultiChannelChooserDialog"); + translatePage(".MultiChannelChooserRow"); + + DeviceList.updateDeviceStatus(); + } + +}); +/** + * channelconfig.js + **/ + +/** + * Dialog für Kanaleinstellungen (Name, Räume, Gewerke, Funktionstest) + **/ +ChannelConfigDialog = Singleton.create({ + PLUS_IMAGE_SRC: "/ise/img/plus.png", + MINUS_IMAGE_SRC: "/ise/img/minus.png", + LAYER_ID: "ChannelConfigDialogLayer", + NAME_ID: "ChannelConfigDialog_ChannelName", + USABLE_ID: "ChannelConfigDialog_isUsable", + VISIBLE_ID: "ChannelConfigDialog_isVisible", + LOGGED_ID: "ChannelConfigDialog_isLogged", + MODE_ID: "ChannelConfigDialog_Mode", + ROOMLIST_ID: "ChannelConfigDialogRooms", + SUBSECTIONLIST_ID: "ChannelConfigDialogFuncs", + TEST_RESULT_ID: "ChannelConfigDialogTestResult", + RESULT_ABORT: 0, + RESULT_OK: 1, + POLL_INTERVAL: 3, + + /** + * Konstruktor + **/ + initialize: function() + { + this.template = TrimPath.parseTemplate(CHANNEL_CONFIG_DIALOG_JST); + }, + + /** + * Zeigt den Konfigurationsdialog an + **/ + show: function(channel, callback) + { + this.m_testId = null; + this.m_isTestRunning = false; + + this.isRoomListVisible = false; + this.isSubsectionListVisible = false; + this.channel = channel; + this.callback = callback; + this.layer = document.createElement("div"); + this.layer.id = this.LAYER_ID; + Layer.add(this.layer); + this.layer.innerHTML = this.template.process({ + channel: this.channel, + isRoomListVisible: this.isRoomListVisible, + isSubsectionListVisible: this.isSubsectionListVisible, + rooms: RoomList.list().ex_sortBy("name"), + funcs: SubsectionList.list().ex_sortBy("name") + }); + + if (this.channel.typeName.indexOf("Team") != -1) { + this.__hideFunctionTest(); + } + + if (isNonCCUDevice(this.channel)) { + this.__hideLogging(); + } + if (this.channel.deviceType.id == "HmIPW-DRAP") { + this.__hideRoomFunctionSelection(); + } + translateJSTemplate("#ChannelConfigDialog"); + translatePage("#ChannelConfigDialogRooms, #ChannelConfigDialogFuncs"); + jQuery("#generalChannelConfigLblSender").val(translateKey("generalChannelConfigLblSender")); + jQuery("#generalChannelConfigLblReceiver").val(translateKey("generalChannelConfigLblReceiver")); + jQuery("#generalChannelConfigLblNone").val(translateKey("generalChannelConfigLblNone")); + }, + + __hideFunctionTest: function() { + jQuery("#channelFunctionTestPanel").hide(); + }, + + __hideLogging: function() { + jQuery("#btnEnableChannelLogging").hide(); + }, + + __hideRoomFunctionSelection: function() { + jQuery("#ChannelConfigDialogSectionRoom, #ChannelConfigDialogSectionFunc").hide(); + }, + + /** + * Schließt den Konfigurationsdialog. + **/ + close: function(result) + { + this.m_isTestRunning = false; + Layer.remove(this.layer); + if (this.callback) { this.callback(result); } + }, + + /** + * Übernimmt die Änderungen und schließt den Dialog. + **/ + ok: function() + { + if (isTextAllowed($(this.NAME_ID).value)) + { + var channel = this.channel, + arRooms = [], arSubSection = []; + + channel.setName($(this.NAME_ID).value); + channel.setVisibility($(this.VISIBLE_ID).checked); + if ($(this.VISIBLE_ID).checked) { + iseDevices.setVisible(channel.id, "id", true); + } + channel.setUsability($(this.USABLE_ID).checked); + channel.setLogging($(this.LOGGED_ID).checked); + channel.setMode($(this.MODE_ID).options[$(this.MODE_ID).options.selectedIndex].value); + + arRooms = $A($(this.ROOMLIST_ID)); + + // SPHM-1153 + jQuery(arRooms).each(function(index,_room) { + var room = RoomList.get(_room.value); + if (jQuery(_room).prop("checked")) { + room.addChannel(channel.id, true); + } else { + room.removeChannel(channel.id, true); + } + }); + + arSubSection = $A($(this.SUBSECTIONLIST_ID)); + + // SPHM-1153 + jQuery(arSubSection).each(function(index,_subSection) { + var subsection = SubsectionList.get(_subSection.value); + if (jQuery(_subSection).prop("checked")) { + subsection.addChannel(channel.id, true); + } else { + subsection.removeChannel(channel.id, true); + } + }); + this.close(this.RESULT_OK); + } + }, + + /** + * Schließt den Dialog ohne die Änderungen zu übernehmen. + **/ + abort: function() + { + this.close(this.RESULT_ABORT); + }, + + /** + * Startet den Funktionstest. + **/ + startTest: function() + { + var _this_ = this; + + this.m_isTestRunning = true; + $(this.TEST_RESULT_ID).setStyle({backgroundColor: WebUI.getColor("testActive")}); + homematic("Channel.startComTest", {id: this.channel.id}, function(testId) { + _this_.m_testId = testId; + _this_.pollTest(); + }); + }, + + showConfigCentralLinkHelp: function() { + var title = translateKey("dialogHelpCentralLinkTitle"), + content = translateKey("dialogHelpCentralLinkContent"); + MessageBox.show(title, content,'', 475, 450); + }, + + createCentralLink: function(channeltype) + { + var addr=this.channel.address; + new YesNoDialog(translateKey('dialogSafetyCheck'), translateKey('dialogQuestionAddLink').replace('%s', addr+' <> CCU'), function(result) { + if (result == YesNoDialog.RESULT_YES) { + if (channeltype === "KEY_TRANSCEIVER" || channeltype === "MULTI_MODE_INPUT_TRANSMITTER") { + homematic("Interface.reportValueUsage", {"interface": "HmIP-RF", "address": addr, "valueId": "PRESS_SHORT", "refCounter":"1"}); + } else if (channeltype === "KEY") { + homematic("Interface.reportValueUsage", {"interface": "BidCos-RF", "address": addr, "valueId": "PRESS_SHORT", "refCounter":"1"}); + } + } + }, "html"); + }, + + removeCentralLink: function(channeltype) + { + var addr=this.channel.address; + new YesNoDialog(translateKey('dialogSafetyCheck'), translateKey('dialogQuestionRemoveLink').replace('%s', addr+' <> CCU'), function(result) { + if (result == YesNoDialog.RESULT_YES) { + if (channeltype === "KEY_TRANSCEIVER" || channeltype === "MULTI_MODE_INPUT_TRANSMITTER") { + homematic("Interface.reportValueUsage", {"interface": "HmIP-RF", "address": addr, "valueId": "PRESS_SHORT", "refCounter":"0"}); + homematic("Interface.reportValueUsage", {"interface": "HmIP-RF", "address": addr, "valueId": "PRESS_LONG", "refCounter":"0"}); + } else if (channeltype === "KEY") { + homematic("Interface.reportValueUsage", {"interface": "BidCos-RF", "address": addr, "valueId": "PRESS_SHORT", "refCounter":"0"}); + homematic("Interface.reportValueUsage", {"interface": "BidCos-RF", "address": addr, "valueId": "PRESS_LONG", "refCounter":"0"}); + } + } + }, "html"); + }, + + /** + * Callback. Fragt zyklisch das Ergebnis des Funktionstests ab. + **/ + pollTest: function(timestamp) + { + var _this_ = ChannelConfigDialog; + + if (typeof(timestamp) == "string") + { + var time = timestamp.split(" ")[1]; + $(_this_.TEST_RESULT_ID).setStyle({backgroundColor: WebUI.getColor("testOk")}); + $(_this_.TEST_RESULT_ID).innerHTML = ""; + $(_this_.TEST_RESULT_ID).appendChild(document.createTextNode(time)); + _this_.m_isTestRunning = false; + } + + if (_this_.m_isTestRunning) + { + homematic.delay(_this_.POLL_INTERVAL, "Channel.pollComTest", { + id : _this_.channel.id, + testId: _this_.m_testId + }, _this_.pollTest); + } + }, + + /** + * Blendet die Raumliste ein bzw. aus. + **/ + toggleRooms: function(image) + { + if (this.isRoomListVisible === true) + { + $(this.ROOMLIST_ID).hide(); + image.src = this.PLUS_IMAGE_SRC; + this.isRoomListVisible = false; + } + else + { + $(this.ROOMLIST_ID).show(); + image.src = this.MINUS_IMAGE_SRC; + this.isRoomListVisible = true; + } + }, + + /** + * Blendet die Gewerkeliste ein bzw. aus. + **/ + toggleFuncs: function(image) + { + if (this.isSubsectionListVisible === true) + { + $(this.SUBSECTIONLIST_ID).hide(); + image.src = this.PLUS_IMAGE_SRC; + this.isSubsectionListVisible = false; + } + else + { + $(this.SUBSECTIONLIST_ID).show(); + image.src = this.MINUS_IMAGE_SRC; + this.isSubsectionListVisible = true; + } + } +}); +/** + * deviceconfigdialog.js + **/ + +/** + * Dialog für Kanaleinstellungen (Name, Räume, Gewerke, Funktionstest) + **/ +DeviceConfigDialog = Singleton.create({ + LAYER_ID: "DeviceConfigDialogLayer", + NAME_ID: "DeviceConfigDialog_DeviceName", + SEPARATOR_ID: "DeviceConfigDialog_DeviceChannelsRenameSeparator", + USABLE_ID: "DeviceConfigDialog_isUsable", + VISIBLE_ID: "DeviceConfigDialog_isVisible", + LOGGED_ID: "DeviceConfigDialog_isLogged", + SERVICEMSG_ID: "DeviceConfigDialog_enabledServiceMsg", + TEST_RESULT_ID: "DeviceConfigDialogTestResult", + RENAME_OWN_ID: "DeviceConfigDialog_renameChannelIncludingOwn", + RESULT_OK: 1, + RESULT_ABORT: 0, + POLL_INTERVAL: 3, + + /** + * Konstruktor + **/ + initialize: function() + { + this.template = TrimPath.parseTemplate(DEVICE_CONFIG_DIALOG_JST); + }, + + /** + * Zeigt den Konfigurationsdialog an + **/ + show: function(device, callback) + { + this.m_testId = null; + this.m_isTestRunning = false; + + this.device = device; + this.isVisibilityChanged = false; + this.isUsabilityChanged = false; + this.isLoggingChanged = false; + this.enabledServiceMsgChanged = false; + this.callback = callback; + this.layer = document.createElement("div"); + this.layer.id = this.LAYER_ID; + Layer.add(this.layer); + this.layer.innerHTML = this.template.process({ + device: this.device + }); + + this.device.channels.each(function(channel) { + if (! channel.isVisible) { + jQuery("#trAllChnVisible").show(); + return false; //leave each loop + } + }); + + if ((this.device.typeName.indexOf("Team") != -1) || (isNonCCUDevice(this.device))) { + this.__hideFunctionTest(); + } + if (isNonCCUDevice(this.device)) { + this.__hideLogging(); + } + translateJSTemplate("#DeviceConfigDialog"); + jQuery("#DeviceConfigDialogTestHintImg").attr('title', translateKey("generalDeviceConfigHintTooltip")); + jQuery("#DeviceConfigDialogRenameChannelButtonHintImg").attr('title', translateKey("generalDeviceRenameChannelHintTooltip")); + jQuery("#DeviceConfigDialogRenameIncludingOwnHintImg").attr('title', translateKey("generalDeviceRenameChannelIncludingOwnHint")); + }, + + __hideFunctionTest: function() { + jQuery("#deviceFunctionTestPanel").hide(); + }, + + __hideLogging: function() { + jQuery("#btnEnableDeviceLogging").hide(); + }, + + /** + * Schließt den Konfigurationsdialog. + **/ + close: function(result) + { + this.m_isTestRunning = false; + Layer.remove(this.layer); + if (this.callback) { this.callback(result); } + }, + + /** + * Übernimmt die Änderungen und schließt den Dialog. + **/ + ok: function() + { + if (isTextAllowed($(this.NAME_ID).value)) + { + this.device.setName($(this.NAME_ID).value); + + var isVisible = $(this.VISIBLE_ID).checked; + var isUsable = $(this.USABLE_ID).checked; + var isLogged = $(this.LOGGED_ID).checked; + var devIsVisible = "unknown"; + this.device.channels.each(function(channel) { + if ((this.isVisibilityChanged) && (isVisible)) { + channel.setVisibility(isVisible); + if (devIsVisible == "unknown") { + homematic("Device.setVisibility", {"id": this.device.id, "isVisible": true}); + devIsVisible = true; + } + } + if (this.isUsabilityChanged) { channel.setUsability(isUsable); } + if (this.isLoggingChanged) { channel.setLogging(isLogged); } + }, this); + var enabledServiceMsg = $(this.SERVICEMSG_ID).checked; + if (this.enabledServiceMsgChanged) { this.device.setEnabledServiceMsg(enabledServiceMsg); } + + this.close(this.RESULT_OK); + } + }, + + /** + * Schließt den Dialog ohne die Änderungen zu übernehmen. + **/ + abort: function() + { + this.close(this.RESULT_ABORT); + }, + + /** + * Benennt alle Channel des Device um + **/ + + ready: function() + { + this.ok(); + }, + + renameChannels: function() { + if (confirm("Alle Kanäle umbenennen?")) { + var renameOwnChannelNames = $(this.RENAME_OWN_ID).checked; + + this.device.channels.each(function(channel) { + var chNumber = channel.address.split(':')[1]; + var origChName = this.device.name+":"+chNumber; + + // Channel bereits umbenannt und Option "eigene Namen umbenennen" wurde deaktiviert + if (channel.name !== origChName && renameOwnChannelNames === false) return true; + + var chName = $(this.NAME_ID).value+ $(this.SEPARATOR_ID).value + chNumber; + homematic("Channel.setName", {id: channel.id, name: chName}); + channel.setName(chName); + }, this); + this.ok(); + } + }, + + /** + * Startet den Funktionstest. + **/ + startTest: function() { + var _this_ = this; + this.m_isTestRunning = true; + $(this.TEST_RESULT_ID).setStyle({backgroundColor: WebUI.getColor("testActive")}); + homematic("Device.startComTest", {id: this.device.id}, function (testId) { + _this_.m_testId = testId; + _this_.pollTest(); + }); + }, + + /** + * Callback. Fragt zyklisch das Ergebnis des Funktionstests ab. + **/ + pollTest: function(timestamp) + { + var _this_ = DeviceConfigDialog; + + if (typeof(timestamp) == "string") + { + var time = timestamp.split(" ")[1]; + $(_this_.TEST_RESULT_ID).setStyle({backgroundColor: WebUI.getColor("testOk")}); + $(_this_.TEST_RESULT_ID).innerHTML = ""; + $(_this_.TEST_RESULT_ID).appendChild(document.createTextNode(time)); + _this_.m_isTestRunning = false; + } + + if (_this_.m_isTestRunning) + { + homematic.delay(_this_.POLL_INTERVAL, "Device.pollComTest", { + id : _this_.device.id, + testId: _this_.m_testId + }, _this_.pollTest); + } + } + +}); +/** + * deletedevicedialog.js + **/ + +hasDeviceInternalProgramOrSysvar = function(device) { + var result = {"id": 0, "address" : "", "type": "" }; + try { + jQuery.each(device.channels, function(index, channel) { + if ( + (channel.channelType == "POWERMETER") + || (channel.channelType == "POWERMETER_IEC1") + || (channel.channelType == "ENERGIE_METER_TRANSMITTER") + || (channel.channelType == "WEATHER_TRANSMIT" /*HmIP-SWO*/) + || (channel.channelType == "KEY_TRANSCEIVER") /*HnmIP-MOD-RC8*/ + ) { + result.id = channel.id; + result.address = channel.address; + result.type = channel.channelType; + return; // leave each loop + } + }); + } catch(e) {} + + return result; +}; + +deleteProgSysvarPOWERMETER = function(chId, chAddress, devLabel) { + try { + homematic("SysVar.deleteSysVarByName", {"name": "svEnergyCounter_" + chId + "_" + chAddress}, function () { + homematic("SysVar.deleteSysVarByName", {"name": "svEnergyCounterOldVal_" + chId}, function () { + homematic("SysVar.deleteSysVarByName", {"name": "svEnergyCounter_" + chId + "_" + chAddress + "_RESET"}, function () { + homematic("SysVar.deleteSysVarByName", {"name": "svEnergyCounter_" + chId + "_" + chAddress + "_DEVICE_RESET"}, function () { + homematic("SysVar.deleteSysVarByName", {"name": "svEnergyCounter_" + chId + "_" + chAddress + "_TMP_OLDVAL"}, function () { + homematic("Program.deleteProgramByName", {"name": "prgEnergyCounter_" + chId + "_" + chAddress}, function () { + homematic("Program.deleteProgramByName", {"name": "prgSetEnergyValuesAtMidnight" + chId}, function () { + if ((typeof devLabel == "undefined") || (devLabel != "hmip-psmco")) { + conInfo(chAddress + " ProgSysvarPOWERMETER deleted - next: save ObjectModel"); + window.setTimeout(function () { + saveObjectModel(); + }, 5000); + } else { + deleteProgSysvarPOWERMETER_FeedIn(chId, chAddress); + } + }); + }); + }); + }); + }); + }); + }); + } catch(e) {console.log(e);} +}; + +deleteProgSysvarPOWERMETER_FeedIn = function(chId, chAddress) { + try { + homematic("SysVar.deleteSysVarByName", {"name": "svEnergyCounterFeedIn_" + chId + "_" + chAddress}, function () { + homematic("SysVar.deleteSysVarByName", {"name": "svEnergyCounterOldValFeedIn_" + chId}, function () { + //homematic("SysVar.deleteSysVarByName", {"name": "svEnergyCounter_" + chId + "_" + chAddress + "_RESET"}, function () { + //homematic("SysVar.deleteSysVarByName", {"name": "svEnergyCounter_" + chId + "_" + chAddress + "_DEVICE_RESET"}, function () { + //homematic("SysVar.deleteSysVarByName", {"name": "svEnergyCounter_" + chId + "_" + chAddress + "_TMP_OLDVAL"}, function () { + homematic("Program.deleteProgramByName", {"name": "prgEnergyCounterFeedIn_" + chId + "_" + chAddress}, function () { + homematic("Program.deleteProgramByName", {"name": "prgSetEnergyValuesAtMidnightFeedIn" + chId}, function () { + conInfo(chAddress + " ProgSysvarPOWERMETER + FeedIn deleted - next: save ObjectModel"); + window.setTimeout(function(){saveObjectModel();},5000); + }); + }); + //}); + //}); + //}); + }); + }); + } catch(e) {console.log(e);} +}; + +deleteProgSysvarPOWERMETER_ESI = function(device) { + try { + jQuery.each(device.channels, function (index, chn) { + if (chn.index >= 1) { + homematic("Program.deleteProgramByName", {"name": "prgEnergyCounter_" + chn.id + "_" + chn.address}); + homematic("Program.deleteProgramByName", {"name": "prgGasCounter_" + chn.id + "_" + chn.address}); + homematic("Program.deleteProgramByName", {"name": "prgSetEnergyValuesAtMidnight" + chn.id}); + homematic("SysVar.deleteSysVarByName", {"name": "svEnergyCounter_" + chn.id + "_" + chn.address}); + homematic("SysVar.deleteSysVarByName", {"name": "svEnergyCounterOldVal_" + chn.id}); + } + }); + } catch(e) {console.log(e);} + + conInfo(device.typeName + ": All relevant programs and sysvars deleted - next: save ObjectModel"); + window.setTimeout(function(){saveObjectModel();},5000); +}; + + +deleteProgSysvarPOWERMETER_IGL = function(chId, chAddress) { + try { + homematic("SysVar.deleteSysVarByName", {"name": "svEnergyCounterGas_" + chId + "_" + chAddress}, function () { + homematic("SysVar.deleteSysVarByName", {"name": "svEnergyCounterGasOldVal_" + chId}, function () { + homematic("SysVar.deleteSysVarByName", {"name": "svEnergyCounterGas_" + chId + "_" + chAddress + "_RESET"}, function () { + homematic("SysVar.deleteSysVarByName", {"name": "svEnergyCounterGas_" + chId + "_" + chAddress + "_DEVICE_RESET"}, function () { + homematic("SysVar.deleteSysVarByName", {"name": "svEnergyCounterGas_" + chId + "_" + chAddress + "_TMP_OLDVAL"}, function () { + homematic("Program.deleteProgramByName", {"name": "prgEnergyCounterGAS_" + chId + "_" + chAddress}, function () { + conInfo(chAddress + " ProgSysvarPOWERMETER_IGL deleted - next: ProgSysvarPOWERMETER"); + deleteProgSysvarPOWERMETER(chId, chAddress); + }); + }); + }); + }); + }); + }); + } catch(e) {console.log(e);} +}; + +deleteProgSysvarPOWERMETER_IEC = function(chId, chAddress) { + try { + homematic("SysVar.deleteSysVarByName", {"name": "svEnergyCounterIEC_" + chId + "_" + chAddress}, function () { + homematic("SysVar.deleteSysVarByName", {"name": "svEnergyCounterIECOldVal_" + chId}, function () { + homematic("Program.deleteProgramByName", {"name": "prgEnergyCounterIEC_" + chId + "_" + chAddress}, function () { + conInfo(chAddress + " ProgSysvarPOWERMETER_IEC deleted - next: ProgSysvarPOWERMETER_IGL"); + deleteProgSysvarPOWERMETER_IGL(chId, chAddress); + }); + }); + }); + } catch(e) {console.log(e);} +}; + +deleteProgSysvarHmIPWeatherTransmitRainSunshine = function(chId, chAddress) { + try { + homematic("SysVar.deleteSysVarByName", {"name": "svHmIPRainCounter_" + chId + "_" + chAddress}, function () { + homematic("SysVar.deleteSysVarByName", {"name": "svHmIPRainCounterOldVal_" + chId}, function () { + homematic("SysVar.deleteSysVarByName", {"name": "svHmIPRainCounterYesterday_" + chId}, function () { + homematic("SysVar.deleteSysVarByName", {"name": "svHmIPRainCounterToday_" + chId}, function () { + homematic("Program.deleteProgramByName", {"name": "prgRainCounter_" + chId + "_" + chAddress}, function () { + homematic("Program.deleteProgramByName", {"name": "prgDailySunshineRainCounter_" + chId}, function () { + conInfo(chAddress + "prgDailySunshineRainCounter and prgHmIPRainCounter deleted - next: delete prgHmIPSunshineCounter"); + deleteProgSysvarHmIPWeatherTransmitSunshine(chId,chAddress); + }); + }); + }); + }); + }); + }); + } catch(e) {console.log(e);} +}; + +deleteProgSysvarHmIPWeatherTransmitSunshine = function(chId, chAddress) { + try { + homematic("SysVar.deleteSysVarByName", {"name": "svHmIPSunshineCounter_" + chId + "_" + chAddress}, function () { + homematic("SysVar.deleteSysVarByName", {"name": "svHmIPSunshineCounterOldVal_" + chId}, function () { + homematic("SysVar.deleteSysVarByName", {"name": "svHmIPSunshineCounterYesterday_" + chId}, function () { + homematic("SysVar.deleteSysVarByName", {"name": "svHmIPSunshineCounterToday_" + chId}, function () { + homematic("Program.deleteProgramByName", {"name": "prgSunshineCounter_" + chId + "_" + chAddress}, function () { + conInfo(chAddress + " prgHmIPSunshineCounter deleted - next: save ObjectModel"); + window.setTimeout(function () { + saveObjectModel(); + }, 5000); + }); + }); + }); + }); + }); + } catch(e) {console.log(e);} +}; + + +/** + * Ablauf: + * 1) Prüfe, ob direkte Verknüpfungen oder Programme bestehen + * 2) Anwender muss bestätigen, ob er das Gerät wirklich löschen möchte + * --> dabei wird angezeigt, on direkte Verknüpfungen oder Programme bestehen + * --> der Anwender wählt eine Löschoption: + * - nur ablernen + * - in Werkzustand zurücksetzen + * 3) Falls das Gerät gelöscht werden soll, wird nun der Löschvorgang durchgeführt + * 4) Falls der Löschvorgang fehlgeschlagen ist, kann der Anwender wählen: + * - erneute löschen + * - später automatisch löschen + * - löschen, auch wenn nicht erreichbar + * - abbrechen (nicht löschen) + */ + +/** + * "Bitte warten...", "Prüfe Programme und direkte Verknüpfungen..." + **/ +CheckLinksAndProgramsWindow = Class.create({ + + initialize: function(device, callback) + { + var onResultHandler = this.m_onResult.bind(this); + var screenWidth = WebUI.getWidth(); + var screenHeight = WebUI.getHeight(); + var frameWidth = CheckLinksAndProgramsWindow.CONTENT_WIDTH; + var frameHeight = CheckLinksAndProgramsWindow.CONTENT_HEIGHT; + var frameX = parseInt((screenWidth - frameWidth ) / 2); + var frameY = parseInt((screenHeight - frameHeight) / 2); + + CheckLinksAndProgramsWindow.TITLE = translateKey("CheckLinksAndProgramsWindowTitle"); + CheckLinksAndProgramsWindow.CONTENT = "" + translateKey("CheckLinksAndProgramsWindowContent"); + + this.m_device = device; + this.m_callback = callback; + + this.m_layer = document.createElement("div"); + this.m_layer.className = "DialogLayer"; + + this.m_frame = new UI.Frame() + .setTitle(CheckLinksAndProgramsWindow.TITLE) + .setContentSize(frameWidth, frameHeight) + .setPosition(frameX, frameY) + .add(new UI.Text() + .setPosition(10, 10) + .setWidth(frameWidth - 10) + .setHtml(CheckLinksAndProgramsWindow.CONTENT) + ); + + this.m_layer.appendChild(this.m_frame.getElement()); + Layer.add(this.m_layer); + + this.m_device.hasLinksOrPrograms(onResultHandler); + }, + + m_onResult: function(result) + { + this.m_frame.dispose(); + Layer.remove(this.m_layer); + + if (this.m_callback) { this.m_callback(result); } + } + +}); + +CheckLinksAndProgramsWindow.CONTENT_WIDTH = 320; +CheckLinksAndProgramsWindow.CONTENT_HEIGHT = 60; +//CheckLinksAndProgramsWindow.TITLE = translateKey("CheckLinksAndProgramsWindowTitle"); +//CheckLinksAndProgramsWindow.CONTENT = "" + translateKey("CheckLinksAndProgramsWindowContent"); + +/** + * "Möchten Sie das Gerät wirklich löschen?" + **/ +ConfirmDeleteDeviceWindow = Class.create({ + + initialize: function(device, hasLinksOrPrograms, callback) + { + var onDeleteHandler = this.m_onDelete.bind(this); + var onAbortHandler = this.m_onAbort.bind(this); + var onChangeHandler = this.m_onChange.bind(this); + var screenWidth = WebUI.getWidth(); + var screenHeight = WebUI.getHeight(); + var frameWidth = ConfirmDeleteDeviceWindow.CONTENT_WIDTH; + var frameHeight = ConfirmDeleteDeviceWindow.CONTENT_HEIGHT; + var frameX = parseInt((screenWidth - frameWidth ) / 2); + var frameY = parseInt((screenHeight - frameHeight) / 2); + + this.m_device = device; + + ConfirmDeleteDeviceWindow.TITLE = translateKey("ConfirmDeleteDeviceWindowTitle"); + ConfirmDeleteDeviceWindow.QUESTION = translateKey("ConfirmDeleteDeviceWindowQuestion"); + ConfirmDeleteDeviceWindow.DELETE_OPTIONS = translateKey("ConfirmDeleteDeviceWindowDeleteOptions"); + ConfirmDeleteDeviceWindow.REMOVE = translateKey("ConfirmDeleteDeviceWindowRemove"); + ConfirmDeleteDeviceWindow.REMOVE_DESCRIPTION = (! isNonCCUDevice(this.m_device)) ? translateKey("ConfirmDeleteDeviceWindowRemoveDescription") : translateKey("ConfirmDeleteDeviceWindowRemoveDescriptionNoneCCUDevice"); + ConfirmDeleteDeviceWindow.RESET = translateKey("ConfirmDeleteDeviceWindowReset"); + ConfirmDeleteDeviceWindow.RESET_DESCRIPTION = translateKey("ConfirmDeleteDeviceWindowResetDescription"); + ConfirmDeleteDeviceWindow.DELETE_BUTTON = translateKey("ConfirmDeleteDeviceWindowDeleteButton"); + ConfirmDeleteDeviceWindow.ABORT_BUTTON = translateKey("ConfirmDeleteDeviceWindowAbortButton"); + ConfirmDeleteDeviceWindow.WARNING = translateKey("ConfirmDeleteDeviceWindowWarning"); + + this.hmIPIdentifier = "HmIP-RF"; + this.isNonCCUDevice = isNonCCUDevice(this.m_device); + + this.m_showRemoveOption = (this.m_device.interfaceName != this.hmIPIdentifier) ? true : false; + this.m_hasLinksOrPrograms = hasLinksOrPrograms; + this.m_callback = callback; + + this.m_layer = document.createElement("div"); + this.m_layer.className = "DialogLayer"; + + this.m_lblDeleteOptions = new UI.Label() + .setPosition(10, 70) + .setText(ConfirmDeleteDeviceWindow.DELETE_OPTIONS); + + this.m_listbox = new UI.ListBox() + .setPosition(30,90) + .setWidth(frameWidth - 60) + //.add({name: ConfirmDeleteDeviceWindow.REMOVE, description: ConfirmDeleteDeviceWindow.REMOVE_DESCRIPTION, flags: 0}) + //.add({name: ConfirmDeleteDeviceWindow.RESET, description: ConfirmDeleteDeviceWindow.RESET_DESCRIPTION, flags: 1}) + .setOnChangeCallback(onChangeHandler) + .selectIndex(0); + + if (this.m_showRemoveOption) { + this.m_listbox.add({name: ConfirmDeleteDeviceWindow.REMOVE, description: ConfirmDeleteDeviceWindow.REMOVE_DESCRIPTION, flags: 0}); + } + + // The deviceType doesn´t exist when in device inbox. + // That means as long as a device is in the device inbox a factory reset isn´t possible when deleting the device. + if(this.m_device.deviceType != null) { + // The new group device has no factory reset + if (this.m_device.deviceType.id != "HM-CC-VG-1") { + this.m_listbox.add({name: ConfirmDeleteDeviceWindow.RESET, description: ConfirmDeleteDeviceWindow.RESET_DESCRIPTION, flags: 1}); + } + } else { + // HmIP devices will always be deleted with a factory reset + if (this.m_device.interfaceName == this.hmIPIdentifier) { + this.m_listbox.add({name: ConfirmDeleteDeviceWindow.RESET, description: ConfirmDeleteDeviceWindow.RESET_DESCRIPTION, flags: 1}); + } + } + + this.m_description = new UI.Text() + .setPosition(30, 120) + .setWidth(frameWidth - 60) + .setText(ConfirmDeleteDeviceWindow.REMOVE_DESCRIPTION); + + if (! this.m_showRemoveOption) { + this.m_description.setText(ConfirmDeleteDeviceWindow.RESET_DESCRIPTION); + } + + this.m_frame = new UI.Frame() + .setTitle(ConfirmDeleteDeviceWindow.TITLE) + .setContentSize(frameWidth, frameHeight) + .setPosition(frameX, frameY) + .add(new UI.Text() + .setPosition(10, 10) + .setWidth(60) + .setHeight(60) + .setHtml(this.m_device.thumbnailHTML) + ) + .add(new UI.Text() + .setPosition(75, 10) + .setWidth(frameWidth - 85) + .setHtml(ConfirmDeleteDeviceWindow.QUESTION.process({device: this.m_device})) + ) + + .add(this.m_lblDeleteOptions) + + .add(this.m_listbox) + + .add(this.m_description) + .add(new UI.Button() + .setPosition(frameWidth - 160, 200) + .setText(ConfirmDeleteDeviceWindow.DELETE_BUTTON) + .setAction(onDeleteHandler) + ) + + .add(new UI.Button() + .setPosition(10,200) + .setText(ConfirmDeleteDeviceWindow.ABORT_BUTTON) + .setAction(onAbortHandler) + ); + + if (this.isNonCCUDevice) { + this.m_frame.remove(this.m_lblDeleteOptions); + this.m_frame.remove(this.m_listbox); + } + + if (this.m_hasLinksOrPrograms !== false) + { + this.m_frame.add(new UI.Text() + .setPosition(10,160) + .setWidth(frameWidth - 10) + .setHtml(ConfirmDeleteDeviceWindow.WARNING) + ); + } + + this.m_layer.appendChild(this.m_frame.getElement()); + Layer.add(this.m_layer); + }, + + m_close: function(result) + { + this.m_frame.dispose(); + Layer.remove(this.m_layer); + if (this.m_callback) { this.m_callback(result); } + }, + + m_onDelete: function() + { + this.m_close(this.m_listbox.getSelectedItem().flags); + }, + + m_onAbort: function() + { + this.m_close(null); + }, + + m_onChange: function(item) + { + this.m_description.setText(item.description); + } +}); + + +ConfirmDeleteDeviceWindow.CONTENT_WIDTH = 400; +ConfirmDeleteDeviceWindow.CONTENT_HEIGHT = 230; +/* +ConfirmDeleteDeviceWindow.TITLE = translateKey("ConfirmDeleteDeviceWindowTitle"); +ConfirmDeleteDeviceWindow.QUESTION = translateKey("ConfirmDeleteDeviceWindowQuestion"); +ConfirmDeleteDeviceWindow.DELETE_OPTIONS = translateKey("ConfirmDeleteDeviceWindowDeleteOptions"); +ConfirmDeleteDeviceWindow.REMOVE = translateKey("ConfirmDeleteDeviceWindowRemove"); +ConfirmDeleteDeviceWindow.REMOVE_DESCRIPTION = translateKey("ConfirmDeleteDeviceWindowRemoveDescription"); +ConfirmDeleteDeviceWindow.RESET = translateKey("ConfirmDeleteDeviceWindowReset"); +ConfirmDeleteDeviceWindow.RESET_DESCRIPTION = translateKey("ConfirmDeleteDeviceWindowResetDescription"); +ConfirmDeleteDeviceWindow.DELETE_BUTTON = translateKey("ConfirmDeleteDeviceWindowDeleteButton"); +ConfirmDeleteDeviceWindow.ABORT_BUTTON = translateKey("ConfirmDeleteDeviceWindowAbortButton"); +ConfirmDeleteDeviceWindow.WARNING = translateKey("ConfirmDeleteDeviceWindowWarning"); +*/ + +/** + * "Bitte warten", "Gerät wird gelöscht..." + **/ +DeleteDeviceWindow = Class.create({ + + initialize: function(device, flags, callback) + { + var onResultHandler = this.m_onResult.bind(this); + var screenWidth = WebUI.getWidth(); + var screenHeight = WebUI.getHeight(); + var frameWidth = DeleteDeviceWindow.CONTENT_WIDTH; + var frameHeight = DeleteDeviceWindow.CONTENT_HEIGHT; + var frameX = parseInt((screenWidth - frameWidth ) / 2); + var frameY = parseInt((screenHeight - frameHeight) / 2); + + DeleteDeviceWindow.TITLE = translateKey("DeleteDeviceWindowTitle"); + DeleteDeviceWindow.CONTENT = ""+translateKey("DeleteDeviceWindowContent"); + + this.m_device = device; + this.m_flags = flags; + this.m_callback = callback; + + this.m_layer = document.createElement("div"); + this.m_layer.className = "DialogLayer"; + + this.m_frame = new UI.Frame() + .setTitle(DeleteDeviceWindow.TITLE) + .setContentSize(frameWidth, frameHeight) + .setPosition(frameX, frameY) + .add(new UI.Text() + .setPosition(10, 10) + .setWidth(frameWidth - 10) + .setHtml(DeleteDeviceWindow.CONTENT) + ); + + this.m_layer.appendChild(this.m_frame.getElement()); + Layer.add(this.m_layer); + + device.remove(this.m_flags, onResultHandler); + + if (flags == 5) { + // Prüfen, ob ein Kanal des Gerätes ein HmIP-Wettersensor ist, als Energy-Counter oder ob das Gerät ein HmIP-MOD-RC8 ist dient. + // Wenn ja, müssen beim Löschen die dazugehörigen Systemvariablen + // sowie das enstprechende Systemprogramm zum aktualisieren der Systemvariablen entfernt werden. + var oChnIdAndAddress = hasDeviceInternalProgramOrSysvar(this.m_device), + chId = oChnIdAndAddress.id, + chAddress= oChnIdAndAddress.address; + if (chId != 0) { + if (oChnIdAndAddress.type == "POWERMETER" || oChnIdAndAddress.type == "ENERGIE_METER_TRANSMITTER") { + if (this.m_device.typeName.toLowerCase() != "hmip-esi") { + deleteProgSysvarPOWERMETER(chId, chAddress, this.m_device.typeName.toLowerCase()); + } else { + deleteProgSysvarPOWERMETER_ESI(this.m_device); + } + } else if (oChnIdAndAddress.type == "POWERMETER_IGL") { + deleteProgSysvarPOWERMETER_IGL(chId, chAddress); + } else if (oChnIdAndAddress.type == "POWERMETER_IEC1") { + deleteProgSysvarPOWERMETER_IEC(chId, chAddress); + } else if ((this.m_device.typeName.toLowerCase() == "hmip-swo-b") && (oChnIdAndAddress.type == "WEATHER_TRANSMIT")) { + deleteProgSysvarHmIPWeatherTransmitSunshine(chId, chAddress); + } else if (((this.m_device.typeName.toLowerCase() == "hmip-swo-pl") || (this.m_device.typeName.toLowerCase() == "hmip-swo-pr")) && (oChnIdAndAddress.type == "WEATHER_TRANSMIT")) { + deleteProgSysvarHmIPWeatherTransmitRainSunshine(chId, chAddress); + } /*currently not in use else if (this.m_device.typeName.toLowerCase() == "hmip-mod-rc8") { + this.m_deleteSysvarHmIPModRC8(); + }*/ + } else if ((typeof this.m_device.typeName != "undefined") && (this.m_device.typeName.toLowerCase() == "hmipw-drbl4")) { + this.m_deleteMetaDataHmIPWBlind(); + } + } + + }, + + m_onResult: function(result, error) + { + var errorCode = DeleteDeviceDialog.ERROR_NO_ERROR; + if (error !== null) + { + errorCode = error.code; + } + var self = this; + + if (isNonCCUDevice(this.m_device)) { + window.setTimeout(function () { + self.m_frame.dispose(); + Layer.remove(self.m_layer); + + ConfigData.reload( function() { + ConfigData.handleReloadDone(); + WebUI.enter(DeviceListPage); + } ); + + }, 7000); + } else { + this.m_frame.dispose(); + Layer.remove(this.m_layer); + if (this.m_callback) { this.m_callback(errorCode); } + } + } + +}); + +DeleteDeviceWindow.CONTENT_WIDTH = 320; +DeleteDeviceWindow.CONTENT_HEIGHT = 60; +/* +DeleteDeviceWindow.TITLE = translateKey("DeleteDeviceWindowTitle"); +DeleteDeviceWindow.CONTENT = ""+translateKey("DeleteDeviceWindowContent"); +*/ + +/** + * "Fehler", "Gerät konnte nicht gelöscht werden" + **/ +ErrorOnDeleteWindow = Class.create({ + + initialize: function(device, flags, errorCode, callback) + { + var onDeleteHandler = this.m_onDelete.bind(this); + var onAbortHandler = this.m_onAbort.bind(this); + var onChangeHandler = this.m_onChange.bind(this); + var screenWidth = WebUI.getWidth(); + var screenHeight = WebUI.getHeight(); + var frameWidth = ErrorOnDeleteWindow.CONTENT_WIDTH; + var frameHeight = ErrorOnDeleteWindow.CONTENT_HEIGHT; + var frameX = parseInt((screenWidth - frameWidth ) / 2); + var frameY = parseInt((screenHeight - frameHeight) / 2); + + ErrorOnDeleteWindow.TITLE = translateKey("ErrorOnDeleteWindowTitle"); + ErrorOnDeleteWindow.DELETE_OPTIONS = translateKey("ErrorOnDeleteWindowDeleteOptions"); + ErrorOnDeleteWindow.RETRY = translateKey("ErrorOnDeleteWindowRetry"); + ErrorOnDeleteWindow.RETRY_DESCRIPTION = translateKey("ErrorOnDeleteWindowRetryDescription"); + ErrorOnDeleteWindow.DEFER = translateKey("ErrorOnDeleteWindowDefer"); + ErrorOnDeleteWindow.DEFER_DESCRIPTION = translateKey("ErrorOnDeleteWindowDeferDescription"); + ErrorOnDeleteWindow.FORCE = translateKey("ErrorOnDeleteWindowForce"); + ErrorOnDeleteWindow.FORCE_DESCRIPTION = translateKey("ErrorOnDeleteWindowForceDescription"); + ErrorOnDeleteWindow.DEVICE_NOT_REACHABLE = translateKey("ErrorOnDeleteWindowDeviceNotReachable"); + ErrorOnDeleteWindow.UNKNOWN_DEVICE = translateKey("ErrorOnDeleteWindowUnknownDevice"); + ErrorOnDeleteWindow.UKNOWN_ERROR = translateKey("ErrorOnDeleteWindowUnknownError"); + ErrorOnDeleteWindow.ABORT_BUTTON = translateKey("ErrorOnDeleteWindowAbortButton"); + ErrorOnDeleteWindow.DELETE_BUTTON = translateKey("ErrorOnDeleteWindowDeleteButton"); + + this.m_device = device; + this.m_flags = (flags & DeleteDeviceDialog.FLAG_RESET); + this.m_errorCode = errorCode; + this.m_callback = callback; + + this.hmIPIdentifier = "HmIP-RF"; + + + var errorMessage; + switch(errorCode) + { + case DeleteDeviceDialog.ERROR_GENERAL: + errorMessage = ErrorOnDeleteWindow.DEVICE_NOT_REACHABLE.process({device: this.m_device}); + break; + case DeleteDeviceDialog.ERROR_UNKNOWN_DEVICE: + errorMessage = ErrorOnDeleteWindow.UNKNOWN_DEVICE.process({device: this.m_device}); + break; + default: + errorMessage = ErrorOnDeleteWindow.UKNOWN_ERROR.process({device: this.m_device}); + break; + } + + this.m_layer = document.createElement("div"); + this.m_layer.className = "DialogLayer"; + + this.m_listbox = new UI.ListBox() + .setPosition(30, 160) + .setWidth(frameWidth - 60) + .add({name: ErrorOnDeleteWindow.RETRY, description: ErrorOnDeleteWindow.RETRY_DESCRIPTION, flags: 0}) + .add({name: ErrorOnDeleteWindow.DEFER, description: ErrorOnDeleteWindow.DEFER_DESCRIPTION, flags: 4}) + .add({name: ErrorOnDeleteWindow.FORCE, description: ErrorOnDeleteWindow.FORCE_DESCRIPTION, flags: 2}) + .setOnChangeCallback(onChangeHandler) + .selectIndex(0); + + this.m_description = new UI.Text() + .setPosition(30,190) + .setWidth(frameWidth - 60) + .setText(ErrorOnDeleteWindow.RETRY_DESCRIPTION); + + this.m_frame = new UI.Frame() + .setTitle(ErrorOnDeleteWindow.TITLE) + .setContentSize(frameWidth, frameHeight) + .setPosition(frameX, frameY) + .add(new UI.Text() + .setPosition(10, 10) + .setWidth(60) + .setHeight(60) + .setHtml(this.m_device.thumbnailHTML) + ) + .add(new UI.Text() + .setPosition(75, 10) + .setWidth(frameWidth - 85) + .setHtml(errorMessage) + ) + .add(new UI.Label() + .setPosition(10, 140) + .setText(ErrorOnDeleteWindow.DELETE_OPTIONS) + ) + .add(this.m_listbox) + .add(this.m_description) + .add(new UI.Button() + .setPosition(10, 230) + .setText(ErrorOnDeleteWindow.ABORT_BUTTON) + .setAction(onAbortHandler) + ) + .add(new UI.Button() + .setPosition(frameWidth - 170, 230) + .setWidth(150) + .setText(ErrorOnDeleteWindow.DELETE_BUTTON) + .setAction(onDeleteHandler) + ); + + this.m_layer.appendChild(this.m_frame.getElement()); + Layer.add(this.m_layer); + }, + + m_close: function(result) + { + if (this.m_frame != undefined) { + this.m_frame.dispose(); + } + + Layer.remove(this.m_layer); + + if (result == null && this.m_flags == 1 && this.m_errorCode == 507) { + // Prüfen, ob ein Kanal des Gerätes ein HmIP-Wettersensor ist, als Energy-Counter oder ob das Gerät ein HmIP-MOD-RC8 ist dient. + // Wenn ja, müssen beim Löschen die dazugehörigen Systemvariablen + // sowie das enstprechende Systemprogramm zum aktualisieren der Systemvariablen entfernt werden. + var oChnIdAndAddress = hasDeviceInternalProgramOrSysvar(this.m_device), + chId = oChnIdAndAddress.id, + chAddress= oChnIdAndAddress.address; + if (chId != 0) { + if (oChnIdAndAddress.type == "POWERMETER" || oChnIdAndAddress.type == "ENERGIE_METER_TRANSMITTER") { + if (this.m_device.typeName.toLowerCase() != "hmip-esi") { + deleteProgSysvarPOWERMETER(chId, chAddress, this.m_device.typeName.toLowerCase()); + } else { + deleteProgSysvarPOWERMETER_ESI(this.m_device); + } + } else if (oChnIdAndAddress.type == "POWERMETER_IGL") { + deleteProgSysvarPOWERMETER_IGL(chId, chAddress); + } else if (oChnIdAndAddress.type == "POWERMETER_IEC1") { + deleteProgSysvarPOWERMETER_IEC(chId, chAddress); + } else if ((this.m_device.typeName.toLowerCase() == "hmip-swo-b") && (oChnIdAndAddress.type == "WEATHER_TRANSMIT")) { + deleteProgSysvarHmIPWeatherTransmitSunshine(chId, chAddress); + } else if (((this.m_device.typeName.toLowerCase() == "hmip-swo-pl") || (this.m_device.typeName.toLowerCase() == "hmip-swo-pr")) && (oChnIdAndAddress.type == "WEATHER_TRANSMIT")) { + deleteProgSysvarHmIPWeatherTransmitRainSunshine(chId, chAddress); + } /*currently not in use else if (this.m_device.typeName.toLowerCase() == "hmip-mod-rc8") { + this.m_deleteSysvarHmIPModRC8(); + }*/ + } else if ((typeof this.m_device.typeName != "undefined") && (this.m_device.typeName.toLowerCase() == "hmipw-drbl4")) { + this.m_deleteMetaDataHmIPWBlind(); + } + } + + if (this.m_callback) { this.m_callback(result); } + }, + + m_onDelete: function() + { + this.m_close(this.m_flags + this.m_listbox.getSelectedItem().flags); + }, + + m_onAbort: function() + { + this.m_close(null); + }, + + m_onChange: function(item) + { + this.m_description.setText(item.description); + } + +}); + +ErrorOnDeleteWindow.CONTENT_WIDTH = 400; +ErrorOnDeleteWindow.CONTENT_HEIGHT = 260; + +/** + * Dialogbox zum Löschen eines Geräts + **/ +DeleteDeviceDialog = Class.create({ + + /** + * Erstellt einen neuen DeleteDeviceDialog. + **/ + initialize: function(device, callback) + { + this.m_device = device; + this.m_callback = callback; + this.m_onLinksAndProgramsCheckedHandler = this.m_onLinksAndProgramsChecked.bind(this); + this.m_onDeleteDeviceConfirmedHandler = this.m_onDeleteDeviceConfirmed.bind(this); + this.m_onDeviceDeletedHandler = this.m_onDeviceDeleted.bind(this); + + this.hmIPIdentifier = "HmIP-RF"; + + + new CheckLinksAndProgramsWindow(device, this.m_onLinksAndProgramsCheckedHandler); + + }, + + m_onLinksAndProgramsChecked: function(result) + { + this.m_hasLinksOrPrograms = result; + new ConfirmDeleteDeviceWindow(this.m_device, this.m_hasLinksOrPrograms, this.m_onDeleteDeviceConfirmedHandler); + }, + + m_onDeleteDeviceConfirmed: function(flags) + { + if (flags !== null) + { + this.m_flags = flags; + new DeleteDeviceWindow(this.m_device, this.m_flags, this.m_onDeviceDeletedHandler); + } + else + { + // Abbruch + if (this.m_callback) { this.m_callback(false); } + } + }, + + m_deleteSysvarHmIPModRC8: function() { + var numberOfKeyTransceiver = 8; + + // delete the appropriate sysvar + jQuery.each(this.m_device.channels, function(index, chn) { + if (chn.channelType == "KEY_TRANSCEIVER") { + homematic("SysVar.deleteSysVarByName", {"name": "svHmIPModRC8ChnMode_" + chn.id + "_" + chn.address}, function () { + conInfo("SysVar svHmIPModRC8ChnMode_" + chn.id + "_" + chn.address + " deleted"); + if (index === numberOfKeyTransceiver) { + window.setTimeout(function(){saveObjectModel();},5000); + } + }); + } + }); + }, + + m_deleteMetaDataHmIPWBlind: function() { + jQuery.each(this.m_device.channels, function(index, chn) { + if (chn.channelType == "BLIND_VIRTUAL_RECEIVER") { + homematic("Interface.removeMetadata", {"objectId": chn.address, "dataId" : "channelMode"}, function (result) { + // console.log("m_deleteMetaDataHmIPWBlind", result); + }); + + } + }); + }, + + m_onDeviceDeleted: function(errorCode) + { + //if ((errorCode === DeleteDeviceDialog.ERROR_NO_ERROR) || (errorCode === DeleteDeviceDialog.HmIP_CONFIG_PENDING) || (errorCode === DeleteDeviceDialog.ERROR_UNKNOWN_DEVICE)) + if ((errorCode === DeleteDeviceDialog.ERROR_NO_ERROR) || (errorCode === DeleteDeviceDialog.ERROR_UNKNOWN_DEVICE)) + { + // Prüfen, ob ein Kanal des Gerätes ein HmIP-Wettersensor ist, als Energy-Counter oder ob das Gerät ein HmIP-MOD-RC8 ist dient. + // Wenn ja, müssen beim Löschen die dazugehörigen Systemvariablen + // sowie das enstprechende Systemprogramm zum aktualisieren der Systemvariablen entfernt werden. + var oChnIdAndAddress = hasDeviceInternalProgramOrSysvar(this.m_device), + chId = oChnIdAndAddress.id, + chAddress= oChnIdAndAddress.address; + if (chId != 0) { + if (oChnIdAndAddress.type == "POWERMETER" || oChnIdAndAddress.type == "ENERGIE_METER_TRANSMITTER") { + if (this.m_device.typeName.toLowerCase() != "hmip-esi") { + deleteProgSysvarPOWERMETER(chId, chAddress, this.m_device.typeName.toLowerCase()); + } else { + deleteProgSysvarPOWERMETER_ESI(this.m_device); + } + } else if (oChnIdAndAddress.type == "POWERMETER_IGL") { + deleteProgSysvarPOWERMETER_IGL(chId, chAddress); + } else if (oChnIdAndAddress.type == "POWERMETER_IEC1") { + deleteProgSysvarPOWERMETER_IEC(chId, chAddress); + } else if ((this.m_device.typeName.toLowerCase() == "hmip-swo-b") && (oChnIdAndAddress.type == "WEATHER_TRANSMIT")) { + deleteProgSysvarHmIPWeatherTransmitSunshine(chId, chAddress); + } else if (((this.m_device.typeName.toLowerCase() == "hmip-swo-pl") || (this.m_device.typeName.toLowerCase() == "hmip-swo-pr")) && (oChnIdAndAddress.type == "WEATHER_TRANSMIT")) { + deleteProgSysvarHmIPWeatherTransmitRainSunshine(chId, chAddress); + } /*currently not in use else if (this.m_device.typeName.toLowerCase() == "hmip-mod-rc8") { + this.m_deleteSysvarHmIPModRC8(); + }*/ + } else if ((typeof this.m_device.typeName != "undefined") && (this.m_device.typeName.toLowerCase() == "hmipw-drbl4")) { + this.m_deleteMetaDataHmIPWBlind(); + } + if (this.m_callback) { this.m_callback(true); } + } + else + { + this.m_errorCode = errorCode; + if (this.m_flags <= 1) { + //if (! (this.m_errorCode == DeleteDeviceDialog.ERROR_UNKNOWN_DEVICE && this.hmIPIdentifier == this.m_device.interfaceName)) { + if (! (this.m_errorCode == DeleteDeviceDialog.ERROR_UNKNOWN_DEVICE) ) { + new ErrorOnDeleteWindow(this.m_device, this.m_flags, this.m_errorCode, this.m_onDeleteDeviceConfirmedHandler); + } + } + } + } +}); + +DeleteDeviceDialog.FLAG_RESET = 0x01; +DeleteDeviceDialog.FLAG_FORCE = 0x02; +DeleteDeviceDialog.FLAG_DEFER = 0x04; +DeleteDeviceDialog.ERROR_NO_ERROR = 0; +DeleteDeviceDialog.ERROR_GENERAL = 501; +DeleteDeviceDialog.ERROR_UNKNOWN_DEVICE = 502; +DeleteDeviceDialog.HmIP_CONFIG_PENDING = 507; + +/** + * crashdialog.js + **/ + +CrashDialog = Class.create({ + + initialize: function(name) + { + var screenWidth = WebUI.getWidth(); + var screenHeight = WebUI.getHeight(); + var frameWidth = CrashDialog.CONTENT_WIDTH; + var frameHeight = CrashDialog.CONTENT_HEIGHT; + var frameX = parseInt((screenWidth - frameWidth) / 2); + var frameY = parseInt((screenHeight - frameHeight) / 2); + + this.m_layer = document.createElement("div"); + this.m_layer.className = "DialogLayer"; + + this.m_frame = new UI.Frame() + .setTitle(name) + .setContentSize(frameWidth, frameHeight) + .setPosition(frameX, frameY) + .add(new UI.Text() + .setPosition(5, 5) + .setWidth(frameWidth - 10) + .setHtml(translateKey("crashDialogContent")) + ) + .add(new UI.Button() + .setPosition(125, 230) + .setText(translateKey("crashDialogBtnClose")) + .setAction(this.close.bind(this)) + ); + + this.m_layer.appendChild(this.m_frame.getElement()); + Layer.add(this.m_layer); + }, + + close: function() + { + Layer.remove(this.m_layer); + } + +}); + +CrashDialog.CONTENT_WIDTH = 400; +CrashDialog.CONTENT_HEIGHT = 260; +/* +CrashDialog.TEXT = "
Eine Komponente der HomeMatic Zentrale reagiert nicht mehr.
" + + "

Hierfür kann es eine Reihe von Ursachen geben:

" + + "
    " + + "
  • es besteht keine Netzwerk-Verbindung
  • " + + "
  • die Stromversorung der HomeMatic Zentrale wurde unterbrochen
  • " + + "
  • mindestens eine Komponente der HomeMatic Zentrale ist abgestürzt
  • " + + "
" + + "

Überprüfen Sie die Netzwerk-Verbindung und die Stromversorgung der HomeMatic Zentrale. Starten Sie ggf. die HomeMatic Zentrale neu.

"; +*/ + +/** + * hmscriptexecutor.js + **/ + +/** + * @fileOverview HM Script Executor + * @author F. Werner (eQ-3) + **/ + +/** + * @class HMScriptExecturor + * Dialog zum Testen von HomeMatic Script. + **/ +HMScriptExecutor = Class.create({ + + initialize: function() + { + var screenWidth = WebUI.getWidth(); + var screenHeight = WebUI.getHeight(); + var frameWidth = parseInt(screenWidth * 0.8); + var frameHeight = parseInt(screenHeight * 0.8); + var frameX = parseInt((screenWidth - frameWidth) / 2); + var frameY = parseInt((screenHeight - frameHeight) / 2); + + HMScriptExecutor.TITLE = translateKey("dialogScriptExecuterTitle"); + HMScriptExecutor.TEXT_RUN = translateKey("dialogScriptExecuterBtnExecute"); + HMScriptExecutor.TEXT_CLOSE = translateKey("dialogScriptExecuterBtnClose"); + + this.m_layer = document.createElement("div"); + this.m_layer.className = "DialogLayer"; + + this.m_frame = new UI.Frame(true) + .setTitle(HMScriptExecutor.TITLE) + .setContentSize(frameWidth, frameHeight) + .setPosition(frameX, frameY) + .add(new UI.Text() + .setStyle('margin-left: 5px') + .setHtml('' + translateKey("dialogScriptExecuterLblInput") + '') + .setClass("") + ) + .add(new UI.Textarea() + .setID("code") + .setName("code") + .setText('WriteLine("'+ translateKey("dialogScriptExecuterHelloWorld") +'");') + ) + .add(new UI.Text() + .setStyle('margin-left: 5px') + .setHtml('' + translateKey("dialogScriptExecuterLblOutput") + '') + .setClass("") + ) + .add(new UI.Textarea() + .setID("output") + .setName("output") + ) + .add(new UI.Button() + .setPosition(5, frameHeight-30) + .setText(HMScriptExecutor.TEXT_RUN) + .setAction(this.run, this) + ) + .add(new UI.Button() + .setPosition(frameWidth-155, frameHeight-30) + .setText(HMScriptExecutor.TEXT_CLOSE) + .setAction(this.close, this) + ); + + this.m_layer.appendChild(this.m_frame.getElement()); + Layer.add(this.m_layer); + + this.m_input = CodeMirror.fromTextArea(document.getElementById('code'), { + mode: "text/x-rega", + autofocus: true, + matchBrackets: true, + autoCloseBrackets: true, + lineWrapping: true, + lineNumbers: true, + foldGutter: true, + indentUnit: 2, + tabSize: 2, + indentWithTabs: false, + gutters: ["CodeMirror-linenumbers", "CodeMirror-foldgutter"], + extraKeys: {"Ctrl-Space": "autocomplete", + "Ctrl-Q": function(cm){ cm.foldCode(cm.getCursor()); }, + "F11": function(cm) { cm.setOption("fullScreen", !cm.getOption("fullScreen")); }, + "Esc": function(cm) { if (cm.getOption("fullScreen")) cm.setOption("fullScreen", false); }, + "Alt-F": "findPersistent", + "Tab": function(cm) { + if (cm.somethingSelected()) { + var sel = cm.getSelection("\n"); + // Indent only if there are multiple lines selected, or if the selection spans a full line + if (sel.length > 0 && (sel.indexOf("\n") > -1 || sel.length === cm.getLine(cm.getCursor().line).length)) { + cm.execCommand("indentMore"); + return; + } + } + if (cm.options.indentWithTabs) + cm.execCommand("insertTab"); + else + cm.execCommand("insertSoftTab"); + }, + "Shift-Tab": function(cm) { + if (cm.somethingSelected()) { + var sel = cm.getSelection("\n"); + // Outdent only if there are multiple lines selected, or if the selection spans a full line + if (sel.length > 0 && (sel.indexOf("\n") > -1 || sel.length === cm.getLine(cm.getCursor().line).length)) { + cm.execCommand("indentLess"); + return; + } + } + var charSize = cm.options.tabSize; + if (cm.options.indentWithTabs) + charSize = 1; + var c = cm.getCursor(); + var lineText = cm.getRange({line: c.line, ch: c.ch - charSize}, {line: c.line, ch: c.ch}); + var m = /^(\s+)/.exec(lineText.reverse()); + if(m && m.length == 2) + cm.replaceRange('', {line: c.line, ch: c.ch - m[1].length}, {line: c.line, ch: c.ch}); + }} + }); + this.m_input.setSize("100%", parseInt((this.m_frame.getContentHeight()-70) * 0.6)); + + this.m_output = CodeMirror.fromTextArea(document.getElementById('output'), { + mode: "default", + readOnly: true, + lineWrapping: true, + lineNumbers: false + }); + this.m_output.setSize("100%", parseInt((this.m_frame.getContentHeight()-70) * 0.4)); + }, + + run: function() + { + this.m_output.setValue(""); + var _this_ = this; + var code = this.m_input.getValue(); + var val = ""; + var ths = "2459"; + var src = ""; + var url = '/esp/system.htm?sid='+SessionId; + var pb = ""; + pb += 'string action = "SyntaxCheck";'; + pb += 'string code = ^'+code.replace(/\^/g, '^#\'^\'#^')+'^;'; + pb += 'string val = "'+val+'";'; + pb += 'string ths = "'+ths+'";'; + pb += 'string src = "'+src+'";'; + var opt = + { + postBody: ReGa.encode(pb), + onComplete: function(t) + { + if( iseStripAll(t.responseText).length == 0 ) + { + homematic("ReGa.runScript", {script: code}, function(response, error) + { + if (error === null) + { + _this_.m_output.setValue(response); + } + }); + } + else + { + _this_.m_output.setValue(t.responseText); + } + } + } + new Ajax.Request(url,opt); + }, + + close: function() + { + Layer.remove(this.m_layer); + } + +}); + +HMScriptExecutor.CONTENT_WIDTH = 800; +HMScriptExecutor.CONTENT_HEIGHT = 500; + +/** + * firewallconfigdialog.js + **/ + +FirewallConfigDialog = Class.create({ + + /** + * @constructor + * Erzeugt einen neuen FirewallConfigDialog + **/ + initialize: function (dlgWoPasswd) { + var yOffset = 320; + + var screenWidth = WebUI.getWidth(); + var screenHeight = WebUI.getHeight(); + var frameWidth = FirewallConfigDialog.CONTENT_WIDTH; + var frameHeight = FirewallConfigDialog.CONTENT_HEIGHT + yOffset; + var frameX = parseInt((screenWidth - frameWidth) / 2); + // var frameY = parseInt((screenHeight - frameHeight) / 2); + var frameY = 10; + + this.dlgWoPasswd = dlgWoPasswd; + + this.m_layer = document.createElement("div"); + this.m_layer.className = "DialogLayer"; + this.m_layer.style = "overflow:scroll;"; + + this.m_portListBox = new UI.ListBox() + .setPosition(FirewallConfigDialog.CONTENT_WIDTH - 180, 10) + .setWidth(150) + .add({id: "RESTRICTIVE", name: translateKey("dialogSettingsFirewallLblPortsRestricted")}) + .add({id: "MOST_OPEN", name: translateKey("dialogSettingsFirewallLblPortsOpen")}); + + this.m_xmlrpcListBox = new UI.ListBox() + .setPosition(FirewallConfigDialog.CONTENT_WIDTH - 180, 80) + .setWidth(150) + .add({id: "full", name: translateKey("dialogSettingsFirewallLblFullAccess")}) + .add({id: "restricted", name: translateKey("dialogSettingsFirewallLblRestrictedAccess")}) + .add({id: "none", name: translateKey("dialogSettingsFirewallLblNoAccess")}); + + + this.m_hmscriptListBox = new UI.ListBox() + .setPosition(FirewallConfigDialog.CONTENT_WIDTH - 180, 150) + .setWidth(150) + .add({id: "full", name: translateKey("dialogSettingsFirewallLblFullAccess")}) + .add({id: "restricted", name: translateKey("dialogSettingsFirewallLblRestrictedAccess")}) + .add({id: "none", name: translateKey("dialogSettingsFirewallLblNoAccess")}); + + this.m_mediolaListBox = new UI.ListBox() + .setPosition(FirewallConfigDialog.CONTENT_WIDTH - 180, 220) + .setWidth(150) + .add({id: "full", name: translateKey("dialogSettingsFirewallLblFullAccess")}) + .add({id: "restricted", name: translateKey("dialogSettingsFirewallLblRestrictedAccess")}) + .add({id: "none", name: translateKey("dialogSettingsFirewallLblNoAccess")}); + + this.m_portTextArea = new UI.Textarea() + .setPosition(10, 320) + .setWidth(FirewallConfigDialog.CONTENT_WIDTH - 20) + .setHeight(100) + .setWrap(true) + .disableResize(); + + this.m_ipTextArea = new UI.Textarea() + .setPosition(10, 200 + yOffset) + .setWidth(FirewallConfigDialog.CONTENT_WIDTH - 20) + .setHeight(100) + .setWrap(true) + .disableResize(); + + this.m_frame = new UI.Frame() + //.setTitle("Firewall Konfiguration") + .setTitle(translateKey("dialogSettingsFirewallTitle")) + .setContentSize(frameWidth, frameHeight) + .setPosition(frameX, frameY) + .add(new UI.Text() + .setPosition(10, 10) + .setHtml(translateKey("dialogSettingsFirewallLblFWPolicy")) + ) + .add(this.m_portListBox) + .add(new UI.Text() + .setPosition(10, 40) + .setHtml(translateKey("dialogSettingsFirewallLblHintPortAccess")) + ) + .add(new UI.Text() + .setPosition(10, 80) + //.setHtml("HomeMatic XML-RPC API:") + .setHtml(translateKey("dialogSettingsFirewallLblXMLRPCAPI")) + ) + .add(new UI.Text() + .setPosition(10, 110) + .setWidth(FirewallConfigDialog.CONTENT_WIDTH - 20) + //.setText("Ermöglicht den direkten Zugriff auf angelernte HomeMatic Geräte") + .setText(translateKey("dialogSettingsFirewallLblHintXMLRPCAPI")) + ) + .add(this.m_xmlrpcListBox) + + .add(new UI.Image() + .setPath("/ise/img/help.png") + .setWidth(25) + .setHeight(25) + .setPosition(475, 75) + .setName("helpToolTip") + ) + + .add(new UI.Text() + .setPosition(10, 150) + //.setHtml("Remote HomeMatic-Script API:") + .setHtml(translateKey("dialogSettingsFirewallLblScriptAPI")) + ) + .add(new UI.Text() + .setPosition(10, 180) + .setWidth(FirewallConfigDialog.CONTENT_WIDTH - 20) + //.setText("Ermöglicht den Zugriff auf die Logikschicht der HomeMatic Zentrale") + .setText(translateKey("dialogSettingsFirewallLblHintScriptAPI")) + ) + .add(this.m_hmscriptListBox) + .add(new UI.Image() + .setPath("/ise/img/help.png") + .setWidth(25) + .setHeight(25) + .setPosition(475, 145) + .setName("helpToolTip") + ) + + .add(new UI.Text() + .setPosition(10, 220) + .setHtml(translateKey("dialogSettingsFirewallLblMediola")) + ) + .add(new UI.Text() + .setPosition(10, 250) + .setWidth(FirewallConfigDialog.CONTENT_WIDTH - 20) + .setText(translateKey("dialogSettingsFirewallLblHintMediola")) + ) + .add(this.m_mediolaListBox) + .add(new UI.Image() + .setPath("/ise/img/help.png") + .setWidth(25) + .setHeight(25) + .setPosition(475, 215) + .setName("helpToolTip") + ) + + .add(new UI.Text() + .setPosition(10, 290) + .setHtml(translateKey("portEnablingTitle")) + ) + + .add(this.m_portTextArea) + + .add(new UI.Text() + .setPosition(10, 430) + .setWidth(FirewallConfigDialog.CONTENT_WIDTH - 20) + .setText(translateKey("portEnablingCaption")) + ) + + .add(new UI.Text() + .setPosition(10, 170 + yOffset) + //.setHtml("IP-Adressen für den eingeschränkten Zugriff:") + .setHtml(translateKey("dialogSettingsFirewallLblIPAddresses")) + ) + .add(this.m_ipTextArea) + .add(new UI.Text() + .setPosition(10, 310 + yOffset) + .setWidth(FirewallConfigDialog.CONTENT_WIDTH - 20) + //.setText("Sie können den Zugriff wahlweise für einzelne IP-Adressen (z.B. 192.168.0.1) oder ganze Adressbereiche (z.B. 192.168.0.0/16) freigeben.") + .setText(translateKey("dialogSettingsFirewallLblHintIPAddresses")) + ) + .add(new UI.Button() + .setPosition(10, FirewallConfigDialog.CONTENT_HEIGHT - 30 + yOffset) + //.setText("Abbrechen") + .setText(translateKey("btnCancel")) + .setId("btnCancel") + .setAction(this.close, this) + ) + .add(new UI.Button() + .setPosition(FirewallConfigDialog.CONTENT_WIDTH - 160, FirewallConfigDialog.CONTENT_HEIGHT - 30 + yOffset) + //.setText("OK") + .setText(translateKey("btnOk")) + .setAction(this.ok, this) + ); + + this.loadConfiguration(); + + this.m_layer.appendChild(this.m_frame.getElement()); + Layer.add(this.m_layer); + this.setTooltips(); + }, + + setTooltips: function() { + var toolTipsElems = jQuery("[name='helpToolTip']"); + toolTipsElems.data('powertip', translateKey("toolTipFirewallAccessModes")); + toolTipsElems.powerTip({placement: 'se', followMouse: true}); + }, + + loadConfiguration: function () { + + var response = homematic("Firewall.getConfiguration"); + if (null != response) { + var services = response.services, + ips = response.ips.join(";\n"), + userPorts = response.userports.join(";\n"), + firewallPolicy = response.mode, + xmlrpcAccess = "full", + hmscriptAccess = "full", + mediolaAccess = "restricted"; + + for (var i = 0, len = services.length; i < len; i++) { + var service = services[i]; + if (service.id == "XMLRPC") { + xmlrpcAccess = service.access; + } + if (service.id == "REGA") { + hmscriptAccess = service.access; + } + if (service.id == "NEOSERVER") { + mediolaAccess = service.access; + } + + } + this.m_portListBox.selectItemById(firewallPolicy); + this.m_xmlrpcListBox.selectItemById(xmlrpcAccess); + this.m_hmscriptListBox.selectItemById(hmscriptAccess); + this.m_mediolaListBox.selectItemById(mediolaAccess); + this.m_ipTextArea.setText(ips); + this.m_portTextArea.setText(userPorts); + } + }, + + /** + * Schließt den FirewallConfigDialog ohne Änderungen zu übernehmen. + **/ + close: function () { + Layer.remove(this.m_layer); + }, + + /** + * Übernimmt die Änderungen und schließt den FirewallConfigDialog anschließend. + **/ + ok: function () { + var xmlrpcAccess = this.m_xmlrpcListBox.getSelectedItem().id, + firewallPolicy = this.m_portListBox.getSelectedItem().id, + hmscriptAccess = this.m_hmscriptListBox.getSelectedItem().id, + mediolaAccess = this.m_mediolaListBox.getSelectedItem().id, + ips = this.m_ipTextArea.getText().trim(), + userPorts = this.m_portTextArea.getText().replace(/\s+/g, '').split(";"); + + // Remove a trailing ; at the end of ips + ips = (ips.charAt(ips.length -1) == ";") ? ips.slice(0,-1) : ips; + ips = ips.replace(/\s+/g, '').split(";"); + + if ((typeof firstStartInstallWizard !== "undefined") && (firstStartInstallWizard)) { + WebUI.enter(StartPage); + delete firstStartInstallWizard; + homematic("CCU.setSecurityHint"); + homematic("CCU.setFirewallConfigured"); + homematic("CCU.setUserAckInstallWizard", {'userName' : userName}); + } + + if (this.dlgWoPasswd ) { + homematic("CCU.setFirewallConfigured"); + } + + var isOk = true; + if (ips[0] != "" ) { + for (var i = 0, len = ips.length; i < len; i++) { + var ip = ips[i]; + if (! isIPAddressValid(ip)) { + isOk = false; + } + } + } + + if (isOk) { + this.close(); + homematic("Firewall.setConfiguration", { + services: [ + {name: "XMLRPC", access: xmlrpcAccess}, + {name: "REGA", access: hmscriptAccess}, + {name: "NEOSERVER", access: mediolaAccess} + ], + ips: ips, + userports: userPorts, + mode: firewallPolicy + }); + } + else { + //MessageBox.show("Eingabefehler", "Verwenden Sie bitte nur IP-Adressen im Format \"1.2.3.4\" und Adressgruppen im Format \"1.2.3.0/8\". Separieren Sie die einzelnen Adressen durch Semikola."); + MessageBox.show(translateKey("dialogSettingsFirewallErrorMsgTitle"), translateKey("dialogSettingsFirewallErrorMsgContent")); + + } + } + +}); + +FirewallConfigDialog_CCU2 = Class.create({ + + /** + * @constructor + * Erzeugt einen neuen FirewallConfigDialog + **/ + initialize: function () { + var screenWidth = WebUI.getWidth(); + var screenHeight = WebUI.getHeight(); + var frameWidth = FirewallConfigDialog.CONTENT_WIDTH; + var frameHeight = FirewallConfigDialog.CONTENT_HEIGHT; + var frameX = parseInt((screenWidth - frameWidth) / 2); + var frameY = parseInt((screenHeight - frameHeight) / 2); + + this.m_layer = document.createElement("div"); + this.m_layer.className = "DialogLayer"; + + this.m_xmlrpcListBox = new UI.ListBox() + .setPosition(FirewallConfigDialog.CONTENT_WIDTH - 160, 10) + .setWidth(150) + //.add({id: "full" , name: "Vollzugriff"}) + //.add({id: "restricted", name: "eingeschränkt"}) + //.add({id: "none" , name: "kein Zugriff"}); + .add({id: "full", name: translateKey("dialogSettingsFirewallLblFullAccess")}) + .add({id: "restricted", name: translateKey("dialogSettingsFirewallLblRestrictedAccess")}) + .add({id: "none", name: translateKey("dialogSettingsFirewallLblNoAccess")}); + + + this.m_hmscriptListBox = new UI.ListBox() + .setPosition(FirewallConfigDialog.CONTENT_WIDTH - 160, 80) + .setWidth(150) + //.add({id: "full" , name: "Vollzugriff"}) + //.add({id: "restricted", name: "eingeschränkt"}) + //.add({id: "none" , name: "kein Zugriff"}); + .add({id: "full", name: translateKey("dialogSettingsFirewallLblFullAccess")}) + .add({id: "restricted", name: translateKey("dialogSettingsFirewallLblRestrictedAccess")}) + .add({id: "none", name: translateKey("dialogSettingsFirewallLblNoAccess")}); + + this.m_ipTextArea = new UI.Textarea() + .setPosition(10, 180) + .setWidth(FirewallConfigDialog.CONTENT_WIDTH - 20) + .setHeight(100) + .setWrap(true); + + this.m_frame = new UI.Frame() + //.setTitle("Firewall Konfiguration") + .setTitle(translateKey("dialogSettingsFirewallTitle")) + .setContentSize(frameWidth, frameHeight) + .setPosition(frameX, frameY) + .add(new UI.Text() + .setPosition(10, 10) + //.setHtml("HomeMatic XML-RPC API:") + .setHtml(translateKey("dialogSettingsFirewallLblXMLRPCAPI")) + ) + .add(new UI.Text() + .setPosition(10, 40) + .setWidth(FirewallConfigDialog.CONTENT_WIDTH - 20) + //.setText("Ermöglicht den direkten Zugriff auf angelernte HomeMatic Geräte") + .setText(translateKey("dialogSettingsFirewallLblHintXMLRPCAPI")) + ) + .add(this.m_xmlrpcListBox) + .add(new UI.Text() + .setPosition(10, 80) + //.setHtml("Remote HomeMatic-Script API:") + .setHtml(translateKey("dialogSettingsFirewallLblScriptAPI")) + ) + .add(new UI.Text() + .setPosition(10, 110) + .setWidth(FirewallConfigDialog.CONTENT_WIDTH - 20) + //.setText("Ermöglicht den Zugriff auf die Logikschicht der HomeMatic Zentrale") + .setText(translateKey("dialogSettingsFirewallLblHintScriptAPI")) + ) + .add(this.m_hmscriptListBox) + .add(new UI.Text() + .setPosition(10, 150) + //.setHtml("IP-Adressen für den eingeschränkten Zugriff:") + .setHtml(translateKey("dialogSettingsFirewallLblIPAddresses")) + ) + .add(this.m_ipTextArea) + .add(new UI.Text() + .setPosition(10, 290) + .setWidth(FirewallConfigDialog.CONTENT_WIDTH - 20) + //.setText("Sie können den Zugriff wahlweise für einzelne IP-Adressen (z.B. 192.168.0.1) oder ganze Adressbereiche (z.B. 192.168.0.0/16) freigeben.") + .setText(translateKey("dialogSettingsFirewallLblHintIPAddressesWithoutIPv6")) + ) + .add(new UI.Button() + .setPosition(10, FirewallConfigDialog.CONTENT_HEIGHT - 30) + //.setText("Abbrechen") + .setText(translateKey("btnCancel")) + + .setAction(this.close, this) + ) + .add(new UI.Button() + .setPosition(FirewallConfigDialog.CONTENT_WIDTH - 160, FirewallConfigDialog.CONTENT_HEIGHT - 30) + //.setText("OK") + .setText(translateKey("btnOk")) + .setAction(this.ok, this) + ); + + this.loadConfiguration(); + + this.m_layer.appendChild(this.m_frame.getElement()); + Layer.add(this.m_layer); + }, + + loadConfiguration: function () { + + var response = homematic("Firewall.getConfiguration"); + if (null != response) { + var services = response.services, + ips = response.ips.join(";\n"), + xmlrpcAccess = "full", + hmscriptAccess = "full"; + + + for (var i = 0, len = services.length; i < len; i++) { + var service = services[i]; + if (service.id == "XMLRPC") { + xmlrpcAccess = service.access; + } + if (service.id == "REGA") { + hmscriptAccess = service.access; + } + } + + this.m_xmlrpcListBox.selectItemById(xmlrpcAccess); + this.m_hmscriptListBox.selectItemById(hmscriptAccess); + this.m_ipTextArea.setText(ips); + } + }, + + /** + * Schließt den FirewallConfigDialog ohne Änderungen zu übernehmen. + **/ + close: function () { + Layer.remove(this.m_layer); + }, + + /** + * Übernimmt die Änderungen und schließt den FirewallConfigDialog anschließend. + **/ + ok: function () { + var xmlrpcAccess = this.m_xmlrpcListBox.getSelectedItem().id, + hmscriptAccess = this.m_hmscriptListBox.getSelectedItem().id, + ips = this.m_ipTextArea.getText().replace(/\s+/g, '').split(";"), + firewallPolicy = "MOST_OPEN", + userPorts = ""; + + var isOk = true; + if (ips[0] != "" ) { + for (var i = 0, len = ips.length; i < len; i++) { + var ip = ips[i]; + if (! isIPAddressValid(ip)) { + isOk = false; + } + } + } + + if (isOk) { + this.close(); + homematic("Firewall.setConfiguration", { + services: [ + {name: "XMLRPC", access: xmlrpcAccess}, + {name: "REGA", access: hmscriptAccess} + ], + ips: ips, + userports: userPorts, + mode: firewallPolicy + }); + } + else { + //MessageBox.show("Eingabefehler", "Verwenden Sie bitte nur IP-Adressen im Format \"1.2.3.4\" und Adressgruppen im Format \"1.2.3.0/8\". Separieren Sie die einzelnen Adressen durch Semikola."); + MessageBox.show(translateKey("dialogSettingsFirewallErrorMsgTitle"), translateKey("dialogSettingsFirewallErrorMsgContent")); + } + } +}); + +FirewallConfigDialog.CONTENT_WIDTH = 500; +FirewallConfigDialog.CONTENT_HEIGHT = 400; + + +/** + * partymodedialog.js + **/ + +StartDateEqualsStopDate = function() { + var startDate = jQuery("#partyStartDate").datepicker('getDate'), + stopDate = jQuery("#partyEndDate").datepicker('getDate'); + if (startDate && stopDate) { + return (startDate.getDate() == stopDate.getDate()) ? true : false; + } else { + return false; + } +}; + +refreshPartyDatePicker = function() { + conInfo("refresh DatePickerEnd"); + var jDatePickerStart = jQuery("#partyStartDate"), + jDatePickerEnd = jQuery("#partyEndDate"), + newDate = jDatePickerStart.datepicker("getDate"); + + jDatePickerEnd.datepicker("option", "minDate", new Date(newDate)); + jDatePickerEnd.datepicker("refresh"); + refreshPartyTimePicker(); +}; + +refreshPartyTimePicker= function() { + allDataSet(); + conInfo("refresh TimePicker"); + if(StartDateEqualsStopDate() && (showEmptyTimeFields != true)) { + var jTimePickerStart = jQuery("#partyStartTime"), + jTimePickerEnd = jQuery("#partyEndTime"), + startHour = jTimePickerStart.timepicker("getHour"), + startMinute = jTimePickerStart.timepicker("getMinute"), + endHour = jTimePickerEnd.timepicker("getHour"), + newEndTime = startHour + 1 + ":" + startMinute; + + if(endHour < startHour) { + jTimePickerEnd.timepicker("setTime", newEndTime); + return; + } + if(endHour == startHour) { + if (parseInt(startMinute) > 0) { + jTimePickerEnd.timepicker("setTime", newEndTime); + } else { + jTimePickerEnd.timepicker("setTime", startHour + ":30"); + } + } + } +}; + +allDataSet = function() { + var startDate = jQuery("#partyStartDate").val(), + endDate = jQuery("#partyEndDate").val(), + startTime = jQuery("#partyStartTime").val(), + endTime = jQuery("#partyEndTime").val(); + if ((startDate != "") && (endDate != "") && (startTime != "") && (endTime != "")) { + showEmptyTimeFields = false; + jQuery("#yesButton").show(); + return true; + } + return false; +}; + +/** + * Dialogbox mit den Schaltflächen "Ja" und "Nein" + * Normalerweise wird als content Text übergeben, + * wenn contentType 'html' gesetzt ist, kann auch HTML übergeben werden. + * Die Höhe des Dialoges sollte sich dynamisch der Contentgröße anpassen. + **/ +PartyModeDialog = Class.create({ + + initialize: function(title, content, deviceData ,callback, contentType) + { + showEmptyTimeFields = deviceData.showEmptyFields; + + var _this_ = this; + + this.m_contentType = contentType; + this.m_callback = callback; + this.m_layer = document.createElement("div"); + this.m_layer.className = "YesNoDialogLayer"; + + this.partyModeObject ={}; + this.SetPartyMode = false; + this.deviceData = deviceData; + this.defaultPartyTemp = 5; + + var dialog = document.createElement("div"); + dialog.className = "YesNoDialog"; + + var titleElement = document.createElement("div"); + titleElement.className = "YesNoDialogTitle"; + + var orientation = document.createAttribute("align"); + orientation.nodeValue = "center"; + titleElement.setAttributeNode(orientation); + + titleElement.appendChild(document.createTextNode(title)); + titleElement.onmousedown = function(event) { new Drag(this.parentNode, event); }; + dialog.appendChild(titleElement); + + var contentWrapper = document.createElement("div"); + contentWrapper.className = "YesNoDialogContentWrapper"; + + var contentElement = document.createElement("div"); + contentElement.className = "YesNoDialogContent"; + + if (this.m_contentType == "html") { + contentElement.innerHTML = content; + } else { + contentElement.appendChild(document.createTextNode(content)); + } + + contentWrapper.appendChild(contentElement); + + dialog.appendChild(contentWrapper); + + var footer = document.createElement("div"); + footer.className= "YesNoDialogFooter"; + + + var noButton = document.createElement("div"); + noButton.className = "YesNoDialog_noButton borderRadius5px colorGradient50px"; + noButton.appendChild(document.createTextNode(translateKey('footerBtnCancel'))); + noButton.onclick = function() { _this_.no(); }; + footer.appendChild(noButton); + + var yesButton = document.createElement("div"); + yesButton.className = "YesNoDialog_yesButton borderRadius5px colorGradient50px"; + yesButton.id = "yesButton"; + yesButton.appendChild(document.createTextNode(translateKey('footerBtnOk'))); + yesButton.onclick = function() { _this_.yes(); }; + footer.appendChild(yesButton); + + dialog.appendChild(footer); + + this.m_layer.appendChild(dialog); + + Layer.add(this.m_layer); + + this.j_YesButton = jQuery("#yesButton"); + if (showEmptyTimeFields) {this.j_YesButton.hide();} + + //Sorgt dafür, daß die Dialoghöhe sich dynamisch dem Content anpasst. + jQuery(".YesNoDialog").css("height", jQuery(".YesNoDialogContentWrapper").height() + 78); + jQuery(".YesNoDialogFooter").css("top", jQuery(".YesNoDialogContentWrapper").height() + 26); + + translatePage(".YesNoDialog"); + this.initInputFields(); + refreshPartyDatePicker(); + }, + + _isUserInputOk: function(sDate, sTime, eDate, eTime) { + if (sDate && sTime && eDate && eTime) { + return true; + } + return false; + }, + + _createPartyModeObject: function() { + var startDate = jQuery("#partyStartDate").datepicker('getDate'), + startTime = jQuery("#partyStartTime").timepicker('getTime'), + stopDate = jQuery("#partyEndDate").datepicker('getDate'), + stopTime = jQuery("#partyEndTime").timepicker('getTime'); + + if(this._isUserInputOk(startDate, startTime, stopDate, stopTime)) { + startDate.setHours(startTime.split(":")[0]); + startDate.setMinutes(startTime.split(":")[1]); + stopDate.setHours(stopTime.split(":")[0]); + stopDate.setMinutes(stopTime.split(":")[1]); + + this.partyModeObject.startDay = startDate.getDate(); + this.partyModeObject.startMonth = startDate.getMonth() + 1; + + var startFullYear = startDate.getFullYear().toString(); + this.partyModeObject.startYear = parseInt(startFullYear[2] + startFullYear[3]); + this.partyModeObject.startHour = startDate.getHours(); + this.partyModeObject.startMin = startDate.getMinutes(); + this.partyModeObject.startMinutesSinceMidnight = parseInt((startDate.getHours() * 60) + startDate.getMinutes()); + + this.partyModeObject.stopDay = stopDate.getDate(); + this.partyModeObject.stopMonth = stopDate.getMonth() + 1; + + var stopFullYear = stopDate.getFullYear().toString(); + this.partyModeObject.stopYear = parseInt(stopFullYear[2] + stopFullYear[3]); + this.partyModeObject.stopHour = stopDate.getHours(); + this.partyModeObject.stopMin = stopDate.getMinutes(); + this.partyModeObject.stopMinutesSinceMidnight = parseInt((stopDate.getHours() * 60) + stopDate.getMinutes()); + + this.partyModeObject.temp = jQuery("#partyTempOption option:selected").val(); + } else { + conInfo("Error PartyModeDialog._createPartyModeObject()"); + } + }, + + close: function(result) + { + var partyModeObject = false; + if (this.SetPartyMode) { + this._createPartyModeObject(); + } + if (Object.keys(this.partyModeObject).length > 0 || ! this.SetPartyMode) { + Layer.remove(this.m_layer); + if (this.m_callback) { this.m_callback(result); } + } + }, + + yes: function() + { + this.SetPartyMode = true; + this.close(PartyModeDialog.RESULT_YES); + }, + + no: function() + { + this.SetPartyMode = false; + this.close(PartyModeDialog.RESULT_NO); + }, + + // Activates the date- and timepicker and initializes the option fields of the tempererature selectbox + initInputFields: function() { + var jDatePickerStart = jQuery("#partyStartDate"), + jDatePickerEnd = jQuery("#partyEndDate"), + jTimePickerStart = jQuery("#partyStartTime"), + jTimePickerEnd = jQuery("#partyEndTime"), + startDate = new Date(), + stopDate = new Date(); + + if (showEmptyTimeFields != true) { + if (this.deviceData.stPartyStartYear == 0 || this.deviceData.stPartyStartYear == undefined) { + // Device Fw. < 1.3 + startDate.setHours(parseInt(startDate.getHours() + 1)); + stopDate.setHours(parseInt(startDate.getHours() + 3)); + jTimePickerStart.val(startDate.getHours() + ":00"); + jTimePickerEnd.val(stopDate.getHours() + ":00"); + } else { + // Device Fw. >= 1.3 + startDate.setDate(this.deviceData.stPartyStartDay); + startDate.setMonth(parseInt(this.deviceData.stPartyStartMonth) - 1); + startDate.setYear((this.deviceData.stPartyStartYear.length == 4) ? this.deviceData.stPartyStartYear : 2000 + parseInt(this.deviceData.stPartyStartYear)); + startDate.setHours(this.deviceData.stPartyStartTime / 60); + startDate.setMinutes(this.deviceData.stPartyStartTime % 60); + startDate.setSeconds(0); + + stopDate.setDate(this.deviceData.stPartyStopDay); + stopDate.setMonth(parseInt(this.deviceData.stPartyStopMonth) - 1); + stopDate.setYear((this.deviceData.stPartyStopYear.length == 4) ? this.deviceData.stPartyStopYear : 2000 + parseInt(this.deviceData.stPartyStopYear)); + stopDate.setHours(this.deviceData.stPartyStopTime / 60); + stopDate.setMinutes(this.deviceData.stPartyStopTime % 60); + stopDate.setSeconds(0); + + var startMinutes = (parseInt(startDate.getMinutes()) < 10) ? "0" + startDate.getMinutes() : startDate.getMinutes(); + var stopMinutes = (parseInt(stopDate.getMinutes()) < 10) ? "0" + stopDate.getMinutes() : stopDate.getMinutes(); + + jTimePickerStart.val(startDate.getHours() + ":" + startMinutes); + jTimePickerEnd.val(stopDate.getHours() + ":" + stopMinutes); + } + } else { + // Show empty inputfields + jTimePickerStart.val(); + jTimePickerEnd.val(); + jTimePickerEnd.prop("disabled", true); + } + + jDatePickerStart.datepicker({ + showOn: "focus", + dateFormat: "dd.mm.yy", + autoSize: true, + firstDay: 1, + minDate: 0, + showButtonPanel:true, + currentText: translateKey("btnToday"), + closeText: translateKey("btnOk"), + onClose: this.OnStartDateClose + }); + + jDatePickerEnd.datepicker({ + showOn: "focus", + dateFormat: "dd.mm.yy", + autoSize: true, + firstDay: 1, + minDate: 0, + showButtonPanel: true, + currentText: translateKey("btnToday"), + closeText: translateKey("btnOk"), + onClose: refreshPartyTimePicker + }); + + if (showEmptyTimeFields != true) { + if (this.deviceData.stPartyStartYear == 0) { + jDatePickerStart.datepicker("setDate", "+0d"); + jDatePickerEnd.datepicker("setDate", "+0d"); + this.deviceData.stPartyTemp = this.defaultPartyTemp; + } else { + jDatePickerStart.datepicker("setDate", startDate); + jDatePickerEnd.datepicker("setDate", stopDate); + } + } else { + jDatePickerStart.val(); + jDatePickerEnd.val(); + jDatePickerEnd.prop("disabled", true); + } + + jTimePickerStart.timepicker({ + //showNowButton: true, + showOn: "focus", + minutes: { + starts: 0, + ends: 30, + interval: 30 + }, + showCloseButton: true, + closeButtonText: translateKey("btnOk"), + beforeShow: this.OnStartTimeBeforeShow, + onSelect: this.OnStartTimeSelect, + onClose: this.OnStartTimeClose + }); + + jTimePickerEnd.timepicker({ + //showNowButton: true, + showOn: "focus", + minutes: { + starts: 0, + ends: 30, + interval: 30 + }, + showCloseButton: true, + closeButtonText: translateKey("btnOk"), + onHourShow : this.OnEndHourShowCallBack, + onMinuteShow: this.OnEndMinuteShowCallBack, + onClose: allDataSet + }); + + // Adds a selectbox for the temperature to the party mode dialog + var selBox = ""; + + jQuery("#partyTempOption").html(selBox); + jQuery("#partyTempOption option[value='"+this.deviceData.stPartyTemp+"']").prop("selected", true); + }, + + OnStartHourShowCallBack: function(hour) { + return true; + }, + + OnStartTimeBeforeShow: function(elem) { + if (showEmptyTimeFields == true) { + var jTimePickerStart = jQuery(elem), + date = new Date(), + hour = date.getHours(), + min = "00"; + + if (jTimePickerStart.val() == "") { + jTimePickerStart.timepicker("setTime", hour + ":" + min); + } + } + }, + + OnStartTimeSelect: function(time) { + var jTimePickerEnd = jQuery("#partyEndTime"), + endHour = jTimePickerEnd.timepicker("getHour"), + endMinute = jTimePickerEnd.timepicker("getMinute"), + arTime = time.split(":"), + startHour = arTime[0], + startMinute = arTime[1], + newEndTime = parseInt(startHour) + 1 + ":" + startMinute; //startHour + 1 + ":" + startMinute; + if (StartDateEqualsStopDate && (showEmptyTimeFields != true)) { + if ((startHour >= endHour) && (startMinute >= endMinute)) { + jTimePickerEnd.timepicker("setTime", newEndTime); + } + } + return true; + }, + + OnStartDateClose: function() { + var jDatePickerStart = jQuery("#partyStartDate"), + jDatePickerEnd = jQuery("#partyEndDate"); + + if (jDatePickerStart.val() != "") { + jDatePickerEnd.prop("disabled", false); + } + + refreshPartyDatePicker(); + }, + + OnStartTimeClose: function() { + var jTimePickerStart = jQuery("#partyStartTime"), + jTimePickerEnd = jQuery("#partyEndTime"); + + if (jTimePickerStart.val() != "") { + jTimePickerEnd.prop("disabled", false); + } + allDataSet(); + }, + + // Makes only valid time selectors selectable - e. g. its´s not possible to set an end time earlier than the start time + OnEndHourShowCallBack: function(hour) { + var startHour = jQuery("#partyStartTime").timepicker('getHour'), + startMin = jQuery("#partyStartTime").timepicker('getMinute'); + + if (StartDateEqualsStopDate()) { + if (hour < startHour || ((hour == startHour) && (parseInt(startMin) >= 30))) { + return false; + } + } + return true; + }, + + // Makes only valid time selectors selectable + OnEndMinuteShowCallBack: function(endHour, endMin) { + var startHour = jQuery("#partyStartTime").timepicker('getHour'), + startMin = jQuery("#partyStartTime").timepicker('getMinute'); + + if (StartDateEqualsStopDate()) { + if ((startHour == endHour) && (endMin <= startMin)) { + return false; + } + } + return true; + }, + + getPartyModeObject: function() { + return this.partyModeObject; + } + +}); + +PartyModeDialog.RESULT_NO = 0; +PartyModeDialog.RESULT_YES = 1; +/** + * statusdisplaydialog.js + **/ + +/** + * When no text is active the header of the table has to be stripped (remove color and icon) + */ +function setStatusDisplayTableHeader() { + var optionHeaderElems = jQuery("[name='optionHeader']"), + hideOptionHeader = true, + row; + + for(var loop = 0; loop <= 5; loop++) { + + row = jQuery("#textSelect_"+loop).val(); + + if ((row != undefined) && (row != "-1")) { + hideOptionHeader = false; + } + } + if (hideOptionHeader) { + optionHeaderElems.hide(); + } else { + optionHeaderElems.show(); + } +} + +function setIconPreview(oValue) { + var displayType = statusDisplayDialog.displayType, + picPath = (displayType == "DIS") ? "/ise/img/icons_hm_dis_wm55/24/" : "/ise/img/icons_hm_dis_ep_wm55/24/"; + + oValue.index = oValue.index.toString(); + var previewElm = jQuery("#iconPreview_"+oValue.index); + previewElm.html(""); +} + +function displayStatusDisplayOptionContainer(lineIndex, mode) { + var optionContainer = jQuery("[name='optionContainer_"+lineIndex+"']"); + if(mode) { + optionContainer.show(); + } else { + optionContainer.hide(); + } +} +/** + * When a text for a line is chosen the selectboxes color and icon are visible, otherwise they are hidden. + * @param elm - Text selectbox for the chosen line + */ +function textOnChange(elm) { + var selBoxIndex = elm.id.split("_")[1], + selIndex = jQuery(elm).val(); + if (selIndex != -1) { + var iconSelElm = jQuery("#iconSelect_" + selBoxIndex); + displayStatusDisplayOptionContainer(selBoxIndex, true); + setIconPreview({index: selBoxIndex, value: iconSelElm.val()}); + } else { + displayStatusDisplayOptionContainer(selBoxIndex, false); + } + setStatusDisplayTableHeader(); + setFreeTextContainer(); +} + +function iconOnChange(elm) { + var selBoxIndex = elm.id.split("_")[1], + preViewIndex = jQuery(elm).val(); + setIconPreview({index: selBoxIndex, value: preViewIndex}); +} + +function setFreeTextContainer() { + var jHeadFreeText = jQuery("#headFreeText"), + freeTextActive = false; + + // Check each line if the free text mode is active. + // If yes switch on the appropriate text input field + // and set the variable freeTextActive to true + for (var line = 0; line < 6; line++) { + var jLine = jQuery("#textSelect_" + line), + jCellFreeText = jQuery("#cellFreeText_"+line); + + if (jLine.val() == "99") { + jCellFreeText.show(); + jHeadFreeText.show(); + freeTextActive = true; + } else { + jCellFreeText.hide(); + } + } + + // If at least one line has an active free text mode + // we have to activate the placeholder for the other lines and the header (color and icon are moving up) + if (freeTextActive) { + for (var line = 0; line < 6; line++) { + var jLine = jQuery("#textSelect_" + line), + jPlaceHolder = jQuery("#placeHolder_"+line); + + if (jLine.val() != "99") { + jPlaceHolder.show(); + } else { + jPlaceHolder.hide().css("display","none"); + } + } + } else { + jHeadFreeText.hide().css("display", "none"); + for (var line = 0; line < 6; line++) { + jQuery("#placeHolder_"+line).hide().css("display", "none"); + } + } +} + +StatusDisplayDialog = Class.create({ + + initialize: function(title, content, value, callback, contentType) { + var _this_ = this; + + this.m_contentType = contentType; + this.m_callback = callback; + this.m_layer = document.createElement("div"); + this.m_layer.className = "YesNoDialogLayer"; + + this.arDisplayData = []; + this.channelValue = value; + + this.startKey = "0x02"; + this.endKey = "0x03"; + this.lf = "0x0A"; + this.textKey = "0x12"; + this.colorKey = "0x11"; + this.iconKey = "0x13"; + this.soundKey ="0x14"; + this.soundQuantityKey = "0x1C"; + this.soundTimeLagKey = "0x1D"; + this.flashKey = "0x16"; + this.configString = "not initialized"; + this.displayType = "DIS"; + + var dialog = document.createElement("div"); + dialog.className = "YesNoDialog"; + + var titleElement = document.createElement("div"); + titleElement.className = "YesNoDialogTitle"; + titleElement.appendChild(document.createTextNode(title)); + titleElement.onmousedown = function(event) { new Drag(this.parentNode, event); }; + dialog.appendChild(titleElement); + + var contentWrapper = document.createElement("div"); + contentWrapper.className = "YesNoDialogContentWrapper"; + + var contentElement = document.createElement("div"); + contentElement.className = "YesNoDialogContent"; + + if (this.m_contentType == "html") { + contentElement.innerHTML = content; + } else { + contentElement.appendChild(document.createTextNode(content)); + } + + contentWrapper.appendChild(contentElement); + + dialog.appendChild(contentWrapper); + + var footer = document.createElement("div"); + footer.className= "YesNoDialogFooter"; + + var yesButton = document.createElement("div"); + yesButton.className = "YesNoDialog_yesButton borderRadius5px colorGradient50px"; + yesButton.appendChild(document.createTextNode(translateKey('btnOk'))); + yesButton.onclick = function() { _this_.yes(); }; + footer.appendChild(yesButton); + + var noButton = document.createElement("div"); + noButton.className = "YesNoDialog_noButton borderRadius5px colorGradient50px"; + noButton.appendChild(document.createTextNode(translateKey('btnCancel'))); + noButton.onclick = function() { _this_.no(); }; + footer.appendChild(noButton); + + dialog.appendChild(footer); + + this.m_layer.appendChild(dialog); + + Layer.add(this.m_layer); + + this.initEPaper(); + this._addElements(); + this._initAllValues(); + + setStatusDisplayTableHeader(); + + + // Remark 1: This doesn´t work satisfying -- see Remark 2 + // This should display an icon within the options of the icon selector + //jQuery("[name='statusDialogIconOptions']").msDropDown({childWidth:"200px"}); + + // This adapts the height of the dialog to the content + jQuery(".YesNoDialog").css("height", jQuery(".YesNoDialogContentWrapper").height() + 78); + jQuery(".YesNoDialogFooter").css("top", jQuery(".YesNoDialogContentWrapper").height() + 26); + }, + + initEPaper: function () {}, + + // This is for testing only + _getAllTextPresets: function() { + var tmp = homematic("Interface.getMasterValue", {"interface": "BidCos-RF", "address": "MYS0000666:1", "valueKey": "TEXTLINE_1"}); + conInfo(tmp); + }, + + // This creates the content of the dialog. + _addElements: function() { + var dialogContentElem = jQuery("#statusDisplayDialog"); + var textOptions = this._getTextOptions(); + var colorOptions = this._getColorOptions(); + var iconOptions = this._getIconOptions(); + var freeTextValue = translateKey("statusDisplayOptionFreeText"); + + dialogContentElem.append(function(index,html){ + var content = "
 Text ColorIcon
"+translateKey("statusDisplayLine")+ " "+(loop + 1)+":
 Text ColorIcon
 Text Icon
"+translateKey("statusDisplayLine")+ " "+(loop + 1)+":

"+translateKey('lblAcusticalSignal')+":
"+translateKey('lblOpticalSignal')+":
"+translateKey('lblAcusticalSignal')+""+translateKey('lblQuantity')+""+translateKey('lblTimeLag')+"
"+translateKey('lblOpticalSignal')+"
"; + content += ""; + content += ""; + content += ""; + content += ""; + content += ""; + content += ""; + + for (var loop = 1; loop <= 5; loop++) { + content += + "" + + "" + + "" + + "" + + "" + + "" + + "" + + ""+ + ""; + } + content += "
 "+translateKey('lblText')+"  "+translateKey('lblAlign')+""+translateKey('lblBGColorBR')+""+translateKey('lblTextColorBR')+""+translateKey('lblIcon')+"
"+translateKey('statusDisplayLine')+": "+loop+""+self._getTextElm(loop)+""+self._getAlignElm(loop)+""+self._getBgColorElm(loop)+""+self._getTextColorElm(loop)+""+self._getIconElm(loop)+"
"; + + content += + "
"; + + content += + "" + + ""; + + content += + "" + + "" + + "" + + "" + + "" + + + "
"+translateKey('lblAcusticalSignal')+"
"; + + content += + "
"; + content += + ""; + content += + "" + + "" + + "" + + "" + + "
"+translateKey("resetDevice")+"
"; + + return content; + }); + }, + + _getTextElm: function(no) { + return ""; + }, + + _getAlignElm: function(no) { + var html = ""; + return html; + }, + + _getBgColorElm: function(no) { + var html = ""; + return html; + }, + + _getTextColorElm: function(no) { + var html = ""; + return html; + }, + + _getIconElm: function(no) { + var html = ""; + return html; + }, + + _getSoundOptions:function() { + var options = "", + arSound = [ + translateKey("lblLowBattery"), + translateKey("lblDisarmed"), + translateKey("lblExternallyArmed"), + translateKey("lblInternallyArmed"), + translateKey("lblDelayExternalArming"), + translateKey("lblDelayInternalArming"), + translateKey("lblEvent"), + translateKey("lblError") + ]; + + options += ""; + + for (var loop = 0; loop < arSound.length; loop++) { + options += ""; + } + return options; + }, + + _getSoundQuantityOptions: function() { + var options = ""; + options += ""; + for (var loop = 1; loop <= 14; loop++) { + options += ""; + } + options += ""; + return options; + }, + + _getSoundTimeLagOptions: function() { + var options = ""; + for (var loop = 5; loop <= 80; loop+=5) { + options += ""; + } + return options; + }, + + _getTextConfigString: function() { + var result = ""; + + var rowCounter = 0, + text = [], + align = [], + bgColor = [], + textColor = [], + icon = []; + + var rowNo, + rowText, + rowIcon; + + for (var loop = 0; loop < 5; loop++) { + rowNo = loop + 1; + rowText = jQuery("#text_" + rowNo).val(); + rowIcon = jQuery("#icon_" + rowNo).val(); + if (rowText != "" || rowIcon != 0) { + if (rowText != "") { + text[rowCounter] = this._encodeSpecialChars(rowText); + } else { + text[rowCounter] = ""; + } + + icon[rowCounter] = rowIcon; + align[rowCounter] = jQuery("#align_" + rowNo).val(); + bgColor[rowCounter] = jQuery("#bgColor_" + rowNo).val(); + textColor[rowCounter] = jQuery("#textColor_" + rowNo).val(); + + result = result.replace(/,DDC=true/g, ''); + + result += "{" + + "DDBC=" + bgColor[rowCounter] + // DISPLAY_DATA_BACKGROUND_COLOR + ",DDTC=" + textColor[rowCounter] + // DISPLAY_DATA_TEXT_COLOR + ",DDI=" + icon[rowCounter] + // DISPLAY_DATA_ICON + ",DDA=" + align[rowCounter] + // DISPLAY_DATA_ALIGNMENT + ",DDS=" + text[rowCounter] + // DISPLAY_DATA_STRING + ",DDID=" + rowNo + // DISPLAY_DATA_ID + ",DDC=true"+ // DISPLAY_DATA_COMMIT + "},"; + rowCounter++; + } + } + return result; + }, + + _encodeSpecialChars: function(txt) { + return txt + .replace(/Ä/g,"[") + .replace(/Ö/g,"#") + .replace(/Ü/g,"$") + .replace(/ä/g,"²") + .replace(/ö/g,"|") + .replace(/ü/g,"³") + .replace(/ß/g,"_") + .replace(/&/g,"]") + .replace(/'/g,"µ"); + }, + + _decodeSpecialChars: function(txt) { + return txt + .replace(/\[/g,"Ä") + .replace(/#/g,"Ö") + .replace(/\$/g,"Ü") + .replace(/²/g,"ä") + .replace(/\|/g,"ö") + .replace(/³/g,"ü") + .replace(/\_/g,"ß") + .replace(/\]/g,"&") + .replace(/µ/g,"'"); + }, + + _getAcousticConfigString: function() { + var result = "", + selectedSound = jQuery("#soundSelectBox").val(); + + if (selectedSound != -1) { + result += "{" + + "R=" + jQuery("#soundQuantitySelectBox").val() + // REPETITIONS + ",IN=" + jQuery("#soundTimeLagSelectBox").val() + // INTERVAL + ",ANS=" + selectedSound + // ACOUSTIC_NOTIFICATION_SELECTION + "}"; + } + + return result; + }, + + _createConfigString: function() { + var textConfigString = "", acousticConfigString = ""; + if (! resetEPaperDisplay) { + textConfigString = this._getTextConfigString(); + acousticConfigString = this._getAcousticConfigString(); + this.configString = (acousticConfigString == "") ? textConfigString.slice(0, textConfigString.length - 1) : textConfigString + acousticConfigString; + } else { + //acousticConfigString = this._getAcousticConfigString(); + //this.configString = (acousticConfigString == "") ? "{DDS=XXX,DDID=1,DDC=true}" : "{DDS=XXX,DDID=1,DDC=true}," + this._getAcousticConfigString() ; + this.configString = "{DDS=XXX,DDID=1,DDC=true}"; + } + }, + + // PUBLIC + getConfigString: function() { + return this.configString; + }, + + close: function(result) + { + Layer.remove(this.m_layer); + if (this.m_callback) { this.m_callback(result); } + }, + + yes: function() + { + this._createConfigString(); + this.close(this.RESULT_YES); + }, + + no: function() + { + this.close(this.RESULT_NO); + }, + + btnTextYes: function(btnTxt) { + jQuery(".YesNoDialog_yesButton").text(btnTxt); + }, + + btnYesHide: function() { + jQuery("#btnYes").addClass("hidden"); + }, + + btnYesShow: function() { + jQuery("#btnYes").removeClass("hidden"); + }, + + btnTextNo: function(btnTxt) { + jQuery(".YesNoDialog_noButton").text(btnTxt); + }, + + btnNoHide: function() { + jQuery("#btnNo").addClass("hidden"); + }, + + btnNoShow: function() { + jQuery("#btnNo").removeClass("hidden"); + }, + + setHeight: function() { + var heightContentWrapper = jQuery(".YesNoDialogContentWrapper").height(), + yesNoElm = jQuery(".YesNoDialog"), + footerElm = jQuery(".YesNoDialogFooter"); + + yesNoElm.css("height", heightContentWrapper + 78); + footerElm.css("top", heightContentWrapper + 26); + yesNoElm.css("top", (window.innerHeight / 2) - (yesNoElm.height() / 2)); + }, + + resetHeight: function() { + this.setHeight(); + }, + + setWidth: function(dlgWidth) { + var defaultWith = 600, + offsetWidth = 4, + offsetPosYesButton = 109, + offsetDialogHeight = 78, + offsetDialogFooterHeight = 26; + + var width = dlgWidth - offsetWidth, + yesButtonPos = dlgWidth - offsetPosYesButton, + position = jQuery(".YesNoDialog").position(); + + // dlgWidth = (defaultWith < dlgWidth) ? defaultWith : dlgWidth; + + jQuery(".YesNoDialog").width(dlgWidth).css({left: position.left + ((defaultWith - dlgWidth) / 2)}); + jQuery(".YesNoDialogTitle").width(width); + jQuery(".YesNoDialogContentWrapper").width(width); + jQuery(".YesNoDialogFooter").width(width); + jQuery(".YesNoDialog_yesButton").css("left", yesButtonPos); + + //Dialoghöhe an Content anpassen. + jQuery(".YesNoDialog").css("height", jQuery(".YesNoDialogContentWrapper").height() + offsetDialogHeight); + jQuery(".YesNoDialogFooter").css("top", jQuery(".YesNoDialogContentWrapper").height() + offsetDialogFooterHeight); + } + +}); +/** + * rgbwcontrollerdialog.js + **/ + +/** + * Dialogbox mit den Schaltflächen "Ja" und "Neine" + * Normalerweise wird als content Text übergeben, + * wenn contentType 'html' gesetzt ist, kann auch HTML übergeben werden. + * Die Höhe des Dialoges sollte sich dynamisch der Contentgröße anpassen. + **/ +RGBWControllerDialog = Class.create({ + + initialize: function (title, content, param, curValue, callback, contentType) { + var _this_ = this; + this.configString = "not initialized"; + + var sCurValue = (curValue != this.configString) ? curValue.replace(/'/g, "\"") : curValue; + + this.DEFAULTBRIGHTNESS = 200; + this.m_contentType = contentType; + this.m_callback = callback; + this.m_layer = document.createElement("div"); + this.m_layer.className = "YesNoDialogLayer"; + this.param = param; + this.curValues = (sCurValue != this.configString) ? JSON.parse(sCurValue) : sCurValue ; + var dialog = document.createElement("div"); + dialog.className = "YesNoDialog"; + + var titleElement = document.createElement("div"); + titleElement.className = "YesNoDialogTitle"; + titleElement.appendChild(document.createTextNode(title)); + titleElement.onmousedown = function (event) { + new Drag(this.parentNode, event); + }; + dialog.appendChild(titleElement); + + var contentWrapper = document.createElement("div"); + contentWrapper.className = "YesNoDialogContentWrapper"; + + var contentElement = document.createElement("div"); + contentElement.className = "YesNoDialogContent"; + + if (this.m_contentType == "html") { + contentElement.innerHTML = content; + } else { + contentElement.appendChild(document.createTextNode(content)); + } + + contentWrapper.appendChild(contentElement); + + dialog.appendChild(contentWrapper); + + var footer = document.createElement("div"); + footer.className = "YesNoDialogFooter"; + + var yesButton = document.createElement("div"); + yesButton.className = "YesNoDialog_yesButton borderRadius5px colorGradient50px"; + yesButton.appendChild(document.createTextNode(translateKey('btnOk'))); + yesButton.onclick = function () { + _this_.yes(); + }; + footer.appendChild(yesButton); + + var noButton = document.createElement("div"); + noButton.className = "YesNoDialog_noButton borderRadius5px colorGradient50px"; + noButton.appendChild(document.createTextNode(translateKey('dialogBack'))); + noButton.onclick = function () { + _this_.no(); + }; + footer.appendChild(noButton); + + dialog.appendChild(footer); + + this.m_layer.appendChild(dialog); + + Layer.add(this.m_layer); + + this.__activateSubDialog(); + + //AG sorgt dafür, daß die Dialoghöhe sich dynamisch dem Content anpasst. + jQuery(".YesNoDialog").css("height", jQuery(".YesNoDialogContentWrapper").height() + 78); + jQuery(".YesNoDialogFooter").css("top", jQuery(".YesNoDialogContentWrapper").height() + 26); + + translatePage('#RGBWControllerColor, #RGBWControllerProgram'); + }, + + // This creates the content of the dialog. + __activateSubDialog: function () { + switch (this.param) { + /* + case "BRIGHTNESS" : + jQuery("#RGBWControllerBrightness").show(); + break; + */ + //case "RGBW_COLOR" : + case "USER_COLOR" : + /* + Array curValues + 0 Color val + 1 Brightness + 2 Ramptime + 3 OnTime + */ + var elmBrightness = jQuery("#colorRGBControllerBrightness"), + elmRampTime = jQuery("#colorRGBControllerRampTime"), + elmOnTime = jQuery("#colorRGBControllerOnTime"), + elmFreeRampTimeContainer = jQuery("#colorRGBEnterFreeRampTimeContainer"), + elmFreeOnTimeContainer = jQuery("#colorRGBEnterFreeOnTimeContainer"); + + elmBrightness.val(this.curValues["ACT_BRIGHTNESS_STORE"] || this.DEFAULTBRIGHTNESS); + + // RampTime + if (this.curValues["RAMP_TIME_STORE"]) { + elmRampTime.val(this.__setTimeValue("colorRGBControllerRampTime", this.curValues["RAMP_TIME_STORE"])); + } else { + elmRampTime.val(0.5); + } + + // OnTime + if (this.curValues["ON_TIME_STORE"]) { + elmOnTime.val(this.__setTimeValue("colorRGBControllerOnTime", this.curValues["ON_TIME_STORE"])); + } else { + elmOnTime.val(118000); + } + elmRampTime.change(function (e) { + if (jQuery(this).val() == "99999999") { + elmFreeRampTimeContainer.show(); + } else { + elmFreeRampTimeContainer.hide(); + } + }); + + elmOnTime.change(function (e) { + if (jQuery(this).val() == "99999999") { + elmFreeOnTimeContainer.show(); + } else { + elmFreeOnTimeContainer.hide(); + } + }); + + jQuery("#RGBWControllerColor").show(); + this.__activateColorPicker(); + break; + //case "RGBW_AUTOMATIC": + case "USER_PROGRAM": + /* + Array curValues + 0 Program + 1 Brightness + 2 Ramptime + 3 OnTime + 4 Color Min + 5 Color Max + */ + var + self = this, + elmProgram = jQuery("#prgRGBControllerProgram"), + elmBrightness = jQuery("#prgRGBControllerBrightness"), + elmRampTime = jQuery("#prgRGBControllerRampTime"), + elmOnTime = jQuery("#prgRGBControllerOnTime"), + elmFreeRampTimeContainer = jQuery("#prgRGBEnterFreeRampTimeContainer"), + elmFreeOnTimeContainer = jQuery("#prgRGBEnterFreeOnTimeContainer"), + elmMinColorActive = jQuery("#prgRGBControllerMinColorActive"), + elmMaxColorActive = jQuery("#prgRGBControllerMaxColorActive"); + + elmProgram.val(this.curValues["ACT_COLOR_PROGRAM_STORE"] || 0); + elmBrightness.val(this.curValues["ACT_BRIGHTNESS_STORE"] || this.DEFAULTBRIGHTNESS); + + // RampTime + if (this.curValues["RAMP_TIME_STORE"]) { + elmRampTime.val(this.__setTimeValue("prgRGBControllerRampTime", this.curValues["RAMP_TIME_STORE"])); + } else { + elmRampTime.val(0.5); + } + + // OnTime + if (this.curValues["ON_TIME_STORE"]) { + elmOnTime.val(this.__setTimeValue("prgRGBControllerOnTime", this.curValues["ON_TIME_STORE"])); + } else { + elmOnTime.val(118000); + } + + elmRampTime.change(function (e) { + if (jQuery(this).val() == "99999999") { + elmFreeRampTimeContainer.show(); + } else { + elmFreeRampTimeContainer.hide(); + } + }); + + elmOnTime.change(function (e) { + if (jQuery(this).val() == "99999999") { + elmFreeOnTimeContainer.show(); + } else { + elmFreeOnTimeContainer.hide(); + } + }); + + elmMinColorActive.change(function (e) { + if (jQuery(this).prop("checked")) { + if (self.curValues[4] == 255) { + jQuery("#prgRGBControllerMinColor").spectrum("set", "hsv(0,100%,100%)"); + } + jQuery("#prgRGBControllerMinColor").spectrum("enable"); + } else { + jQuery("#prgRGBControllerMinColor").spectrum("disable"); + } + }); + + elmMaxColorActive.change(function (e) { + if (jQuery(this).prop("checked")) { + if (self.curValues[5] == 255) { + jQuery("#prgRGBControllerMaxColor").spectrum("set", "hsv(359,100%,100%)"); + } + jQuery("#prgRGBControllerMaxColor").spectrum("enable"); + } else { + jQuery("#prgRGBControllerMaxColor").spectrum("disable"); + } + }); + + jQuery("#RGBWControllerProgram").show(); + this.__activateColorPickerMinMax("min"); + this.__activateColorPickerMinMax("max"); + break; + } + }, + + // PUBLIC + getConfigString: function () { + return this.configString; + }, + + + __setTimeValue: function (strTimeElem, value) { + var maxValue = 85825945; + var optionAvailable = false; + var fullSeconds = (value <= maxValue) ? value : maxValue; + + jQuery("#" + strTimeElem + " > option").each(function () { + if (this.value == fullSeconds) { + optionAvailable = true; + } + }); + + if (!optionAvailable) { + var days = Math.floor(fullSeconds / 86400); + var hours = Math.floor(fullSeconds / 3600) % 24; + var minutes = Math.floor((fullSeconds - (hours * 3600)) / 60) % 60; + var seconds = fullSeconds - ((days * 86400) + (hours * 3600) + (minutes * 60)); + var sHour = (hours < 10) ? "0" + hours : hours, + sMinutes = (minutes < 10) ? "0" + minutes : minutes, + sSeconds = (seconds < 10) ? "0" + seconds : seconds; + + if (days > 0) { + jQuery("#" + strTimeElem).append(""; + for (var loop= 10; loop <= 100; loop+=10) { + options+= ""; + } + return ""; + }, + + setDialogElements: function() { + + this.trDurationElms = jQuery("[name='trDuration']"); + this.trRampTimeElms = jQuery("[name='trRampTime']"); + + this.volumeElm = jQuery("#combinedParam_Volume"); + this.chkBoxTimeLimitElm = jQuery("#chkBoxTimeLimit"); + this.durationUnitElm = jQuery("#combinedParam_DurationUnit"); + this.durationValueElm = jQuery("#combinedParam_DurationValue"); + this.rampTimeUnitElm = jQuery("#combinedParam_RampTimeUnit"); + this.rampTimeValueElm = jQuery("#combinedParam_RampTimeValue"); + this.repetitionsElm = jQuery("#combinedParam_Repetitions"); + this.choosenFilesElm = jQuery("#combinedParam_ChoosenFiles"); + this.btnChooseSoundFiles = jQuery("#btnChooseSoundFiles"); + }, + + initDialog: function() { + var self = this, + arElmValues = this.initValue.split(","), + permanentHR = 31, + minDuration = 0, + maxDuration = 16343; + + this.volumeElm.val(arElmValues[0].split("=")[1]); + this.durationUnitElm.val(arElmValues[1].split("=")[1]); + this.durationValueElm.val(arElmValues[2].split("=")[1]); + + // Permanent not active. The duration of the sound is limited + if (this.durationValueElm.val() == permanentHR && this.durationUnitElm.val() == 2) { + this.chkBoxTimeLimitElm.prop("checked", false); + this.trDurationElms.css("visibility", "visible"); + this.trDurationElms.css("opacity", "0.2"); + } else { + this.chkBoxTimeLimitElm.prop("checked", true); + this.trDurationElms.css("visibility", "visible"); + } + + this.rampTimeUnitElm.val(arElmValues[3].split("=")[1]); + this.rampTimeValueElm.val(arElmValues[4].split("=")[1]); + this.repetitionsElm.val(arElmValues[5].split("=")[1]); + this.choosenFilesElm.val(arElmValues[6].split("=")[1].replace(/;/g, ",")); + + this.btnChooseSoundFiles.bind("click", function() { + chooseSoundFiles(self.choosenFilesElm.val()); + }); + this.chkBoxTimeLimitElm.bind("change", function(){ + if (this.checked) { + self.durationValueElm.prop('disabled', false); + self.durationUnitElm.prop('disabled', false); + self.trDurationElms.fadeTo(1000, 1); + } else { + self.durationValueElm.prop('disabled', true); + self.durationUnitElm.prop('disabled', true); + self.trDurationElms.fadeTo(1000, 0.2); + self.durationValueElm.val(permanentHR); + self.trRampTimeElms.fadeTo(1000, 1); + self.rampTimeValueElm.prop('disabled', false); + self.rampTimeUnitElm.prop('disabled', false); + } + }); + + this.durationValueElm.bind("keyup", function() { + var min = 0, + max = (parseInt(self.durationUnitElm.val()) == 2) ? permanentHR: maxDuration; + this.value = self.checkValidity(this.value,min,max); + if (this.value == 0) { + self.trRampTimeElms.fadeTo(1000,0.1); + self.rampTimeValueElm.prop('disabled', true).val(0); + self.rampTimeUnitElm.prop('disabled', true); + } else { + self.trRampTimeElms.fadeTo(1000,1); + self.rampTimeValueElm.prop('disabled', false); + self.rampTimeUnitElm.prop('disabled', false); + } + }); + + this.durationValueElm.bind("blur", function() { + var val = parseInt(this.value); + + if (isNaN(val)) { + this.value = (parseInt(self.durationUnitElm.val()) == 2) ? permanentHR : maxDuration; + } else { + this.value = val; + } + self.durationValueElm.keyup(); + }); + + this.durationUnitElm.bind("change", function(){ + self.durationValueElm.keyup(); + }); + + this.rampTimeValueElm.bind("keyup", function() { + var min = 0, + max = (parseInt(self.rampTimeUnitElm.val()) == 2) ? permanentHR: maxDuration; + this.value = self.checkValidity(this.value,min,max); + }); + + this.rampTimeValueElm.bind("blur", function() { + var val = parseInt(this.value); + + if (isNaN(val)) { + this.value = (parseInt(self.rampTimeUnitElm.val()) == 2) ? permanentHR : maxDuration; + } else { + this.value = val; + } + }); + + this.rampTimeUnitElm.bind("change", function(){ + self.rampTimeValueElm.keyup(); + }); + + }, + + checkValidity: function(val, min, max) { + var result = val; + if (val == "") {result = "";} + + if (parseInt(val) < 0) {result = min;} + if (parseInt(val) > max) {result = max;} + return result; + }, + + + getConfigString: function() { + var volume = this.volumeElm.val(), + durationUnit = (this.chkBoxTimeLimitElm.prop("checked") == false) ? 2 : this.durationUnitElm.val(), // 2 = unit hour + durationValue = (this.chkBoxTimeLimitElm.prop("checked") == false) ? 31 : this.durationValueElm.val(), + ramptimeUnit = this.rampTimeUnitElm.val(), + ramptimeValue = this.rampTimeValueElm.val(), + repetitions = this.repetitionsElm.val(), + soundfileList = this.choosenFilesElm.val().replace(/,/g, ";"), + + result = "L="+volume+",DU="+durationUnit+",DV="+durationValue+",RTU="+ramptimeUnit+",RTV="+ramptimeValue+",R="+repetitions+",SL="+ soundfileList; + + Layer.remove(this.m_layer); + + return result; + }, + + close: function(result) + { + if (this.m_callback) { this.m_callback(result); } + }, + + yes: function() + { + this.close(this.RESULT_YES); + }, + + no: function() + { + Layer.remove(this.m_layer); + this.close(this.RESULT_NO); + }, + + btnTextYes: function(btnTxt) { + jQuery(".YesNoDialog_yesButton").text(btnTxt); + }, + + btnYesHide: function() { + jQuery("#btnYes").addClass("hidden"); + }, + + btnYesShow: function() { + jQuery("#btnYes").removeClass("hidden"); + }, + + btnTextNo: function(btnTxt) { + jQuery(".YesNoDialog_noButton").text(btnTxt); + }, + + btnNoHide: function() { + jQuery("#btnNo").addClass("hidden"); + }, + + btnNoShow: function() { + jQuery("#btnNo").removeClass("hidden"); + }, + + setHeight: function() { + var heightContentWrapper = jQuery(".YesNoDialogContentWrapper").height(), + yesNoElm = jQuery(".YesNoDialog"), + footerElm = jQuery(".YesNoDialogFooter"); + + yesNoElm.css("height", heightContentWrapper + 78); + footerElm.css("top", heightContentWrapper + 26); + yesNoElm.css("top", (window.innerHeight / 2) - (yesNoElm.height() / 2)); + }, + + resetHeight: function() { + this.setHeight(); + }, + + setWidth: function(dlgWidth) { + var defaultWith = 600, + offsetWidth = 4, + offsetPosYesButton = 109, + offsetDialogHeight = 78, + offsetDialogFooterHeight = 26; + + var width = dlgWidth - offsetWidth, + yesButtonPos = dlgWidth - offsetPosYesButton, + position = jQuery(".YesNoDialog").position(); + + // dlgWidth = (defaultWith < dlgWidth) ? defaultWith : dlgWidth; + + jQuery(".YesNoDialog").width(dlgWidth).css({left: position.left + ((defaultWith - dlgWidth) / 2)}); + jQuery(".YesNoDialogTitle").width(width); + jQuery(".YesNoDialogContentWrapper").width(width); + jQuery(".YesNoDialogFooter").width(width); + jQuery(".YesNoDialog_yesButton").css("left", yesButtonPos); + + //Dialoghöhe an Content anpassen. + jQuery(".YesNoDialog").css("height", jQuery(".YesNoDialogContentWrapper").height() + offsetDialogHeight); + jQuery(".YesNoDialogFooter").css("top", jQuery(".YesNoDialogContentWrapper").height() + offsetDialogFooterHeight); + } + +}); + +RenameDeviceDialog = Class.create({ + + initialize: function(title, content, devId, allChannels, callback, contentType) + { + var _this_ = this; + this.m_contentType = contentType; + this.m_callback = callback; + this.m_layer = document.createElement("div"); + this.m_layer.className = "YesNoDialogLayer"; + + var dialog = document.createElement("div"); + dialog.className = "YesNoDialog"; + + var titleElement = document.createElement("div"); + titleElement.className = "YesNoDialogTitle"; + titleElement.appendChild(document.createTextNode(title)); + titleElement.onmousedown = function(event) { new Drag(this.parentNode, event); }; + dialog.appendChild(titleElement); + + var contentWrapper = document.createElement("div"); + contentWrapper.className = "YesNoDialogContentWrapper"; + + var contentElement = document.createElement("div"); + contentElement.className = "YesNoDialogContent"; + + if (this.m_contentType == "html") { + contentElement.innerHTML = content; + } else { + contentElement.appendChild(document.createTextNode(content)); + } + + contentWrapper.appendChild(contentElement); + + dialog.appendChild(contentWrapper); + + var footer = document.createElement("div"); + footer.className= "YesNoDialogFooter"; + + var yesButton = document.createElement("div"); + yesButton.className = "YesNoDialog_yesButton borderRadius5px colorGradient50px"; + yesButton.appendChild(document.createTextNode(translateKey('dialogYes'))); + yesButton.onclick = function() { _this_.yes(); }; + yesButton.id="btnYes"; + footer.appendChild(yesButton); + + var noButton = document.createElement("div"); + noButton.className = "YesNoDialog_noButton borderRadius5px colorGradient50px"; + noButton.appendChild(document.createTextNode(translateKey('dialogNo'))); + noButton.onclick = function() { _this_.no(); }; + noButton.id = "btnNo"; + footer.appendChild(noButton); + + dialog.appendChild(footer); + + this.m_layer.appendChild(dialog); + Layer.add(this.m_layer); + + translatePage(".YesNoDialog"); + + this.setHeight(); + + this.renameAllChannels = (allChannels == "true" || allChannels == true) ? true : false; + this.device = homematic("Device.get", {id: devId}); // selected device + this.newDeviceName = this.device.name; + + this.arChnObject = []; + + this.elmBasic = jQuery("#deviceBasisName"); + this.elmSN = jQuery("#partSN"); + //this.elmChannel = jQuery("#partChannel"); + this.tblChannelList = jQuery("#tblChannelList"); + this.elmChannelNames = jQuery("#channelNames"); + + this.basicName = ""; + this.tailSN = ""; + this.virtChnGroup = 0; + this.virtChnGroupLock = false; + + this.generateDeviceName(); + if (this.renameAllChannels) { + this.showChannelList(); + } + }, + + generateDeviceName: function() { + this.basicName = (this.device.name.indexOf(":") == -1 ) ? this.device.name.split(" ")[0] : this.device.name.split(":")[0]; + this.tailSN = this.device.address.slice(-4); + + this.elmBasic.val(this.basicName); + this.elmSN.val(this.tailSN); + + + }, + + showChannelList: function() { + var self = this, chnList = ""; + this.generateChannelNames(); + jQuery.each(this.arChnObject, function(index, chnObj) { + if (chnObj.chnType != "ALARM_COND_SWITCH_TRANSMITTER") { + chnList += "
Kanal: " + (index + 1) + " = " + self.convertToValidBasicName(chnObj.name) + "
"; + } + }); + + this.elmChannelNames.html(chnList); + this.tblChannelList.show(); + }, + + generateChannelNames: function() { + var self= this, + virtChnCounter = 0; + this.arChnObject = []; + this.virtChnGroup = 0; + + jQuery.each(this.device.channels, function(index, channel) { + + if (channel.channelType != "MAINTENANCE") { + + if (channel.channelType.indexOf("_VIRTUAL_") != -1) { + virtChnCounter++; + } else { + virtChnCounter = 0; + } + self.arChnObject.push({id: channel.id, name: self.getNewChannelName(channel.index, channel.channelType, virtChnCounter), chnType: channel.channelType}); + } + }); + }, + + getNewChannelName: function(chnIndex, chnType, virtChnCounter) { + + chnType = (chnType == "ACCESSPOINT_GENERIC_RECEIVER") ? chnType + "_" + chnIndex : chnType; + + var result = "", + arExt = [translateKey("chType_" + chnType), "A","B","C","D","E"]; // currently there are only devices with 3 virtuals channels in use (A, B, C) + + // No virtual channel + if (virtChnCounter == 0) { + result = this.convertToValidBasicName(this.elmBasic.val()) + ":" + this.elmSN.val() + ":" + chnIndex + ":" + arExt[virtChnCounter]; + this.virtChnGroupLock = false; + } else { + if (! this.virtChnGroupLock) { + this.virtChnGroupLock = true; + this.virtChnGroup++; + } + result = this.convertToValidBasicName(this.elmBasic.val()) + ":" + this.elmSN.val() + ":"+ chnIndex + "-CH" + this.virtChnGroup + "-" + arExt[virtChnCounter]; + } + return result; + }, + + convertToValidBasicName: function(value) { + value = value.substring(0,99); + value = value.replace(/[!\"§$%&\/=?\´\´#\'^°;,~]/g,""); + value = value.replace(/<[^>]*>/g, " "); // replace html code with a space + //value = value.replace(/(<\/?(?:br)[^>]*>)|<[^>]+>/ig, '$1'); // Remove html code except
+ value = value.trim(); // Remove whitespace from the start and the end of the value + + return value; + }, + + close: function(result) + { + Layer.remove(this.m_layer); + if (this.m_callback) { this.m_callback(result); } + }, + + yes: function() + { + this.newDeviceName = this.elmBasic.val() + ":" + this.elmSN.val(); + + if (this.renameAllChannels) { + this.generateChannelNames(); + } + + this.close(RenameDeviceDialog.RESULT_YES); + }, + + no: function() + { + this.close(RenameDeviceDialog.RESULT_NO); + }, + + btnTextYes: function(btnTxt) { + jQuery(".YesNoDialog_yesButton").text(btnTxt); + }, + + btnYesHide: function() { + jQuery("#btnYes").addClass("hidden"); + }, + + btnYesShow: function() { + jQuery("#btnYes").removeClass("hidden"); + }, + + btnTextNo: function(btnTxt) { + jQuery(".YesNoDialog_noButton").text(btnTxt); + }, + + btnNoHide: function() { + jQuery("#btnNo").addClass("hidden"); + }, + + btnNoShow: function() { + jQuery("#btnNo").removeClass("hidden"); + }, + + setHeight: function() { + var heightContentWrapper = jQuery(".YesNoDialogContentWrapper").height(), + yesNoElm = jQuery(".YesNoDialog"), + footerElm = jQuery(".YesNoDialogFooter"); + + yesNoElm.css("height", heightContentWrapper + 78); + footerElm.css("top", heightContentWrapper + 26); + yesNoElm.css("top", (window.innerHeight / 2) - (yesNoElm.height() / 2)); + }, + + resetHeight: function() { + this.setHeight(); + }, + + setWidth: function(dlgWidth) { + var defaultWith = 600, + offsetWidth = 4, + offsetPosYesButton = 109, + offsetDialogHeight = 78, + offsetDialogFooterHeight = 26; + + var width = dlgWidth - offsetWidth, + yesButtonPos = dlgWidth - offsetPosYesButton, + position = jQuery(".YesNoDialog").position(); + + // dlgWidth = (defaultWith < dlgWidth) ? defaultWith : dlgWidth; + + jQuery(".YesNoDialog").width(dlgWidth).css({left: position.left + ((defaultWith - dlgWidth) / 2)}); + jQuery(".YesNoDialogTitle").width(width); + jQuery(".YesNoDialogContentWrapper").width(width); + jQuery(".YesNoDialogFooter").width(width); + jQuery(".YesNoDialog_yesButton").css("left", yesButtonPos); + + //Dialoghöhe an Content anpassen. + jQuery(".YesNoDialog").css("height", jQuery(".YesNoDialogContentWrapper").height() + offsetDialogHeight); + jQuery(".YesNoDialogFooter").css("top", jQuery(".YesNoDialogContentWrapper").height() + offsetDialogFooterHeight); + }, + + getNewDeviceName: function() { + return this.convertToValidBasicName(this.newDeviceName); + }, + + getNewChannelNames: function () { + return this.arChnObject; + } + +}); + +RenameDeviceDialog.RESULT_NO = 0; +RenameDeviceDialog.RESULT_YES = 1; +/** + * LegacyAPIMigrationDialog.js + **/ + +LegacyAPIMigrationDialog = Class.create({ + + initialize: function(title, content, callback, contentType) + { + var _this_ = this; + + this.m_contentType = contentType; + this.m_callback = callback; + this.m_layer = document.createElement("div"); + this.m_layer.className = "YesNoDialogLayer"; + + this.RESULT_NO = 0; + this.RESULT_YES = 1; + + var dialog = document.createElement("div"); + dialog.className = "YesNoDialog"; + + var titleElement = document.createElement("div"); + titleElement.className = "YesNoDialogTitle"; + titleElement.appendChild(document.createTextNode(title)); + titleElement.onmousedown = function(event) { new Drag(this.parentNode, event); }; + dialog.appendChild(titleElement); + + var contentWrapper = document.createElement("div"); + contentWrapper.className = "YesNoDialogContentWrapper"; + + var contentElement = document.createElement("div"); + contentElement.className = "YesNoDialogContent"; + + if (this.m_contentType == "html") { + contentElement.innerHTML = content; + } else { + contentElement.appendChild(document.createTextNode(content)); + } + + contentWrapper.appendChild(contentElement); + + dialog.appendChild(contentWrapper); + + var footer = document.createElement("div"); + footer.className= "YesNoDialogFooter"; + + var yesButton = document.createElement("div"); + yesButton.className = "YesNoDialog_yesButton borderRadius5px colorGradient50px"; + yesButton.appendChild(document.createTextNode(translateKey('dialogYes'))); + yesButton.onclick = function() { _this_.yes(); }; + yesButton.id="btnYes"; + footer.appendChild(yesButton); + + var noButton = document.createElement("div"); + noButton.className = "YesNoDialog_noButton borderRadius5px colorGradient50px"; + noButton.appendChild(document.createTextNode(translateKey('dialogNo'))); + noButton.onclick = function() { _this_.no(); }; + noButton.id = "btnNo"; + footer.appendChild(noButton); + + dialog.appendChild(footer); + + this.m_layer.appendChild(dialog); + Layer.add(this.m_layer); + + translatePage(".YesNoDialog"); + + this.setHeight(); + + }, + + close: function(result) + { + Layer.remove(this.m_layer); + if (this.m_callback) { this.m_callback(result); } + }, + + yes: function() + { + this.close(this.RESULT_YES); + }, + + no: function() + { + this.close(this.RESULT_NO); + }, + + btnTextYes: function(btnTxt) { + jQuery(".YesNoDialog_yesButton").text(btnTxt); + }, + + btnYesHide: function() { + jQuery("#btnYes").addClass("hidden"); + }, + + btnYesShow: function() { + jQuery("#btnYes").removeClass("hidden"); + }, + + btnTextNo: function(btnTxt) { + jQuery(".YesNoDialog_noButton").text(btnTxt); + }, + + btnNoHide: function() { + jQuery("#btnNo").addClass("hidden"); + }, + + btnNoShow: function() { + jQuery("#btnNo").removeClass("hidden"); + }, + + setHeight: function() { + var heightContentWrapper = jQuery(".YesNoDialogContentWrapper").height(), + yesNoElm = jQuery(".YesNoDialog"), + footerElm = jQuery(".YesNoDialogFooter"); + + yesNoElm.css("height", heightContentWrapper + 78); + footerElm.css("top", heightContentWrapper + 26); + yesNoElm.css("top", (window.innerHeight / 2) - (yesNoElm.height() / 2)); + }, + + resetHeight: function() { + this.setHeight(); + }, + + setWidth: function(dlgWidth) { + var defaultWith = 600, + offsetWidth = 4, + offsetPosYesButton = 109, + offsetDialogHeight = 78, + offsetDialogFooterHeight = 26; + + var width = dlgWidth - offsetWidth, + yesButtonPos = dlgWidth - offsetPosYesButton, + position = jQuery(".YesNoDialog").position(); + + // dlgWidth = (defaultWith < dlgWidth) ? defaultWith : dlgWidth; + + jQuery(".YesNoDialog").width(dlgWidth).css({left: position.left + ((defaultWith - dlgWidth) / 2)}); + jQuery(".YesNoDialogTitle").width(width); + jQuery(".YesNoDialogContentWrapper").width(width); + jQuery(".YesNoDialogFooter").width(width); + jQuery(".YesNoDialog_yesButton").css("left", yesButtonPos); + + //Dialoghöhe an Content anpassen. + jQuery(".YesNoDialog").css("height", jQuery(".YesNoDialogContentWrapper").height() + offsetDialogHeight); + jQuery(".YesNoDialogFooter").css("top", jQuery(".YesNoDialogContentWrapper").height() + offsetDialogFooterHeight); + } + +}); +LegacyAPIMigrationDialog.CONFIRM_FILE = '/etc/config/legacyAPIMigrationAccepted'; + +SoundfileChooserDialog = Class.create({ + + initialize: function(activeSounds, callback) + { + var _this_ = this; + + this.m_title = translateKey("btnChooseSongs"); + + this.m_callback = callback; + this.m_layer = document.createElement("div"); + this.m_layer.className = "YesNoDialogLayer"; + + this.RESULT_NO = "Cancel"; + this.RESULT_YES = "OK"; + + this.activeSounds = activeSounds; + + var dialog = document.createElement("div"); + dialog.className = "YesNoDialogA"; + + + var titleElement = document.createElement("div"); + titleElement.className = "YesNoDialogTitleA"; + titleElement.appendChild(document.createTextNode(this.m_title)); + titleElement.onmousedown = function(event) { new Drag(this.parentNode, event); }; + dialog.appendChild(titleElement); + + var contentWrapper = document.createElement("div"); + contentWrapper.className = "YesNoDialogContentWrapperA"; + + var contentElement = document.createElement("div"); + contentElement.className = "YesNoDialogContentA"; + + contentElement.innerHTML = this.getHTML(); + + contentWrapper.appendChild(contentElement); + + dialog.appendChild(contentWrapper); + + var footer = document.createElement("div"); + footer.className= "YesNoDialogFooterA"; + + var yesButton = document.createElement("div"); + yesButton.className = "YesNoDialogA_yesButton borderRadius5px colorGradient50px"; + yesButton.appendChild(document.createTextNode(translateKey('footerBtnOk'))); + yesButton.onclick = function() { _this_.yes(); }; + yesButton.id="btnYesA"; + footer.appendChild(yesButton); + + var noButton = document.createElement("div"); + noButton.className = "YesNoDialogA_noButton borderRadius5px colorGradient50px"; + noButton.appendChild(document.createTextNode(translateKey('footerBtnCancel'))); + noButton.onclick = function() { _this_.no(); }; + noButton.id = "btnNoA"; + footer.appendChild(noButton); + + dialog.appendChild(footer); + + this.m_layer.appendChild(dialog); + Layer.add(this.m_layer); + + translatePage(".YesNoDialogA"); + + this.setHeight(); + + this.initDialog(); + + }, + + getHTML: function() { + var result = "", + x= 0, + count = 0, + songNr; + + result += "
"; + result += ""; + + for (var row = 0; row < 3; row++) { + result += ""; + for (x = row; x < (row + 4); x++) { + result += ""; + count++; + } + result += ""; + } + result += "
"; + result += ""; + result += "
"; + result += "
"; + return result; + }, + + initDialog: function() { + var arSound = this.activeSounds.split(","); + jQuery.each(arSound, function(index, songNr) { + jQuery("#songNr_" + index).val(songNr); + }); + }, + + getChoosenSongs: function() { + var result = "", + songNr; + + for(var loop = 0; loop < 12; loop++) { + songNr = jQuery("#songNr_" + loop).val(); + if (songNr != -1) { + result += songNr+ ";"; + } + } + + return result.slice(0,-1); + }, + + close: function(result) + { + Layer.remove(this.m_layer); + if (this.m_callback) { this.m_callback(result); } + }, + + yes: function() + { + //this.close(this.RESULT_YES); + this.close(this.getChoosenSongs()); + }, + + no: function() + { + this.close(this.RESULT_NO); + }, + + btnTextYes: function(btnTxt) { + jQuery(".YesNoDialogA_yesButton").text(btnTxt); + }, + + btnYesHide: function() { + jQuery("#btnYesA").addClass("hidden"); + }, + + btnYesShow: function() { + jQuery("#btnYesA").removeClass("hidden"); + }, + + btnTextNo: function(btnTxt) { + jQuery(".YesNoDialogA_noButton").text(btnTxt); + }, + + btnNoHide: function() { + jQuery("#btnNoA").addClass("hidden"); + }, + + btnNoShow: function() { + jQuery("#btnNoA").removeClass("hidden"); + }, + + setHeight: function() { + var heightContentWrapper = jQuery(".YesNoDialogContentWrapperA").height(), + yesNoElm = jQuery(".YesNoDialogA"), + footerElm = jQuery(".YesNoDialogFooterA"); + + yesNoElm.css("height", heightContentWrapper + 78); + footerElm.css("top", heightContentWrapper + 26); + yesNoElm.css("top", (window.innerHeight / 2) - (yesNoElm.height() / 2)); + }, + + resetHeight: function() { + this.setHeight(); + }, + + setWidth: function(dlgWidth) { + var defaultWith = 600, + offsetWidth = 4, + offsetPosYesButton = 109, + offsetDialogHeight = 78, + offsetDialogFooterHeight = 26; + + var width = dlgWidth - offsetWidth, + yesButtonPos = dlgWidth - offsetPosYesButton, + position = jQuery(".YesNoDialogA").position(); + + // dlgWidth = (defaultWith < dlgWidth) ? defaultWith : dlgWidth; + + jQuery(".YesNoDialogA").width(dlgWidth).css({left: position.left + ((defaultWith - dlgWidth) / 2)}); + jQuery(".YesNoDialogTitleA").width(width); + jQuery(".YesNoDialogContentWrapperA").width(width); + jQuery(".YesNoDialogFooterA").width(width); + jQuery(".YesNoDialogA_yesButton").css("left", yesButtonPos); + + //Dialoghöhe an Content anpassen. + jQuery(".YesNoDialogA").css("height", jQuery(".YesNoDialogContentWrapperA").height() + offsetDialogHeight); + jQuery(".YesNoDialogFooterA").css("top", jQuery(".YesNoDialogContentWrapperA").height() + offsetDialogFooterHeight); + } + +}); +setShutterVirtualReceiverInitValue = function(elmID, chnAddress) { + var paramElm = jQuery("#"+elmID); + var val = paramElm.val(); + var ch = DeviceList.getChannelByAddress(chnAddress), + virtChannelType = (typeof ch.virtChannelType != "undefined") ? ch.virtChannelType : ""; + + if (virtChannelType == "SHUTTER_VIRTUAL_RECEIVER") { + paramElm.val(val.split(",")[0]); + } +}; + +BlindCombinedParamDialog = Class.create({ + + initialize: function(title, content, value, virtChannelType, callback, contentType) + { + var _this_ = this; + + this.RESULT_NO = 0; + this.RESULT_YES = 1; + this.initValue = value; + this.virtChannelType = virtChannelType; + + this.m_contentType = contentType; + this.m_callback = callback; + this.m_layer = document.createElement("div"); + this.m_layer.className = "YesNoDialogLayer"; + + this.idSHUTTER = "SHUTTER_VIRTUAL_RECEIVER"; + + var dialog = document.createElement("div"); + dialog.className = "YesNoDialog"; + + var titleElement = document.createElement("div"); + titleElement.className = "YesNoDialogTitle"; + titleElement.appendChild(document.createTextNode(title)); + titleElement.onmousedown = function(event) { new Drag(this.parentNode, event); }; + dialog.appendChild(titleElement); + + var contentWrapper = document.createElement("div"); + contentWrapper.className = "YesNoDialogContentWrapper"; + + var contentElement = document.createElement("div"); + contentElement.className = "YesNoDialogContent"; + + if (this.m_contentType == "html") { + contentElement.innerHTML = content; + } else { + contentElement.appendChild(document.createTextNode(content)); + } + + contentWrapper.appendChild(contentElement); + + dialog.appendChild(contentWrapper); + + var footer = document.createElement("div"); + footer.className= "YesNoDialogFooter"; + + var yesButton = document.createElement("div"); + yesButton.className = "YesNoDialog_yesButton borderRadius5px colorGradient50px"; + yesButton.appendChild(document.createTextNode(translateKey('dialogYes'))); + yesButton.onclick = function() { _this_.yes(); }; + yesButton.id="btnYes"; + footer.appendChild(yesButton); + + var noButton = document.createElement("div"); + noButton.className = "YesNoDialog_noButton borderRadius5px colorGradient50px"; + noButton.appendChild(document.createTextNode(translateKey('dialogNo'))); + noButton.onclick = function() { _this_.no(); }; + noButton.id = "btnNo"; + footer.appendChild(noButton); + + dialog.appendChild(footer); + + this.m_layer.appendChild(dialog); + Layer.add(this.m_layer); + + translatePage(".YesNoDialog"); + + this.setHeight(); + + this.elmLevel = jQuery("#tdCombinedParam_Level"); + this.elmLevel2 = jQuery("#tdCombinedParam_Level2"); // not available when mode SHUTTER_VIRTUAL_RECEIVER activated + + this.initDialog(); + + }, + + initDialog: function() { + var arElmValues = this.initValue.split(","), + valueL = arElmValues[0].split("=")[1], + valueL2 = (this.virtChannelType != this.idSHUTTER) ? arElmValues[1].split("=")[1] : ""; + + this.elmLevel.val(valueL); + + if (this.virtChannelType != this.idSHUTTER) { + this.elmLevel2.val(valueL2); + } + }, + + getConfigString: function() { + var valL = this.elmLevel.val(), + result; + + if (this.virtChannelType != this.idSHUTTER) { + var valL2 = this.elmLevel2.val(); + result = "L="+valL+",L2="+valL2; + } else { + // See SPHM-1302 result = "L="+valL; + + // New with SPHM-1302 + result = "L="+valL+",L2="+valL; + } + + Layer.remove(this.m_layer); + + return result; + }, + + close: function(result) + { + if (this.m_callback) { this.m_callback(result); } + Layer.remove(this.m_layer); + }, + + yes: function() + { + this.close(YesNoDialog.RESULT_YES); + }, + + no: function() + { + this.close(YesNoDialog.RESULT_NO); + }, + + btnTextYes: function(btnTxt) { + jQuery(".YesNoDialog_yesButton").text(btnTxt); + }, + + btnYesHide: function() { + jQuery("#btnYes").addClass("hidden"); + }, + + btnYesShow: function() { + jQuery("#btnYes").removeClass("hidden"); + }, + + btnTextNo: function(btnTxt) { + jQuery(".YesNoDialog_noButton").text(btnTxt); + }, + + btnNoHide: function() { + jQuery("#btnNo").addClass("hidden"); + }, + + btnNoShow: function() { + jQuery("#btnNo").removeClass("hidden"); + }, + + setHeight: function() { + var heightContentWrapper = jQuery(".YesNoDialogContentWrapper").height(), + yesNoElm = jQuery(".YesNoDialog"), + footerElm = jQuery(".YesNoDialogFooter"); + + yesNoElm.css("height", heightContentWrapper + 78); + footerElm.css("top", heightContentWrapper + 26); + yesNoElm.css("top", (window.innerHeight / 2) - (yesNoElm.height() / 2)); + }, + + resetHeight: function() { + this.setHeight(); + }, + + setWidth: function(dlgWidth) { + var yesNoDlgElm = jQuery(".YesNoDialog"), + yesNoDlgFooterElm = jQuery(".YesNoDialogFooter"), + yesNoDlgTitleElm = jQuery(".YesNoDialogTitle"), + yesNoDlgContentWrapperElm = jQuery(".YesNoDialogContentWrapper"), + yesNoDlgYesBtnElm = jQuery(".YesNoDialog_yesButton"); + + var defaultWith = 600, + offsetWidth = 4, + offsetPosYesButton = 109, + offsetDialogHeight = 78, + offsetDialogFooterHeight = 26; + + var width = dlgWidth - offsetWidth, + yesButtonPos = dlgWidth - offsetPosYesButton, + position = yesNoDlgElm.position(); + + // dlgWidth = (defaultWith < dlgWidth) ? defaultWith : dlgWidth; + + yesNoDlgElm.width(dlgWidth).css({left: position.left + ((defaultWith - dlgWidth) / 2)}); + yesNoDlgTitleElm.width(width); + yesNoDlgContentWrapperElm.width(width); + yesNoDlgFooterElm.width(width); + yesNoDlgYesBtnElm.css("left", yesButtonPos); + + //Dialoghöhe an Content anpassen. + yesNoDlgElm.css("height", yesNoDlgContentWrapperElm.height() + offsetDialogHeight); + yesNoDlgFooterElm.css("top", yesNoDlgContentWrapperElm.height() + offsetDialogFooterHeight); + } + +}); +DimmerCombinedParamDialog = Class.create({ + initialize: function(title, content, deviceType, chnAddress, value, callback, contentType) + { + showRamptimeOff = false; // This we need among other things for certain COMBINED_PARAMETER help dialogs. + var _this_ = this; + + this.iFace = "HmIP-RF"; + + this.m_contentType = contentType; + this.m_callback = callback; + this.m_layer = document.createElement("div"); + this.m_layer.className = "YesNoDialogLayer"; + + this.RESULT_NO = 0; + this.RESULT_YES = 1; + + this.deviceType = deviceType; + this.chnAddress = chnAddress; + this.initValue = value; + + this.maxOnTime = 111600; + + this.devDescr = homematic("Interface.getDeviceDescription", { + "interface" : this.iFace, + "address" : this.chnAddress.split(":")[0] + }); + + this.devFirmware = this.devDescr.firmware.split("."); + this.fwMajor = parseInt(this.devFirmware[0]); + // this.fwMinor = parseInt(this.devFirmware[1]); // currently not in use + // this.fwPatch = parseInt(this.devFirmware[2]); // currently not in use + + this.isUniversalActor = ((this.deviceType == "HmIP-WUA") || (this.deviceType == "ELV-SH-WUA")) ? true : false; + this.isServoController = ((this.deviceType == "HmIP-WSC") || (this.deviceType == "ELV-SH-WSC")) ? true : false; + this.arNoOntimeAvailable = ["HmIP-MP3P", "HmIP-BSL", "HmIPW-WRC6", "HmIPW-WRC6-A"]; + this.showRampTimeOffElm = ["HmIPW-WRC6", "HmIPW-WRC6-A"]; + this.showColorElms = ["HmIP-MP3P", "HmIP-BSL", "HmIPW-WRC6", "HmIPW-WRC6-A"]; + this.showBehaviourElms = ["HmIPW-WRC6", "HmIPW-WRC6-A"]; + + // SPHM-1268 + if ((this.deviceType == "HmIP-BSL") && (this.fwMajor >= 2)) { + this.showBehaviourElms.push(this.deviceType); + } + + var dialog = document.createElement("div"); + dialog.className = "YesNoDialog"; + + var titleElement = document.createElement("div"); + titleElement.className = "YesNoDialogTitle"; + //titleElement.appendChild(document.createTextNode(title + " " + deviceType + " - " + chnAddress)); + titleElement.appendChild(document.createTextNode(deviceType + " - " + chnAddress)); + titleElement.onmousedown = function(event) { new Drag(this.parentNode, event); }; + dialog.appendChild(titleElement); + + var contentWrapper = document.createElement("div"); + contentWrapper.className = "YesNoDialogContentWrapper"; + + var contentElement = document.createElement("div"); + contentElement.className = "YesNoDialogContent"; + + if (this.m_contentType == "html") { + contentElement.innerHTML = content; + } else { + contentElement.appendChild(document.createTextNode(content)); + } + + contentWrapper.appendChild(contentElement); + + dialog.appendChild(contentWrapper); + + var footer = document.createElement("div"); + footer.className= "YesNoDialogFooter"; + + var yesButton = document.createElement("div"); + yesButton.className = "YesNoDialog_yesButton borderRadius5px colorGradient50px"; + yesButton.appendChild(document.createTextNode(translateKey('dialogYes'))); + yesButton.onclick = function() { _this_.yes(); }; + yesButton.id="btnYes"; + footer.appendChild(yesButton); + + var noButton = document.createElement("div"); + noButton.className = "YesNoDialog_noButton borderRadius5px colorGradient50px"; + noButton.appendChild(document.createTextNode(translateKey('dialogNo'))); + noButton.onclick = function() { _this_.no(); }; + noButton.id = "btnNo"; + footer.appendChild(noButton); + + dialog.appendChild(footer); + + this.m_layer.appendChild(dialog); + Layer.add(this.m_layer); + + translatePage(".YesNoDialog"); + + this.setHeight(); + + this.colorElmVisible = false; + this.behaviourElmVisible = false; + this.setDialogElements(); + this.initDialog(); + + }, + + isOntimeAvailable: function() { + return (this.arNoOntimeAvailable.indexOf(this.deviceType) == -1) ? true : false; + }, + + setDialogElements: function() { + + this.trSelectColorElm = jQuery("#trSelectColor"); + this.trSelectBehaviourElm = jQuery("#trSelectBehaviour"); + this.trDurationElms = jQuery("[name='trDuration']"); + this.trRampTimeElms = jQuery("[name='trRampTime']"); + this.trRampTimeOff = jQuery("#trRampTimeOff"); + this.selectColorElm = jQuery("#combinedParam_Color"); + this.selectBehaviourElm = jQuery("#combinedParam_Behaviour"); + this.levelElm = jQuery("#combinedParam_Level"); + + this.levelFreeValElm = jQuery("#prgDimmerEnterFreeLevel"); + this.divLevelFreeValElm = jQuery("#divLevelEnterFreeValue"); + this.levelFreeValActive = false; + + this.lblBrightnessLevelElm = jQuery("#lblBrightnessLevel"); + this.lblRampTimeElm = jQuery("#lblRampTime"); + this.chkBoxTimeLimitElm = jQuery("#chkBoxTimeLimit"); + this.durationValueElm = jQuery("#combinedParam_DurationValue"); + this.durationUnitElm = jQuery("#combinedParam_DurationUnit"); + + this.rampTimeUnitElm = jQuery("#combinedParam_RampTimeUnit"); + this.rampTimeValueElm = jQuery("#combinedParam_RampTimeValue"); + this.rampTimeOffUnitElm = jQuery("#combinedParam_RampTimeOffUnit"); + this.rampTimeOffValueElm = jQuery("#combinedParam_RampTimeOffValue"); + + }, + + // For those devices who are able to change the color show the color selector. + _showColorElm: function() { + var self = this; + jQuery.each(this.showColorElms, function(index, val) { + if (self.deviceType == val) { + self.trSelectColorElm.css("visibility", "visible"); + self.colorElmVisible = true; + return false; // leave each loop + } + }); + }, + + // For those devices who are able to change the behaviour (slow blinking, fast blinking and so on) show the color selector. + _showBehaviourElm: function() { + var self = this; + jQuery.each(this.showBehaviourElms, function(index, val) { + if (self.deviceType == val) { + self.trSelectBehaviourElm.css("visibility", "visible"); + self.behaviourElmVisible = true; + return false; // leave each loop + } + }); + }, + + _getOnTimeVal: function(val, unit) { + var result; + + if (parseInt(val) >= 31 && parseInt(unit) == 2) { + return 0; + } + + if (unit == 0) { + result = val; + } else if (unit == 1) { + result = val * 60; + } else if (unit == 2) { + result = val * 3600; + } + return parseInt(result); + }, + + _getRampTimeVal: function(val, unit) { + var result; + if (unit == 0) { + result = val; + } else if (unit == 1) { + result = parseInt(val * 60); + } else if (unit == 3) { + result = parseFloat(val / 100); + } + return result; + }, + + _getUnitInDU4OnTime: function(time) { + var result = 0, + hr = time / 3600, + min= time / 60; + + if (hr == parseInt(hr)) { + result = 2; + } else if (min == parseInt(min)) { + result = 1; + } + return result; + }, + + _getUnitInDU4RampTime: function(time) { + var t = parseFloat(time), + result = 0, + min = t / 60; + + if (parseInt(time) == 0) { + return 0; + } + + if (min == parseInt(min)) { + result = 1; + } else if ((Number(t) === t) && (t % 1 !== 0)) { + // time in float + result = 3; + } + return result; + }, + + hideOnTimeElems: function() { + jQuery("[name='trRampTime']").first().nextAll().hide(); + this.setHeight(); + }, + + showHideLevelFreeValue: function() { + if (this.levelElm.val() == "99999998") { + this.divLevelFreeValElm.show(); + this.levelFreeValActive = true; + this.setHeight(); + } else { + this.divLevelFreeValElm.hide(); + this.levelFreeValActive = false; + this.setHeight(); + } + + }, + + isLevelValid: function(elm) { + var val = parseInt(elm.value); + if ((isNaN(val) || val < 0)) {val = 0;} else if (val > 100) {val = 100;} + elm.value = val; + }, + + initDialog: function() { + var self = this; + + this.levelElm.change(function() {self.showHideLevelFreeValue();}); + this.levelFreeValElm.blur(function() {self.isLevelValid(this);}); + + var arElmValues, valueL, iValueL, valueDV, valueDVtmp, valueDU, valueRTV, valueRTVtmp, valueRTU, valueC, valueCB, valueRTTOU, valueRTTOV, permanentHR, permanentHR_0, minDuration, maxDuration; + + arElmValues = this.initValue.split(","); + valueL = arElmValues[0].split("=")[1]; + iValueL = parseInt(valueL) / 10; + + if (this.isUniversalActor) { // WUA + this.lblBrightnessLevelElm.text(translateKey("lblOperatingVoltage")); + } else if (this.isServoController) { + this.hideOnTimeElems(); + this.lblBrightnessLevelElm.text(translateKey("stringTableServoLevel")); + this.levelElm.find("option[value='0']").text("0 %"); + this.lblRampTimeElm .text(translateKey("stringTableServoRamp")); + } + + // iValueL !== (iValueL | 0) = check if the value is not 0% - 100% + if ( (iValueL !== (iValueL | 0)) && (valueL != "100.5") && (valueL != "101")) { + this.levelFreeValActive = true; + this.levelFreeValElm.val(valueL); + this.divLevelFreeValElm.show(); + } + + this._showColorElm(); + this._showBehaviourElm(); + if (this.isOntimeAvailable()) { + valueDVtmp = arElmValues[1].split("=")[1]; + valueDU = this._getUnitInDU4OnTime(valueDVtmp); + + if (valueDU == 2) { + valueDV = parseInt(valueDVtmp / 3600); + } else if (valueDU == 1) { + valueDV = parseInt(valueDVtmp / 60); + } else { + valueDV = valueDVtmp; + } + + valueRTVtmp = (! this.isServoController) ? arElmValues[2].split("=")[1] : arElmValues[1].split("=")[1] ; + + valueRTU = this._getUnitInDU4RampTime(valueRTVtmp); + + if (valueRTU == 3) { + valueRTV = valueRTVtmp * 100; + } else if (valueRTU == 1) { + valueRTV = parseInt(valueRTVtmp / 60); + } else { + valueRTV = valueRTVtmp; + } + + valueC = 7; + permanentHR = 31; + permanentHR_0 = 0; + minDuration = 0; + maxDuration = 16343; + } else { + valueDV = arElmValues[1].split("=")[1]; + valueDU = arElmValues[2].split("=")[1]; + valueRTV = arElmValues[3].split("=")[1]; + valueRTU = arElmValues[4].split("=")[1]; + valueC = 7; + permanentHR = 31; + minDuration = 0; + maxDuration = 16343; + } + + // Color + if (this.colorElmVisible && (arElmValues.length >= 6)) { + valueC = arElmValues[5].split("=")[1]; + this.selectColorElm.val(valueC); + } + + // Behaviour (blink slow, blink fast, ....) + if (this.behaviourElmVisible && (arElmValues.length >= 7)) { + valueCB = arElmValues[6].split("=")[1]; + this.selectBehaviourElm.val(valueCB); + } + + // RAMPTIME_OFF + if (arElmValues.length >= 9) { + valueRTTOV = arElmValues[7].split("=")[1]; + valueRTTOU = arElmValues[8].split("=")[1]; + this.rampTimeOffUnitElm.val(valueRTTOU); + this.rampTimeOffValueElm.val(valueRTTOV); + } + + if (this.levelFreeValActive) { + this.levelElm.val("99999998"); + } else { + this.levelElm.val(valueL); + } + + this.durationValueElm.val(valueDV); + this.durationUnitElm.val(valueDU); + + this.rampTimeUnitElm.val(valueRTU); + this.rampTimeValueElm.val(valueRTV); + + if ((this.durationValueElm.val() == permanentHR && this.durationUnitElm.val() == 2) || (this.isOntimeAvailable() && valueDV == 0)) { + this.chkBoxTimeLimitElm.prop("checked", false); + this.durationValueElm.prop('disabled', true); + this.durationUnitElm.prop('disabled', true); + this.trDurationElms.css("visibility", "visible"); + this.trRampTimeElms.css("visibility", "visible"); + this.trDurationElms.css("opacity", "0.2"); + if (this.showRampTimeOffElm.indexOf(this.deviceType) != -1) { + this.trRampTimeOff.css("visibility", "visible").css("opacity", "0.2"); + showRamptimeOff = true; + } + } else { + this.chkBoxTimeLimitElm.prop("checked", true); + this.durationValueElm.prop('disabled', false); + this.durationUnitElm.prop('disabled', false); + this.trDurationElms.css("visibility", "visible"); + this.trRampTimeElms.css("visibility", "visible"); + if (this.showRampTimeOffElm.indexOf(this.deviceType) != -1) { + this.trRampTimeOff.css("visibility", "visible"); + showRamptimeOff = true; + } + } + + this.chkBoxTimeLimitElm.bind("change", function(){ + if (this.checked) { + self.durationValueElm.prop('disabled', false); + self.durationUnitElm.prop('disabled', false); + self.trDurationElms.fadeTo(1000, 1); + self.trRampTimeElms.fadeTo(1000, 1); + if (self.showRampTimeOffElm.indexOf(self.deviceType) != -1) { + self.trRampTimeOff.fadeTo(1000,1); + } + } else { + self.durationValueElm.prop('disabled', true); + self.durationUnitElm.prop('disabled', true); + self.rampTimeValueElm.prop('disabled', false); //.val(0); + self.rampTimeUnitElm.prop('disabled', false); //.val(0); + self.trDurationElms.fadeTo(1000, 0.2); + self.trRampTimeElms.fadeTo(1000, 1); + + if (self.showRampTimeOffElm.indexOf(self.deviceType) != -1) { + self.trRampTimeOff.fadeTo(1000,0.2); + } + + if (self.isOntimeAvailable()) { + self.durationValueElm.val(permanentHR_0); + } else { + self.durationValueElm.val(permanentHR); + self.rampTimeOffUnitElm.val(3); + self.rampTimeOffValueElm.val(0); + } + + self.durationUnitElm.val(2); + + } + }); + + this.durationValueElm.bind("keyup", function() { + var min = minDuration, + max = (parseInt(self.durationUnitElm.val()) == 2) ? permanentHR: maxDuration; + this.value = self.checkValidity(this.value,min,max); + if (parseInt(this.value) == 31) { + self.rampTimeOffValueElm.val(min); + self.rampTimeOffUnitElm.val(3); // = 10ms + } + }); + + this.durationValueElm.bind("blur", function() { + var val = parseInt(this.value); + + if (isNaN(val)) { + this.value = (parseInt(self.durationUnitElm.val()) == 2) ? permanentHR : maxDuration; + } else { + this.value = val; + } + self.durationValueElm.keyup(); + }); + + this.durationUnitElm.bind("change", function(){ + self.durationValueElm.keyup(); + }); + + this.rampTimeValueElm.bind("keyup", function() { + var min = minDuration, + max = maxDuration; + this.value = self.checkValidity(this.value,min,max); + }); + + this.rampTimeValueElm.bind("blur", function() { + var val = parseInt(this.value); + + if (isNaN(val)) { + this.value = maxDuration; + } else { + this.value = val; + } + }); + + this.rampTimeUnitElm.bind("change", function(){ + self.rampTimeValueElm.keyup(); + }); + + /**********************/ + this.rampTimeOffValueElm.bind("keyup", function() { + var min = minDuration, + max = maxDuration; + this.value = self.checkValidity(this.value,min,max); + }); + + this.rampTimeOffValueElm.bind("blur", function() { + var val = parseInt(this.value); + + if (isNaN(val)) { + this.value = maxDuration; + } else { + this.value = (parseInt(self.durationValueElm.val()) <= 30) ? val : minDuration; + if (parseInt(self.durationValueElm.val()) >= 31) { + self.rampTimeOffUnitElm.val(3); // 10ms + } + } + }); + + this.rampTimeUnitElm.bind("change", function(){ + self.rampTimeOffValueElm.keyup(); + }); + /**********************/ + }, + + checkValidity: function(val, min, max) { + var result = val; + if (val == "") {result = "";} + + if (parseInt(val) < 0) {result = min;} + if (parseInt(val) > max) {result = max;} + return result; + }, + + getConfigString: function() { + var self = this, + result, + level, + durationUnit = (this.chkBoxTimeLimitElm.prop("checked") == false) ? 2 : this.durationUnitElm.val(), // 2 = unit hour + durationValue = (this.chkBoxTimeLimitElm.prop("checked") == false) ? 31 : this.durationValueElm.val(), + ramptimeUnit = this.rampTimeUnitElm.val(), + ramptimeValue = this.rampTimeValueElm.val(), + valColor = "", + valBehaviour = ""; + + level = (this.levelFreeValActive) ? this.levelFreeValElm.val() : this.levelElm.val(); + + if (this.colorElmVisible || this.behaviourElmVisible) { + if (this.colorElmVisible && ! this.behaviourElmVisible) { + valColor = this.selectColorElm.val(); + result = "L=" + level + ",DV=" + durationValue + ",DU=" + durationUnit + ",RTV=" + ramptimeValue + ",RTU=" + ramptimeUnit + ",C=" + valColor; + } + + if (! this.colorElmVisible && this.behaviourElmVisible) { + valBehaviour = this.selectBehaviourElm.val(); + result = "L=" + level + ",DV=" + durationValue + ",DU=" + durationUnit + ",RTV=" + ramptimeValue + ",RTU=" + ramptimeUnit + ",CB=" +valBehaviour; + } + + if (this.colorElmVisible && this.behaviourElmVisible) { + valColor = this.selectColorElm.val(); + valBehaviour = this.selectBehaviourElm.val(); + result = "L=" + level + ",DV=" + durationValue + ",DU=" + durationUnit + ",RTV=" + ramptimeValue + ",RTU=" + ramptimeUnit + ",C=" + valColor + ",CB=" +valBehaviour; + } + + } else { + if (this.isOntimeAvailable()) { + if (this.chkBoxTimeLimitElm.prop("checked") == false) { + var _rampTimeValue = parseInt(this._getRampTimeVal(ramptimeValue, ramptimeUnit)); + + if (this.isServoController) { + result = "L=" + level + ",RT=" + _rampTimeValue; // ON_TIME is for the Hmip-WSC not allowed (see SPHM-942) + } else { + if (_rampTimeValue > 0) { + result = "L=" + level + ",OT=" + this.maxOnTime + ",RT=" + _rampTimeValue; // ON_TIME = permanently ON + } else { + result = "L=" + level + ",OT=0,RT=0"; + } + } + } else { + if (this.isServoController) { + var _rampTimeValue = parseInt(this._getRampTimeVal(ramptimeValue, ramptimeUnit)); + result = "L=" + level + ",RT=" + _rampTimeValue; // ON_TIME is for the Hmip-WSC not allowed (see SPHM-942) + } else { + if (durationValue == 0) { + result = "L=" + level + ",OT=" + this._getOnTimeVal(durationValue, durationUnit) + ",RT=0"; + } else { + result = "L=" + level + ",OT=" + this._getOnTimeVal(durationValue, durationUnit) + ",RT=" + this._getRampTimeVal(ramptimeValue, ramptimeUnit); + } + } + } + } else { + result = "L=" + level + ",DV=" + durationValue + ",DU=" + durationUnit + ",RTV=" + ramptimeValue + ",RTU=" + ramptimeUnit; + } + } + + jQuery.each(this.showRampTimeOffElm, function(index, val) { + if (self.deviceType == val) { + return false; // leave each loop + } + }); + + if (showRamptimeOff) { + result += ",RTTOV=" + this.rampTimeOffValueElm.val() + ",RTTOU=" + this.rampTimeOffUnitElm.val(); + } + return result; + }, + + close: function(result) + { + Layer.remove(this.m_layer); + if (this.m_callback) { this.m_callback(result); } + if (showRamptimeOff) {window.setTimeout(function() {delete showRamptimeOff;},100);} + }, + + yes: function() + { + this.close(YesNoDialog.RESULT_YES); + }, + + no: function() + { + this.close(YesNoDialog.RESULT_NO); + }, + + btnTextYes: function(btnTxt) { + jQuery(".YesNoDialog_yesButton").text(btnTxt); + }, + + btnYesHide: function() { + jQuery("#btnYes").addClass("hidden"); + }, + + btnYesShow: function() { + jQuery("#btnYes").removeClass("hidden"); + }, + + btnTextNo: function(btnTxt) { + jQuery(".YesNoDialog_noButton").text(btnTxt); + }, + + btnNoHide: function() { + jQuery("#btnNo").addClass("hidden"); + }, + + btnNoShow: function() { + jQuery("#btnNo").removeClass("hidden"); + }, + + setHeight: function() { + var heightContentWrapper = jQuery(".YesNoDialogContentWrapper").height(), + yesNoElm = jQuery(".YesNoDialog"), + footerElm = jQuery(".YesNoDialogFooter"); + + yesNoElm.css("height", heightContentWrapper + 78); + footerElm.css("top", heightContentWrapper + 26); + yesNoElm.css("top", (window.innerHeight / 2) - (yesNoElm.height() / 2)); + }, + + resetHeight: function() { + this.setHeight(); + }, + + setWidth: function(dlgWidth) { + var yesNoDialogElm = jQuery(".YesNoDialog"), + yesNoDialogContentWrapperElm = jQuery(".YesNoDialogContentWrapper"), + yesNoDialogFooterElm = jQuery(".YesNoDialogFooter"), + yesNoDialogTitleElm = jQuery(".YesNoDialogTitle"), + yesNoDialogYesButton = jQuery(".YesNoDialog_yesButton"); + + var defaultWith = 600, + offsetWidth = 4, + offsetPosYesButton = 109, + offsetDialogHeight = 78, + offsetDialogFooterHeight = 26; + + var width = dlgWidth - offsetWidth, + yesButtonPos = dlgWidth - offsetPosYesButton, + position = yesNoDialogElm.position(); + + // dlgWidth = (defaultWith < dlgWidth) ? defaultWith : dlgWidth; + + yesNoDialogElm.width(dlgWidth).css({left: position.left + ((defaultWith - dlgWidth) / 2)}); + yesNoDialogTitleElm.width(width); + yesNoDialogContentWrapperElm.width(width); + yesNoDialogFooterElm.width(width); + yesNoDialogYesButton.css("left", yesButtonPos); + + //Dialoghöhe an Content anpassen. + yesNoDialogElm.css("height", yesNoDialogContentWrapperElm.height() + offsetDialogHeight); + yesNoDialogFooterElm.css("top", yesNoDialogContentWrapperElm.height() + offsetDialogFooterHeight); + } + +}); +SwitchCombinedParamDialog = Class.create({ + + initialize: function(title, content, deviceType, chnAddress, value, callback, contentType) + { + var _this_ = this; + + this.m_contentType = contentType; + this.m_callback = callback; + this.m_layer = document.createElement("div"); + this.m_layer.className = "YesNoDialogLayer"; + + this.RESULT_NO = 0; + this.RESULT_YES = 1; + + this.deviceType = deviceType; + this.chnAddress = chnAddress; + this.initValue = value; + + this.windowDrive = "HmIP-MOD-WD-VK"; + this.dali = "HmIP-DRG-DALI"; + + this.arNoOntimeAvailable = []; // here we can add devices with Value and Unit instead of Ontime in seconds + + var dialog = document.createElement("div"); + dialog.className = "YesNoDialog"; + + var titleElement = document.createElement("div"); + titleElement.className = "YesNoDialogTitle"; + //titleElement.appendChild(document.createTextNode(title)); + titleElement.appendChild(document.createTextNode(deviceType + " - " + chnAddress)); + titleElement.onmousedown = function(event) { new Drag(this.parentNode, event); }; + dialog.appendChild(titleElement); + + var contentWrapper = document.createElement("div"); + contentWrapper.className = "YesNoDialogContentWrapper"; + + var contentElement = document.createElement("div"); + contentElement.className = "YesNoDialogContent"; + + if (this.m_contentType == "html") { + contentElement.innerHTML = content; + } else { + contentElement.appendChild(document.createTextNode(content)); + } + + contentWrapper.appendChild(contentElement); + + dialog.appendChild(contentWrapper); + + var footer = document.createElement("div"); + footer.className= "YesNoDialogFooter"; + + var yesButton = document.createElement("div"); + yesButton.className = "YesNoDialog_yesButton borderRadius5px colorGradient50px"; + yesButton.appendChild(document.createTextNode(translateKey('dialogYes'))); + yesButton.onclick = function() { _this_.yes(); }; + yesButton.id="btnYes"; + footer.appendChild(yesButton); + + var noButton = document.createElement("div"); + noButton.className = "YesNoDialog_noButton borderRadius5px colorGradient50px"; + noButton.appendChild(document.createTextNode(translateKey('dialogNo'))); + noButton.onclick = function() { _this_.no(); }; + noButton.id = "btnNo"; + footer.appendChild(noButton); + + dialog.appendChild(footer); + + this.m_layer.appendChild(dialog); + Layer.add(this.m_layer); + + translatePage(".YesNoDialog"); + + this.setHeight(); + this.setDialogElements(); + this.initDialog(); + }, + + _deviceIsWindowDrive: function() { + return (this.deviceType == this.windowDrive) ? true : false; + }, + + _deviceIsDali: function() { + return (this.deviceType == this.dali) ? true : false; + }, + + _getOnTimeVal: function(val, unit) { + var result; + + if (parseInt(val) >= 31 && parseInt(unit) == 2) { + return 0; + } + + if (unit == 0) { + result = val; + } else if (unit == 1) { + result = val * 60; + } else if (unit == 2) { + result = val * 3600; + } + return parseInt(result); + }, + + _getUnitInDU4OnTime: function(time) { + var result = 0, + hr = time / 3600, + min= time / 60; + + if (hr == parseInt(hr)) { + result = 2; + } else if (min == parseInt(min)) { + result = 1; + } + return result; + }, + + isOntimeAvailable: function() { + return (this.arNoOntimeAvailable.indexOf(this.deviceType) == -1) ? true : false; + }, + + setDialogElements: function() { + this.trDurationElms = jQuery("[name='trDuration']"); + this.stateElm = jQuery("#combinedParam_State"); + this.chkBoxTimeLimitElm = jQuery("#chkBoxTimeLimit"); + this.durationValueElm = jQuery("#combinedParam_DurationValue"); + this.durationUnitElm = jQuery("#combinedParam_DurationUnit"); + }, + + getConfigString: function() { + var result, + state = this.stateElm.val(), + durationUnit = (this.chkBoxTimeLimitElm.prop("checked") == false) ? 2 : this.durationUnitElm.val(), // 2 = unit hour + durationValue = (this.chkBoxTimeLimitElm.prop("checked") == false) ? 31 : this.durationValueElm.val(); + + if (this.isOntimeAvailable()) { + if ((this.chkBoxTimeLimitElm.prop("checked") == false) || (durationValue == 0) || (durationValue == 31 && durationUnit == 2)) { + if (! this._deviceIsWindowDrive()) { + if (! this._deviceIsDali()) { + result = "S=" + state; + } else { + // The DALI STATE is LEVEL + state = (state == "true") ? 100 : 0; + result = "L=" + state; + } + } else { + result = "VL=" + state; + } + + } else { + if (! this._deviceIsWindowDrive()) { + if (! this._deviceIsDali()) { + result = "S=" + state + ",OT=" + this._getOnTimeVal(durationValue, durationUnit); + } else { + // The DALI STATE is LEVEL + state = (state == "true") ? 100 : 0; + result = "L=" + state + ",OT=" + this._getOnTimeVal(durationValue, durationUnit); + } + + } else { + result = "VL=" + state + ",OT=" + this._getOnTimeVal(durationValue, durationUnit); + } + } + } else { + result = "S=" + state + ",DV=" + durationValue + ",DU=" + durationUnit; + } + return result; + }, + + checkValidity: function(val, min, max) { + var result = val; + if (val == "") {result = "";} + + if (parseInt(val) < 0) {result = min;} + if (parseInt(val) > max) {result = max;} + return result; + }, + + initDialog: function() { + + var self = this; + + var arElmValues, valueS, valueDV, valueDVtmp, valueDU, permanentHR, permanentHR_0, minDuration, maxDuration; + + if (this.isOntimeAvailable()) { + arElmValues = this.initValue.split(","); + + if (arElmValues.length > 1) { + valueS = arElmValues[0].split("=")[1]; + valueDVtmp = arElmValues[1].split("=")[1]; + valueDU = this._getUnitInDU4OnTime(valueDVtmp); + + if (valueDU == 2) { + valueDV = parseInt(valueDVtmp / 3600); + } else if (valueDU == 1) { + valueDV = parseInt(valueDVtmp / 60); + } else { + valueDV = valueDVtmp; + } + } else { + valueS = arElmValues[0].split("=")[1]; + valueDV = 0; + valueDU = 2; + } + permanentHR = 31; + permanentHR_0 = 0; + minDuration = 0; + maxDuration = 16343; + } else { + arElmValues = this.initValue.split(","); + valueS = arElmValues[0].split("=")[1]; + valueDV = arElmValues[1].split("=")[1]; + valueDU = arElmValues[2].split("=")[1]; + permanentHR = 31; + minDuration = 0; + maxDuration = 16343; + } + + if (this._deviceIsDali()) { + valueS = (valueS == "100") ? "true" : "false"; + } + + this.stateElm.val(valueS); + this.durationValueElm.val(valueDV); + this.durationUnitElm.val(valueDU); + + if ((this.durationValueElm.val() == permanentHR && this.durationUnitElm.val() == 2) || (this.isOntimeAvailable() && valueDV == 0)) { + this.chkBoxTimeLimitElm.prop("checked", false); + this.trDurationElms.css("visibility", "visible"); + this.trDurationElms.css("opacity", "0.2"); + } else { + this.chkBoxTimeLimitElm.prop("checked", true); + this.trDurationElms.css("visibility", "visible"); + } + + this.chkBoxTimeLimitElm.bind("change", function(){ + if (this.checked) { + self.durationValueElm.prop('disabled', false); + self.durationUnitElm.prop('disabled', false); + self.trDurationElms.fadeTo(1000, 1); + } else { + self.durationValueElm.prop('disabled', true); + self.durationUnitElm.prop('disabled', true); + self.trDurationElms.fadeTo(1000, 0.2); + + if (self.isOntimeAvailable()) { + self.durationValueElm.val(permanentHR_0); + } else { + self.durationValueElm.val(permanentHR); + } + + self.durationUnitElm.val(2); + } + }); + + this.durationValueElm.bind("keyup", function() { + var min = 0, + max = (parseInt(self.durationUnitElm.val()) == 2) ? permanentHR: maxDuration; + this.value = self.checkValidity(this.value,min,max); + }); + + this.durationValueElm.bind("blur", function() { + var val = parseInt(this.value); + + if (isNaN(val)) { + this.value = (parseInt(self.durationUnitElm.val()) == 2) ? permanentHR : maxDuration; + } else { + this.value = val; + } + self.durationValueElm.keyup(); + }); + + this.durationUnitElm.bind("change", function(){ + self.durationValueElm.keyup(); + }); + + }, + + close: function(result) + { + Layer.remove(this.m_layer); + if (this.m_callback) { this.m_callback(result); } + }, + + yes: function() + { + this.close(YesNoDialog.RESULT_YES); + }, + + no: function() + { + this.close(YesNoDialog.RESULT_NO); + }, + + btnTextYes: function(btnTxt) { + jQuery(".YesNoDialog_yesButton").text(btnTxt); + }, + + btnYesHide: function() { + jQuery("#btnYes").addClass("hidden"); + }, + + btnYesShow: function() { + jQuery("#btnYes").removeClass("hidden"); + }, + + btnTextNo: function(btnTxt) { + jQuery(".YesNoDialog_noButton").text(btnTxt); + }, + + btnNoHide: function() { + jQuery("#btnNo").addClass("hidden"); + }, + + btnNoShow: function() { + jQuery("#btnNo").removeClass("hidden"); + }, + + setHeight: function() { + var heightContentWrapper = jQuery(".YesNoDialogContentWrapper").height(), + yesNoElm = jQuery(".YesNoDialog"), + footerElm = jQuery(".YesNoDialogFooter"); + + yesNoElm.css("height", heightContentWrapper + 78); + footerElm.css("top", heightContentWrapper + 26); + yesNoElm.css("top", (window.innerHeight / 2) - (yesNoElm.height() / 2)); + }, + + resetHeight: function() { + this.setHeight(); + }, + + setWidth: function(dlgWidth) { + var defaultWith = 600, + offsetWidth = 4, + offsetPosYesButton = 109, + offsetDialogHeight = 78, + offsetDialogFooterHeight = 26; + + var width = dlgWidth - offsetWidth, + yesButtonPos = dlgWidth - offsetPosYesButton, + position = jQuery(".YesNoDialog").position(); + + // dlgWidth = (defaultWith < dlgWidth) ? defaultWith : dlgWidth; + + jQuery(".YesNoDialog").width(dlgWidth).css({left: position.left + ((defaultWith - dlgWidth) / 2)}); + jQuery(".YesNoDialogTitle").width(width); + jQuery(".YesNoDialogContentWrapper").width(width); + jQuery(".YesNoDialogFooter").width(width); + jQuery(".YesNoDialog_yesButton").css("left", yesButtonPos); + + //Dialoghöhe an Content anpassen. + jQuery(".YesNoDialog").css("height", jQuery(".YesNoDialogContentWrapper").height() + offsetDialogHeight); + jQuery(".YesNoDialogFooter").css("top", jQuery(".YesNoDialogContentWrapper").height() + offsetDialogFooterHeight); + } + +}); +WiredDisplaySystemKey = Class.create({ + + initialize: function(title, content, deviceType, chnAddress, value, callback, contentType) + { + + var _this_ = this; + + this.iface = "HmIP-RF"; + + this.m_contentType = contentType; + this.m_callback = callback; + this.m_layer = document.createElement("div"); + this.m_layer.className = "YesNoDialogLayer"; + + this.RESULT_NO = 0; + this.RESULT_YES = 1; + + this.deviceType = deviceType; + this.chnAddress = chnAddress; + this.initValue = value; + + this.hasDisplay = false; + this.checkIfDisplay(); + + var dialog = document.createElement("div"); + dialog.className = "YesNoDialog"; + + var titleElement = document.createElement("div"); + titleElement.className = "YesNoDialogTitle"; + //titleElement.appendChild(document.createTextNode(title)); + titleElement.appendChild(document.createTextNode(deviceType + " - " + chnAddress)); + titleElement.onmousedown = function(event) { new Drag(this.parentNode, event); }; + dialog.appendChild(titleElement); + + var contentWrapper = document.createElement("div"); + contentWrapper.className = "YesNoDialogContentWrapper"; + + var contentElement = document.createElement("div"); + contentElement.className = "YesNoDialogContent"; + + if (this.m_contentType == "html") { + contentElement.innerHTML = content; + } else { + contentElement.appendChild(document.createTextNode(content)); + } + + contentWrapper.appendChild(contentElement); + + dialog.appendChild(contentWrapper); + + var footer = document.createElement("div"); + footer.className= "YesNoDialogFooter"; + + var yesButton = document.createElement("div"); + yesButton.className = "YesNoDialog_yesButton borderRadius5px colorGradient50px"; + yesButton.appendChild(document.createTextNode(translateKey('dialogYes'))); + yesButton.onclick = function() { _this_.yes(); }; + yesButton.id="btnYes"; + footer.appendChild(yesButton); + + var noButton = document.createElement("div"); + noButton.className = "YesNoDialog_noButton borderRadius5px colorGradient50px"; + noButton.appendChild(document.createTextNode(translateKey('dialogNo'))); + noButton.onclick = function() { _this_.no(); }; + noButton.id = "btnNo"; + footer.appendChild(noButton); + + dialog.appendChild(footer); + + this.m_layer.appendChild(dialog); + Layer.add(this.m_layer); + + translatePage(".YesNoDialog"); + + this.setHeight(); + this.fetchDialogElements(); + this.initDialog(); + }, + + fetchDialogElements: function() { + this.displayElems = jQuery("[name='display']"); + this.displayChkBox = jQuery("#display"); + this.sysKeyChkBox = jQuery("#sysKey"); + this.durationSelect = jQuery("#duration"); + }, + + getConfigString: function(type) { + /* + See SPHM-769 + IDENTIFICATION_MODE_LCD_BACKLIGHT -> IMLB + IDENTIFICATION_MODE_KEY_VISUAL -> IMKV + IDENTIFY_TARGET_LEVEL -> IMTL --> can only be 0 (Off) or > 0 (On) + IDENTIFY_DURATION -> IMDU + */ + + var result, + onDisplay = this.displayChkBox.prop("checked"), + onSysKey = this.sysKeyChkBox.prop("checked"), + brightness = (onDisplay || onSysKey) ? 1 : 0, + durationSelect = this.durationSelect.val(); + if (this.hasDisplay) { + result = "IMLB=" + onDisplay + ",IMKV=" + onSysKey + ",IMTL=" + brightness + ",IMDU=" + durationSelect; + } else { + result = "IMKV=" + onSysKey + ",IMTL=" + brightness + ",IMDU=" + durationSelect; + } + return result; + }, + + checkIfDisplay: function() { + var self = this; + var devDescr = homematic("Interface.getParamsetDescription", {"interface": this.iface, "address": this.chnAddress, "paramsetKey": "VALUES"}); + jQuery.each(devDescr, function(index, val) { + if (val.NAME == "IDENTIFICATION_MODE_LCD_BACKLIGHT") { + self.hasDisplay = true; + return; // leave each loop + } + }); + }, + + initDialog: function() { + var self = this, + arElmValues = this.initValue.split(","), + valBacklight, valKeyVisual, valTargetLevel, valDuration; + + if (this.hasDisplay) { + this.displayElems.show(); + + valBacklight = (arElmValues[0].split("=")[1] == "true") ? true : false; + valKeyVisual = (arElmValues[1].split("=")[1] == "true") ? true : false; + valDuration = arElmValues[3].split("=")[1]; + + this.displayChkBox.prop("checked", valBacklight); + this.sysKeyChkBox.prop("checked", valKeyVisual); + this.durationSelect.val(valDuration); + } else { + valKeyVisual = (arElmValues[0].split("=")[1] == "true") ? true : false; + valDuration = arElmValues[arElmValues.length - 1].split("=")[1]; // the last entry of the string should be IMDU = IDENTIFY_DURATION + + this.sysKeyChkBox.prop("checked", valKeyVisual); + this.durationSelect.val(valDuration); + } + }, + + close: function(result) + { + Layer.remove(this.m_layer); + if (this.m_callback) { this.m_callback(result); } + }, + + yes: function() + { + this.close(YesNoDialog.RESULT_YES); + }, + + no: function() + { + this.close(YesNoDialog.RESULT_NO); + }, + + btnTextYes: function(btnTxt) { + jQuery(".YesNoDialog_yesButton").text(btnTxt); + }, + + btnYesHide: function() { + jQuery("#btnYes").addClass("hidden"); + }, + + btnYesShow: function() { + jQuery("#btnYes").removeClass("hidden"); + }, + + btnTextNo: function(btnTxt) { + jQuery(".YesNoDialog_noButton").text(btnTxt); + }, + + btnNoHide: function() { + jQuery("#btnNo").addClass("hidden"); + }, + + btnNoShow: function() { + jQuery("#btnNo").removeClass("hidden"); + }, + + setHeight: function() { + var heightContentWrapper = jQuery(".YesNoDialogContentWrapper").height(), + yesNoElm = jQuery(".YesNoDialog"), + footerElm = jQuery(".YesNoDialogFooter"); + + yesNoElm.css("height", heightContentWrapper + 78); + footerElm.css("top", heightContentWrapper + 26); + yesNoElm.css("top", (window.innerHeight / 2) - (yesNoElm.height() / 2)); + }, + + resetHeight: function() { + this.setHeight(); + }, + + setWidth: function(dlgWidth) { + var defaultWith = 600, + offsetWidth = 4, + offsetPosYesButton = 109, + offsetDialogHeight = 78, + offsetDialogFooterHeight = 26; + + var width = dlgWidth - offsetWidth, + yesButtonPos = dlgWidth - offsetPosYesButton, + position = jQuery(".YesNoDialog").position(); + + // dlgWidth = (defaultWith < dlgWidth) ? defaultWith : dlgWidth; + + jQuery(".YesNoDialog").width(dlgWidth).css({left: position.left + ((defaultWith - dlgWidth) / 2)}); + jQuery(".YesNoDialogTitle").width(width); + jQuery(".YesNoDialogContentWrapper").width(width); + jQuery(".YesNoDialogFooter").width(width); + jQuery(".YesNoDialog_yesButton").css("left", yesButtonPos); + + //Dialoghöhe an Content anpassen. + jQuery(".YesNoDialog").css("height", jQuery(".YesNoDialogContentWrapper").height() + offsetDialogHeight); + jQuery(".YesNoDialogFooter").css("top", jQuery(".YesNoDialogContentWrapper").height() + offsetDialogFooterHeight); + } + +}); +var + getWGDImagePath = function() { + return "/ise/img/icons_hmipw_wgd/"; + }, + getWGDDefaultImage = function() { + return "_0000_fallback.png"; + }, + getWGDImageCollection = function() { + var image = { + 0 : ["_0000_fallback.png",0], + 1 : ["_000_000_lightbulb0.png",1], + 2 : ["_001_000_tablelamp0.png",12], + 3 : ["_002_000_spotoff.png",23], + 4 : ["_010_000_socket_off.png",25], + 5 : ["_020_000_shutter0.png",27] + /* Not desired according to discussion with PM and Developer. + 5 : ["_050_20_windows_closed.png",43], + 6 : ["_050_64_window_closed.png",52] + */ + }; + return image; +}; + + +WGDSelectIconDialog = Class.create(YesNoDialog,{ + + run: function () { + var self = this; + this.selectedIconNo = 0; + this.selectedIcon = ""; + this.activeIcon = 0; + this.imagePath = getWGDImagePath(); + + jQuery(".YesNoDialogContentWrapper").css("background-color", "grey"); + + window.setTimeout(function() { + self._initIconPreview(); + }, 50); + }, + + _initIconPreview: function() { + var previewElm = jQuery("#anchor_"+ this.chn); + + previewElm.html(this._getHTML()); + + this.resetHeight(); + }, + + _getHTML: function() { + var self = this, + result ="", + radioBoxSelected = "", + rows = 8, rowCounter=0; + + setSelectedIconNo = function(iconNo) { + self.selectedIconNo = iconNo; + + }; + + setSelectedIcon = function(icon) { + self.selectedIcon = icon; + }; + + //console.log(image[1][0]); // prints the name of the first image + result += ""; + result += ""; + jQuery.each(getWGDImageCollection(), function(index, val) { + if ((radioBoxSelected == "") && (self.activeIcon == val[1])) { + radioBoxSelected = "checked"; + setSelectedIcon(self.imagePath + val[0]); + setSelectedIconNo(val[1]); + } else { + radioBoxSelected = ""; + } + if (index / rows == Math.floor(index / rows)) { + result += ""; + } + rowCounter++; + result += ""; + + if (rowCounter == rows * 2) { + result += ""; + rowCounter = 0; + } + }); + result += ""; + result += "
"; + result += ""; + result += ""; + result += "
"; + result += ""; + result += ""; + result += ""; + result += "
"; + return result; + }, + + getSelectedIconNo: function() { + return this.selectedIconNo; + }, + + getSelectedIcon: function() { + return this.selectedIcon; + } + +}); + +// TODO Check if this class is still necessary! +UniveralLightReceiverDialog = Class.create(YesNoDialog,{ + + run: function () { + this.durationValElm = jQuery("#durationVal"); + this.durationUnitElm = jQuery("#durationUnit"); + this.rampTimeValElm = jQuery("#rampTimeVal"); + this.rampTimeUnitElm = jQuery("#rampTimeUnit"); + this.rampTimeOffValElm = jQuery("#rampTimeOffVal"); + this.rampTimeOffUnitElm = jQuery("#rampTimeOffUnit"); + }, + + initColorPicker: function(chnId, oInitColor, dlg) { + //this.initEventHandler(dlg); + var hsvColorString = "hsv(" + oInitColor.hue + "," + oInitColor.saturation + "%," + oInitColor.level + "%)", + colorPickerElm = jQuery("#colorPicker"); + colorPickerElm.val(hsvColorString); + + jQuery(colorPickerElm).spectrum({ + preferredFormat: "hsv", + showInput: false, + color: hsvColorString, + //showPalette: true, + //disabled: pickerState, + //palette: palette, + cancelText: translateKey("btnCancel"), + chooseText: translateKey("btnOk"), + show: function() {dlg.btnYesHide();}, + hide: function(color) { + selectedRGBColor = tinycolor(color).toRgbString(); + selectedColor = tinycolor(color).toHsv(); + dlg.btnYesShow(); + } + }); + } +});hmipRGBWControllerDialog = Class.create({ + initialize: function(title, content, deviceType, chnAddress, value, callback, contentType) + { + showRamptimeOff = false; // This we need among other things for certain COMBINED_PARAMETER help dialogs. + var _this_ = this; + + this.m_contentType = contentType; + this.m_callback = callback; + this.m_layer = document.createElement("div"); + this.m_layer.className = "YesNoDialogLayer"; + + this.RESULT_NO = 0; + this.RESULT_YES = 1; + + this.iface = "HmIP-RF"; + + this.rgbw = "HmIP-RGBW"; + this.drgDali = "HmIP-DRG-DALI"; + this.lss = "HmIP-LSC"; + + this.deviceType = deviceType; + this.chnAddress = chnAddress; + this.initValue = value; + + this.oChannel = DeviceList.getChannelByAddress(this.chnAddress); + + this.maxOnTime = 111600; + + this.valHCL = 10200; + this.valDim2Warm = 10150; + this.ColorTempDefaultMin = 2000; + this.ColorTempDefaultMax = 6500; + + + this.arNoOntimeAvailable = []; + this.showRampTimeOffElm = [this.rgbw, this.drgDali, this.lss]; + + this.chnDescription = homematic("Interface.getParamset", {'interface': this.iface, 'address': this.chnAddress, 'paramsetKey': 'MASTER'}); + this.maxCap = (this.deviceType != this.lss) ? parseInt(this.chnDescription.UNIVERSAL_LIGHT_MAX_CAPABILITIES) : 3; + + + + this.effectModePrg = "unknown"; + + var dialog = document.createElement("div"); + dialog.className = "YesNoDialog"; + + var titleElement = document.createElement("div"); + titleElement.className = "YesNoDialogTitle"; + //titleElement.appendChild(document.createTextNode(title + " " + deviceType + " - " + chnAddress)); + titleElement.appendChild(document.createTextNode(deviceType + " - " + chnAddress)); + titleElement.onmousedown = function(event) { new Drag(this.parentNode, event); }; + dialog.appendChild(titleElement); + + var contentWrapper = document.createElement("div"); + contentWrapper.className = "YesNoDialogContentWrapper"; + + var contentElement = document.createElement("div"); + contentElement.className = "YesNoDialogContent"; + + if (this.m_contentType == "html") { + contentElement.innerHTML = content; + } else { + contentElement.appendChild(document.createTextNode(content)); + } + + contentWrapper.appendChild(contentElement); + + dialog.appendChild(contentWrapper); + + var footer = document.createElement("div"); + footer.className= "YesNoDialogFooter"; + + var yesButton = document.createElement("div"); + yesButton.className = "YesNoDialog_yesButton borderRadius5px colorGradient50px"; + yesButton.appendChild(document.createTextNode(translateKey('dialogYes'))); + yesButton.onclick = function() { _this_.yes(); }; + yesButton.id="btnYes"; + footer.appendChild(yesButton); + + var noButton = document.createElement("div"); + noButton.className = "YesNoDialog_noButton borderRadius5px colorGradient50px"; + noButton.appendChild(document.createTextNode(translateKey('dialogNo'))); + noButton.onclick = function() { _this_.no(); }; + noButton.id = "btnNo"; + footer.appendChild(noButton); + + dialog.appendChild(footer); + + this.m_layer.appendChild(dialog); + Layer.add(this.m_layer); + + translatePage(".YesNoDialog"); + + this.setHeight(); + + this.setDialogElements(); + this.initDialog(); + + }, + + isOntimeAvailable: function() { + return (this.arNoOntimeAvailable.indexOf(this.deviceType) == -1) ? true : false; + }, + + setDialogElements: function() { + var self = this; + this.activeDialog = "color"; // default = color - valid values: color, colorTemp, effect + this.btnColorDialog = jQuery("#dialogColor"); + this.btnColorTempDialog = jQuery("#dialogColorTemp"); + this.btnEffectDialog = jQuery("#dialogEffect"); + + this.anchorColorPicker = jQuery("#anchorColorPicker"); + this.trColor = jQuery(".j_trColor"); + this.trDurationElms = jQuery("[name='trDuration']"); + this.trRampTimeElms = jQuery("[name='trRampTime']"); + this.trRampTimeOff = jQuery("#trRampTimeOff"); + this.levelElm = jQuery("#combinedParam_Level"); + + this.levelFreeValElm = jQuery("#prgDimmerEnterFreeLevel"); + this.divLevelFreeValElm = jQuery("#divLevelEnterFreeValue"); + this.levelFreeValActive = false; + + this.lblBrightnessLevelElm = jQuery("#lblBrightnessLevel"); + this.lblRampTimeElm = jQuery("#lblRampTime"); + this.chkBoxTimeLimitElm = jQuery("#chkBoxTimeLimit"); + this.durationValueElm = jQuery("#combinedParam_DurationValue"); + this.durationUnitElm = jQuery("#combinedParam_DurationUnit"); + this.rampTimeUnitElm = jQuery("#combinedParam_RampTimeUnit"); + this.rampTimeValueElm = jQuery("#combinedParam_RampTimeValue"); + this.rampTimeOffUnitElm = jQuery("#combinedParam_RampTimeOffUnit"); + this.rampTimeOffValueElm = jQuery("#combinedParam_RampTimeOffValue"); + + this.onTimePanel = jQuery(".j_trOnTimePanel"); + + + this.colorPreviewElm = jQuery("#bckGndElm"); + + this.colorPicker; + this.colorPickerInit = {}; // level, hue, saturation + + this.hueElm = jQuery("#hueElm"); + this.satElm = jQuery("#satElm"); + + this.HUE; + this.SATURATION; + + this.lastValHueElm = jQuery("#lastValHue"); + this.lastValSatElm = jQuery("#lastValSat"); + + // TW + this.trTWSlider = jQuery("[name='trTWSlider']"); + this.sliderElm = jQuery("#twSlider"); + this.sliderInfoElm = jQuery("#tcInfoField"); + this.btnHCLElm = jQuery("#btnHCL"); + this.btnDim2WarmElm = jQuery("#btnDim2Warm"); + this.colorTemperature = 0; + + // Effects + this.trEffects = jQuery("[name='trEffects']"); + this.effectSelBox = jQuery("#effectSelBox"); + this.effectModeChkBox = jQuery("#effectModePrg"); + }, + + _getOnTimeVal: function(val, unit) { + var result; + + if (parseInt(val) >= 31 && parseInt(unit) == 2) { + return 0; + } + + if (unit == 0) { + result = val; + } else if (unit == 1) { + result = val * 60; + } else if (unit == 2) { + result = val * 3600; + } + return parseInt(result); + }, + + _getRampTimeVal: function(val, unit) { + var result; + if (unit == 0) { + result = val; + } else if (unit == 1) { + result = parseInt(val * 60); + } else if (unit == 3) { + result = parseFloat(val / 100); + } + return result; + }, + + _getUnitInDU4OnTime: function(time) { + var result = 0, + hr = time / 3600, + min= time / 60; + + if (hr == parseInt(hr)) { + result = 2; + } else if (min == parseInt(min)) { + result = 1; + } + return result; + }, + + _getUnitInDU4RampTime: function(time) { + var t = parseFloat(time), + result = 0, + min = t / 60; + + if (parseInt(time) == 0) { + return 0; + } + + if (min == parseInt(min)) { + result = 1; + } else if ((Number(t) === t) && (t % 1 !== 0)) { + // time in float + result = 3; + } + return result; + }, + + hideOnTimeElems: function() { + jQuery("[name='trRampTime']").first().nextAll().hide(); + this.setHeight(); + }, + + getActiveDialog: function() {return this.activeDialog;}, + + initSubDialogs: function() { + var self = this; + + this.btnColorDialog.click(function() { + JControlBtn.on(jQuery(this)); + JControlBtn.off(jQuery(self.btnColorTempDialog)); + JControlBtn.off(jQuery(self.btnEffectDialog)); + self.trTWSlider.hide(); + self.trEffects.hide(); + self.trRampTimeElms.show(); + self.trColor.show(); + self.onTimePanel.show(); + self.resetHeight(); + self.activeDialog = "color"; + }); + + if ((this.deviceType == this.drgDali) || (this.deviceType == this.rgbw) || (this.deviceType == this.lss)) { + this.btnColorTempDialog.click(function () { + JControlBtn.on(jQuery(this)); + JControlBtn.off(jQuery(self.btnColorDialog)); + JControlBtn.off(jQuery(self.btnEffectDialog)); + self.trColor.hide(); + self.trEffects.hide(); + self.trRampTimeElms.show(); + self.trTWSlider.show(); + self.onTimePanel.show(); + self.resetHeight(); + self.activeDialog = "colorTemp"; + }); + } + + if (this.deviceType == this.drgDali) { + switch (this.maxCap) { + case 2: + this.btnColorDialog.hide(); + this.btnColorTempDialog.click(); + } + } + + if ((this.deviceType == this.rgbw)) { + switch (this.maxCap) { + case 2: + this.btnColorDialog.hide(); + this.btnColorTempDialog.click(); + break; + case 3: + this.btnColorTempDialog.hide(); + this.btnColorDialog.click(); + } + } + + this.btnEffectDialog.click(function() { + JControlBtn.on(jQuery(this)); + JControlBtn.off(jQuery(self.btnColorDialog)); + JControlBtn.off(jQuery(self.btnColorTempDialog)); + self.trRampTimeElms.hide(); + self.trColor.hide(); + self.trTWSlider.hide(); + self.onTimePanel.hide(); + self.trEffects.show(); + self.resetHeight(); + self.activeDialog = "effect"; + }); + }, + + setEffectNames: function() { + var oDevice = DeviceList.getDeviceByAddress(this.chnAddress.split(":")[0]), + effectName, effectNo, + arEffectValue = [0,1,3,5,7,9,11,13,15,17,19]; + + this.effectSelBox.empty().append(""); + for (effectNo = 1; effectNo <= 10; effectNo++) { + effectName = homematic("Interface.getMetadata", {"objectId": oDevice.id, "dataId": "effectName_" + effectNo}); + if ((effectName == "") || (effectName == "null")) {effectName = translateKey("lblEffect") + " " + effectNo;} + this.effectSelBox.append(""); + } + }, + + + setULReffectModePrg: function() { + this.effectModePrg = (jQuery(this.effectModeChkBox).is(":checked")) ? true : false; + homematic("Interface.setMetadata", {"objectId": this.oChannel.id, "dataId": "effectModePrg", "value": this.effectModePrg}); + }, + + + showHideLevelFreeValue: function() { + if (this.levelElm.val() == "99999998") { + this.divLevelFreeValElm.show(); + this.levelFreeValActive = true; + this.setHeight(); + } else { + this.divLevelFreeValElm.hide(); + this.levelFreeValActive = false; + this.setHeight(); + } + + }, + + isLevelValid: function(elm) { + var val = parseInt(elm.value); + if ((isNaN(val) || val < 0)) {val = 0;} else if (val > 100) {val = 100;} + elm.value = val; + }, + + initDialog: function() { + var self = this; + + this.levelElm.change(function() {self.showHideLevelFreeValue();}); + this.levelFreeValElm.blur(function() {self.isLevelValid(this);}); + + var arElmValues, valueL, iValueL, valueDV, valueDVtmp, valueDU, valueRTV, valueRTVtmp, valueRTU, valueC, valueCB, valueRTTOU, valueRTTOV, permanentHR, permanentHR_0, minDuration, maxDuration; + + arElmValues = this.initValue.split(","); + valueL = arElmValues[0].split("=")[1]; + iValueL = parseInt(valueL) / 10; + + + var arElmValues, valueL, valueDV, valueDVtmp, valueDU, valueRTV, valueRTVtmp, valueRTU, valueSlider, valueRTTOU, valueRTTOV, permanentHR, permanentHR_0, minDuration, maxDuration, effect; + + // iValueL !== (iValueL | 0) = check if the value is not 0% - 100% + if ( (iValueL !== (iValueL | 0)) && (valueL != "100.5") && (valueL != "101")) { + this.levelFreeValActive = true; + this.levelFreeValElm.val(valueL); + this.divLevelFreeValElm.show(); + } + + this.initSubDialogs(); + + if (this.isOntimeAvailable()) { + arElmValues = this.initValue.split(","); + + valueL = this.getConfigStringValue("L"); + valueDVtmp = this.getConfigStringValue("OT"); + valueDU = this._getUnitInDU4OnTime(valueDVtmp); + + + this.colorPickerInit.level = parseInt(valueL); + this.colorPickerInit.hue = parseInt(this.getConfigStringValue("H")); + this.colorPickerInit.saturation = parseInt(this.getConfigStringValue("SAT")); + this.colorTemperature = parseInt(this.getConfigStringValue("TC")); + + this.HUE = this.colorPickerInit.hue; + this.SATURATION = this.colorPickerInit.saturation; + + if ((this.colorTemperature == -1) || (this.colorTemperature == 0)) { + if (this.HUE > 360) {this.hueElm.hide();this.hueElm.parent().next().hide();this.lastValHueElm.prop("checked", true);} + if (this.SATURATION > 100) {this.satElm.hide(); this.satElm.parent().next().hide();this.lastValSatElm.prop("checked", true);} + } else { + this.HUE = 0; + this.SATURATION = 0; + this.colorPickerInit.hue = this.HUE; + this.colorPickerInit.saturation = this.SATURATION; + } + + if (valueDU == 2) { + valueDV = parseInt(valueDVtmp / 3600); + } else if (valueDU == 1) { + valueDV = parseInt(valueDVtmp / 60); + } else { + valueDV = valueDVtmp; + } + + //valueRTVtmp = arElmValues[2].split("=")[1]; + valueRTVtmp = this.getConfigStringValue("RT"); + + valueRTU = this._getUnitInDU4RampTime(valueRTVtmp); + + if (valueRTU == 3) { + valueRTV = valueRTVtmp * 100; + } else if (valueRTU == 1) { + valueRTV = parseInt(valueRTVtmp / 60); + } else { + valueRTV = valueRTVtmp; + } + + permanentHR = 31; + permanentHR_0 = 0; + minDuration = 0; + maxDuration = 16343; + } + // RAMPTIME_OFF + + if (arElmValues.length >= 7) { + valueRTTOV = this.getConfigStringValue("RTTOV"); + valueRTTOV = (valueRTTOV == -1 ) ? this.getConfigStringValue("RTTDV") : valueRTTOV; + + valueRTTOU = this.getConfigStringValue("RTTOU"); + valueRTTOU = (valueRTTOU == -1 ) ? this.getConfigStringValue("RTTDU") : valueRTTOU; + + this.rampTimeOffUnitElm.val(valueRTTOU); + this.rampTimeOffValueElm.val(valueRTTOV); + } + + if (this.levelFreeValActive) { + this.levelElm.val("99999998"); + } else { + this.levelElm.val(valueL); + } + + this.durationValueElm.val(valueDV); + this.durationUnitElm.val(valueDU); + + this.rampTimeUnitElm.val(valueRTU); + this.rampTimeValueElm.val(valueRTV); + + this.hueElm.val(this.HUE); + this.satElm.val(this.SATURATION); + + if ((this.durationValueElm.val() == permanentHR && this.durationUnitElm.val() == 2) || (this.isOntimeAvailable() && valueDV == 0)) { + this.chkBoxTimeLimitElm.prop("checked", false); + this.durationValueElm.prop('disabled', true); + this.durationUnitElm.prop('disabled', true); + this.trDurationElms.css("visibility", "visible"); + this.trRampTimeElms.css("visibility", "visible"); + this.trDurationElms.css("opacity", "0.2"); + if (this.showRampTimeOffElm.indexOf(this.deviceType) != -1) { + this.trRampTimeOff.css("visibility", "visible").css("opacity", "0.2"); + showRamptimeOff = true; + } + } else { + this.chkBoxTimeLimitElm.prop("checked", true); + this.durationValueElm.prop('disabled', false); + this.durationUnitElm.prop('disabled', false); + this.trDurationElms.css("visibility", "visible"); + this.trRampTimeElms.css("visibility", "visible"); + if (this.showRampTimeOffElm.indexOf(this.deviceType) != -1) { + this.trRampTimeOff.css("visibility", "visible"); + showRamptimeOff = true; + } + } + + this.chkBoxTimeLimitElm.bind("change", function() { + if (this.checked) { + self.durationValueElm.prop('disabled', false); + self.durationUnitElm.prop('disabled', false); + self.trDurationElms.fadeTo(1000, 1); + self.trRampTimeElms.fadeTo(1000, 1); + if (self.showRampTimeOffElm.indexOf(self.deviceType) != -1) { + self.trRampTimeOff.fadeTo(1000,1); + } + } else { + self.durationValueElm.prop('disabled', true); + self.durationUnitElm.prop('disabled', true); + self.rampTimeValueElm.prop('disabled', false); //.val(0); + self.rampTimeUnitElm.prop('disabled', false); //.val(0); + self.trDurationElms.fadeTo(1000, 0.2); + self.trRampTimeElms.fadeTo(1000, 1); + + if (self.showRampTimeOffElm.indexOf(self.deviceType) != -1) { + self.trRampTimeOff.fadeTo(1000,0.2); + } + + if (self.isOntimeAvailable()) { + self.durationValueElm.val(permanentHR_0); + } else { + self.durationValueElm.val(permanentHR); + self.rampTimeOffUnitElm.val(3); + self.rampTimeOffValueElm.val(0); + } + self.durationUnitElm.val(2); + } + }); + + this.durationValueElm.bind("keyup", function() { + var min = minDuration, + max = (parseInt(self.durationUnitElm.val()) == 2) ? permanentHR: maxDuration; + this.value = self.checkValidity(this.value,min,max); + if (parseInt(this.value) == 31) { + self.rampTimeOffValueElm.val(min); + self.rampTimeOffUnitElm.val(3); // = 10ms + } + }); + + this.durationValueElm.bind("blur", function() { + var val = parseInt(this.value); + + if (isNaN(val)) { + this.value = (parseInt(self.durationUnitElm.val()) == 2) ? permanentHR : maxDuration; + } else { + this.value = val; + } + self.durationValueElm.keyup(); + }); + + this.durationUnitElm.bind("change", function(){ + self.durationValueElm.keyup(); + }); + + this.rampTimeValueElm.bind("keyup", function() { + var min = minDuration, + max = maxDuration; + this.value = self.checkValidity(this.value,min,max); + }); + + this.rampTimeValueElm.bind("blur", function() { + var val = parseInt(this.value); + + if (isNaN(val)) { + this.value = maxDuration; + } else { + this.value = val; + } + }); + + this.rampTimeUnitElm.bind("change", function(){ + self.rampTimeValueElm.keyup(); + }); + + /**********************/ + this.rampTimeOffValueElm.bind("keyup", function() { + var min = minDuration, + max = maxDuration; + this.value = self.checkValidity(this.value,min,max); + }); + + this.rampTimeOffValueElm.bind("blur", function() { + var val = parseInt(this.value); + + if (isNaN(val)) { + this.value = maxDuration; + } else { + this.value = (parseInt(self.durationValueElm.val()) <= 30) ? val : minDuration; + if (parseInt(self.durationValueElm.val()) >= 31) { + self.rampTimeOffUnitElm.val(3); // 10ms + } + } + }); + + this.rampTimeUnitElm.bind("change", function(){ + self.rampTimeOffValueElm.keyup(); + }); + + this.hueElm.keyup(function(event) { + var val; + if (event.keyCode == 13) { + val = parseInt(jQuery(this).val()); + if (val < 0 || isNaN(val)) {self.HUE = 0;} else if (val > 360) {self.HUE = 360;} else {self.HUE = val;}; + jQuery(this).val(self.HUE); + self.colorPicker.color.hsv = {h: self.HUE, s: self.SATURATION, v: 0}; + self.setColorPreviewElm(self.HUE, self.SATURATION); + + // Set the TW slider to -- + self.resetColorTemp(); + } + }); + + this.hueElm.blur(function(event) { + var val; + val = parseInt(jQuery(this).val()); + if (val < 0 || isNaN(val)) {self.HUE = 0;} else if (val > 360) {self.HUE = 360;} else {self.HUE = val;}; + jQuery(this).val(self.HUE); + self.colorPicker.color.hsv = {h: self.HUE, s: self.SATURATION, v: 0}; + self.setColorPreviewElm(self.HUE, self.SATURATION); + + // Set the TW slider to -- + self.resetColorTemp(); + }); + + + this.satElm.keyup(function(event) { + var val; + if (event.keyCode == 13) { + val = parseInt(jQuery(this).val()); + if (val < 0 || isNaN(val)) {self.SATURATION = 0;} else if (val > 100) {self.SATURATION = 100;} else {self.SATURATION = val;}; + jQuery(this).val(parseInt(self.SATURATION)); + self.colorPicker.color.hsv = {h: self.HUE, s: self.SATURATION, v: 0}; + self.setColorPreviewElm(self.HUE, self.SATURATION); + + // Set the TW slider to -- + self.resetColorTemp(); + } + }); + + this.satElm.blur(function(event) { + var val; + val = parseInt(jQuery(this).val()); + if (val < 0 || isNaN(val)) {self.SATURATION = 0;} else if (val > 100) {self.SATURATION = 100;} else {self.SATURATION = val;}; + jQuery(this).val(parseInt(self.SATURATION)); + self.colorPicker.color.hsv = {h: self.HUE, s: self.SATURATION, v: 0}; + self.setColorPreviewElm(self.HUE, self.SATURATION); + + // Set the TW slider to -- + self.resetColorTemp(); + }); + /**********************/ + + this.showHideColorPicker(); + + this.lastValHueElm.click(function() { + var selected = jQuery(this).prop("checked"); + + self.showHideColorPicker(); + + if (selected) { + self.HUE = 361; + self.hueElm.val(self.HUE); + self.hueElm.hide();self.hueElm.parent().next().hide(); + self.resetColorTemp(); + } else { + self.HUE = 0; + self.hueElm.val(self.HUE); + self.hueElm.show();self.hueElm.parent().next().show(); + self.colorPicker.color.hsv = {h: self.HUE, s: 100, v: 100}; + } + self.freezeColorTemp(); + self.setColorPreviewElm(self.HUE, 100); + self.resetHeight(); + }); + + this.lastValSatElm.click(function() { + var selected = jQuery(this).prop("checked"); + + self.showHideColorPicker(); + + if (selected) { + self.SATURATION = 101; + self.satElm.val(self.SATURATION); + self.satElm.hide();self.satElm.parent().next().hide(); + self.colorPicker.color.hsv = {h: self.HUE, s: 100, v: 100}; + self.resetColorTemp(); + } else { + self.SATURATION = 100; + self.satElm.val(self.SATURATION); + self.satElm.show();self.satElm.parent().next().show(); + self.colorPicker.color.hsv = {h: self.HUE, s: 100, v: 100}; + } + self.freezeColorTemp(); + self.setColorPreviewElm(self.HUE, 100); + self.resetHeight(); + }); + + // TW Slider + + this.btnHCLElm.bind("click", function() { + JControlBtn.on(jQuery(this)); + JControlBtn.off(jQuery(self.btnDim2WarmElm)); + window.setTimeout(function() {jQuery(".ui-slider-handle").removeClass("ui-state-active");},100); + self.colorTemperature = self.valHCL; + self.sliderInfoElm.val("--"); + self.sliderElm.slider('value', 0); + self.resetColorPicker(); + }); + + this.btnDim2WarmElm.bind("click", function() { + JControlBtn.on(jQuery(this)); + JControlBtn.off(jQuery(self.btnHCLElm)); + window.setTimeout(function() {jQuery(".ui-slider-handle").removeClass("ui-state-active");},100); + self.colorTemperature = self.valDim2Warm; + self.sliderInfoElm.val("--"); + self.sliderElm.slider('value', 0); + self.resetColorPicker(); + }); + + // TW Slider + //var tcValueElm = this.getConfigStringValue("TC"); + this.sliderElm.slider(this.getSliderOpts()); + + valueSlider = parseInt(this.getConfigStringValue("TC")); + valueSlider = (valueSlider != -1) ? valueSlider : 0; + + this.sliderInfoElm.val((valueSlider == 0) ? "--" : valueSlider); + this.sliderElm.val(valueSlider); + this.sliderElm.slider('value', (valueSlider > 10100) ? 0 : valueSlider); + this.colorTemperature = valueSlider; + + this.sliderElm.on("slide", function (event, ui) { + self.sliderInfoElm.val(ui.value); + }); + + this.sliderElm.on("slidestop", function(event, ui){ + JControlBtn.off(jQuery(self.btnDim2WarmElm)); + JControlBtn.off(jQuery(self.btnHCLElm)); + window.setTimeout(function() {jQuery(".ui-slider-handle").addClass("ui-state-active");},100); + self.colorTemperature = ui.value; + + // Set Hue and Saturation to 0 + self.resetColorPicker(); + + }); + + if ((valueSlider > 0) && (valueSlider < 10000)) {jQuery(".ui-slider-handle").addClass("ui-state-active");} else {jQuery(".ui-slider-handle").removeClass("ui-state-active");} + if (valueSlider == this.valHCL) {jQuery(".ui-slider-handle").removeClass("ui-state-active"); JControlBtn.on(this.btnHCLElm);this.sliderInfoElm.val("--");} + if (valueSlider == this.valDim2Warm) {jQuery(".ui-slider-handle").removeClass("ui-state-active"); JControlBtn.on(this.btnDim2WarmElm);this.sliderInfoElm.val("--");} + this.TWEvents = jQuery("[name='trTWSlider']").css("pointer-events"); + + // Effects + effect = parseInt(this.getConfigStringValue("E")); + + if (effect % 2 == 0) { + this.effectModePrg = true; + homematic("Interface.setMetadata", {"objectId": this.oChannel.id, "dataId": "effectModePrg", "value": this.effectModePrg}); + this.effectModeChkBox.prop("checked", true); + effect = (effect - 1); + } else { + this.effectModePrg = false; + this.effectModeChkBox.prop("checked", false); + } + + effect = (effect != -1) ? effect : 0; // 0 = default (No Effect) + this.setEffectNames(); + + this.effectSelBox.val(effect); + + // Show the appropriate dialog (Color, Color Temp, Effect) + if ((effect != 0) || ((valueL == 0) && (arElmValues.length == 1))) { + this.btnEffectDialog.click(); + } else if (parseInt(this.getConfigStringValue("TC")) > 0) { + this.btnColorTempDialog.click(); + } else { + if ((this.deviceType == this.lss) && (this.initValue.includes("TC="))) { // + this.btnColorTempDialog.click(); + } else { + this.btnColorDialog.click(); + } + } + + }, + + initColorPickerEvents: function() { + var self = this; + this.colorPicker.on("mount", function(color) { + self.setColorPreviewElm(self.colorPickerInit.hue, self.colorPickerInit.saturation); + }); + + this.colorPicker.on("input:end", function(color) { + var hsv_H = parseInt(color.hsv.h), + hsv_S, + hsv_S_Percent = parseInt(color.hsv.s); + + self.hueElm.val(hsv_H); + self.HUE = hsv_H; + + self.satElm.val(hsv_S_Percent); + self.SATURATION = hsv_S_Percent; + + self.setColorPreviewElm(color.hsv.h, color.hsv.s); + + // Set the TW slider to -- + self.resetColorTemp(); + + }); + }, + + resetColorPicker: function() { + // Set Hue and Saturation to 0 + this.hueElm.val(0); this.HUE = 0; + this.satElm.val(0); this.SATURATION = 0; + this.colorPicker.color.hsv = {h: this.HUE, s: this.SATURATION, v: 0}; + this.setColorPreviewElm(this.HUE, this.SATURATION); + }, + + resetColorTemp: function() { + JControlBtn.off(jQuery(this.btnHCLElm)); + JControlBtn.off(jQuery(this.btnDim2WarmElm)); + window.setTimeout(function() {jQuery(".ui-slider-handle").removeClass("ui-state-active");},100); + this.colorTemperature = 0; + this.sliderInfoElm.val("--"); + this.sliderElm.val(this.colorTemperature); + this.sliderElm.slider('value', this.colorTemperature); + }, + + freezeColorTemp: function() { + if ((this.HUE == 361) || (this.SATURATION == 101)) { + this.trTWSlider.css("pointer-events","none"); // freeze the tw slider + } else { + this.trTWSlider.css("pointer-events",this.TWEvents); // unfreeze the tw slider + } + }, + + getHSVColorPicker: function() { + var self = this; + jQuery("#anchorColorPicker").html(""); + + this.colorPicker = new iro.ColorPicker("#anchorColorPicker", { + // Set the size of the color picker + width: 90, + color: {h: self.colorPickerInit.hue, s: self.colorPickerInit.saturation, v: self.colorPickerInit.level}, + wheelLightness: false, // If set to false, the color wheel will not fade to black when the lightness decreases. + layout: [{component: iro.ui.Wheel}], // don't show the V slider below the wheel - this value comes from the dimmer slider + handleRadius: 4 + } + ); + this.initColorPickerEvents(); + }, + + getHSVColorSlider: function() { + var self = this; + jQuery("#anchorColorPicker").html(""); + + this.colorPicker = new iro.ColorPicker("#anchorColorPicker", { + width: 90, + sliderSize: 20, // height + color: {h: self.colorPickerInit.hue, s: 100, v: 100}, + handleSvg: '#handle', + layout: [ + { + component: iro.ui.Slider, + options: { + sliderType: 'hue', + edgeRadius: 0 + } + } + ] + }); + this.initColorPickerEvents(); + }, + + getSliderOpts: function() { + var opts = {}; + opts.animate = "fast"; + opts.min = parseInt(this.chnDescription.HARDWARE_COLOR_TEMPERATURE_WARM_WHITE); + opts.min = (!isNaN(opts.min)) ? opts.min : this.ColorTempDefaultMin; + opts.max = parseInt(this.chnDescription.HARDWARE_COLOR_TEMPERATURE_COLD_WHITE); + opts.max = (!isNaN(opts.max)) ? opts.max : this.ColorTempDefaultMax; + opts.value = ((opts.max - opts.min) / 2); + opts.step = 50; + opts.orientation = "horizontal"; + return opts; + }, + + showHideColorPicker: function () { + var hueLastValue = this.lastValHueElm.prop("checked"), + satLastValue = this.lastValSatElm.prop("checked"); + + if (hueLastValue && satLastValue) { + this.anchorColorPicker.hide(); + this.colorPreviewElm.hide(); + } else if (hueLastValue && ! satLastValue) { + this.anchorColorPicker.hide(); + this.colorPreviewElm.hide(); + } else if (! hueLastValue && satLastValue) { + this.getHSVColorSlider(); + this.anchorColorPicker.show(); + this.colorPreviewElm.show(); + } else { + this.getHSVColorPicker(); + this.anchorColorPicker.show(); + this.colorPreviewElm.show(); + } + this.resetHeight(); + }, + + setColorPreviewElm: function(hue, sat) { + var rgbVal; + rgbVal = hsvToRgb(hue, sat, 100); + this.colorPreviewElm.css("background-color", "rgb("+rgbVal.r+","+rgbVal.g+","+rgbVal.b+")"); + }, + + checkValidity: function(val, min, max) { + var result = val; + if (val == "") {result = "";} + + if (parseInt(val) < 0) {result = min;} + if (parseInt(val) > max) {result = max;} + return result; + }, + + getConfigString: function() { + var self = this, + result, + level, + durationUnit = (this.chkBoxTimeLimitElm.prop("checked") == false) ? 2 : this.durationUnitElm.val(), // 2 = unit hour + durationValue = (this.chkBoxTimeLimitElm.prop("checked") == false) ? 31 : this.durationValueElm.val(), + ramptimeUnit = this.rampTimeUnitElm.val(), + ramptimeValue = this.rampTimeValueElm.val(), + lastValueHueSelected = this.lastValHueElm.prop("checked"), + lastValueSatSelected = this.lastValSatElm.prop("checked"), + hueValue = (lastValueHueSelected || (this.colorTemperature > 0)) ? 361 : this.HUE, + satValue = (lastValueSatSelected || (this.colorTemperature > 0)) ? 101 : this.SATURATION, + colorTemperature = this.colorTemperature, + tempColorID = "", + effectID = "", + effect = parseInt(this.effectSelBox.val()), + activeDialog = "color"; + + level = (this.levelFreeValActive) ? this.levelFreeValElm.val() : this.levelElm.val(); + + this.setULReffectModePrg(); + + effect = (this.effectModePrg == true) ? (effect + 1) : effect; + + if ((this.deviceType == this.drgDali) || (this.deviceType == this.lss) || ((this.deviceType == this.rgbw) && ((this.maxCap == 2) || (this.maxCap == 4)))) { + tempColorID = ",TC=" + colorTemperature; + effectID = ",E=" + effect; + } + + if (this.btnColorTempDialog.hasClass("ControlBtnOn")) { + activeDialog = "colorTemp"; + } else if (this.btnEffectDialog.hasClass("ControlBtnOn")) { + activeDialog = "effect"; + if (effect == 0) { + result = "L=0"; + } else { + result = "L=" + level + ",E=" + effect; + } + return result; + } + + if (this.isOntimeAvailable()) { + + if (this.chkBoxTimeLimitElm.prop("checked") == false) { + var _rampTimeValue = parseInt(this._getRampTimeVal(ramptimeValue, ramptimeUnit)); + + if (_rampTimeValue > 0) { + if (this.deviceType == this.lss) { + if (this.getActiveDialog() == "color") { + result = "L=" + level + ",OT=" + this.maxOnTime + ",RT=" + _rampTimeValue + ",H=" + hueValue + ",SAT=" + satValue; + } else { + // This is for the HmIP-LSS colorTemp + result = "L=" + level + ",OT=" + this.maxOnTime + ",RT=" + _rampTimeValue; + } + } else { + result = "L=" + level + ",OT=" + this.maxOnTime + ",RT=" + _rampTimeValue + ",H=" + hueValue + ",SAT=" + satValue; + } + } else { + if (this.deviceType == this.lss) { + if (this.getActiveDialog() == "color") { + result = "L=" + level + ",OT=0,RT=0,H=" + hueValue + ",SAT=" + satValue; + } else { + // this ist for the HmIP-LSS color temp + result = "L=" + level + ",OT=0,RT=0"; + } + } else { + result = "L=" + level + ",OT=0,RT=0,H=" + hueValue + ",SAT=" + satValue; + } + } + + } else { + if (durationValue == 0) { + + if (this.deviceType == this.lss) { + if (this.getActiveDialog() == "color") { + result = "L=" + level + ",OT=" + this._getOnTimeVal(durationValue, durationUnit) + ",RT=0,H=" + hueValue + ",SAT=" + satValue; + } else { + // this ist for the HmIP-LSS color temp + result = "L=" + level + ",OT=" + this._getOnTimeVal(durationValue, durationUnit) + ",RT=0"; + } + } else { + result = "L=" + level + ",OT=" + this._getOnTimeVal(durationValue, durationUnit) + ",RT=0,H=" + hueValue + ",SAT=" + satValue; + } + } else { + if (this.deviceType == this.lss) { + if (this.getActiveDialog() == "color") { + result = "L=" + level + ",OT=" + this._getOnTimeVal(durationValue, durationUnit) + ",RT=" + this._getRampTimeVal(ramptimeValue, ramptimeUnit) + ",H=" + hueValue + ",SAT=" + satValue; + } else { + // this ist for the HmIP-LSS color temp + result = "L=" + level + ",OT=" + this._getOnTimeVal(durationValue, durationUnit) + ",RT=" + this._getRampTimeVal(ramptimeValue, ramptimeUnit); + } + } else { + result = "L=" + level + ",OT=" + this._getOnTimeVal(durationValue, durationUnit) + ",RT=" + this._getRampTimeVal(ramptimeValue, ramptimeUnit) + ",H=" + hueValue + ",SAT=" + satValue; + } + } + } + } else { + result = "L=" + level + ",DV=" + durationValue + ",DU=" + durationUnit + ",RTV=" + ramptimeValue + ",RTU=" + ramptimeUnit + ",H=" + hueValue + ",SAT=" + satValue; + } + + jQuery.each(this.showRampTimeOffElm, function(index, val) { + if (self.deviceType == val) { + return false; // leave each loop + } + }); + + if (showRamptimeOff) { + result += ",RTTOV=" + this.rampTimeOffValueElm.val() + ",RTTOU=" + this.rampTimeOffUnitElm.val(); + } + + if ((this.deviceType == this.drgDali) || ((this.deviceType == this.lss) && (this.getActiveDialog() == "colorTemp")) || ((this.deviceType == this.rgbw) && ((this.maxCap == 2) || (this.maxCap == 4)))) { + result += tempColorID; + } + + return result; + }, + + // Get the value of a given shortcut of the config string + // Example config string > "L=100,OT=0,RT=0,H=0,SAT=0,RTTOV=0,RTTOU=0,TC=10150" + getConfigStringValue: function(sShortCut) { + var arElmValues = this.initValue.split(","), + result = "-1", arKey; + + jQuery.each(arElmValues, function(index,val) { + arKey = val.split("="); + if (arKey[0] == sShortCut) { + result = arKey[1]; + } + }); + return (result == -1) ? 0 : result; + }, + + close: function(result) + { + Layer.remove(this.m_layer); + if (this.m_callback) { this.m_callback(result); } + if (showRamptimeOff) {window.setTimeout(function() {delete showRamptimeOff;},100);} + }, + + yes: function() + { + this.close(YesNoDialog.RESULT_YES); + }, + + no: function() + { + this.close(YesNoDialog.RESULT_NO); + }, + + btnTextYes: function(btnTxt) { + jQuery(".YesNoDialog_yesButton").text(btnTxt); + }, + + btnYesHide: function() { + jQuery("#btnYes").addClass("hidden"); + }, + + btnYesShow: function() { + jQuery("#btnYes").removeClass("hidden"); + }, + + btnTextNo: function(btnTxt) { + jQuery(".YesNoDialog_noButton").text(btnTxt); + }, + + btnNoHide: function() { + jQuery("#btnNo").addClass("hidden"); + }, + + btnNoShow: function() { + jQuery("#btnNo").removeClass("hidden"); + }, + + setHeight: function() { + var heightContentWrapper = jQuery(".YesNoDialogContentWrapper").height(), + yesNoElm = jQuery(".YesNoDialog"), + footerElm = jQuery(".YesNoDialogFooter"); + + yesNoElm.css("height", heightContentWrapper + 78); + footerElm.css("top", heightContentWrapper + 26); + yesNoElm.css("top", (window.innerHeight / 2) - (yesNoElm.height() / 2)); + }, + + resetHeight: function() { + this.setHeight(); + }, + + setWidth: function(dlgWidth) { + var yesNoDialogElm = jQuery(".YesNoDialog"), + yesNoDialogContentWrapperElm = jQuery(".YesNoDialogContentWrapper"), + yesNoDialogFooterElm = jQuery(".YesNoDialogFooter"), + yesNoDialogTitleElm = jQuery(".YesNoDialogTitle"), + yesNoDialogYesButton = jQuery(".YesNoDialog_yesButton"); + + var defaultWith = 600, + offsetWidth = 4, + offsetPosYesButton = 109, + offsetDialogHeight = 78, + offsetDialogFooterHeight = 26; + + var width = dlgWidth - offsetWidth, + yesButtonPos = dlgWidth - offsetPosYesButton, + position = yesNoDialogElm.position(); + + // dlgWidth = (defaultWith < dlgWidth) ? defaultWith : dlgWidth; + + yesNoDialogElm.width(dlgWidth).css({left: position.left + ((defaultWith - dlgWidth) / 2)}); + yesNoDialogTitleElm.width(width); + yesNoDialogContentWrapperElm.width(width); + yesNoDialogFooterElm.width(width); + yesNoDialogYesButton.css("left", yesButtonPos); + + //Dialoghöhe an Content anpassen. + yesNoDialogElm.css("height", yesNoDialogContentWrapperElm.height() + offsetDialogHeight); + yesNoDialogFooterElm.css("top", yesNoDialogContentWrapperElm.height() + offsetDialogFooterHeight); + } + +});RGBWTunableWhiteControllerDialog = Class.create({ + initialize: function(title, content, deviceType, chnAddress, value, callback, contentType) + { + showRamptimeOff = false; // This we need among other things for certain COMBINED_PARAMETER help dialogs. + var _this_ = this; + + this.m_contentType = contentType; + this.m_callback = callback; + this.m_layer = document.createElement("div"); + this.m_layer.className = "YesNoDialogLayer"; + + this.RESULT_NO = 0; + this.RESULT_YES = 1; + + this.iFace = "HmIP-RF"; + + this.deviceType = deviceType; + this.chnAddress = chnAddress; + this.initValue = value; + + this.maxOnTime = 111600; + + this.valHCL = 10200; + this.valDim2Warm = 10150; + + this.arNoOntimeAvailable = []; + this.showRampTimeOffElm = ["HmIP-RGBW", "HmIP-DRG-DALI"]; + + var dialog = document.createElement("div"); + dialog.className = "YesNoDialog"; + + var titleElement = document.createElement("div"); + titleElement.className = "YesNoDialogTitle"; + //titleElement.appendChild(document.createTextNode(title + " " + deviceType + " - " + chnAddress)); + titleElement.appendChild(document.createTextNode(deviceType + " - " + chnAddress)); + titleElement.onmousedown = function(event) { new Drag(this.parentNode, event); }; + dialog.appendChild(titleElement); + + var contentWrapper = document.createElement("div"); + contentWrapper.className = "YesNoDialogContentWrapper"; + + var contentElement = document.createElement("div"); + contentElement.className = "YesNoDialogContent"; + + if (this.m_contentType == "html") { + contentElement.innerHTML = content; + } else { + contentElement.appendChild(document.createTextNode(content)); + } + + contentWrapper.appendChild(contentElement); + + dialog.appendChild(contentWrapper); + + var footer = document.createElement("div"); + footer.className= "YesNoDialogFooter"; + + var yesButton = document.createElement("div"); + yesButton.className = "YesNoDialog_yesButton borderRadius5px colorGradient50px"; + yesButton.appendChild(document.createTextNode(translateKey('dialogYes'))); + yesButton.onclick = function() { _this_.yes(); }; + yesButton.id="btnYes"; + footer.appendChild(yesButton); + + var noButton = document.createElement("div"); + noButton.className = "YesNoDialog_noButton borderRadius5px colorGradient50px"; + noButton.appendChild(document.createTextNode(translateKey('dialogNo'))); + noButton.onclick = function() { _this_.no(); }; + noButton.id = "btnNo"; + footer.appendChild(noButton); + + dialog.appendChild(footer); + + this.m_layer.appendChild(dialog); + Layer.add(this.m_layer); + + translatePage(".YesNoDialog"); + + this.setHeight(); + + this.setDialogElements(); + this.initDialog(); + + }, + + isOntimeAvailable: function() { + return (this.arNoOntimeAvailable.indexOf(this.deviceType) == -1) ? true : false; + }, + + setDialogElements: function() { + var self = this; + this.trDurationElms = jQuery("[name='trDuration']"); + this.trRampTimeElms = jQuery("[name='trRampTime']"); + this.trRampTimeOff = jQuery("#trRampTimeOff"); + this.levelElm = jQuery("#combinedParam_Level"); + this.lblBrightnessLevelElm = jQuery("#lblBrightnessLevel"); + this.lblRampTimeElm = jQuery("#lblRampTime"); + this.chkBoxTimeLimitElm = jQuery("#chkBoxTimeLimit"); + this.durationValueElm = jQuery("#combinedParam_DurationValue"); + this.durationUnitElm = jQuery("#combinedParam_DurationUnit"); + this.rampTimeUnitElm = jQuery("#combinedParam_RampTimeUnit"); + this.rampTimeValueElm = jQuery("#combinedParam_RampTimeValue"); + this.rampTimeOffUnitElm = jQuery("#combinedParam_RampTimeOffUnit"); + this.rampTimeOffValueElm = jQuery("#combinedParam_RampTimeOffValue"); + + this.sliderElm = jQuery("#twSlider"); + this.sliderInfoElm = jQuery("#tcInfoField"); + this.btnHCLElm = jQuery("#btnHCL"); + this.btnDim2WarmElm = jQuery("#btnDim2Warm"); + this.colorTemperature = 0; + + }, + + _getOnTimeVal: function(val, unit) { + var result; + + if (parseInt(val) >= 31 && parseInt(unit) == 2) { + return 0; + } + + if (unit == 0) { + result = val; + } else if (unit == 1) { + result = val * 60; + } else if (unit == 2) { + result = val * 3600; + } + return parseInt(result); + }, + + _getRampTimeVal: function(val, unit) { + var result; + if (unit == 0) { + result = val; + } else if (unit == 1) { + result = parseInt(val * 60); + } else if (unit == 3) { + result = parseFloat(val / 100); + } + return result; + }, + + _getUnitInDU4OnTime: function(time) { + var result = 0, + hr = time / 3600, + min= time / 60; + + if (hr == parseInt(hr)) { + result = 2; + } else if (min == parseInt(min)) { + result = 1; + } + return result; + }, + + _getUnitInDU4RampTime: function(time) { + var t = parseFloat(time), + result = 0, + min = t / 60; + + if (parseInt(time) == 0) { + return 0; + } + + if (min == parseInt(min)) { + result = 1; + } else if ((Number(t) === t) && (t % 1 !== 0)) { + // time in float + result = 3; + } + return result; + }, + + hideOnTimeElems: function() { + jQuery("[name='trRampTime']").first().nextAll().hide(); + this.setHeight(); + }, + + + initDialog: function() { + var self = this; + + var arElmValues, valueL, valueDV, valueDVtmp, valueDU, valueRTV, valueRTVtmp, valueRTU, valueC, valueSlider, valueRTTOU, valueRTTOV, permanentHR, permanentHR_0, minDuration, maxDuration; + + if (this.isOntimeAvailable()) { + arElmValues = this.initValue.split(","); + + valueL = arElmValues[0].split("=")[1]; + valueDVtmp = arElmValues[1].split("=")[1]; + valueDU = this._getUnitInDU4OnTime(valueDVtmp); + + valueSlider = parseInt(arElmValues[3].split("=")[1]); + + if (valueDU == 2) { + valueDV = parseInt(valueDVtmp / 3600); + } else if (valueDU == 1) { + valueDV = parseInt(valueDVtmp / 60); + } else { + valueDV = valueDVtmp; + } + + valueRTVtmp = arElmValues[2].split("=")[1]; + + valueRTU = this._getUnitInDU4RampTime(valueRTVtmp); + + if (valueRTU == 3) { + valueRTV = valueRTVtmp * 100; + } else if (valueRTU == 1) { + valueRTV = parseInt(valueRTVtmp / 60); + } else { + valueRTV = valueRTVtmp; + } + + valueC = 7; + permanentHR = 31; + permanentHR_0 = 0; + minDuration = 0; + maxDuration = 16343; + } + // RAMPTIME_OFF + if (arElmValues.length >= 6) { + valueRTTOV = arElmValues[4].split("=")[1]; + valueRTTOU = arElmValues[5].split("=")[1]; + this.rampTimeOffUnitElm.val(valueRTTOU); + this.rampTimeOffValueElm.val(valueRTTOV); + } + + this.levelElm.val(valueL); + this.durationValueElm.val(valueDV); + this.durationUnitElm.val(valueDU); + + this.rampTimeUnitElm.val(valueRTU); + this.rampTimeValueElm.val(valueRTV); + + if ((this.durationValueElm.val() == permanentHR && this.durationUnitElm.val() == 2) || (this.isOntimeAvailable() && valueDV == 0)) { + this.chkBoxTimeLimitElm.prop("checked", false); + this.durationValueElm.prop('disabled', true); + this.durationUnitElm.prop('disabled', true); + this.trDurationElms.css("visibility", "visible"); + this.trRampTimeElms.css("visibility", "visible"); + this.trDurationElms.css("opacity", "0.2"); + if (this.showRampTimeOffElm.indexOf(this.deviceType) != -1) { + this.trRampTimeOff.css("visibility", "visible").css("opacity", "0.2"); + showRamptimeOff = true; + } + } else { + this.chkBoxTimeLimitElm.prop("checked", true); + this.durationValueElm.prop('disabled', false); + this.durationUnitElm.prop('disabled', false); + this.trDurationElms.css("visibility", "visible"); + this.trRampTimeElms.css("visibility", "visible"); + if (this.showRampTimeOffElm.indexOf(this.deviceType) != -1) { + this.trRampTimeOff.css("visibility", "visible"); + showRamptimeOff = true; + } + } + + this.chkBoxTimeLimitElm.bind("change", function() { + if (this.checked) { + self.durationValueElm.prop('disabled', false); + self.durationUnitElm.prop('disabled', false); + self.trDurationElms.fadeTo(1000, 1); + self.trRampTimeElms.fadeTo(1000, 1); + if (self.showRampTimeOffElm.indexOf(self.deviceType) != -1) { + self.trRampTimeOff.fadeTo(1000,1); + } + } else { + self.durationValueElm.prop('disabled', true); + self.durationUnitElm.prop('disabled', true); + self.rampTimeValueElm.prop('disabled', false); //.val(0); + self.rampTimeUnitElm.prop('disabled', false); //.val(0); + self.trDurationElms.fadeTo(1000, 0.2); + self.trRampTimeElms.fadeTo(1000, 1); + + if (self.showRampTimeOffElm.indexOf(self.deviceType) != -1) { + self.trRampTimeOff.fadeTo(1000,0.2); + } + + if (self.isOntimeAvailable()) { + self.durationValueElm.val(permanentHR_0); + } else { + self.durationValueElm.val(permanentHR); + self.rampTimeOffUnitElm.val(3); + self.rampTimeOffValueElm.val(0); + } + self.durationUnitElm.val(2); + } + }); + + this.durationValueElm.bind("keyup", function() { + var min = minDuration, + max = (parseInt(self.durationUnitElm.val()) == 2) ? permanentHR: maxDuration; + this.value = self.checkValidity(this.value,min,max); + if (parseInt(this.value) == 31) { + self.rampTimeOffValueElm.val(min); + self.rampTimeOffUnitElm.val(3); // = 10ms + } + }); + + this.durationValueElm.bind("blur", function() { + var val = parseInt(this.value); + + if (isNaN(val)) { + this.value = (parseInt(self.durationUnitElm.val()) == 2) ? permanentHR : maxDuration; + } else { + this.value = val; + } + self.durationValueElm.keyup(); + }); + + this.durationUnitElm.bind("change", function(){ + self.durationValueElm.keyup(); + }); + + this.rampTimeValueElm.bind("keyup", function() { + var min = minDuration, + max = maxDuration; + this.value = self.checkValidity(this.value,min,max); + }); + + this.rampTimeValueElm.bind("blur", function() { + var val = parseInt(this.value); + + if (isNaN(val)) { + this.value = maxDuration; + } else { + this.value = val; + } + }); + + this.rampTimeUnitElm.bind("change", function(){ + self.rampTimeValueElm.keyup(); + }); + + /**********************/ + this.rampTimeOffValueElm.bind("keyup", function() { + var min = minDuration, + max = maxDuration; + this.value = self.checkValidity(this.value,min,max); + }); + + this.rampTimeOffValueElm.bind("blur", function() { + var val = parseInt(this.value); + + if (isNaN(val)) { + this.value = maxDuration; + } else { + this.value = (parseInt(self.durationValueElm.val()) <= 30) ? val : minDuration; + if (parseInt(self.durationValueElm.val()) >= 31) { + self.rampTimeOffUnitElm.val(3); // 10ms + } + } + }); + + this.rampTimeUnitElm.bind("change", function(){ + self.rampTimeOffValueElm.keyup(); + }); + /**********************/ + + this.btnHCLElm.bind("click", function() { + JControlBtn.on(jQuery(this)); + JControlBtn.off(jQuery(self.btnDim2WarmElm)); + window.setTimeout(function() {jQuery(".ui-slider-handle").removeClass("ui-state-active");},100); + self.colorTemperature = self.valHCL; + self.sliderInfoElm.val("--"); + }); + + this.btnDim2WarmElm.bind("click", function() { + JControlBtn.on(jQuery(this)); + JControlBtn.off(jQuery(self.btnHCLElm)); + window.setTimeout(function() {jQuery(".ui-slider-handle").removeClass("ui-state-active");},100); + self.colorTemperature = self.valDim2Warm; + self.sliderInfoElm.val("--"); + }); + + this.sliderElm.slider(this.getSliderOpts()); + + + this.sliderInfoElm.val(valueSlider); + this.sliderElm.val(valueSlider); + this.sliderElm.slider('value', valueSlider); + this.colorTemperature = valueSlider; + + this.sliderElm.on("slide", function (event, ui) { + self.sliderInfoElm.val(ui.value); + }); + + this.sliderElm.on("slidestop", function(event, ui){ + JControlBtn.off(jQuery(self.btnDim2WarmElm)); + JControlBtn.off(jQuery(self.btnHCLElm)); + window.setTimeout(function() {jQuery(".ui-slider-handle").addClass("ui-state-active");},100); + self.colorTemperature = ui.value; + }); + + if (valueSlider < 10000) {jQuery(".ui-slider-handle").addClass("ui-state-active");} else {jQuery(".ui-slider-handle").removeClass("ui-state-active");} + if (valueSlider == this.valHCL) {jQuery(".ui-slider-handle").removeClass("ui-state-active"); JControlBtn.on(this.btnHCLElm);this.sliderInfoElm.val("--");} + if (valueSlider == this.valDim2Warm) {jQuery(".ui-slider-handle").removeClass("ui-state-active"); JControlBtn.on(this.btnDim2WarmElm);this.sliderInfoElm.val("--");} + + + }, + + getSliderOpts: function() { + + var chnDescription = homematic("Interface.getParamset", {'interface': this.iFace, 'address': this.chnAddress, 'paramsetKey': 'MASTER'}); + + var opts = {}; + opts.animate = "fast"; + opts.min = parseInt(chnDescription.HARDWARE_COLOR_TEMPERATURE_WARM_WHITE); + opts.max = parseInt(chnDescription.HARDWARE_COLOR_TEMPERATURE_COLD_WHITE); + opts.value = ((opts.max - opts.min) / 2); + opts.step = 50; + opts.orientation = "horizontal"; + return opts; + }, + + checkValidity: function(val, min, max) { + var result = val; + if (val == "") {result = "";} + + if (parseInt(val) < 0) {result = min;} + if (parseInt(val) > max) {result = max;} + return result; + }, + + getConfigString: function() { + var self = this, + result, + level = this.levelElm.val(), + durationUnit = (this.chkBoxTimeLimitElm.prop("checked") == false) ? 2 : this.durationUnitElm.val(), // 2 = unit hour + durationValue = (this.chkBoxTimeLimitElm.prop("checked") == false) ? 31 : this.durationValueElm.val(), + ramptimeUnit = this.rampTimeUnitElm.val(), + ramptimeValue = this.rampTimeValueElm.val(), + colorTemperature = this.colorTemperature; + + if (this.isOntimeAvailable()) { + if (this.chkBoxTimeLimitElm.prop("checked") == false) { + var _rampTimeValue = parseInt(this._getRampTimeVal(ramptimeValue, ramptimeUnit)); + + if (_rampTimeValue > 0) { + result = "L=" + level + ",OT=" + this.maxOnTime + ",RT=" + _rampTimeValue + ",TC=" + colorTemperature; // ON_TIME = permanently ON + } else { + result = "L=" + level + ",OT=0,RT=0,TC=" + colorTemperature; + } + + } else { + if (durationValue == 0) { + result = "L=" + level + ",OT=" + this._getOnTimeVal(durationValue, durationUnit) + ",RT=0,TC=" + colorTemperature; + } else { + result = "L=" + level + ",OT=" + this._getOnTimeVal(durationValue, durationUnit) + ",RT=" + this._getRampTimeVal(ramptimeValue, ramptimeUnit) + ",TC=" + colorTemperature; + } + } + } else { + result = "L=" + level + ",DV=" + durationValue + ",DU=" + durationUnit + ",RTV=" + ramptimeValue + ",RTU=" + ramptimeUnit + ",TC=" + colorTemperature; + } + + jQuery.each(this.showRampTimeOffElm, function(index, val) { + if (self.deviceType == val) { + return false; // leave each loop + } + }); + + if (showRamptimeOff) { + result += ",RTTOV=" + this.rampTimeOffValueElm.val() + ",RTTOU=" + this.rampTimeOffUnitElm.val(); + } + return result; + }, + + close: function(result) + { + Layer.remove(this.m_layer); + if (this.m_callback) { this.m_callback(result); } + if (showRamptimeOff) {window.setTimeout(function() {delete showRamptimeOff;},100);} + }, + + yes: function() + { + this.close(YesNoDialog.RESULT_YES); + }, + + no: function() + { + this.close(YesNoDialog.RESULT_NO); + }, + + btnTextYes: function(btnTxt) { + jQuery(".YesNoDialog_yesButton").text(btnTxt); + }, + + btnYesHide: function() { + jQuery("#btnYes").addClass("hidden"); + }, + + btnYesShow: function() { + jQuery("#btnYes").removeClass("hidden"); + }, + + btnTextNo: function(btnTxt) { + jQuery(".YesNoDialog_noButton").text(btnTxt); + }, + + btnNoHide: function() { + jQuery("#btnNo").addClass("hidden"); + }, + + btnNoShow: function() { + jQuery("#btnNo").removeClass("hidden"); + }, + + setHeight: function() { + var heightContentWrapper = jQuery(".YesNoDialogContentWrapper").height(), + yesNoElm = jQuery(".YesNoDialog"), + footerElm = jQuery(".YesNoDialogFooter"); + + yesNoElm.css("height", heightContentWrapper + 78); + footerElm.css("top", heightContentWrapper + 26); + yesNoElm.css("top", (window.innerHeight / 2) - (yesNoElm.height() / 2)); + }, + + resetHeight: function() { + this.setHeight(); + }, + + setWidth: function(dlgWidth) { + var yesNoDialogElm = jQuery(".YesNoDialog"), + yesNoDialogContentWrapperElm = jQuery(".YesNoDialogContentWrapper"), + yesNoDialogFooterElm = jQuery(".YesNoDialogFooter"), + yesNoDialogTitleElm = jQuery(".YesNoDialogTitle"), + yesNoDialogYesButton = jQuery(".YesNoDialog_yesButton"); + + var defaultWith = 600, + offsetWidth = 4, + offsetPosYesButton = 109, + offsetDialogHeight = 78, + offsetDialogFooterHeight = 26; + + var width = dlgWidth - offsetWidth, + yesButtonPos = dlgWidth - offsetPosYesButton, + position = yesNoDialogElm.position(); + + // dlgWidth = (defaultWith < dlgWidth) ? defaultWith : dlgWidth; + + yesNoDialogElm.width(dlgWidth).css({left: position.left + ((defaultWith - dlgWidth) / 2)}); + yesNoDialogTitleElm.width(width); + yesNoDialogContentWrapperElm.width(width); + yesNoDialogFooterElm.width(width); + yesNoDialogYesButton.css("left", yesButtonPos); + + //Dialoghöhe an Content anpassen. + yesNoDialogElm.css("height", yesNoDialogContentWrapperElm.height() + offsetDialogHeight); + yesNoDialogFooterElm.css("top", yesNoDialogContentWrapperElm.height() + offsetDialogFooterHeight); + } + +}); +/** + * Kopfleiste + **/ +HeaderBar = new function() +{ + + // This causes problems with Mac & Safari + this.load_ = function() + { + new Ajax.Updater("header", "/ise/htm/header.htm", { + evalScripts: true, + asynchronous: false + }); + }; + + this.load = function() { + jQuery.ajax({ + url: "/ise/htm/header.htm", + dataType: "html", + async: false, + context: document.body + }).done(function(response) { + jQuery("#header").html(response); + }); + }; + +}();/** + * mainmenu.js + **/ + +/** + * Hauptmenü + **/ +MainMenu = Singleton.create({ + MAINMENU_ADMIN_FILE: "/webui/js/mainmenu/admin.js", + MAINMENU_USER_FILE: "/webui/js/mainmenu/user.js", + ID: "menubar", + MAINMENU_ITEM_LEFT: "MainMenuItem_Left", + MAINMENU_ITEM_RIGHT: "MainMenuItem_Right", + MAINMENU_ITEM_CAPTION: "MainMenuItem_Caption", + SUBMENU: "MainMenuSubMenu", + CAPTION_SUFFIX: "_TITLE", + SUBMENU_SUFFIX: "_SUBMENU", + ITEM_SELECTED: "MainMenuItem_Selected", + ITEM_HIGHLIGH: "MainMenuItem_Highlight", + SUBITEM_HIGHLIGHT: "MainMenuSubItem_Highlight", + + /** + * Initialisiert das Hauptmenü + **/ + initialize: function() + { + this.m_selectedId = null; + this.m_id = null; + + switch (getUPL()) + { + case UPL_ADMIN: this.m_menu = eval("(" + HttpLoader.getText(this.MAINMENU_ADMIN_FILE) + ")"); break; + case UPL_USER: this.m_menu = eval("(" + HttpLoader.getText(this.MAINMENU_USER_FILE) + ")"); break; + default: this.m_menu = null; break; + } + }, + + /** + * Erzeugt ein Untermenü-Element. + **/ + m_createSubmenuItem: function(menuItem, submenuItem) + { + var _submenuItem_ = submenuItem; + var _menuItem_ = menuItem; + + var cell = document.createElement("div"); + var img = document.createElement("img"); + img.src="../ise/img/menuicons/"+submenuItem.id+".png"; + cell.appendChild(img); + cell.className = "MainMenuSubItem"; + cell.id = submenuItem.id; + //cell.appendChild(document.createTextNode("${"+submenuItem.id+"}")); + cell.appendChild(document.createTextNode(" "+translateKey(submenuItem.id))); + Event.observe(cell, "mouseover", function() { MainMenu.highlightOn(this); }); + Event.observe(cell, "mouseout", function() { MainMenu.highlightOff(this); }); + Event.observe(cell, "click", function() { MainMenu.beginHideSubmenu(_menuItem_); _submenuItem_.action.defer(); }); + + return cell; + }, + + /** + * Erzeugt ein Menüelement + **/ + m_createMenuItem: function(menuItem) + { + var _menuItem_ = menuItem; + + var menuElement = document.createElement("div"); + menuElement.id = menuItem.id; + if (menuItem.align == "left") { menuElement.className = "MainMenuItem_Left"; } + else { menuElement.className = "MainMenuItem_Right"; } + + if (menuItem.id == "menuHelpPage") {menuElement.className = "MainMenuItem_Right MainMenuItem_Help";} + + Event.observe(menuElement, "mouseover", function() { MainMenu.showSubmenu(_menuItem_); }); + Event.observe(menuElement, "mouseout", function() { MainMenu.beginHideSubmenu(_menuItem_); }); + + var caption = document.createElement("div"); + caption.id = menuItem.id + "_TITLE"; + caption.className = "MainMenuItemCaption"; + //caption.appendChild(document.createTextNode("${"+menuItem.id+"}")); + caption.appendChild(document.createTextNode(translateKey(menuItem.id))); + Event.observe(caption, "click", function() { MainMenu.beginHideSubmenu(_menuItem_); _menuItem_.action.defer(); }); + menuElement.appendChild(caption); + + var submenu = menuItem.submenu; + if (submenu.length > 0) + { + var submenuElement = document.createElement("div"); + submenuElement.id = menuItem.id + "_SUBMENU"; + submenuElement.className = "MainMenuSubMenu"; + Element.setStyle(submenuElement, {display: "none"}); + + + var tbody = document.createElement("div"); + Element.setStyle(tbody, {"display": "flex"}); + Element.setStyle(tbody, {"flex-direction": "column"}); + submenuElement.appendChild(tbody); + + for (var i = 0, len = submenu.length; i < len; i++) + { + tbody.appendChild(this.m_createSubmenuItem(menuItem, submenu[i])); + } + menuElement.appendChild(submenuElement); + } + + return menuElement; + }, + + /** + * Erzeugt ein neues Hauptmenü + **/ + create: function(menubar) + { + if (this.m_menu !== null) + { + for (var i = 0, len = this.m_menu.length; i < len; i++) + { + menubar.appendChild(this.m_createMenuItem(this.m_menu[i])); + } + } + else + { + menubar.hide(); + } + }, + + /** + * Zeigt ein Untermenü an + **/ + showSubmenu: function(menuItem) + { + this.hideSubmenu(); + + var id = menuItem.id; + + if (this.m_id == id) { this.m_id = null; } + + Element.addClassName(id, this.ITEM_HIGHLIGH); + var submenu = $(id + this.SUBMENU_SUFFIX); + if (submenu) { submenu.show(); } + }, + + /** + * Beginnt damit, ein Untermenü verzögert zu schließen + **/ + beginHideSubmenu: function(menuItem) + { + this.m_id = menuItem.id; + window.setTimeout("MainMenu.hideSubmenu();", 1); + }, + + /** + * Schließt ein Untermenü + **/ + hideSubmenu: function() + { + if ($(this.m_id)) + { + var menu = $(this.m_id); + var submenu = $(this.m_id + this.SUBMENU_SUFFIX); + + if (menu) { menu.removeClassName(this.ITEM_HIGHLIGH); } + if (submenu) { submenu.hide(); } + this.m_id = null; + } + }, + + /** + * Hebt ein Untermenüelement farblich hervor. + **/ + highlightOn: function(element, event) + { + Element.addClassName(element, this.SUBITEM_HIGHLIGHT); + }, + + /** + * Deaktiviert die Hervorhebung eines Untermenüelements + **/ + highlightOff: function(element, event) + { + Element.removeClassName(element, this.SUBITEM_HIGHLIGHT); + }, + + /** + * Wählt ein Menüelement aus. + * Dieses wird dann entsprechend farblich hinterlegt. + **/ + select: function(id) + { + if (this.m_selectedId !== null) { Element.removeClassName(this.m_selectedId, this.ITEM_SELECTED); } + this.m_selectedId = id; + if (this.m_selectedId !== null) { Element.addClassName(this.m_selectedId, this.ITEM_SELECTED); } + } + +}); +/** + * ipage.js + **/ + +/** + * Schnittstelle für Seiten + **/ +IPage = Interface.create({ + + /** + * Callback für das Betreten der Seite + **/ + enter: function(options) {}, + + /** + * Callback für das Verlassen der Seite + **/ + leave: function() {}, + +}); +/** + * page.js + **/ + +/** + * Basisklasse für alle Seiten + **/ +Page = Class.create({ + __interfaces__: [IPage], + MAINMENU_ID: null, + + /** + * Callback. Wird beim Betreten der Seite aufgerufen. + **/ + enter: function(options) + { + MainMenu.select(MAINMENU_ID); + }, + + /** + * Callback. Wird beim Verlassen der Seite aufgerufen. + **/ + leave: function() + { + }, + +}); +/** + * StartPage.js + **/ + +var preURL = (WEBUI_VERSION.split(".")[0] < 3) ? "" : "ccu3-"; + +StartPage = Singleton.create(Page, { + MAINMENU_ID: "MAINMENU_STARTPAGE", + downloadURLServer: "https://"+preURL+"update.homematic.com/firmware/download?cmd=download", + fieldTestURLServer: "https://fieldtest-ccu3-update.homematic.com/firmware/download?cmd=download", + fieldTestActive: "/etc/config/fieldTestActive", + downloadURL : "", + prevDownloadURL : "", + devList: [], + devIndex: 0, + newFwCounter: 0, + messageBoxHTML: "", + fetchDeviceList: false, + knownTypes: [], + numberOfKnownTypes: 0, + + /** + * Konstrutor + **/ + initialize: function () + { + this.deviceList = []; + }, + + /** + * Callback. Wird beim betreten der Seite aufgerufen. + **/ + enter: function(options) + { + iseInitUpdateArrays(); + setPath(""); + setFooter(""); + + switch (getUPL()) + { + case UPL_ADMIN: + case UPL_USER: + MainMenu.select(this.MAINMENU_ID); + loadStartPage(options); + break; + case UPL_GUEST: + loadStartPageGuest(options); + break; + default: + break; + } + + this.serial = homematic("CCU.getSerial"); + + if (homematic('CCU.existsFile', {'file': this.fieldTestActive})) { + this.downloadURL = this.fieldTestURLServer; + } else { + this.downloadURL = this.downloadURLServer; + } + + if (this.prevDownloadURL != this.downloadURL) { + this.devList = []; + this.devIndex = 0; + this.newFwCounter = 0; + this.fetchDeviceList = false; + this.knownTypes = []; + this.numberOfKnownTypes = 0; + } + this.prevDownloadURL = this.downloadURL; + conInfo("Device Fw. downloadURL: " + this.downloadURL); + }, + + getPageMeasurement: function() { + var pageElements = ["body","#header", "#menubar", "#favSelector", "#favView", "#footer"], + elementDim = []; + jQuery.each(pageElements, function(index, val) { + var elm = jQuery(val); + elementDim[val.replace(/^#/,"")] = { + "height" : elm.height(), + "width" : elm.width() + }; + }); + return elementDim; + }, + + // WebUI-Version + showCurrentFirmware: function() { + jQuery("#currentFirmware").text(WEBUI_VERSION); + + //homematic("Interface.getDeviceDescription", {"interface": "BidCos-RF", "address": "BidCoS-RF"}, function(result) { + // if (result != null) { + // WEBUI_VERSION = result.firmware; + // } else { + // WEBUI_VERSION = "0.0.0"; + // } + // jQuery("#currentFirmware").text(WEBUI_VERSION); + //}); + }, + + /*evalVersionAGreaterThanB: function(a, b) { + var aSplit = a.split(".", 3); + var bSplit = b.split(".", 3); + if( Array.isArray(aSplit) && aSplit.length == 3) { + if(Array.isArray(bSplit) && bSplit.length == 3) { + //major + var aI = parseInt(aSplit[0]); + var bI = parseInt(bSplit[0]); + if( aI > bI ) { return true; } + if( aI < bI ) { return false; } + //major equal, cmp minor + aI = parseInt(aSplit[1]); + bI = parseInt(bSplit[1]); + if( aI > bI ) { return true; } + if( aI < bI ) { return false; } + //minor equal, check patch + aI = parseInt(aSplit[2]); + bI = parseInt(bSplit[2]); + if( aI > bI) { return true; } + if( aI <= bI ) { return false; } + } else { return true; } + } else { return false; } + return false; + },*/ + + cmpVersion: function (aa, bb) { + // 0 Version equal + // >0 Version aa newer + // <0 Version bb newer + const aArr = aa.split("."); + const bArr = bb.split("."); + const min = Math.min(aArr.length, bArr.length); + for (let index = 0; index < min; index++) { + if (aArr[index] != bArr[index]) + return (aArr[index] - bArr[index]); + } + return 0; + }, + + showAllDeviceFirmware: function() { + var self = this; + if (!this.fetchDeviceList) { + this.fetchDeviceList = true; // prevents this to be called multiple times (when clicking the start page) + this.messageBoxHTML = ""; + this.DeviceUpdateList = {}; + this.newFwCounter = 0; + this.devIndex = 0; + if (this.devList.length == 0) { + homematic("Interface.listDevices", {"interface": "BidCos-RF"}, function (deviceList) { + conInfo("Fetch RF device list"); + if (deviceList) { + for (var i = 0; i < deviceList.length; i++) { + var device = deviceList[i]; + if (device.children && device.type != "HM-RCV-50") { + self.devList.push({"type": device.type, "firmware": device.firmware, "availableFirmware": device.availableFirmware, "updatable": (device.updatable == "1") ? true : false, "address": device.address}); + } + } + } + homematic("Interface.listDevices", {"interface": "BidCos-Wired"}, function (deviceList) { + conInfo("Fetch Wired device list"); + if (deviceList) { + for (var i = 0; i < deviceList.length; i++) { + var device = deviceList[i]; + if (device.children && device.type != "HMW-RCV-50") { + self.devList.push({"type": device.type, "firmware": device.firmware, "availableFirmware": device.availableFirmware, "updatable": (device.updatable == "1") ? true : false, "address": device.address}); + } + } + } + homematic("Interface.listDevices", {"interface": "HmIP-RF"}, function (deviceList) { + conInfo("Fetch HmIP device list"); + if (deviceList) { + for (var i = 0; i < deviceList.length; i++) { + var device = deviceList[i]; + if (device.children.length > 0 && (device.type != "HmIP-RCV-50")) { + self.devList.push({"type": device.type, "firmware": device.firmware, "availableFirmware": device.availableFirmware, "updatable": (device.updatable == "1") ? true : false, "address": device.address}); + conInfo("hmipdev: "+device.type+" fw:"+device.firmware+" availFw: "+device.availableFirmware); + } + } + } + conInfo("Check firmware version of all devices - number of devices: " + self.devList.length); + if (self.devList.length > 0) { + function sortorder_devList(a , b) { + if (a.type == b.type) { + return (a.address < b.address) ? -1 : 1; + } else { + return (a.type < b.type) ? -1 : 1; + } + } + + self.devList.sort(sortorder_devList); + self.fetchAndSetDeviceVersion(); + } + }); + }); + }); + } else { + self.fetchAndSetDeviceVersion(); + } + } + }, + + fetchAndSetDeviceVersion: function() { + var self = this; + if (this.numberOfKnownTypes == 0) { + conInfo("Fetch device firmware list from server"); + homematic.com.getListOfAvailableFirmware(function (result) { + conInfo("List fetched"); + jQuery.each(result, function (index, value) { + var type = value.type.toLowerCase(); + type = type.replace(/_(?!.*_)/, ' '); //SPHM-1039 + if(value.type=="HmIP-HAP-JS1") {//SPHM-1034 HAP JS1 has different pattern than other devices. + type = "HmIP-HAP JS1".toLowerCase(); + } + self.knownTypes[type] = value.version; + self.numberOfKnownTypes = index + 1; + if(value.type == "HmIP-HAP") { //SPHM-1022 + self.knownTypes["HmIP-HAP-B1".toLowerCase()] = value.version; + self.numberOfKnownTypes += 1; + } + }); + self.setDeviceVersion(self.devList[self.devIndex].type, self.knownTypes[self.devList[self.devIndex].type.toLowerCase()]); + }); + } else { + conInfo("Don't fetch the device firmware list from the server. Use the known list."); + self.setDeviceVersion(self.devList[self.devIndex].type, self.knownTypes[self.devList[self.devIndex].type.toLowerCase()]); + } + }, + + setDeviceVersion: function (deviceType, fwVersion) { + var self = this; + var deviceTypeForUrl = deviceType.replace(/\ (?!.*\ )/, '_'); //SPHM-1039; + if(deviceType == "HmIP-HAP JS1") {//SPHM-1034 HAP JS1 has different pattern than other devices. + deviceTypeForUrl = "HmIP-HAP-JS1"; + } + if(deviceType == "HmIP-HAP-B1") { //SPHM-1022 Use HAP Fw for HAP-B1 + deviceTypeForUrl = "HmIP-HAP"; + } + if (fwVersion) { + var devAddress = self.devList[self.devIndex].address, + curFw = self.devList[self.devIndex].firmware, + arCurFw = curFw.split("."), + availableFW = self.devList[self.devIndex].availableFirmware,// auf der CCU gespeicherte Geräte-Fw. + devIsUpdatable = self.devList[self.devIndex].updatable, + arResultMajorMinorPatch, + resultMajorMinor, + newFW = fwVersion; + + // The current fw for BidCos devices has no patch version + if (arCurFw.length == 2) { + arResultMajorMinorPatch = fwVersion.split("."); + resultMajorMinor = arResultMajorMinorPatch[0] + "." + arResultMajorMinorPatch[1]; + newFW = resultMajorMinor; + } + + // generate RefUpdateList with detailed Information per DeviceType for grouped list + if (devIsUpdatable && fwVersion && (fwVersion != "n/a") && (newFW != curFw)) { + if (!this.DeviceUpdateList[deviceType]) { + this.DeviceUpdateList[deviceType] = {}; + } + var RefUpdateList = this.DeviceUpdateList[deviceType][curFw]; + if (!RefUpdateList) { + this.DeviceUpdateList[deviceType][curFw] = { DevCnt: 0, FWAvailable: 0, FWUpload: 0, Address: [], downloadURL: this.downloadURL, deviceTypeForUrl: deviceTypeForUrl, fwVersion: fwVersion, curVersion: curFw, availableFirmware: availableFW }; + RefUpdateList = this.DeviceUpdateList[deviceType][curFw]; + } + RefUpdateList.DevCnt++; + RefUpdateList.Address.push(self.devList[self.devIndex].address); + // FW not yet available on the CCU + if (availableFW != newFW) { + RefUpdateList.FWUpload++; + } else { + RefUpdateList.FWAvailable++; + } + self.newFwCounter++; + } + } + self.devIndex++; + if (self.devIndex < self.devList.length) { + self.fetchAndSetDeviceVersion(); + } else { + for (const Typ of Object.keys(this.DeviceUpdateList).sort()) { + for (const curFw of Object.keys(this.DeviceUpdateList[Typ]).sort()) { + let Obj = this.DeviceUpdateList[Typ][curFw]; + let curVersion = Obj.curVersion; + let color = "black"; + if (this.cmpVersion(Obj.curVersion, Obj.fwVersion) > 0) { + curVersion = "" + Obj.curVersion + ""; + color = "orange"; + } + this.messageBoxHTML += "
" + + Typ + + "" + + Obj.Address.join('
') + + "
" + + curVersion + + "
"+ + "" + + "" + + "" + + "" + + "" + + "" + + "" + + ""+ + ""+ + ""+ + ""+ + ""+ + this.messageBoxHTML + + "" + + "
"+translateKey('dialogShowDeviceFirmwareTHDevice')+""+translateKey('lblQuantity')+""+translateKey('dialogShowDeviceFirmwareTHSerials')+""+translateKey('dialogShowDeviceFirmwareTHCurFw')+""+translateKey('dialogShowDeviceFirmwareTHNewFw')+"

"+translateKey('dialogShowDeviceFirmwareDescription')+":
" + + translateKey('dialogShowDeviceFirmwareDownloadInfo1') + "
" + + translateKey('dialogShowDeviceFirmwareDownloadInfo2') + " " + + "'" + + " => " + translateKey('footerBtnNew') + "' " + + translateKey('dialogShowDeviceFirmwareDownloadInfo3') + + //"
"+translateKey('dialogShowDeviceFirmwareLinkDownload')+"
", + "", + 450, + msgBoxHeight + ); + }, + + showAddonUpdate: function() { + addonUpdateList = ""; + var addonversions = homematic('CCU.getAddonVersions'); + if (addonversions && addonversions !== "false") { + var localaddonversions = addonversions.local; + var onlineaddonversions = addonversions.online; + for(var l_obj in localaddonversions) { + if (typeof localaddonversions[l_obj] === "object") { + + for(var o_obj in onlineaddonversions) { + if (typeof onlineaddonversions[o_obj] === "object") { + + if (onlineaddonversions[o_obj].name == localaddonversions[l_obj].name) { + //console.log(onlineaddonversions[o_obj].name +" local: "+localaddonversions[l_obj].localversion+", online: "+onlineaddonversions[o_obj].webversion); + if (localaddonversions[l_obj].localversion != onlineaddonversions[o_obj].webversion && onlineaddonversions[o_obj].webversion != '' && onlineaddonversions[o_obj].webversion != 'n/a') { + addonUpdateList += "
· "+onlineaddonversions[o_obj].name+" ("+onlineaddonversions[o_obj].webversion+")"; + } + } + + } + } + } + } + } + + if (addonUpdateList !== "") { + var self = this, + rowShowAddonUpdates = jQuery("#addonUpdatesAvailable"), + btnShowAddonUpdates = jQuery("#addonUpdatesAvailable .firmwareAvailable"); + btnShowAddonUpdates.click(function () { + showSoftwareCP(); + }); + jQuery("#addonUpdatesAvailableList").html(addonUpdateList); + rowShowAddonUpdates.show(); + } + }, + + + showUpdate: function() { + var fn = function() { + var result = homematic.com.isUpdateAvailable(); + if ((result) && ($("updateCol"))) { + var updateText = " (" + homematic.com.getLatestVersion() + " " + translateKey('isAvailable') + ")"; + if (getUPL() == UPL_ADMIN) { + jQuery("#updateCol").text(updateText) + .addClass("firmwareAvailable") + .unbind("click").bind("click", function() { + showNewFirmwareDownload(); + }); + } else { + jQuery("#updateCol").text(updateText); + } + jQuery("#updateCol").show(); + } + return result; + }; + + if (!fn()) { + window.setTimeout(fn, 5000); + } + }, + + showDutyCycle: function() { + showDutyCycle(); + } + +}); +ControlPage = new function() +{ + var MAINMENU_ID = "MAINMENU_CONTROL"; + + this.enter = function(options) + { + MainMenu.select(MAINMENU_ID); + loadStatus(options); + }; + + this.leave = function() + { + // open the systemLanguage config dialog if no systemLanguage was selected yet + if (homematic('CCU.getSystemLanguage') === 'none') { + CreatePopup(ID_SYSTEM_LANGUAGE_CONFIG); + } + }; + +}(); +ControlRoomsPage = new function() +{ + var MAINMENU_ID = "MAINMENU_CONTROL"; + + this.enter = function(options) + { + MainMenu.select(MAINMENU_ID); + loadHandlingRooms(options); + }; + + this.leave = function() + { + }; + +}(); +ControlFunctionsPage = new function() +{ + var MAINMENU_ID = "MAINMENU_CONTROL"; + + this.enter = function(options) + { + MainMenu.select(MAINMENU_ID); + loadHandlingFunctions(options); + }; + + this.leave = function() + { + }; + +}(); +ControlFavoritesPage = new function() +{ + + var MAINMENU_ID = "MAINMENU_FAVORITES"; + + this.enter = function(options) + { + MainMenu.select(MAINMENU_ID); + loadFavorites(options); + }; + + this.leave = function() + { + }; + +}(); +ControlFavoritePage = new function() +{ + var MAINMENU_ID = "MAINMENU_FAVORITES"; + + this.enter = function(options) + { + MainMenu.select(MAINMENU_ID); + loadFavViewer(options); + }; + + this.leave = function() + { + }; + +}(); +ControlDevicesPage = new function() +{ + var MAINMENU_ID = "MAINMENU_CONTROL"; + + this.enter = function(options) + { + MainMenu.select(MAINMENU_ID); + loadHandlingDevices(options); + }; + + this.leave = function() + { + }; + +}(); +ControlProgramsPage = new function() +{ + var MAINMENU_ID = "MAINMENU_CONTROL"; + + this.enter = function(options) + { + MainMenu.select(MAINMENU_ID); + loadHandlingPrograms(); + }; + + this.leave = function() + { + }; + +}(); +ControlVariablesPage = new function() +{ + var MAINMENU_ID = "MAINMENU_STATUS"; + + this.enter = function(options) + { + MainMenu.select(MAINMENU_ID); + loadStatusviewSysVars(options); + }; + + this.leave = function() + { + }; + +}(); +ControlProtocolPage = new function() +{ + var MAINMENU_ID = "MAINMENU_STATUS"; + + this.enter = function(options) + { + MainMenu.select(MAINMENU_ID); + loadStatusviewSysProtocol(options); + }; + + this.leave = function() + { + }; + +}(); +LinksAndProgramsPage = new function() +{ + var m_menuId = "MAINMENU_LINKSANDPROGRAMS"; + + this.enter = function(options) + { + MainMenu.select(m_menuId); + loadLinkProg(options); + }; + + this.leave = function() + { + }; + +}(); +LinkListPage = new function() +{ + var m_menuId = "MAINMENU_LINKSANDPROGRAMS"; + + this.enter = function(options) + { + var args = ""; + + MainMenu.select(m_menuId); + if (typeof(options) != "undefined") + { + for(key in options) + { + args += "&" + key + "=" + options[key]; + } + } + updateContent("/config/ic_linkpeerlist.cgi", args); + }; + + this.leave = function() + { + }; + +}(); +ProgramListPage = new function() +{ + var m_menuId = "MAINMENU_LINKSANDPROGRAMS"; + + this.enter = function(options) + { + MainMenu.select(m_menuId); + loadProgramList(options); + }; + + this.leave = function() + { + }; + +}(); +LinkEditProfilePage = new function() +{ + var m_menuId = "MAINMENU_LINKSANDPROGRAMS"; + + this.enter = function(options) + { + var iface = options.iface; + var sender = options.sender; + var receiver = options.receiver; + + MainMenu.select(m_menuId); + OpenSetProfiles(iface, sender, receiver); + + }; + + this.leave = function() + { + }; + +};AlarmMessagesPage = new function() +{ + + this.enter = function(options) + { + MainMenu.select(null); + if ($("msgAlarms")) { $("msgAlarms").addClassName("Messages_Selected"); } + loadAlarmMessages(options); + }; + + this.leave = function() + { + if ($("msgAlarms")) { $("msgAlarms").removeClassName("Messages_Selected"); } + }; + +}(); +ServiceMessagesPage = new function() +{ + + this.enter = function(options) + { + MainMenu.select(null); + if ($("msgServices")) { $("msgServices").addClassName("Messages_Selected"); } + loadServiceMessages(options); + }; + + this.leave = function() + { + if ($("msgServices")) { $("msgServices").removeClassName("Messages_Selected"); } + }; + +}(); +HelpPage = new function() +{ + + var m_menuId = "MAINMENU_HELP"; + + this.enter = function(options) + { + MainMenu.select(m_menuId); + loadHelp(options); + }; + + this.leave = function() + { + }; + +}(); +adminFirstStartup = new function() +{ + + this.enter = function(options) + { + ccuAdminFirstStartup(options); + }; + + this.leave = function() + { + }; + +}(); +userFirstStartup = new function() +{ + + this.enter = function(options) + { + ccuUserFirstStartup(options); + }; + + this.leave = function() + { + }; + +}(); +/** + * devielistpage.js + **/ + +/** + * Geräteliste. + **/ + +if (PLATFORM == "Central") { + + DeviceListPage = Singleton.create(Page, { + MAINMENU_ID: "MAINMENU_OPTIONS", + TREE_COLLAPSED_FOOTER_HTML: "" + + "" + + "" + + "" + + "" + + "" + + "" + + "
${footerBtnPageBack}
${footerBtnResetFilter}
${footerBtnOpenTree}
", + TREE_EXPANDED_FOOTER_HTML: "" + + "" + + "" + + "" + + "" + + "" + + "" + + "
${footerBtnPageBack}
${footerBtnResetFilter}
${footerBtnCloseTree}
", + FLAT_FOOTER_HTML: "" + + "" + + "" + + "" + + "" + + "" + + "" + + "
${footerBtnPageBack}
${footerBtnResetFilter}
${footerBtnRestoreTree}
", + MODE: + { + TREE: 1, // Anzeige als Baumstruktur + FLAT: 2 // Anzeige als (flache) Kanalliste + }, + UPDATE_DATA: true, + SORT_FN: + { + NAME : function(channels, reverse) { return channels.ex_sortBy("name", reverse); }, + TYPE_NAME : function(channels, reverse) { return channels.ex_sortBy("typeName", reverse); }, + DESCRIPTION: function(channels, reverse) { return channels.ex_sortBy("typeDescription", reverse); }, + ADDRESS : function(channels, reverse) { return channels.ex_sortBy("address", reverse); }, + CATEGORY : function(channels, reverse) { return channels.ex_sortBy("category", reverse); }, + MODE : function(channels, reverse) { return channels.ex_sortBy("mode", reverse); }, + ROOM_NAMES : function(channels, reverse) { + channels.sort(function(a, b) { return Object.ex_compare(a.rooms.ex_joinItem("name"), b.rooms.ex_joinItem("name")); }); + return (reverse) ? channels.reverse() : channels; + }, + FUNC_NAMES : function(channels, reverse) { + channels.sort(function(a, b) { return Object.ex_compare(a.subsections.ex_joinItem("name"), b.subsections.ex_joinItem("name")); }); + return (reverse) ? channels.reverse() : channels; + } + }, + PREFIX: "DeviceListPage", + HIGHLIGHT_CLASS: "DeviceListCell_Highlight", + CATEGORIES: + [ + {id: "CATEGORY_SENDER", name: translateKey("generalChannelConfigLblSender")}, // Sender + {id: "CATEGORY_RECEIVER", name: translateKey("generalChannelConfigLblReceiver")}, // Empfänger + {id: "CATEGORY_NOT_LINKABLE", name: translateKey("generalChannelConfigLblNone")} // nicht verknüpfbar + ], + MODES: + [ + {id: "MODE_DEFAULT", name: translateKey("lblStandard") }, // Standard + {id: "MODE_AES", name: translateKey("lblSecured") } // Gesichert + ], + INTERFACES: + [ + {id: "INTERFACE_BIDCOS_RF", name: translateKey("BidCosRF-Filter")}, // BidCos-RF + {id: "INTERFACE_BIDCOS_WIRED", name: translateKey("BidCosWired-Filter")}, // BidCos-Wired + {id: "INTERFACE_HMIP_RF", name: translateKey("HmIPRF")}, // HmIP-RF + {id: "INTERFACE_VIRTUAL_DEVICES", name: translateKey("VirtualDevices")}, + {id: "INTERFACE_CUXD", name: "CUxD"}, // + {id: "INTERFACE_CCU_JACK", name: "CCU-Jack"}, // + {id: "INTERFACE_SYSTEM", name: "System"} // + ], + + /** + * Konstruktor + **/ + initialize: function() + { + this.m_onRemoveDevice = this.onRemoveDevice.bind(this); + + this.treeTemplate = TrimPath.parseTemplate(DEVICELIST_TREE_JST); + this.flatTemplate = TrimPath.parseTemplate(DEVICELIST_FLAT_JST); + + this.channels = new Array(); + this.devices = new Array(); + this.groups = {}; + + this.mode = this.MODE.TREE; + this.sortId = "NAME"; + this.sortDescend = false; + this.isExpanded = false; + + this.virtChnCounter = 0; + + DeviceList.removeEvent.add(this.m_onRemoveDevice); + }, + + /** + * Aktualisiert die zwischengespeicherten Daten eines Geräts + **/ + updateDeviceData: function(device) + { + device.groups.each(function(group) { + if (typeof(group._expanded) == "undefined") { group._expanded = false; } + }); + + // if (typeof(device._expanded) == "undefined") { device._expanded = false; } + device._expanded = false; + + device.channels.each(function(channel) { + channel._isVisible = true; + channel.highlightChannel = ( ! userIsNoExpert && (channel.channelType.indexOf("_VIRTUAL_RECEIVER") != -1)) ? true : false; + }); + }, + + /** + * Aktualisiert alle zwischengespreicherten Daten + **/ + updateData: function() + { + this.devices = DeviceList.listDevices().ex_sortBy("name"); + this.channels = DeviceList.listChannels(); + this.devices.each(this.updateDeviceData, this); + }, + + /** + * + **/ + sort: function(channels) + { + var sort_fn = this.SORT_FN[this.sortId]; + + if (typeof(sort_fn) != "undefined") { return sort_fn(channels, this.sortDescend); } + else { return channels; } + }, + + /** + * + **/ + matchChannel: function(channel) + { + return ((this.NameFilter.match(channel.name)) && + (this.TypeNameFilter.match(channel.typeName)) && + (this.DescriptionFilter.match(translateKey(channel.typeDescription))) && + (this.AddressFilter.match(channel.address)) && + (this.CategoryFilter.matchString(channel.category)) && + (this.ModeFilter.matchStringArray(channel.mode)) && + (this.RoomFilter.matchArray(channel.rooms)) && + (this.FuncFilter.matchArray(channel.subsections))); + }, + + /** + * + **/ + filterChannels: function(channels) + { + var result = new Array(); + + channels.each(function(channel) { + if (this.matchChannel(channel)) { result.push(channel); } + }, this); + + return result; + }, + + matchDevice: function(device) + { + return ((this.NameFilter.match(device.name)) && + (this.TypeNameFilter.match(device.typeName)) && + (this.DescriptionFilter.match(translateKey(device.typeDescription))) && + (this.AddressFilter.match(device.address)) && + (this.InterfaceFilter.matchString(device.interfaceDisplayName)) && + (this.ModeFilter.matchStringArray(device.modes)) && + (this.RoomFilter.matchArray(device.rooms)) && + (this.FuncFilter.matchArray(device.subsections))); + }, + + filterDevices: function(devices) + { + var result = new Array(); + + devices.each(function(device) { + if (this.matchDevice(device)) { result.push(device); } + }, this); + + return result; + }, + + /** + * Startet die Aktualisierung der Anzeige + **/ + beginUpdateView: function(updateData) + { + var _updateData_ = updateData; + if (typeof(_updateData_) == "undefined") { _updateData_ = false; } + $("content").setStyle({cursor: "wait"}); + window.setTimeout("DeviceListPage.updateView(" + _updateData_ + ");", 1); + }, + + /** + * Betreten der Geräteliste + **/ + enter: function(options) + { + var self = this; + this.content = $("content"); + this.content.innerHTML = "\"Loading...\""; + this.m_visible = true; + + MainMenu.select(this.MAINMENU_ID); + setPath(""+translateKey('menuSettingsPage')+" > "+translateKey('submenuDevices')); + setFooter(""); + this.userIsNoExpert = userIsNoExpert; + + this.mode = this.MODE.TREE; + this.sortId = "NAME"; + this.sortDescend = false; + + var rooms = RoomList.list().ex_sortBy("name"); + var funcs = SubsectionList.list().ex_sortBy("name"); + + this.NameFilter = new StringFilter("DeviceListPage.NameFilter", this.beginUpdateView); + this.TypeNameFilter = new StringFilter("DeviceListPage.TypeNameFilter", this.beginUpdateView); + this.DescriptionFilter = new StringFilter("DeviceListPage.DescriptionFilter", this.beginUpdateView); + this.AddressFilter = new StringFilter("DeviceListPage.AddressFilter", this.beginUpdateView); + this.InterfaceFilter = new ListFilter("DeviceListPage.InterfaceFilter", this.INTERFACES, this.beginUpdateView); + this.CategoryFilter = new ListFilter("DeviceListPage.CategoryFilter", this.CATEGORIES, this.beginUpdateView); + this.ModeFilter = new ListFilter("DeviceListPage.ModeFilter", this.MODES, this.beginUpdateView); + this.RoomFilter = new ListFilter("DeviceListPage.RoomFilter", rooms, this.beginUpdateView); + this.FuncFilter = new ListFilter("DeviceListPage.FuncFilter", funcs, this.beginUpdateView); + + window.setTimeout(function() {self.beginUpdateView(self.UPDATE_DATA);},50); + }, + + leave: function() + { + this.m_visible = false; + }, + + /** + * Prüft, ob es sich bei dem Kanal um einen der neuen virtellen Kanäle handelt (z. B. VIRTUAL_DIMMER, VIRTUAL_SWITCH, VIRTUAL_BLIND) + * Diese Kanäle sollen nur dann angezeigt werden, wenn der User den Expertenmodus aktiviert hat. + * Die virtuellen Fernbedienungen der CCU 'VIRTUAL_KEY' sind nicht betroffen + **/ + showVirtualChannel: function(channel) { + var deviceType = channel.deviceType.name.toUpperCase(), + interfaceName = channel.device.interfaceName, + hmIP_RF_Identifier = "HmIP-RF", + channelNr = parseInt(channel.index); + + if (interfaceName != hmIP_RF_Identifier) { + return ( + (!this.userIsNoExpert) + || (channel.channelType == "VIRTUAL_KEY") + || ((interfaceName != hmIP_RF_Identifier) && (channel.channelType.split("_")[0] != "VIRTUAL")) + ) ? true : false; + } else { + if (this.userIsNoExpert) { + if ((deviceType != "HMIP-MIOB") && (deviceType != "HMIP-WHS2")) { + if ( + channel.channelType == "DIMMER_VIRTUAL_RECEIVER" || + channel.channelType == "SWITCH_VIRTUAL_RECEIVER" || + channel.channelType == "BLIND_VIRTUAL_RECEIVER" || + channel.channelType == "SHUTTER_VIRTUAL_RECEIVER" || + channel.channelType == "ACOUSTIC_SIGNAL_VIRTUAL_RECEIVER" || + channel.channelType == "SERVO_VIRTUAL_RECEIVER" + ) { + this.virtChnCounter = (this.virtChnCounter >= 3) ? 0 : this.virtChnCounter; + this.virtChnCounter++; + if (this.virtChnCounter == 1) { + return true; + } else { + return false; + } + } + } else { + if (((deviceType == "HMIP-MIOB") || (deviceType == "HMIP-WHS2")) && + ((channelNr == 2) || (channelNr == 4) || (channelNr == 6) || (channelNr == 8))) { + return false; // hide the virtual channels 2,4,6,8 - 3 and 7 are necessary for certain links + } + } + return true; + } + } + return true; + }, + + isHmIPMaintenanceChannel: function(channel) + { + return (channel.channelType == "MAINTENANCE") ? true : false; + }, + + isChannelVisible: function(channel) + { + // Don't show some channels + var result = true; + switch (channel.channelType) { + case "ALARM_COND_SWITCH_TRANSMITTER": + case "WEEK_PROGRAM": + result = false; + break; + default: result = true; + } + return result; + }, + + + /** + * Zeigt den Konfigurationsdialog für einen Kanal an. + **/ + selectChannel: function(id) + { + var _this_ = this; + var channel = DeviceList.getChannel(id); + + ChannelConfigDialog.show(channel, function(result) { + if (result == ChannelConfigDialog.RESULT_OK) + { + _this_.beginUpdateView(); + } + }); + }, + + /** + * Zeigt den Konfigurationsdialog für ein Gerät an. + **/ + selectDevice: function(id) + { + var _this_ = this; + var device = DeviceList.getDevice(id); + + DeviceConfigDialog.show(device, function(result) { + if (result == DeviceConfigDialog.RESULT_OK) + { + _this_.beginUpdateView(); + } + }); + }, + + /** + * + **/ + sortBy: function(sortId) + { + if (this.mode == this.MODE.FLAT) + { + if (this.sortId == sortId) { this.sortDescend = !this.sortDescend; } + else { this.sortDescend = false; } + } + else + { + this.sortDescend = false; + this.mode = this.MODE.FLAT; + this.resetFilters(false); + } + + this.sortId = sortId; + this.beginUpdateView(); + }, + + + /** + * Filter zurücksetzen + **/ + resetFilters: function(update) + { + var _update_ = update; + if (typeof(_update_) == "undefined") { _update_ = true; } + + this.NameFilter.reset(); + this.TypeNameFilter.reset(); + this.DescriptionFilter.reset(); + this.AddressFilter.reset(); + this.InterfaceFilter.reset(); + this.CategoryFilter.reset(); + this.ModeFilter.reset(); + this.RoomFilter.reset(); + this.FuncFilter.reset(); + + if (_update_ == true) { this.beginUpdateView(); } + }, + + expandTree: function() + { + this.mode = this.MODE.TREE; + + this.devices.each(function(device) { + device._expanded = true; + + device.channels.each(function(channel) { + channel._isVisible = false; + if(this.showVirtualChannel(channel)) { + channel._isVisible = true; + } + }, this); + + device.groups.each(function(group) { + group._expanded = true; + }); + }, this); + + this.isExpanded = true; + this.beginUpdateView(); + }, + + + collapseTree: function() + { + this.mode = this.MODE.TREE; + this.devices.each(function(device) { + device._expanded = false; + device.groups.each(function(group) { + group._expanded = false; + }); + }); + + this.isExpanded = false; + this.beginUpdateView(); + }, + + expandDevice: function(event, id) + { + var evt = (event) ? event : window.event; + Event.stop(evt); + + var device = DeviceList.getDevice(id); + + device._expanded = true; + + $(this.PREFIX + id + "PLUS").hide(); + $(this.PREFIX + id + "MINUS").show(); + + device.groups.each(function(group) { + $(this.PREFIX + group.id).show(); + $(this.PREFIX + group.id + "Thumbnail").show(); + this.collapseGroup(evt, group.id); + }, this); + device.singles.each(function(channel) { + channel._isVisible = false; + if(this.showVirtualChannel(channel) && (this.isChannelVisible(channel)) ) { + channel._isVisible = true; + $(this.PREFIX + channel.id).show(); + $(this.PREFIX + channel.id + "Thumbnail").show(); + } + }, this); + }, + + + collapseDevice: function(event, id) + { + var evt = (event) ? event : window.event; + Event.stop(evt); + + var device = DeviceList.getDevice(id); + device._expanded = false; + + $(this.PREFIX + id + "MINUS").hide(); + $(this.PREFIX + id + "PLUS").show(); + + device.groups.each(function(group) { + $(this.PREFIX + group.id).hide(); + $(this.PREFIX + group.id + "Thumbnail").hide(); + this.collapseGroup(evt, group.id); + }, this); + device.singles.each(function(channel) { + try { + $(this.PREFIX + channel.id).hide(); + $(this.PREFIX + channel.id + "Thumbnail").hide(); + } catch (e) {} + }, this); + }, + + expandGroup: function(event, id) + { + var evt = (event) ? event : window.event; + Event.stop(evt); + + var group = DeviceList.getChannelGroup(id); + group._expanded = true; + + $(this.PREFIX + id + "PLUS").hide(); + $(this.PREFIX + id + "MINUS").show(); + + group.channels.each(function(channel) { + $(this.PREFIX + channel.id).show(); + $(this.PREFIX + channel.id + "Thumbnail").show(); + }, this); + }, + + collapseGroup: function(event, id) + { + var evt = (event) ? event : window.event; + Event.stop(evt); + + var group = DeviceList.getChannelGroup(id); + group._expanded = false; + + $(this.PREFIX + id + "MINUS").hide(); + $(this.PREFIX + id + "PLUS").show(); + + group.channels.each(function(channel) { + $(this.PREFIX + channel.id).hide(); + $(this.PREFIX + channel.id + "Thumbnail").hide(); + }, this); + }, + + /** + * Baumstruktur wiederherstellen + **/ + recoverTree: function() + { + this.mode = this.MODE.TREE; + this.resetFilters(); + }, + + /** + * Gerät löschen + **/ + deleteDevice: function(event, id) + { + var evt = (event) ? event : window.event; + Event.stop(evt); + + var device = DeviceList.getDevice(id); + new DeleteDeviceDialog(device, function(isDeleted) { + // if (isDeleted) { WebUI.reload(); } + }); + }, + + /** + * Gerät, Kanal oder Kanalgruppe konfigurieren + **/ + showConfiguration: function(event, typeId, id) + { + var evt = (event) ? event : window.event; + try { + Event.stop(evt); + } catch(e) {} + + switch (typeId) + { + case "DEVICE": + var device = DeviceList.getDevice(id); + var iface = device.interfaceName; + var address = device.address; + WebUI.enter(DeviceConfigPage, {'iface': iface, 'address': address, 'redirect_url': 'GO_BACK'}); + break; + case "GROUP": + var group = DeviceList.getChannelGroup(id); + var iface = group.device.interfaceName; + var address = group.channels[0].address; + WebUI.enter(DeviceConfigPage, {'iface': iface, 'address': address, 'redirect_url': 'GO_BACK', 'with_group': 1}); + break; + case "CHANNEL": + var channel = DeviceList.getChannel(id); + var iface = channel.device.interfaceName; + var address = channel.address; + WebUI.enter(DeviceConfigPage, {'iface': iface, 'address': address, 'redirect_url': 'GO_BACK'}); + break; + default: + Debug.assert(false, "DeviceListPage.showConfiguration: invalid type id"); + break; + } + + }, + + /** + * Direkte Verknüpfungen anzeigen + **/ + showDirectLinks: function(event, typeId, id) + { + var evt = (event) ? event : window.event; + Event.stop(evt); + + switch (typeId) + { + case "DEVICE": + var device = DeviceList.getDevice(id); + WebUI.enter(LinkListPage, { + iface : device.interfaceName, + channel: device.address + }); + break; + case "GROUP": + var group = DeviceList.getChannelGroup(id); + WebUI.enter(LinkListPage, { + iface : group.device.interfaceName, + channel: group.channels[0].address, + keypair: 1 + }); + break; + case "CHANNEL": + var channel = DeviceList.getChannel(id); + WebUI.enter(LinkListPage, { + iface : channel.device.interfaceName, + channel: channel.address + }); + break; + default: + Debug.assert(false, "DeviceListPage.showDirectLinks: invalid type id"); + break; + } + }, + + /** + * Programme anzeigen + **/ + showPrograms: function(event, typeId, id) + { + var evt = (event) ? event : window.event; + Event.stop(evt); + + switch (typeId) + { + case "DEVICE": + var device = DeviceList.getDevice(id); + var ids = device.listProgramIds(); + WebUI.enter(ProgramListPage, ids.join("\t")); + break; + case "GROUP": + var group = DeviceList.getChannelGroup(id); + var ids = group.listProgramIds(); + WebUI.enter(ProgramListPage, ids.join("\t")); + break; + case "CHANNEL": + var channel = DeviceList.getChannel(id); + var ids = channel.listProgramIds(); + WebUI.enter(ProgramListPage, ids.join("\t")); + break; + default: + Debug.assert(false, "DeviceListPage.showPrograms: invalid type id"); + break; + } + }, + + /** + * Aktualisert die Anzeige + **/ + updateView: function(updateData) + { + this.content.setStyle({"cursor": "default"}); + if (updateData === true) { this.updateData(); } + + if (this.mode == this.MODE.TREE) + { + this.content.innerHTML = this.treeTemplate.process({ + PREFIX : this.PREFIX, + nameFilter : this.NameFilter, + typeNameFilter : this.TypeNameFilter, + descriptionFilter: this.DescriptionFilter, + addressFilter : this.AddressFilter, + interfaceFilter : this.InterfaceFilter, + modeFilter : this.ModeFilter, + funcFilter : this.FuncFilter, + roomFilter : this.RoomFilter, + devices : this.filterDevices(this.devices) + }); + if (this.isExpanded) { setFooter(this.TREE_EXPANDED_FOOTER_HTML); } + else { setFooter(this.TREE_COLLAPSED_FOOTER_HTML); } + } + else + { + this.content.innerHTML = this.flatTemplate.process({ + PREFIX : this.PREFIX, + sortId : this.sortId, + sortDescend : this.sortDescend, + nameFilter : this.NameFilter, + typeNameFilter : this.TypeNameFilter, + descriptionFilter: this.DescriptionFilter, + addressFilter : this.AddressFilter, + categoryFilter : this.CategoryFilter, + modeFilter : this.ModeFilter, + funcFilter : this.FuncFilter, + roomFilter : this.RoomFilter, + channels : this.sort(this.filterChannels(this.channels)) + }); + setFooter(this.FLAT_FOOTER_HTML); + } + + var translatedSecure = translateKey("lblSecured"); + var translatedStandard = translateKey("lblStandard"); + jQuery(".j_chMode").each(function(i, e){ + switch (e.textContent) { + case "Gesichert": + e.textContent = translatedSecure; + break; + case "Standard": + e.textContent = translatedStandard; + break; + } + }); + + translateJSTemplate("#DeviceListTable"); + translatePage(".j_rooms, .j_functions"); // this translates the room name as well the function name within the main devicelist (Settings > Devices) + jQuery("#DeviceListPage_RoomFilter").draggable(); + jQuery("#DeviceListPage_FuncFilter").draggable(); + + DeviceList.updateDeviceStatus(); + eQ3.HomeMatic.Event.fire({type: 'DeviceListPageLoaded'}); + }, + + onRemoveDevice: function(whatEver) + { + if (this.m_visible) + { + WebUI.reload(); + } + } + +}); + +} else { + + DeviceListPage = new function() + { + //Geräteliste Konfigtool + var m_menuId = "MAINMENU_OPTIONS_DEVICES"; + this.enter = function(options) + { + //MainMenu.select(m_menuId); + updateContent('/configapp/devices.cgi'); + }; + + this.leave = function() + { + }; + + }(); + +} +FavoriteListPage = new function() +{ + var MAINMENU_ID = "MAINMENU_OPTIONS"; + + this.enter = function(options) + { + MainMenu.select(MAINMENU_ID); + loadFavOverview(options); + }; + + this.leave = function() + { + }; + +}(); +FunctionListPage = new function() +{ + var MAINMENU_ID = "MAINMENU_OPTIONS"; + + this.enter = function(options) + { + loadFunctionList(options); + }; + + this.leave = function() + { + }; + +}(); +NewDeviceListPage = new function() +{ + var MAINMENU_ID = "MAINMENU_OPTIONS"; + + this.enter = function(options) + { + MainMenu.select(MAINMENU_ID); + + // Aktualisiert alle Gewerke + // ==> neue Geräte werden beim Anlernen automatisch einem Gewerk zugeordnet + var subsections = SubsectionList.list(); + subsections.each(function(subsection) { + SubsectionList.beginUpdate(subsection.id); + }); + + loadNewDevices(options); + }; + + this.leave = function() + { + }; + +}(); +RoomListPage = new function() +{ + var MAINMENU_ID = "MAINMENU_OPTIONS"; + + this.enter = function(options) + { + MainMenu.select(MAINMENU_ID); + loadRoomList(options); + }; + + this.leave = function() + { + }; + +}(); +SystemConfigPageUser = new function() +{ + var MAINMENU_ID = "MAINMENU_OPTIONS"; + + this.enter = function(options) + { + MainMenu.select(MAINMENU_ID); + loadSystemConfigUser(options); + }; + + this.leave = function() + { + }; + +}(); +SystemConfigPage = new function() +{ + var MAINMENU_ID = "MAINMENU_OPTIONS"; + + this.enter = function(options) + { + MainMenu.select(MAINMENU_ID); + loadSystemConfig(options); + }; + + this.leave = function() + { + }; + +}(); +UserAdminPageUser = new function() +{ + var MAINMENU_ID = "MAINMENU_OPTIONS"; + + this.enter = function(options) + { + MainMenu.select(MAINMENU_ID); + updateContent('/pages/tabs/user/userAdministrationUser.htm'); + }; + + this.leave = function() + { + }; + +}(); +UserAdminPageAdmin = new function() +{ + var MAINMENU_ID = "MAINMENU_OPTIONS"; + + this.enter = function(options) + { + MainMenu.select(MAINMENU_ID); + loadSysconfigUserAdmin(options); + }; + + this.leave = function() + { + }; + +}(); +SystemControlPage = new function() +{ + var MAINMENU_ID = "MAINMENU_OPTIONS"; + + this.enter = function(options) + { + MainMenu.select(MAINMENU_ID); + loadSystemControl(options); + }; + + this.leave = function() + { + }; + +}(); +CreateDiagramPage = new function() +{ + var MAINMENU_ID = "MAINMENU_OPTIONS"; + + this.enter = function(options) + { + MainMenu.select(MAINMENU_ID); + /* + // response should be: + // ID : string + // KEYS : array of strings + // NAME : string + var response = homematic("Diagram.getDataSourceGroups"); + if (response) { + jQuery.each(response, function(index, val) { + console.dir(val); + }); + } + */ + + conInfo("create diagram page"); + + doClearTempView = true; + if( typeof filter == "string" ) + { + updateContent("jpages/diagram/settings", "", 'system.SetSessionVar("sessionPrgIsFiltered", true);system.SetSessionVar("sessionPrgFilter","'+filter+'");' ); + } + else + { + updateContent("jpages/diagram/settings"); + } + }; + + this.leave = function() + { + }; + +}(); +CreateDiagramPage = new function() +{ + var MAINMENU_ID = "MAINMENU_OPTIONS"; + + this.enter = function(options) + { + MainMenu.select(MAINMENU_ID); + /* + // response should be: + // ID : string + // KEYS : array of strings + // NAME : string + var response = homematic("Diagram.getDataSourceGroups"); + if (response) { + jQuery.each(response, function(index, val) { + console.dir(val); + }); + } + */ + + conInfo("create diagram page"); + + doClearTempView = true; + if( typeof filter == "string" ) + { + updateContent("jpages/diagram/settings", "", 'system.SetSessionVar("sessionPrgIsFiltered", true);system.SetSessionVar("sessionPrgFilter","'+filter+'");' ); + } + else + { + updateContent("jpages/diagram/settings"); + } + }; + + this.leave = function() + { + }; + +}(); +DiagramListPage = new function() +{ + var MAINMENU_ID = "MAINMENU_OPTIONS"; + + this.enter = function(options) + { + MainMenu.select(MAINMENU_ID); + conInfo("create diagram list page"); + + doClearTempView = true; + if( typeof filter == "string" ) + { + updateContent("jpages/diagram/control", "", 'system.SetSessionVar("sessionPrgIsFiltered", true);system.SetSessionVar("sessionPrgFilter","'+filter+'");' ); + } + else + { + updateContent("jpages/diagram/control"); + } + + }; + + this.leave = function() + { + }; + +}(); +CreateGroupPage = new function() +{ + var MAINMENU_ID = "MAINMENU_OPTIONS"; + + this.enter = function(options) + { + MainMenu.select(MAINMENU_ID); + //alert("create group page"); + + conInfo("create group list page"); + + doClearTempView = true; + if( typeof filter == "string" ) + { + updateContent("jpages/group/list", "", 'system.SetSessionVar("sessionPrgIsFiltered", true);system.SetSessionVar("sessionPrgFilter","'+filter+'");' ); + } + else + { + updateContent("jpages/group/list"); + } + + }; + + this.leave = function() + { + }; + +}(); +CreateTestPage = new function() +{ + var MAINMENU_ID = "MAINMENU_OPTIONS"; + + this.enter = function(options) + { + MainMenu.select(MAINMENU_ID); + + conInfo("create testpage"); + + doClearTempView = true; + if( typeof filter == "string" ) + { + updateContent("jpages/testjavapage", "", 'system.SetSessionVar("sessionPrgIsFiltered", true);system.SetSessionVar("sessionPrgFilter","'+filter+'");' ); + } + else + { + updateContent("jpages/testjavapage"); + } + }; + + this.leave = function() + { + }; + +}(); +DeviceFirmware = new function() +{ + var MAINMENU_ID = "MAINMENU_OPTIONS"; + + this.enter = function(options) + { + MainMenu.select(MAINMENU_ID); + + conInfo("Show page device firmware"); + + doClearTempView = true; + if( typeof filter == "string" ) + { + updateContent("jpages/devicefirmware", "", 'system.SetSessionVar("sessionPrgIsFiltered", true);system.SetSessionVar("sessionPrgFilter","'+filter+'");' ); + } + else + { + updateContent("jpages/devicefirmware"); + } + }; + + this.leave = function() + { + }; + +}(); +function compare(a,b) { + if (a.name < b.name) + return -1; + if (a.name > b.name) + return 1; + return 0; +} + +DeviceFirmwareInformation = new function() +{ + var MAINMENU_ID = "MAINMENU_OPTIONS"; + + /** + * @param options + * iface + * address + * redirect_url + * with_group + **/ + this.enter = function(options) + { + ResetPostString(); + + MainMenu.select(MAINMENU_ID); + var poststr = ""; + + var arDevList = []; + + jQuery.each(DeviceList.devices, function(index,dev) { + if (dev.interfaceName != "VirtualDevices") { + arDevList.push({"address": dev.address, "interfaceName": dev.interfaceName, "name": dev.name}); + } + }); + + // Sort the table by name + arDevList.sort(compare); + + poststr += "&deviceList="; + jQuery.each(arDevList, function(index,dev) { + poststr += dev.address + ' ' + dev.interfaceName + ' '; + }); + + updateContent(UI_PATH + 'ic_deviceFirmwareOverview.cgi', poststr); + }; + + this.leave = function() + { + }; + +}();VariableListPage = new function() +{ + var MAINMENU_ID = "MAINMENU_OPTIONS"; + + this.enter = function(options) + { + MainMenu.select(MAINMENU_ID); + loadSysconfigSysVars(options); + }; + + this.leave = function() + { + }; + +}(); +DeviceConfigPage = new function() +{ + var MAINMENU_ID = "MAINMENU_OPTIONS"; + + /** + * @param options + * iface + * address + * redirect_url + * with_group + **/ + this.enter = function(options) + { + ResetPostString(); + + MainMenu.select(MAINMENU_ID); + var poststr = ""; + if (typeof(options) != "undefined") + { + for(key in options) + { + poststr += "&" + key + "=" + options[key]; + } + } + + updateContent(UI_PATH + 'ic_deviceparameters.cgi', poststr); + }; + + this.leave = function() + { + }; + +}(); +getGatewayStatus = function() +{ + return [ + {address: "ABC1234567", description: "", isConnected: true, isDefault: true}, + {address: "ABC0234567", description: "", isConnected: false, isDefault: false} + ]; +}; + +var globalLGWTypeMap = {}; +var globalLGWTypes = {LANIF : "Lan Interface", HMWLGW : "HMWLGW", HMLGW2 : "HMLGW2"}; +var globalGWClasses = {RF : "RF", Wired : "Wired"}; + +BidcosRfPage = +{ + UPDATE_INTERVALL: 5, + + m_page: null, + m_optionsContainer: null, + m_optionsHeadline: null, + m_optionsForm: null, + m_gatewayContainer: null, + m_gatewayTableHead: null, + m_gatewayTableHeadRow: null, + m_gatewayTableAddressHeader: null, + m_gatewayTableKeyHeader: null, + m_gatewayTableIPHeader: null, + m_gatewayTableStateHeader: null, + m_gatewayTableDCStateHeader: null, + m_gatewayTableFWStateHeader: null, + m_gatewayTableActionHeader: null, + m_gatewayTableBody: null, + m_optionsButtonBar: null, + m_addGatewayButton: null, + m_applyButton: null, + m_optionButtonClear: null, + m_optionsFooter: null, + m_allocationContainer: null, + m_allocationHeadline: null, + m_allocationTable: null, + m_allocationTableHead: null, + m_allocationTableHeadRow: null, + m_allocationTableNameHeader: null, + m_allocationTableImageHeader: null, + m_allocationTableAddressHeader: null, + m_allocationTableGatewayHeader: null, + m_allocationTableActionHeader: null, + m_allocationTableBody: null, + m_onSourceChangedHandler: null, + m_onAddGatewayHandlerRF: null, + m_onApplyHandler: null, + m_onUpdateHandler: null, + m_periodicalUpdater: null, + m_defaultGateway: null, + + m_devices: [], + + + create: function() + { + this.m_page = document.createElement("div"); + this.m_page.className = "bidcosrf_page"; + + globalLGWTypeMap[globalLGWTypes.HMWLGW] = "HomeMatic RS485 Gateway"; + globalLGWTypeMap[globalLGWTypes.HMLGW2] = "HomeMatic RF-LAN Gateway"; + globalLGWTypeMap[globalLGWTypes.LANIF] = "HM Configuration Tool LAN"; + + /* Event-Handler */ + this.m_onUpdateHandler = function() { BidcosRfPage.onUpdate(); }; + this.m_onSourceChangedHandler = function() { BidcosRfPage.onSourceChanged(); }; + this.m_onAddGatewayHandlerRF = function() { BidcosRfPage.onAddGateway(); }; + this.m_onApplyHandler = function() { BidcosRfPage.onApply(); }; + + /* Periodisches Update */ + this.m_periodicalUpdater = new PeriodicalExecuter(this.m_onUpdateHandler, this.UPDATE_INTERVALL); + + /* Allgmeine Einstellungen */ + this.m_optionsContainer = document.createElement("div"); + this.m_page.appendChild(this.m_optionsContainer); + + /* Überschrift */ + this.m_optionsHeadline = document.createElement("h1"); + //this.m_optionsHeadline.appendChild(document.createTextNode("Allgmeine Einstellungen")); + this.m_optionsHeadline.appendChild(document.createTextNode(translateKey("dialogSettingsBidCosRFConfLblSettings"))); + this.m_optionsContainer.appendChild(this.m_optionsHeadline); + + /* Formular zur Auswahl der Quelle */ + this.m_optionsForm = document.createElement("form"); + this.m_optionsContainer.appendChild(this.m_optionsForm); + + /* Container für BidCoS-RF Gateways */ + this.m_gatewayContainer = document.createElement("div"); + $(this.m_gatewayContainer).hide(); + this.m_optionsContainer.appendChild(this.m_gatewayContainer); + + /* Tabelle für BidCoS-RF Gateways */ + this.m_gatewayTable = document.createElement("table"); + this.m_gatewayTable.className = "bidcosrf_table"; + $(this.m_gatewayTable).writeAttribute("cellspacing", "0"); + this.m_gatewayContainer.appendChild(this.m_gatewayTable); + + /* Tabellenkopf (Tabelle für BidCoS-RF Gateways) */ + this.m_gatewayTableHead = document.createElement("thead"); + this.m_gatewayTable.appendChild(this.m_gatewayTableHead); + + /* Kopfzeile (Tabelle für BidCoS-RF Gateways) */ + this.m_gatewayTableHeadRow = document.createElement("tr"); + this.m_gatewayTableHead.appendChild(this.m_gatewayTableHeadRow); + + /* Spaltenüberschrift Name (Tabelle für BidCoS-RF Gateways */ + this.m_gatewayTableAddressHeader = document.createElement("th"); + this.m_gatewayTableAddressHeader.className = "bidcosrf_tableheader"; + this.m_gatewayTableAddressHeader.appendChild(document.createTextNode(translateKey("thName"))); + this.m_gatewayTableHeadRow.appendChild(this.m_gatewayTableAddressHeader); + + /* Spaltenüberschrift Seriennummer (Tabelle für BidCoS-RF Gateways */ + this.m_gatewayTableAddressHeader = document.createElement("th"); + this.m_gatewayTableAddressHeader.className = "bidcosrf_tableheader"; + //this.m_gatewayTableAddressHeader.appendChild(document.createTextNode("Seriennummer")); + this.m_gatewayTableAddressHeader.appendChild(document.createTextNode("Gateway")); + this.m_gatewayTableHeadRow.appendChild(this.m_gatewayTableAddressHeader); + + /* Spaltenüberschrift AES-Schlüssel (Tabelle für BidCoS-RF Gateways */ + this.m_gatewayTableKeyHeader = document.createElement("th"); + this.m_gatewayTableKeyHeader.className = "bidcosrf_tableheader"; + //this.m_gatewayTableKeyHeader.appendChild(document.createTextNode("Zugriffscode")); + this.m_gatewayTableKeyHeader.appendChild(document.createTextNode(translateKey("dialogSettingsBidcosRFSecurityKey"))); + this.m_gatewayTableHeadRow.appendChild(this.m_gatewayTableKeyHeader); + + /* Spaltenüberschrift IP (Tabelle für BidCoS-RF Gateways */ + this.m_gatewayTableIPHeader = document.createElement("th"); + this.m_gatewayTableIPHeader.className = "bidcosrf_tableheader"; + //this.m_gatewayTableIPHeader.appendChild(document.createTextNode("IP-Adresse")); + this.m_gatewayTableIPHeader.appendChild(document.createTextNode(translateKey("thIPAddress"))); + this.m_gatewayTableHeadRow.appendChild(this.m_gatewayTableIPHeader); + + /* Spaltenüberschrift Status (Tabelle für BidCoS-RF Gateways */ + this.m_gatewayTableStateHeader = document.createElement("th"); + this.m_gatewayTableStateHeader.className = "bidcosrf_tableheader"; + //this.m_gatewayTableStateHeader.appendChild(document.createTextNode("Status")); + this.m_gatewayTableStateHeader.appendChild(document.createTextNode(translateKey("thState"))); + this.m_gatewayTableHeadRow.appendChild(this.m_gatewayTableStateHeader); + + /* Spaltenüberschrift DutyCycle Status (Tabelle für BidCoS-RF Gateways */ + this.m_gatewayTableDCStateHeader = document.createElement("th"); + this.m_gatewayTableDCStateHeader.className = "bidcosrf_tableheader"; + //this.m_gatewayTableStateHeader.appendChild(document.createTextNode("Status")); + this.m_gatewayTableDCStateHeader.appendChild(document.createTextNode("DutyCycle")); + this.m_gatewayTableHeadRow.appendChild(this.m_gatewayTableDCStateHeader); + + /* Spaltenüberschrift Firmware Status (Tabelle für BidCoS-RF Gateways */ + this.m_gatewayTableFWStateHeader = document.createElement("th"); + this.m_gatewayTableFWStateHeader.className = "bidcosrf_tableheader"; + //this.m_gatewayTableStateHeader.appendChild(document.createTextNode("Status")); + this.m_gatewayTableFWStateHeader.appendChild(document.createTextNode("Firmware")); + this.m_gatewayTableHeadRow.appendChild(this.m_gatewayTableFWStateHeader); + + /* Spaltenüberschrift Verbunden (Tabelle für BidCoS-RF Gateways */ + this.m_gatewayTableActionHeader = document.createElement("th"); + this.m_gatewayTableActionHeader.className = "bidcosrf_tableheader"; + //this.m_gatewayTableActionHeader.appendChild(document.createTextNode("Aktion")); + this.m_gatewayTableActionHeader.appendChild(document.createTextNode(translateKey("thAction"))); + this.m_gatewayTableHeadRow.appendChild(this.m_gatewayTableActionHeader); + + /* Tabellenkörper (Tabelle für BidCoS-RF Gateways) */ + this.m_gatewayTableBody = document.createElement("tbody"); + this.m_gatewayTable.appendChild(this.m_gatewayTableBody); + + /* Optionsmenü */ + this.m_optionsButtonBar = document.createElement("div"); + this.m_optionsContainer.appendChild(this.m_optionsButtonBar); + + /* Button zum Übernehmen der Einstellungen */ + this.m_applyButton = document.createElement("div"); + //this.m_applyButton.appendChild(document.createTextNode("Übernehmen")); + this.m_applyButton.appendChild(document.createTextNode(translateKey("dialogSettingsBidCosRFConfBtnSave"))); + Event.observe($(this.m_applyButton), "click", this.m_onApplyHandler); + this.m_applyButton.className = "StdButton bidcosrf_optionbutton"; + this.m_optionsButtonBar.appendChild(this.m_applyButton); + + /* Button zum Hinzufügen von RF Gateways */ + this.m_addGatewayButton = document.createElement("div"); + $(this.m_addGatewayButton).hide(); + //this.m_addGatewayButton.appendChild(document.createTextNode("Hinzufügen")); + this.m_addGatewayButton.appendChild(document.createTextNode(translateKey("dialogSettingsBidCosRFConfBtnAdd"))); + Event.observe($(this.m_addGatewayButton), "click", this.m_onAddGatewayHandlerRF); + this.m_addGatewayButton.className = "StdButton bidcosrf_optionbutton"; + this.m_optionsButtonBar.appendChild(this.m_addGatewayButton); + + /* float-Bereich löschen */ + this.m_optionButtonClear = document.createElement("div"); + this.m_optionButtonClear.className = "bidcosrf_clear"; + this.m_optionsButtonBar.appendChild(this.m_optionButtonClear); + + /* Footer für allgemeine Einstellungen*/ + this.m_optionsFooter = document.createElement("div"); + this.m_optionsFooter.className = "bidcosrf_footer"; + this.m_optionsContainer.appendChild(this.m_optionsFooter); + + /* Gateway-Zuordnung */ + this.m_allocationContainer = document.createElement("div"); + this.m_page.appendChild(this.m_allocationContainer); + + /* Überschrift für Gateway-Zuordnung */ + this.m_allocationHeadline = document.createElement("h1"); + //this.m_allocationHeadline.appendChild(document.createTextNode("Interface-Zuordnung")); + this.m_allocationHeadline.appendChild(document.createTextNode(translateKey("dialogSettingsBidCosRFConfIfaceAssignment"))); + this.m_allocationContainer.appendChild(this.m_allocationHeadline); + + /* Tabelle für Gateway-Zuordnung */ + this.m_allocationTable = document.createElement("table"); + this.m_allocationTable.className = "bidcosrf_table"; + $(this.m_allocationTable).writeAttribute("cellspacing", "0"); + this.m_allocationContainer.appendChild(this.m_allocationTable); + + /* Tabellenkopf (Tabelle für Gateway-Zuordnung) */ + this.m_allocationTableHead = document.createElement("thead"); + this.m_allocationTable.appendChild(this.m_allocationTableHead); + + /* Zeile im Tabellenkopf (Tabelle für Gateway-Zuordnung) */ + this.m_allocationTableHeadRow = document.createElement("tr"); + this.m_allocationTableHead.appendChild(this.m_allocationTableHeadRow); + + /* Spaltenüberschrift "Name" (Tabelle für Gateway-Zuordnung) */ + this.m_allocationTableNameHeader = document.createElement("th"); + this.m_allocationTableNameHeader.className = "bidcosrf_tableheader"; + //this.m_allocationTableNameHeader.appendChild(document.createTextNode("Name")); + this.m_allocationTableNameHeader.appendChild(document.createTextNode(translateKey("thName"))); + this.m_allocationTableHeadRow.appendChild(this.m_allocationTableNameHeader); + + /* Spaltenüberschrift "Bild" (Tabelle für Gateway-Zuordnung) */ + this.m_allocationTableImageHeader = document.createElement("th"); + this.m_allocationTableImageHeader.className = "bidcosrf_tableheader"; + //this.m_allocationTableImageHeader.appendChild(document.createTextNode("Bild")); + this.m_allocationTableImageHeader.appendChild(document.createTextNode(translateKey("thPicture"))); + this.m_allocationTableHeadRow.appendChild(this.m_allocationTableImageHeader); + + /* Spaltenüberschrift "Seriennummer" (Tabelle für Gateway-Zuordnung) */ + this.m_allocationTableAddressHeader = document.createElement("th"); + this.m_allocationTableAddressHeader.className = "bidcosrf_tableheader"; + //this.m_allocationTableAddressHeader.appendChild(document.createTextNode("Seriennummer")); + this.m_allocationTableAddressHeader.appendChild(document.createTextNode(translateKey("thSerialNumber"))); + this.m_allocationTableHeadRow.appendChild(this.m_allocationTableAddressHeader); + + /* Spaltenüberschrift "Gatway" (Tabelle für Gateway-Zuordnung) */ + this.m_allocationTableGatewayHeader = document.createElement("th"); + this.m_allocationTableGatewayHeader.className = "bidcosrf_tableheader"; + this.m_allocationTableGatewayHeader.appendChild(document.createTextNode("Gateway")); + this.m_allocationTableHeadRow.appendChild(this.m_allocationTableGatewayHeader); + + /* Spaltenüberschrift "Aktion" (Tabelle für Gateway-Zuordnung) */ + this.m_allocationTableActionHeader = document.createElement("th"); + this.m_allocationTableActionHeader.className = "bidcosrf_tableheader"; + //this.m_allocationTableActionHeader.appendChild(document.createTextNode("Aktion")); + this.m_allocationTableActionHeader.appendChild(document.createTextNode(translateKey("thAction"))); + this.m_allocationTableHeadRow.appendChild(this.m_allocationTableActionHeader); + + /* Tabellenkörper (Tabelle für Gateway-Zuordnung) */ + this.m_allocationTableBody = document.createElement("tbody"); + this.m_allocationTable.appendChild(this.m_allocationTableBody); + + this.m_gatewayContainer.show(); + this.m_addGatewayButton.show(); + + }, + + destroy: function() + { + var i, len; + + /* Periodisches Update deaktivieren */ + this.m_periodicalUpdater.stop(); + + /* Ereignis-Handler abmelden */ + //Event.stopObserving($(this.m_antennaRadioButton), "click", this.m_sourceChangedHandler); + //Event.stopObserving($(this.m_hmcfgRadioButton), "click", this.m_sourceChangedHandler); + Event.stopObserving($(this.m_applyButton), "click", this.m_onApplyHandler); + Event.stopObserving($(this.m_addGatewayButton), "click", this.m_onAddGatewayHandlerRF); + + /* Gateways entfernen */ + for (i = 0, len = this.m_gateways.length; i < len; i++) + { + var gateway = this.m_gateways[i]; + gateway.destroy(); + } + this.m_gateways = []; + + /* Geräte entfernen */ + for (i = 0, len = this.m_devices.length; i < len; i++) + { + var device = this.m_devices[i]; + device.destroy(); + } + this.m_devices = []; + }, + + enter: function() + { + + + MainMenu.select("MAINMENU_OPTIONS"); + + var PATH_HTML= "" + + ""+translateKey("menuSettingsPage")+"" + + " > " + + ""+translateKey("submenuSysControl")+"" + + " > " + + translateKey("dialogSettingsBidCosRFConfPath"), + + FOOTER_HTML= "" + + "" + + "" + + "" + + "" + + "
"+translateKey("footerBtnPageBack")+"
"; + + setPath(PATH_HTML); + setFooter(FOOTER_HTML); + InterfaceMonitor.stop(); + + this.create(); + this.loadGateways(); + this.loadDevices(); + + WebUI.setContent(this.m_page); + }, + + leave: function() + { + this.destroy(); + InterfaceMonitor.start(); + }, + + onSourceChanged: function() + { + /* if (this.m_hmcfgRadioButton.checked) + { + $(this.m_gatewayContainer).show(); + $(this.m_addGatewayButton).show(); + } + else + { + $(this.m_gatewayContainer).hide(); + $(this.m_addGatewayButton).hide(); + }*/ + }, + + onAddGateway: function() + { + + var wiredGWExists = false; + for (var i = 0, len = this.m_gateways.length; i < len; i++) + { + var gateway = this.m_gateways[i]; + if( globalGWClasses.Wired == gateway.getGatewayClass()) { + wiredGWExists = true; + break; + } + } + new BidcosRfPage.AddGatewayDialog(wiredGWExists) + .setAction(this.onGatewayAdded, this); + }, + + onGatewayAdded: function(dialog) + { + var gateway = new BidcosRfPage.Gateway() + .setGatewayClass(dialog.getGatewayClass()) + .setType(dialog.getType()) + .setUserName(dialog.getUserName()) + .setAddress(dialog.getSerial()) + .setKey(dialog.getKey()) + .setIP(dialog.getIp()) + .setState(translateKey("lanGatewayLblNotActive")); + + this.m_gatewayTableBody.appendChild(gateway.getElement()); + this.m_gateways.push(gateway); + }, + + + onApply: function() + { + var gatewaysRF = []; + var gatewaysWired = []; + +/* var useInternalAntenna = this.m_antennaRadioButton.checked; + if (this.ss.length == 0) + { + useInternalAntenna = true; + } + */ + + /* RF-Gateways */ + for (var i = 0, len = this.m_gateways.length; i < len; i++) + { + var gateway = this.m_gateways[i]; + if( globalGWClasses.RF == gateway.getGatewayClass()) { + gatewaysRF.push({ + type : gateway.getType(), + userName : gateway.getUserName(), + serialNumber : gateway.getAddress(), + encryptionKey: gateway.getKey(), + ipAddress : gateway.getIP() + }); + } + else { //gatewayClass is: Wired + gatewaysWired.push({ + type : gateway.getType(), + userName : gateway.getUserName(), + serialNumber : gateway.getAddress(), + encryptionKey: gateway.getKey(), + ipAddress : gateway.getIP() + }); + } + } + + homematic("BidCoS_RF.setConfigurationRF", { + // "useInternalAntenna": useInternalAntenna, + "interfaces": gatewaysRF + }); + + homematic("BidCoS_Wired.setConfigurationWired", { + "interfaces": gatewaysWired + }); + + + // if (/*(useInternalAntenna == false) &&*/ (homematic("BidCoS_RF.isKeySet", null))) //TODO Check if this is okay + // { + // new BidcosRfPage.OptionsDialog(); + // } + // else + // { + //MessageBox.show("Info", "Die Konfiguration wurde an die HomeMatic Zentrale übertragen.\nDie Änderungen werden mit dem nächsten Start der HomeMatic Zentrale wirksam."); + MessageBox.show(translateKey("dialogInfo"), translateKey("dialogSettingsBidcosRFSaveConfigSucceed")); + WebUI.enter(BidcosRfPage); + // } + }, + + onUpdate: function() + { + var that = this; + //Sort gateways into own arrays to avoid interferences when doing more than one homematic() calls. + var rfGateways = new Array(); + var wiredGateways = new Array(); + + for(var i = 0, len = that.m_gateways.length; i < len; i++) + { + if(that.m_gateways[i].getGatewayClass() == globalGWClasses.Wired) { + wiredGateways.push(that.m_gateways[i]); + } + else { + rfGateways.push(that.m_gateways[i]); + } + } + /* RF-Gateways */ + homematic("Interface.listBidcosInterfaces", {"interface": "BidCos-RF"}, function(gatewayStatus) { + if (gatewayStatus) + { + for (var i = 0, len = rfGateways.length; i < len; i++) + { + if(globalLGWTypes.HMLGW2 == rfGateways[i].getType()) {//NEW RF Gateway + //var hmlgw2GW = rfGateways[i]; + var lgwStatus = null; + homematic("Interface.getLGWConnectionStatus", {"interface" : "BidCos-RF", "serial" : rfGateways[i].getAddress()}, function(lgwStatus) { + var textB = ""; + var lgw = null; + if(lgwStatus) + { + for(var j = 0; j < rfGateways.length; j++) { + if(rfGateways[j].getAddress() == lgwStatus.serial) { + lgw = rfGateways[j]; + } + } + for (var loop = 0; loop < gatewayStatus.length; loop++) { + gatewaysn = gatewayStatus[loop].address; + if (lgwStatus.serial == gatewaysn) { + var textDC = gatewayStatus[loop].dutyCycle + "%"; + lgw.setDCState(textDC); + + var textFW = gatewayStatus[loop].fwVersion; + lgw.setFWState(textFW); + } + } + if(lgw) + { + if(lgwStatus.connstat == "NO_ERROR") { + textB = translateKey("lanGatewayLblConnected"); + } + else if(lgwStatus.connstat == "CONNECT_FAILED") { + textB = translateKey("lanGatewayLblNotConnected"); + } + else if(lgwStatus.connstat == "WRONG_KEY") { + textB = translateKey("errorWrongPassword"); + } + else if(lgwStatus.connstat == "") { + textB = translateKey("lanGatewayLblNotConnected"); + } + else { + textB = translateKey("lanGatewayLblNotConnected"); + } + } + else + { + textB = translateKey("lanGatewayLblNotActive"); + } + lgw.setState(textB); + }//if lgwstatus + else { + lgw.setState(translateKey("lanGatewayLblNotActive")); + } + }); + } + else //all other rf gateways + { + var text = ""; + var status = rfGateways[i].determineState(gatewayStatus); + var cfglan = rfGateways[i].getAddress(gatewayStatus); + + for (var loop = 0; loop < gatewayStatus.length; loop++) { + gatewaysn = gatewayStatus[loop].address; + + if (cfglan == gatewaysn) { + var textDC = gatewayStatus[loop].dutyCycle + "%"; + rfGateways[i].setDCState(textDC); + + var textFW = gatewayStatus[loop].fwVersion; + if (textFW < "965") { + textFW = "0." + gatewayStatus[loop].fwVersion + " (Update: 0.965)"; + } else { + textFW = "0." + gatewayStatus[loop].fwVersion; + } + rfGateways[i].setFWState(textFW); + } + } + + if (status) + { + text = (status.isConnected) ? translateKey("lanGatewayLblConnected") : translateKey("lanGatewayLblNotConnected"); + if (status.isDefault) { text += " " + translateKey("lanGatewayLblStandard"); } + } + else + { + //text = "inaktiv"; + text = translateKey("lanGatewayLblNotActive"); + } + rfGateways[i].setState(text); + } + } + + //Set address of default gateway + if (!that.m_defaultGateway) + { + for (var i = 0, len = gatewayStatus.length; i < len; i++) + { + if (gatewayStatus[i].isDefault) + { + //alert("isDEfault"+gatewayStatus[i].address); + that.m_defaultGateway = new BidcosRfPage.Gateway() + .setAddress(gatewayStatus[i].address); + } + } + } + jQuery("." + that.m_defaultGateway.getAddress()).text(translateKey("lanGatewayLblStandard")); + } + }); + /* Wired Gateways */ + for(var k = 0, length = wiredGateways.length; k < length ; k++) + { + var wiredLGW = wiredGateways[k]; + homematic("Interface.getLGWConnectionStatus", {"interface" : "BidCos-Wired", "serial" : wiredLGW.getAddress()}, function(lgwStatus) { + var textB = ""; + var lgw = null; + if(lgwStatus) + { + for(var j = 0; j < wiredGateways.length; j++) { + if(wiredGateways[j].getAddress() == lgwStatus.serial) { + lgw = wiredGateways[j]; + } + } + if(lgw) + { + if(lgwStatus.connstat == "NO_ERROR") { + textB = translateKey("lanGatewayLblConnected"); + } + else if(lgwStatus.connstat == "CONNECT_FAILED") { + textB = translateKey("lanGatewayLblNotConnected"); + } + else if(lgwStatus.connstat == "WRONG_KEY") { + textB = translateKey("errorWrongPassword"); + } + else if(lgwStatus.connstat == "") { + textB = translateKey("lanGatewayLblNotConnected"); + } + else { + textB = translateKey("lanGatewayLblNotConnected"); + } + } + else { + textB = translateKey("lanGatewayLblNotActive"); + } + lgw.setState(textB); + }//if lgwstatus + else { + lgw.setState(translateKey("lanGatewayLblNotActive")); + } + }); + } + }, + + loadGateways: function() + { + var i, len; + this.m_gateways = []; + + //HomeMatic RF Gateways + var response = homematic("BidCoS_RF.getConfigurationRF"); + if (response) + { + // this.m_antennaRadioButton.checked = response.useInternalAntenna; + // this.m_hmcfgRadioButton.checked = !response.useInternalAntenna; + this.onSourceChanged(); + + for (i = 0, len = response.interfaces.length; i < len; i++) + { + var gateway = response.interfaces[i]; + this.m_gateways.push(new BidcosRfPage.Gateway() + .setGatewayClass("RF") + .setType(gateway.type) + .setUserName(gateway.userName) + .setAddress(gateway.serialNumber) + .setKey(gateway.encryptionKey) + .setIP(gateway.ipAddress)); + } + + } + + //HomeMatic Wired Gateways + response = homematic("BidCoS_Wired.getConfigurationWired"); + if(response) + { + for (i = 0, len = response.interfaces.length; i < len; i++) + { + var gateway = response.interfaces[i]; + this.m_gateways.push(new BidcosRfPage.Gateway() + .setGatewayClass(globalGWClasses.Wired) + .setType(gateway.type) + .setUserName(gateway.userName) + .setAddress(gateway.serialNumber) + .setKey(gateway.encryptionKey) + .setIP(gateway.ipAddress)); + } + } + + //Add all gateways to table + for (i = 0, len = this.m_gateways.length; i < len; i++) + { + var gateway = this.m_gateways[i]; + this.m_gatewayTableBody.appendChild(gateway.getElement()); + } + + }, + + removeGateway: function(gateway) + { + gateway.destroy(); + this.m_gateways = this.m_gateways.without(gateway); + }, + + loadDevices: function() + { + var i, len, device; + this.m_devices = []; + + var devices = DeviceList.listDevices().ex_sortBy("name"); + + for (i = 0, len = devices.length; i < len; i++) + { + device = devices[i]; + if (device.interfaceName == "BidCos-RF") + { + this.m_devices.push(new BidcosRfPage.Device() + .setName(device.name) + .setImageHtml(device.getThumbnailHTML()) + .setAddress(device.address) + ); + } + } + + for (i = 0, len = this.m_devices.length; i < len; i++) + { + device = this.m_devices[i]; + this.m_allocationTableBody.appendChild(device.getElement()); + } + + var that = this; + homematic("Interface.listDevices", {"interface": "BidCos-RF"}, function(deviceList) { + if (deviceList) + { + for (var i = 0, len = that.m_devices.length; i < len; i++) + { + var device = that.m_devices[i]; + device.setGatewayFromDeviceList(deviceList); + } + } + }); + }, + + getGateways: function() + { + return this.m_gateways; + }, + + getDefaultGateway: function() + { + return this.m_defaultGateway; + } +}; + +BidcosRfPage.Gateway = function() +{ + this.create(); +}; + +BidcosRfPage.Gateway.prototype = +{ + m_element: null, + m_type: null, + m_address: null, + m_key: null, + m_ip: null, + m_userNameLabel: null, + m_addressLabel: null, + m_keyLabel: null, + m_ipLabel: null, + m_stateLabel: null, + m_stateDCLabel: null, + m_stateFWLabel: null, + m_actionCell: null, + m_deleteButton: null, + m_onDeleteHandler: null, + m_editButton: null, + m_onEditHandler: null, + m_changeKeyButton : null, + m_onChangeKeyHandler : null, + + create: function() + { + /* Event-Handler */ + var that = this; + this.m_onDeleteHandler = function() { that.onDelete(); }; + this.m_onEditHandler = function() { that.onEdit(); }; + this.m_onChangeKeyHandler = function() { that.onChangeKey(); }; + + /* Tabellenzeile */ + this.m_element = document.createElement("tr"); + + /** Gateway-Klasse (RF oder Wired)*/ + this.m_gatewayClass = ""; + + /** Gateway-Typ (Lan Interface / HMWLGW) */ + this.m_type = ""; + + /* userName */ + this.m_userName = ""; + this.m_userNameLabel = document.createElement("td"); + this.m_userNameLabel.className = "bidcosrf_tablecell"; + this.m_element.appendChild(this.m_userNameLabel); + + /* Seriennummer */ + this.m_address = ""; + this.m_addressLabel = document.createElement("td"); + this.m_addressLabel.className = "bidcosrf_tablecell"; + this.m_element.appendChild(this.m_addressLabel); + + /* Zugriffscode */ + this.m_keyLabel = document.createElement("td"); + this.m_keyLabel.className = "bidcosrf_tablecell"; + this.m_element.appendChild(this.m_keyLabel); + + /* IP-Addresse */ + this.m_ipLabel = document.createElement("td"); + this.m_ipLabel.className = "bidcosrf_tablecell"; + this.m_element.appendChild(this.m_ipLabel); + + /* Status */ + this.m_stateLabel = document.createElement("td"); + this.m_stateLabel.className = "bidcosrf_tablecell"; + this.m_element.appendChild(this.m_stateLabel); + + /* DutyCycle Status */ + this.m_stateDCLabel = document.createElement("td"); + this.m_stateDCLabel.className = "bidcosrf_tablecell"; + this.m_element.appendChild(this.m_stateDCLabel); + + /* Firmware Status */ + this.m_stateFWLabel = document.createElement("td"); + this.m_stateFWLabel.className = "bidcosrf_tablecell"; + this.m_element.appendChild(this.m_stateFWLabel); + + /* Aktion */ + this.m_actionCell = document.createElement("td"); + this.m_actionCell.className = "bidcosrf_actioncell"; + this.m_element.appendChild(this.m_actionCell); + + /* Löschen-Button */ + this.m_deleteButton = document.createElement("div"); + this.m_deleteButton.className = "StdButton";//"bidcosrf_button"; + //this.m_deleteButton.appendChild(document.createTextNode("Löschen")); + this.m_deleteButton.appendChild(document.createTextNode(translateKey("btnRemove"))); + Event.observe($(this.m_deleteButton), "click", this.m_onDeleteHandler); + Element.setStyle(this.m_deleteButton, { + margin : "1px" + }); + this.m_actionCell.appendChild(this.m_deleteButton); + + /* Edit-Button */ + this.m_editButton = document.createElement("div"); + this.m_editButton.className = "StdButton";//"bidcosrf_button"; + Element.setStyle(this.m_editButton, { + margin : "1px" + }); + this.m_editButton.appendChild(document.createTextNode(translateKey("dialogSettingsBidCosRFConfBtnSet"))); + Event.observe($(this.m_editButton), "click", this.m_onEditHandler); + this.m_actionCell.appendChild(this.m_editButton); + + + /* change key button */ + this.m_changeKeyButton = document.createElement("div"); + this.m_changeKeyButton.className = "StdButton"; + this.m_changeKeyButton.id = "changeKeyButtonId"; + Element.setStyle(this.m_changeKeyButton, { + margin : "1px" + }); + this.m_changeKeyButton.appendChild(document.createTextNode(translateKey("dialogSettingsBidcosRFChangeAccessCodeTitle"))); + Event.observe($(this.m_changeKeyButton), "click", this.m_onChangeKeyHandler); + this.m_actionCell.appendChild(this.m_changeKeyButton); + }, + + destroy: function() + { + Event.stopObserving($(this.m_deleteButton), "click", this.m_onDeleteHandler); + Event.stopObserving($(this.m_editButton), "click", this.m_onEditHandler); + Event.stopObserving($(this.m_changeKeyButton), "click", this.m_onChangeKeyHandler); + $(this.m_element).remove(); + }, + + getGatewayClass : function() + { + return this.m_gatewayClass; + }, + + setGatewayClass: function(gwClass) + { + this.m_gatewayClass = gwClass; + return this; + }, + + setType: function(type) + { + this.m_type = type; + if( (this.m_type !== globalLGWTypes.HMLGW2) && (this.m_type !== globalLGWTypes.HMWLGW) ) + { + this.m_changeKeyButton.hide(); + } + return this; + }, + + getType: function() + { + return this.m_type; + }, + + setUserName: function(name) + { + if(name != undefined) { + this.m_userName = name; + this.m_userNameLabel.innerHTML = ""; + this.m_userNameLabel.appendChild(document.createTextNode(name)); + } + return this; + }, + + getUserName: function() + { + return this.m_userName; + }, + + setAddress: function(address) + { + this.m_address = address; + this.m_addressLabel.innerHTML = this.m_address+"
"+globalLGWTypeMap[this.m_type]; + return this; + }, + + getAddress: function() + { + return this.m_address; + }, + + setKey: function(key) + { + this.m_key = key; + + this.m_keyLabel.innerHTML = ""; + this.m_keyLabel.appendChild(document.createTextNode(key)); + + return this; + }, + + getKey: function() + { + return this.m_key; + }, + + setIP: function(ip) + { + this.m_ip = ip; + + this.m_ipLabel.innerHTML = ""; + this.m_ipLabel.appendChild(document.createTextNode(ip)); + + return this; + }, + + getIP: function() + { + return this.m_ip; + }, + + setState: function(state) + { + + this.m_stateLabel.innerHTML = ""; + this.m_stateLabel.appendChild(document.createTextNode(state)); + + return this; + }, + + setDCState: function(state) + { + this.m_stateDCLabel.innerHTML = ""; + this.m_stateDCLabel.appendChild(document.createTextNode(state)); + }, + + setFWState: function(state) + { + this.m_stateFWLabel.innerHTML = ""; + this.m_stateFWLabel.appendChild(document.createTextNode(state)); + }, + + getElement: function() + { + return this.m_element; + }, + + determineState: function(status) + { + for (i = 0, len = status.length; i < len; i++) + { + if (this.m_address == status[i].address) + { + return status[i]; + } + } + + return null; + }, + + onDelete: function() + { + var that = this; + //new YesNoDialog("Sicherheitsabfrage", "Möchten Sie den HomeMatic Konfigurations-Adapter wirklich löschen?", function(result) { + new YesNoDialog(translateKey("dialogSafetyCheck"), translateKey("dialogQuestionRemoveCFG"), function(result) { + + if (result == YesNoDialog.RESULT_YES) + { + BidcosRfPage.removeGateway(that); + } + }); + }, + + onEdit : function() + { + var that = this; + new BidcosRfPage.EditGatewayDialog(that).setAction(this.onGatewayEdited, this); + }, + + onGatewayEdited : function(dialog) { + this.setUserName(dialog.getUserName()); + this.setAddress(dialog.getSerial()); + this.setKey(dialog.getKey()); + this.setIP(dialog.getIPAddress()); + }, + + onChangeKey : function() + { + var that = this; + new BidcosRfPage.ChangeKeyDialog(that).setAction(this.onKeyChanged, this); + }, + + keyContainsNoForbiddenCharacter : function(key) { + if(key.indexOf("<") != -1) { return false; } + else if(key.indexOf(">") != -1) { return false; } + else if(key.indexOf("\'") != -1) { return false; } + else if(key.indexOf("\"") != -1) { return false; } + else if(key.indexOf("&") != -1) { return false; } + else if(key.indexOf("$") != -1) { return false; } + else if(key.indexOf("?") != -1) { return false; } + else if(key.indexOf("[") != -1) { return false; } + else if(key.indexOf("]") != -1) { return false; } + else if(key.indexOf("{") != -1) { return false; } + else if(key.indexOf("}") != -1) { return false; } + else if(key.indexOf("#") != -1) { return false; } + else if(key.indexOf("\\") != -1) { return false; } + else { return true; } + return false; + }, + + onKeyChanged : function(dialog) + { + var key = dialog.getKey(); + var key2 = dialog.getKeyRepetition(); + if(key === "") { + MessageBox.show(translateKey("dialogSettingsBidcosRFChangeAccessCodeDialogErrorTitle"), translateKey("dialogSettingsBidcosRFChangeAccessCodeDialogErrorTooShort")); + } + else if(key === key2) { + if(this.keyContainsNoForbiddenCharacter(key)) {//check if key contains a forbidden character + if( homematic("BidCoS.changeLanGatewayKey", { + "lgwclass" : this.getGatewayClass(), //RF or Wired + "lgwserial": this.getAddress(), + "lgwip" : this.getIP(), + "newkey" : key, + "curkey" : this.getKey() + }) ) { + MessageBox.show(translateKey("dialogInfo"), translateKey("dialogSettingsBidcosRFSaveConfigSucceed")); + } + else { + MessageBox.show(translateKey("dialogSettingsBidcosRFChangeAccessCodeDialogErrorTitle"), translateKey("dialogSettingsBidcosRFChangeAccessCodeDialogErrorGeneral")); + } + } + else { //!keyContainsNoForbiddenCharacter + MessageBox.show(translateKey("dialogSettingsBidcosRFChangeAccessCodeDialogErrorTitle"), translateKey("msgForbiddenCharacter")); + } + } + else { + MessageBox.show(translateKey("dialogSettingsBidcosRFChangeAccessCodeDialogErrorTitle"), translateKey("dialogSettingsBidcosRFChangeAccessCodeDialogErrorDontMatch")); + } + } + + +}; + + +BidcosRfPage.Device = function() +{ + this.create(); +}; + +BidcosRfPage.Device.prototype = +{ + m_element: null, + m_name: null, + m_nameLabel: null, + m_image: null, + m_address: null, + m_addressLabel: null, + m_gateway: null, + m_gatewayLabel: null, + m_roaming: null, + m_action: null, + m_configButton: null, + m_onConfigHandler: null, + + gatewayList : [], + + create: function() + { + + this.gatewayList = BidcosRfPage.getGateways(); + + /* Event-Handler */ + var that = this; + this.m_onConfigHandler = function() { that.onConfig(); }; + + /* Tabellenzeile */ + this.m_element = document.createElement("tr"); + + /* Name */ + this.m_nameLabel = document.createElement("td"); + this.m_nameLabel.className = "bidcosrf_tablecell"; + this.m_element.appendChild(this.m_nameLabel); + + /* Bild */ + this.m_image = document.createElement("td"); + this.m_image.className = "bidcosrf_imagecell bidcosrf_imagesize"; + this.m_image.innerHTML = " "; + this.m_element.appendChild(this.m_image); + + /* Seriennummer */ + this.m_addressLabel = document.createElement("td"); + this.m_addressLabel.className = "bidcosrf_tablecell"; + this.m_element.appendChild(this.m_addressLabel); + + /* Gateway */ + this.m_gatewayLabel = document.createElement("td"); + this.m_gatewayLabel.className = "bidcosrf_tablecell"; + this.m_element.appendChild(this.m_gatewayLabel); + + /* Aktion */ + this.m_action = document.createElement("td"); + this.m_action.className = "bidcosrf_actioncell"; + this.m_element.appendChild(this.m_action); + + /* Button zur Konfiguration */ + this.m_configButton = document.createElement("div"); + this.m_configButton.className = "StdButton";//"bidcosrf_button"; + //this.m_configButton.appendChild(document.createTextNode("Einstellen")); + this.m_configButton.appendChild(document.createTextNode(translateKey("dialogSettingsBidCosRFConfBtnSet"))); + Event.observe($(this.m_configButton), "click", this.m_onConfigHandler); + this.m_action.appendChild(this.m_configButton); + }, + + + destroy: function() + { + Event.stopObserving($(this.m_configButton), "click", this.m_onConfigHandler); + $(this.m_element).remove(); + }, + + setName: function(name) + { + this.m_name = name; + + this.m_nameLabel.innerHtml = ""; + this.m_nameLabel.appendChild(document.createTextNode(name)); + + return this; + }, + + getName: function() + { + return this.m_name; + }, + + setImageHtml: function(imageHtml) + { + var div = document.createElement("div"); + div.innerHTML = imageHtml; + div.className = "thumbnail"; + + this.m_image.innerHTML = ""; + this.m_image.appendChild(div); + + return this; + }, + + setAddress: function(address) + { + this.m_address = address; + + this.m_addressLabel.innerHtml = ""; + this.m_addressLabel.appendChild(document.createTextNode(address)); + + return this; + }, + + getAddress: function() + { + return this.m_address; + }, + + setGateway: function(gateway) + { + var label = gateway; + var name = ""; + + BidcosRfPage.m_defaultGateway; + + // Has the gateway an user defined name? + for (var i = 0; i < this.gatewayList.length; i++) { + if (gateway == this.gatewayList[i].m_address) { + name = this.gatewayList[i].m_userName; + label = (name.length > 0) ? name : label; + break; + } + } + + this.m_gateway = label; + this.m_gatewayLabel.innerHTML = ""; + this.m_gatewayLabel.appendChild(document.createTextNode(label)); + //this.m_gatewayLabel.className += " " + label.replace(/\s+/g,""); + this.m_gatewayLabel.setAttribute("class", "bidcosrf_tablecell " + label.replace(/\s+/g,"")); + return this; + }, + + getGateway: function() + { + return this.m_gateway; + }, + + setRoaming: function(roaming) + { + this.m_roaming = roaming; + + return this; + }, + + getRoaming: function() + { + return this.m_roaming; + }, + + getElement: function() + { + return this.m_element; + }, + + setGatewayFromDeviceList: function(deviceList) + { + for (var i = 0, len = deviceList.length; i < len; i++) + { + var device = deviceList[i]; + if (device.address == this.m_address) + { + this.setGateway(device["interface"]); + this.setRoaming(device["roaming"]); + } + } + return this; + }, + + onConfig: function() + { + new BidcosRfPage.EditAssignmentDialog() + .setDevice(this) + .setAction(this.saveConfig, this); + }, + + saveConfig: function(dialog) + { + var gateway = dialog.getGateway(); + var roaming = dialog.getRoaming(); + + if (gateway) + { + homematic("Interface.setBidcosInterface", { + "interface": "BidCos-RF", + "deviceId": this.m_address, + "interfaceId": gateway.getAddress(), + "roaming": roaming + }); + //jQuery("."+gateway.getAddress()).attr("class","bidcosrf_tablecell " + gateway.getAddress().replace(/\s+/g,"")); + this.setGateway(gateway.getAddress()); + this.setRoaming(roaming); + DeviceList.updateInterfaceDisplayName(this.m_address, (gateway.getUserName()).length > 0 ? gateway.getUserName() : 'BidCos-RF'); + } + } +}; + +/*-------------------------------------------------------------------------------------------------------------------*/ + +/** +* @class BidcosRfPage.EditGatewayDialog +* @brief Dialog zum Bearbeiten von Lan Gateway Einstellungen +**/ +BidcosRfPage.EditGatewayDialog = Class.create({ + + + /** Constructor + * Fuehrt die Grundinitialisierung durch und zeigt das Dialogfenster an. + **/ + initialize: function(gateway) + { + var screenWidth = WebUI.getWidth(); + var screenHeight = WebUI.getHeight(); + var frameWidth = 500; + var frameHeight = 200; + var frameX = parseInt((screenWidth - frameWidth) / 2); + var frameY = parseInt((screenHeight - frameHeight) / 2); + var m_gateway = gateway; + + this.m_action = null;//Callback function + + this.m_layer = document.createElement("div"); + this.m_layer.className = "DialogLayer"; + + + //Create content ui-elements + //Type + this.m_typeText = new UI.Text() + .setPosition(180, 10) + .setWidth(frameWidth - 190) + .setText(globalLGWTypeMap[m_gateway.getType()]); + + //Name + this.m_nameTextEdit = new UI.TextEdit() + .setPosition(180,40) + .setWidth(frameWidth - 190) + .setText(m_gateway.getUserName()); + + //Serial + this.m_serialTextEdit = new UI.TextEdit() + .setPosition(180, 70) + .setWidth(frameWidth - 190) + .setText(m_gateway.getAddress()); + + //Key + this.m_keyTextEdit = new UI.TextEdit() + .setPosition(180, 100) + .setWidth(frameWidth - 190) + .setText(m_gateway.getKey()); + + //IP Address + this.m_ipTextEdit = new UI.TextEdit() + .setPosition(180, 130) + .setWidth(frameWidth - 190) + .setText(m_gateway.getIP()); + + this.m_keyLabel = new UI.Text(); + + //Create and assemble frame + this.m_frame = new UI.Frame() + .setTitle(translateKey("dialogSettingsBidcosRFEditGatewayTitle")) + .setContentSize(frameWidth, frameHeight) + .setPosition(frameX, frameY) + /* Add Cancel Button */ + .add(new UI.Button() + .setPosition(10, frameHeight - 30) + //.setText("Abbrechen") + .setText(translateKey("btnCancel")) + .setAction(this.cancel, this) + ) + /* Add OK Button */ + .add(new UI.Button() + .setPosition(frameWidth - 160, frameHeight - 30) + //.setText("OK") + .setText(translateKey("btnOk")) + .setAction(this.ok, this) + ) + + //Content: + //Type label + .add(new UI.Text().setPosition(10,10).setText(translateKey("dialogSettingsBidCosRFLblType"))) + .add(this.m_typeText) + + //Name + .add(new UI.Text() + .setPosition(10,40) + .setText(translateKey("dialogSettingsBidCosRFLblName")) + ) + .add(this.m_nameTextEdit) + + //Serial + .add(new UI.Text() + .setPosition(10, 70) + //.setText("Seriennummer:") + .setText(translateKey("dialogSettingsBidCosRFLblSN")) + ) + .add(this.m_serialTextEdit) + //Accesscode / passphrase + .add(this.m_keyLabel + .setPosition(10,100) + .setText( + (m_gateway.getType() == "Lan Interface" ? translateKey("dialogSettingsBidCosRFLblAccessCode") : translateKey("dialogSettingsBidCosRFLblPassphrase")) + ) + ) + .add(this.m_keyTextEdit) + //IP label + .add(this.m_ipTextEdit) + .add(new UI.Text() + .setPosition(10,130) + //.setText("IP-Adresse (optional):") + .setText(translateKey("dialogSettingsBidCosRFLblIPAddress")) + ); + + + /* Add frame to layer and layer to Layer */ + this.m_layer.appendChild(this.m_frame.getElement()); + Layer.add(this.m_layer); + }, + + /** + * @fn close + * @brief Schließt das Dialogfenster + **/ + close: function() + { + Layer.remove(this.m_layer); + }, + + /** @fn ok + * @brief Führt die Callbackfuntion aus nachdem auf "OK" geklickt wurde + * und schließt anschließend das Dialogfenster + **/ + ok: function() + { + if (this.m_action) { this.m_action(this); } + this.close(); + }, + + /** @fn cancel + * @brief Schließt das Dialogfenster, nachdem auf "Abbrechen" geklickt wurde + **/ + cancel: function() + { + this.close(); + }, + + /** + * @fn setAction + * @brief Setzt die Callbackfuntion, die aufgerufen wird, wenn OK-gedrückt wurde + * @param action Callbackfuntion "onOK" + * @param context Optional. Kontext, an die action gebunden wird + **/ + setAction: function(action, context) + { + if (context) { this.m_action = action.bind(context); } + else { this.m_action = action; } + + return this; + }, + + getUserName: function() + { + return this.m_nameTextEdit.getText(); + }, + + getSerial: function() + { + return this.m_serialTextEdit.getText(); + }, + + getKey: function() + { + return this.m_keyTextEdit.getText(); + }, + + getIPAddress : function() + { + return this.m_ipTextEdit.getText(); + } + +}); + +/*-------------------------------------------------------------------------------------------------------------------*/ + +BidcosRfPage.ChangeKeyDialog = Class.create({ + + initialize : function(gateway) { + + var screenWidth = WebUI.getWidth(); + var screenHeight = WebUI.getHeight(); + var frameWidth = 500; + var frameHeight = 175; + var frameX = parseInt((screenWidth - frameWidth) / 2); + var frameY = parseInt((screenHeight - frameHeight) / 2); + var m_gateway = gateway; + + this.m_action = null;//Callback function + + this.m_layer = document.createElement("div"); + this.m_layer.className = "DialogLayer"; + + this.m_newKeyTextEdit = new UI.TextEdit() + .setPosition(180, 40) + .setWidth(frameWidth - 190); + + this.m_newKeyTextRepetition = new UI.TextEdit() + .setPosition(180, 70) + .setWidth(frameWidth - 190); + + this.m_newKeyRepetitionLabel = new UI.Text(); + this.m_newKeyRepetitionLabel.setPosition(10, 70); + this.m_newKeyRepetitionLabel.setHtml(translateKey("dialogSettingsBidcosRFChangeAccessCodeNewKeyRepetition")); + + + //Create new frame and add stuff + this.m_frame = new UI.Frame() + .setTitle(translateKey("dialogSettingsBidcosRFChangeAccessCodeTitle")) + .setContentSize(frameWidth, frameHeight) + .setPosition(frameX, frameY) + /* Add Cancel Button */ + .add(new UI.Button() + .setPosition(10, frameHeight - 30) + //.setText("Abbrechen") + .setText(translateKey("btnCancel")) + .setAction(this.cancel, this) + ) + /* Add OK Button */ + .add(new UI.Button() + .setPosition(frameWidth - 160, frameHeight - 30) + //.setText("OK") + .setText(translateKey("btnOk")) + .setAction(this.ok, this) + + ) + //New key + .add(new UI.Text() + .setPosition(10, 40) + .setText(translateKey("dialogSettingsBidcosRFChangeAccessCodeNewKey")) + ) + .add(this.m_newKeyTextEdit) + //Repetition of new key + .add(this.m_newKeyRepetitionLabel) + .add(this.m_newKeyTextRepetition); + + /* Add frame to layer and layer to Layer */ + this.m_layer.appendChild(this.m_frame.getElement()); + Layer.add(this.m_layer); + }, + + getKey : function() + { + return this.m_newKeyTextEdit.getText(); + }, + + getKeyRepetition : function() + { + return this.m_newKeyTextRepetition.getText(); + }, + + /** + * @fn setAction + * @brief Setzt die Callbackfuntion, die aufgerufen wird, wenn OK-gedrückt wurde + * @param action Callbackfuntion "onOK" + * @param context Optional. Kontext, an die action gebunden wird + **/ + setAction : function(action, context) + { + if (context) { this.m_action = action.bind(context); } + else { this.m_action = action; } + + return this; + }, + + /** + * @fn close + * @brief Schließt das Dialogfenster + **/ + close: function() + { + Layer.remove(this.m_layer); + }, + + /** @fn ok + * @brief Führt die Callbackfuntion aus nachdem auf "OK" geklickt wurde + * und schließt anschließend das Dialogfenster + **/ + ok: function() + { + if (this.m_action) { this.m_action(this); } + this.close(); + }, + + /** @fn cancel + * @brief Schließt das Dialogfenster, nachdem auf "Abbrechen" geklickt wurde + **/ + cancel: function() + { + this.close(); + } + +}); + +/*-------------------------------------------------------------------------------------------------------------------*/ + + +/** + * @class BidcosRfPage.AddGatewayDialog + * @brief Dialog zum Hinzufuegen von HM-CFG-LAN-Einstellungen. + **/ +BidcosRfPage.AddGatewayDialog = Class.create({ + + /** + * @constructor + * Führt eine Grundinitialisierung durch und zeigt das Dialogfenster an. + **/ + initialize: function(wiredGWExists, gateway) + { + var that = this; + var imageHeight = 48; + BidcosRfPage.AddGatewayDialog.CONTENT_HEIGHT += imageHeight; + + var screenWidth = WebUI.getWidth(); + var screenHeight = WebUI.getHeight(); + var frameWidth = BidcosRfPage.AddGatewayDialog.CONTENT_WIDTH; + var frameHeight = BidcosRfPage.AddGatewayDialog.CONTENT_HEIGHT; + var frameX = parseInt((screenWidth - frameWidth) / 2); + var frameY = parseInt((screenHeight - frameHeight) / 2); + + var previewHMLGW2 = "/ise/img/icons_lan_gateways/48/HMLGW2.png", + previewLANIF = "/ise/img/icons_lan_gateways/48/CFG_LAN.png", + previewHMWLGW = "/ise/img/icons_lan_gateways/48/HMWLGW.png"; + + this.m_layer = document.createElement("div"); + this.m_layer.className = "DialogLayer"; + + this.m_action = null; + this.m_id = null; + + + this.m_gatewayImg = new UI.Image() + .setPosition(180 + (BidcosRfPage.AddGatewayDialog.CONTENT_WIDTH / 2) ,10) + .setPath(previewHMLGW2); // As default preselected + + this.m_typeListBox = new UI.ListBox() + .setPosition(180,10 + imageHeight) + .setWidth(BidcosRfPage.AddGatewayDialog.CONTENT_WIDTH - 190) + .add({id:globalLGWTypes.HMLGW2, name: "RF: "+globalLGWTypeMap[globalLGWTypes.HMLGW2]}) + .add({id:globalLGWTypes.LANIF, name: "RF: "+globalLGWTypeMap[globalLGWTypes.LANIF]}) + .setOnChangeCallback(function() { + var gateWay = this.getSelectedItem(), + gateWayID = gateWay.id, + jElem = "#bidcosAccessCode"; + var offsetPreviewPic = 180; + + switch (gateWayID) { + case globalLGWTypes.HMLGW2: + jQuery(jElem).text(translateKey("dialogSettingsBidCosRFLblPassphrase")); + that.m_gatewayImg.setPath(previewHMLGW2); + break; + case globalLGWTypes.LANIF: + jQuery(jElem).text(translateKey("dialogSettingsBidCosRFLblAccessCode")); + that.m_gatewayImg.setPath(previewLANIF); + break; + case globalLGWTypes.HMWLGW: + jQuery(jElem).text(translateKey("dialogSettingsBidCosRFLblPassphrase")); + that.m_gatewayImg.setPath(previewHMWLGW); + break; + } + that.m_gatewayImg.setPosition(offsetPreviewPic + (BidcosRfPage.AddGatewayDialog.CONTENT_WIDTH / 2),10); + }); + + /*Add Wired LGW only if there is no one*/ + if(!wiredGWExists) { + this.m_typeListBox.add({id:globalLGWTypes.HMWLGW, name: "Wired: "+globalLGWTypeMap[globalLGWTypes.HMWLGW]}); + } + + this.m_nameTextEdit = new UI.TextEdit() + .setPosition(180, 40 + imageHeight) + .setWidth(BidcosRfPage.AddGatewayDialog.CONTENT_WIDTH - 190); + + this.m_serialTextEdit = new UI.TextEdit() + .setPosition(180, 70 + imageHeight) + .setWidth(BidcosRfPage.AddGatewayDialog.CONTENT_WIDTH - 190); + + this.m_keyTextEdit = new UI.TextEdit() + .setPosition(180, 70 + imageHeight) + .setWidth(BidcosRfPage.AddGatewayDialog.CONTENT_WIDTH - 190); + + this.m_keyTextEdit = new UI.TextEdit() + .setPosition(180, 100 + imageHeight) + .setWidth(BidcosRfPage.AddGatewayDialog.CONTENT_WIDTH - 190); + + this.m_ipTextEdit = new UI.TextEdit() + .setPosition(180, 130 + imageHeight) + .setWidth(BidcosRfPage.AddGatewayDialog.CONTENT_WIDTH - 190); + + this.m_frame = new UI.Frame() + //.setTitle("HomeMatic Konfigurations-Adapter hinzufügen") + .setTitle(translateKey("dialogSettingsBidCosRFAddCFGTitle")) + .setContentSize(frameWidth, frameHeight) + .setPosition(frameX, frameY) + + .add(this.m_gatewayImg) + + .add(new UI.Text().setPosition(10,10 + imageHeight).setText(translateKey("dialogSettingsBidCosRFLblType"))) + + .add(this.m_typeListBox) + + .add(new UI.Text() + .setPosition(10,40 + imageHeight) + .setText(translateKey("dialogSettingsBidCosRFLblName")) + ) + .add(this.m_nameTextEdit) + .add(new UI.Text() + .setPosition(10, 70 + imageHeight) + //.setText("Seriennummer:") + .setText(translateKey("dialogSettingsBidCosRFLblSN")) + ) + .add(this.m_serialTextEdit) + .add(new UI.Text() + .setPosition(10, 100 + imageHeight) + //.setText("Zugriffscode:") + .setText(translateKey("dialogSettingsBidCosRFLblAccessCode")) + .setID("bidcosAccessCode") + ) + .add(this.m_keyTextEdit) + .add(new UI.Text() + .setPosition(10,130 + imageHeight) + //.setText("IP-Adresse (optional):") + .setText(translateKey("dialogSettingsBidCosRFLblIPAddress")) + ) + .add(this.m_ipTextEdit) + .add(new UI.Button() + .setPosition(10, BidcosRfPage.AddGatewayDialog.CONTENT_HEIGHT - 30) + //.setText("Abbrechen") + .setText(translateKey("btnCancel")) + .setAction(this.cancel, this) + ) + .add(new UI.Button() + .setPosition(340, BidcosRfPage.AddGatewayDialog.CONTENT_HEIGHT - 30) + //.setText("OK") + .setText(translateKey("btnOk")) + .setAction(this.ok, this) + ); + + this.m_layer.appendChild(this.m_frame.getElement()); + Layer.add(this.m_layer); + BidcosRfPage.AddGatewayDialog.CONTENT_HEIGHT -= imageHeight; + }, + + /** + * @fn setGateway + * @brief Setzt die Felder Seriennummer, Zugriffscode und IP-Adresse + **/ + setGateway: function(gateway) + { + this.m_nameTextEdit.setText(gateway.userName); + this.m_serialTextEdit.setText(gateway.serial); + this.m_keyTextEdit.setText(gateway.key); + this.m_ipTextEdit.setText(gateway.ip); + this.m_id = gateway.id; + + return this; + }, + + /** + * @fn setAction + * @brief Setzt die Callbackfuntion, die aufgerufen wird, wenn OK-gedrückt + * wurde + * + * @param action Callbackfuntion "onOK" + * @param context Optional. Kontext, an die action gebunden wird + **/ + setAction: function(action, context) + { + if (context) { this.m_action = action.bind(context); } + else { this.m_action = action; } + + return this; + }, + + getUserName: function() + { + return this.m_nameTextEdit.getText(); + }, + + /** + * @fn getSerial + * @brief Liefert den Inhalt des Feldes Seriennummer + **/ + getSerial: function() + { + return this.m_serialTextEdit.getText().toUpperCase(); + }, + + /** + * @fn getKey + * @brief Liefert den Inhalt des Feldes Zugriffcode + **/ + getKey: function() + { + if((this.getType() == globalLGWTypes.HMWLGW) || (this.getType() == globalLGWTypes.HMLGW2)) { + return this.m_keyTextEdit.getText();//Passphrases should not be upper case + } + else { + return this.m_keyTextEdit.getText().toUpperCase(); + } + }, + + /** + * @fn getType + * @brief Liefert den Inhalt des Feldes Zugriffcode + **/ + getType: function() + { + return this.m_typeListBox.getSelectedItem().id; + }, + + /** + * @fn getType + * @brief Liefert den Inhalt des Feldes Zugriffcode + **/ + getGatewayClass: function() + { + var gwClass = globalGWClasses.RF; + if (this.m_typeListBox.getSelectedItem().id == globalLGWTypes.HMWLGW) { + gwClass = globalGWClasses.Wired; + } + return gwClass; + }, + + /** + * @fn getIp + * @brief Liefert den Inhalt des Feldes IP-Addresse + **/ + getIp: function() + { + return this.m_ipTextEdit.getText(); + }, + + /** + * @fn getId + * @brief Liefert die Id des momentan bearbeiten Gateways. + **/ + getId: function() + { + return this.m_id; + }, + + /** + * @fn close + * @brief Schließt das Dialogfenster + **/ + close: function() + { + Layer.remove(this.m_layer); + }, + + /** + * @fn ok + * @brief Führt die Callbackfuntion aus nachdem auf "OK" geklickt wurde + * und schließt anschließend das Dialogfenster + **/ + ok: function() + { + if (this.m_action) { this.m_action(this); } + this.close(); + }, + + /** + * @fn cancel + * @brief Schließt das Dialogfenster, nachdem auf "Abbrechen" geklickt wurde + **/ + cancel: function() + { + this.close(); + } + +}); + +BidcosRfPage.AddGatewayDialog.CONTENT_WIDTH = 500; //< Breite des Dialogfensters +BidcosRfPage.AddGatewayDialog.CONTENT_HEIGHT = 200; //< Höhe des Dialogfensters + + +BidcosRfPage.EditAssignmentDialog = Class.create({ + + m_gateways: null, + m_device: null, + m_action: null, + m_frame: null, + m_defaultGateway : null, + + initialize: function() + { + var screenWidth = WebUI.getWidth(); + var screenHeight = WebUI.getHeight(); + var frameWidth = BidcosRfPage.EditAssignmentDialog.CONTENT_WIDTH; + var frameHeight = BidcosRfPage.EditAssignmentDialog.CONTENT_HEIGHT; + var frameX = parseInt((screenWidth - frameWidth) / 2); + var frameY = parseInt((screenHeight - frameHeight) / 2); + var gateways = BidcosRfPage.getGateways(); + + this.m_layer = document.createElement("div"); + this.m_layer.className = "DialogLayer"; + + this.m_gatewaysListbox = new UI.ListBox() + .setPosition(100,10) + .setWidth(BidcosRfPage.EditAssignmentDialog.CONTENT_WIDTH - 110); + + this.m_gateways = []; + + this.m_gatewaysListbox.add({name: translateKey("dialogSettingsBidcosRFIFaceAssignmentLblStandard"), value: BidcosRfPage.getDefaultGateway()}); + + for (var i = 0, len = gateways.length; i < len; i++) + { + var gateway = gateways[i]; + if(gateway.getGatewayClass() == "RF") { + //this.m_gateways.push({name: gateway.getAddress(), value: gateway}); + var name = (gateway.getUserName().length > 0) ? gateway.getUserName(): gateway.getAddress(); + + this.m_gateways.push({name: name, value: gateway}); + if (this.m_gateways[i]) { + this.m_gatewaysListbox.add(this.m_gateways[i]); + } + } + } + + this.m_roamingCheckbox = new UI.Checkbox() + //.setText("feste Zuordnung aufheben") + .setText(translateKey("dialogSettingsBidcosRFIFaceAssignmentLblNullify")) + .setPosition(100,40) + .setWidth(BidcosRfPage.EditAssignmentDialog.CONTENT_WIDTH - 110) + .setIsChecked(true); + + + this.m_frame = new UI.Frame() + //.setTitle("Interface-Zuordnung: ") + .setTitle(translateKey("dialogSettingsBidcosRFIFaceAssignmentTitle")) + .setContentSize(frameWidth, frameHeight) + .setPosition(frameX, frameY) + .add(new UI.Text() + .setPosition(10, 10) + //.setText("Gateway:") + .setText(translateKey("dialogSettingsBidcosRFIFaceAssignmentLblGateway")) + + ) + .add(this.m_gatewaysListbox) + .add(this.m_roamingCheckbox) + .add(new UI.Button() + .setPosition(10, BidcosRfPage.EditAssignmentDialog.CONTENT_HEIGHT - 30) + //.setText("Abbrechen") + .setText(translateKey("btnCancel")) + .setAction(this.cancel, this) + ) + .add(new UI.Button() + .setPosition(240, BidcosRfPage.EditAssignmentDialog.CONTENT_HEIGHT - 30) + //.setText("OK") + .setText(translateKey("btnOk")) + .setAction(this.ok, this) + ); + + this.m_layer.appendChild(this.m_frame.getElement()); + Layer.add(this.m_layer); + }, + + setDevice: function(device) + { + this.m_device = device; + + this.m_frame.setTitle(translateKey("dialogSettingsBidcosRFIFaceAssignmentTitle") + device.getName()); + this.m_roamingCheckbox.setIsChecked(device.getRoaming()); + for (var i = 0, len = this.m_gateways.length; i < len; i++) + { + var gateway = this.m_gateways[i]; + if (device.getGateway() == gateway.value.getAddress()) + { + this.m_gatewaysListbox.selectItem(gateway); + break; + } + } + + return this; + }, + + setAction: function(action, context) + { + if (context) { this.m_action = action.bind(context); } + else { this.m_action = action; } + + return this; + }, + + getGateway: function() + { + return this.m_gatewaysListbox.getSelectedItem().value; + }, + + getRoaming: function() + { + return this.m_roamingCheckbox.isChecked(); + }, + + /** + * @fn close + * @brief Schließt das Dialogfenster + **/ + close: function() + { + Layer.remove(this.m_layer); + }, + + /** + * @fn ok + * @brief Führt die Callbackfuntion aus nachdem auf "OK" geklickt wurde + * und schließt anschließend das Dialogfenster + **/ + ok: function() + { + if (this.m_action) { this.m_action(this); } + this.close(); + }, + + /** + * @fn cancel + * @brief Schließt das Dialogfenster, nachdem auf "Abbrechen" geklickt wurde + **/ + cancel: function() + { + this.close(); + } + +}); + +BidcosRfPage.EditAssignmentDialog.CONTENT_WIDTH = 400; +BidcosRfPage.EditAssignmentDialog.CONTENT_HEIGHT = 150; + +BidcosRfPage.OptionsDialog = Class.create({ + m_passwordEdit: null, + m_frame: null, + + initialize: function() + { + var screenWidth = WebUI.getWidth(); + var screenHeight = WebUI.getHeight(); + var frameWidth = BidcosRfPage.OptionsDialog.CONTENT_WIDTH; + var frameHeight = BidcosRfPage.OptionsDialog.CONTENT_HEIGHT; + var frameX = parseInt((screenWidth - frameWidth) / 2); + var frameY = parseInt((screenHeight - frameHeight) / 2); + + this.m_layer = document.createElement("div"); + this.m_layer.className = "DialogLayer"; + + this.m_passwordEdit = new UI.PasswordEdit() + .setPosition(90, 50) + .setWidth(BidcosRfPage.OptionsDialog.CONTENT_WIDTH - 100); + + this.m_frame = new UI.Frame() + //.setTitle("Sicherheitsschlüssel: ") + .setTitle(translateKey("dialogSettingsBidcosRFEnterSecKeyTitle")) + .setContentSize(frameWidth, frameHeight) + .setPosition(frameX, frameY) + .add(new UI.Text() + .setPosition(10, 10) + //.setText("Bitte geben Sie den System-Sicherheitsschlüssel ein:") + .setText(translateKey("dialogSettingsBidcosRFEnterSecKeyContent")) + ) + .add(this.m_passwordEdit) + .add(new UI.Button() + .setPosition(90, BidcosRfPage.OptionsDialog.CONTENT_HEIGHT - 30) + .setText("OK") + .setAction(this.ok, this) + ); + + this.m_layer.appendChild(this.m_frame.getElement()); + Layer.add(this.m_layer); + }, + + /** + * @fn close + * @brief Schließt das Dialogfenster + **/ + close: function() + { + Layer.remove(this.m_layer); + }, + + /** + * @fn ok + * @brief Führt die Callbackfuntion aus nachdem auf "OK" geklickt wurde + * und schließt anschließend das Dialogfenster + **/ + ok: function() + { + var key = this.m_passwordEdit.getText(); + + homematic("BidCoS_RF.createKeyFile", { "key": key }); + + if (homematic("BidCoS_RF.validateKey", {"key": key})) + { + //MessageBox.show("Info", "Die Konfiguration wurde an die HomeMatic Zentrale übertragen.\nDie Änderungen werden mit dem nächsten Start der HomeMatic Zentrale wirksam."); + MessageBox.show(translateKey("dialogInfo"), translateKey("dialogSettingsBidcosRFSaveConfigSucceed")); + } + else + { + //MessageBox.show("Hinweis", "Der eingegebene Schlüssel entspricht nicht dem aktuellen System-Sicherheitsschlüssel.\nDie Konfiguration wurde an die HomeMatic Zentrale übertragen.\nDie Änderungen werden mit dem nächsten Start der HomeMatic Zentrale wirksam.\nFalls Probleme auftreten, wiederholen Sie ggf. die Eingabe.", null, 320, 120); + MessageBox.show(translateKey("dialogHint"), translateKey("dialogSettingsBidcosRFSaveConfigFailure"), null, 320, 120); + } + + this.close(); + } + + +}); + +BidcosRfPage.OptionsDialog.CONTENT_WIDTH = 250; +BidcosRfPage.OptionsDialog.CONTENT_HEIGHT = 130; +/** + * homematic.js + **/ + +/** + * Stellt eine Anfrage an die HomeMatic Zentrale + * Der Parameter callback ist optional. Wird er weggelassen, so ist die Anfrage synchron. + **/ +homematic = function(method, params, callback) +{ + var _params_ = params; + if (!_params_) { _params_ = { }; } + _params_["_session_id_"] = getSessionId(); + + if (typeof(callback) != "undefined") + { + var _callback_ = callback; + return jsonrpc(homematic.URL, method, _params_, function(response) { + _callback_(homematic._checkResponse(response), response.error); + }); + } + else + { + return homematic._checkResponse(jsonrpc(homematic.URL, method, _params_)); + } +}; + +/** + * URL zur HomeMatic JSON API + **/ +homematic.URL = "/api/homematic.cgi"; + +/** + * Prüft die JSON-Antwort ud liefert deren Resultat + **/ +homematic._checkResponse = function(response) +{ + if (null === response.error) + { + return response.result; + } + else + { + // handle errors + return null; + } +}; +/** + * regamonitor.js + **/ + +/** + * Überwacht die Logikschicht "ReGa" und gibt eine Meldung, falls diese sich nicht meldet. + **/ +ReGaMonitor = Class.create({ + + initialize: function() + { + this.m_pollHandler = this.poll.bind(this); + this.m_responseHandler = this.response.bind(this); + this.m_isRunning = true; + this.m_failureCount = 0; + this.poll(); + }, + + poll: function() + { + if (this.m_isRunning) + { + homematic("ReGa.isPresent", null, this.m_responseHandler); + } + }, + + response: function(result) + { + if (this.m_isRunning) + { + if (result === true) + { + this.m_pollHandler.delay(ReGaMonitor.INTERVAL); + this.m_failureCount = 0; + } + else + { + this.m_failureCount++; + if (this.m_failureCount < ReGaMonitor.FAILURE_RETRY) + { + this.m_pollHandler.delay(ReGaMonitor.INTERVAL); + } + else + { + new CrashDialog("ReGa"); + } + } + } + }, + + stop: function() + { + this.m_isRunning = false; + } + +}); + +ReGaMonitor.INTERVAL = 30; +ReGaMonitor.FAILURE_RETRY = 3; +/** + * interfacemonitor.js + **/ + +/** + * Überwacht einen Schnittstellenprozess + **/ +InterfaceMonitor = Class.create({ + + initialize: function(interfaceName) + { + this.m_interface = interfaceName; + this.m_pollHandler = this.poll.bind(this); + this.m_responseHandler = this.response.bind(this); + this.m_isRunning = true; + this.m_failureCount = 0; + this.storageElm = jQuery("body"); + this.poll(); + }, + + poll: function() + { + if (this.m_isRunning) + { + homematic("Interface.isPresent", {"interface": this.m_interface}, this.m_responseHandler); + } + }, + + response: function(result) + { + if (this.m_isRunning) + { + if (result === true) + { + this.m_pollHandler.delay(InterfaceMonitor.INTERVAL); + this.m_failureCount = 0; + this.storageElm.data(this.m_interface, true); + } + else + { + this.m_failureCount++; + if (this.m_failureCount < InterfaceMonitor.FAILURE_RETRY) + { + this.m_pollHandler.delay(InterfaceMonitor.INTERVAL); + this.storageElm.data(this.m_interface, false); + } + else + { + new CrashDialog(this.m_interface); + } + } + } + }, + + stop: function() + { + this.m_isRunning = false; + } + +}); + +InterfaceMonitor.INTERVAL = 30; +InterfaceMonitor.FAILURE_RETRY = 3; +InterfaceMonitor.start = function() +{ + InterfaceMonitor.m_monitors = []; + + var result = homematic("Interface.listInterfaces", null); + if (result) + { + result.each(function (iface) { + InterfaceMonitor.m_monitors.push(new InterfaceMonitor(iface["name"])); + }); + } +}; + +InterfaceMonitor.stop = function() +{ + var monitors = InterfaceMonitor.m_monitors.clone(); + monitors.each(function(monitor) { monitor.stop(); }); +}; +/** + * eQ3.HomeMatic.Event.js + **/ + +/** + * @fileOverview Ereignisse von der HomeMatic Zentrale + * @author F. Werner (eQ-3) + **/ + +if (!eQ3) { eQ3 = {}; } +if (!eQ3.HomeMatic) { eQ3.HomeMatic = {}; } + +eQ3.HomeMatic.Event = Singleton.create({ + + INTERVALL: 5, + + initialize: function() + { + this.m_listeners = { }; + this.m_poll = this.poll.bind(this); + + this.m_dispatch = this.dispatch.bind(this); + + homematic("Event.subscribe", null); + + if ((typeof preventInterfaceCheck == "undefined") || (! preventInterfaceCheck)) { + this.m_pe = new PeriodicalExecuter(this.m_poll, this.INTERVALL); + } + }, + + poll: function(pe) + { + homematic("Event.poll", null, this.m_dispatch); + }, + + dispatch: function(events, error) + { + if (!error) + { + for (var i = 0, len = events.length; i < len; i++) + { + this.fire(events[i]); + } + } + }, + + stop: function() + { + this.m_pe.stop(); + homematic("Event.unsubscribe", null); + }, + + subscribe: function(eventType, listener) + { + var listeners = this.m_listeners[eventType]; + if (!listeners) + { + listeners = []; + this.m_listeners[eventType] = listeners; + } + + listeners.push(listener); + }, + + unsubscribe: function(eventType, listener) + { + var listeners = this.m_listeners[eventType]; + + if (listeners) + { + this.m_listeners[eventType] = listeners.without(listener); + } + }, + + fire: function(event) + { + var type = event.type; + var data = event.data; + var listeners = this.m_listeners[type]; + + if (listeners) + { + listeners.each(function(listener) { listener(type, data); }); + } + } + +}); +/** + * homematic.com.js + * Schnittstelle zu HomeMatic.com + **/ + +homematic.com = +{ + m_latestVersion: translateKey("lblAvailableFirmwareVersionNotKnown"), + m_isUpdateAvailable: false, + m_latestDeviceFw : "", + m_callback: null, + m_URLServer: "", + + m_product: "", + init: function() + { + this.m_ccuProduct = getProduct(); + this.preURL = (this.m_ccuProduct < 3) ? "" : "ccu3-"; + this.m_product = "HM-RASPBERRYMATIC"; + this.m_URLServer = "https://"+this.preURL+"update.homematic.com"; + this.m_fieldTestURLServer = "https://fieldtest-ccu3-update.homematic.com"; + + this.serial = homematic("CCU.getSerial"); + this.serial = ((this.serial != "") && (typeof this.serial != "undefined") && (this.serial != null)) ? this.serial : "0"; + + // The server should return a string like "homematic.com.setLatestVersion('2.4.212');" + var script = document.createElement("script"); + script.id = "homematic_com_script"; + script.type = "text/javascript"; + script.src = "https://raspberrymatic.de/LATEST-VERSION.js?v=" + WEBUI_VERSION + "&p=" + PRODUCT; + $("body").appendChild(script); + }, + + // For testing only + _init: function() + { + availableVersion = "unknown"; + peLoop = 0; + // window.setTimout is only for testing the real server delay. In production this has of course to be removed. + window.setTimeout(function(){ + // The server should return a string like "availableVersion=2.6.0.1;" + var script = document.createElement("script"); + script.id = "homematic_com_script"; + script.type = "text/javascript"; + script.src = "version.js"; // rega/pages/version.js - has to be in one of these days the correct server url + $('body').appendChild(script); + }, 5000); + + new PeriodicalExecuter(function(pe) { + conInfo.log("check available Version!"); + conInfo.log("correct version: " +availableVersion.match(/^[0-9]+.[0-9]+.[0-9]+/)); + if (availableVersion != "unknown") { + homematic.com.setLatestVersion(availableVersion); + StartPage.showUpdate(); + pe.stop(); + } + // Try 30 seconds (10 * 3) to get the available version. + // After that stop the polling. + if (peLoop > 9) { + pe.stop(); + } + peLoop++; + }, 3); + }, + + isUpdateAvailable: function() + { + return homematic.com.m_isUpdateAvailable; + }, + + getLatestVersion: function() + { + return homematic.com.m_latestVersion; + }, + + + /* Not in use anymore - instead we now use getListOfAvailableFirmware */ + getAvailableDeviceFirmware: function(product, index, callback) { + // The server should return a string like "homematic.com.setLatestVersion('1.2.2', 'product');" + var script = document.createElement("script"); + script.id = "homematic_com_script_" + index; + script.type = "text/javascript"; + script.src = this.m_URLServer + "/firmware/download?cmd=js_check_version&product=" + product + "&serial=0" + "&ts=" + Date.now(); + $("body").appendChild(script); + homematic.com.callback = callback; + }, + + getListOfAvailableFirmware: function(callback) { + var fieldTestActive = "/etc/config/fieldTestActive"; + + // The server should return a string like "homematic.com.setDeviceFirmwareVersions([{"type":"HM-MOD-Re-8","version":"1.0.0"},{"type":"HM-MOD-Re-8","version":"1.0.0"}])" + var script = document.createElement("script"); + script.id = "homematic_com_script_fw"; + script.type = "text/javascript"; + // script.src = this.m_URLServer + "/firmware/api/firmware/search/DEVICE"; + + if (homematic('CCU.existsFile', {'file': fieldTestActive})) { + script.src = this.m_fieldTestURLServer + "/firmware/api/firmware/search/DEVICE?product=HM-CCU"+getProduct()+"&version="+WEBUI_VERSION+"&serial=" + this.serial + "&ts=" + Date.now(); + } else { + script.src = this.m_URLServer + "/firmware/api/firmware/search/DEVICE?product=HM-CCU" + getProduct() + "&version=" + WEBUI_VERSION + "&ts=" + Date.now(); + } + $("body").appendChild(script); + homematic.com.callback = callback; + }, + + + showCCULicense: function(callback) { + var barGraphTimeout = 60000; + + MessageBox.show( + translateKey('dlgLoadLicense'), + '


', + '','320','75','fwUpload', 'msgBoxBarGraph'); + + timeoutBargraph = window.setTimeout(function() { + // Hide the messagebox after 'barGraphTimeout' seconds without a response from this.m_URLServer + MessageBox.close(); + HideWaitAnim(); + jQuery("#homematic_license_script").remove(); + // Show a error message + MessageBox.show(translateKey("dialogTitleHomeMaticInfo"), translateKey("dlgErrorLoadLicense"), '', '320', '75'); + },barGraphTimeout); + + var lang = getLang(); + if (lang != "de" && lang != "en") {lang = getDefaultLang();} + + var script = document.createElement("script"); + script.id = "homematic_license_script"; + script.type = "text/javascript"; + script.src = this.m_URLServer + "/firmware/download?cmd=release_note&product="+this.m_product+"&serial=3014&version="+homematic.com.m_latestVersion+"&locale=" + lang; + + $("body").appendChild(script); + homematic.com.callback = callback; + }, + + // For testing only + showCCUDummyLicense: function(callback) { + var lang = getLang(); + if (lang != "de" && lang != "en") {lang = getDefaultLang();} + var result = "TEST TEXT

Das ist die Lizenz

Sprache: "+lang+"

"; + homematic.com.callback = callback; + window.setTimeout(function() {homematic.com.getCCU2LicenceText(result);}, 2000); + }, + + /** + * wird von homematic.com zurück geliefert + **/ + setLatestVersion: function(latestVersion, product) + { + if (product == this.m_product) { + homematic.com.m_latestVersion = latestVersion; + homematic.com.m_isUpdateAvailable = (WEBUI_VERSION != latestVersion); + } else { + if (homematic.com.callback != null) { + homematic.com.callback(latestVersion, product); + } + } + }, + + // wird von homematic.com zurück geliefert + setDeviceFirmwareVersions: function(result) { + homematic.com.callback(result); + }, + + // wird von homematic.com zurück geliefert + getCCU2LicenceText: function(result) { + homematic.com.callback(result); + } +}; +/** + * rega.js + * Zugriff auf den ise ReGa Webserver. + **/ + +/** + * @fileOverview ? + * @author Falk Werner (eQ-3) + **/ + +/** + * @class + **/ +ReGa = { + + /** + * 1) ReGa arbeitet mit Latin-1 Zeichencodierung (ISO-8859-1) + * 2) Anfragen über das XMLHttpRequest-Objekt sind i.d.R. UTF-8-codiert + * + * ==> Codierung der Anfrage: + * - escape() wandelt UTF-8 nach ASCII um + * (Latin-1 Sonderzeichen werden durch Escape-Sequenzen ersetzt) + * - Anfrage wird in + * verpackt + * + * ==> Decodierung erfolgt durch den ReGa Webserver + **/ + encode: function(data) + { + return ""; + } +}; +/** + * ise/iseFunctions.js + **/ + +/** + * @fileOverview ? + * @author ise + **/ + +/** + * @namespace + **/ +ise = {}; + +// ###################### +// ### ISE: FAVORITES ### +// ###################### + +/** + * @class + **/ +ise.Favorites = Class.create(); + +ise.Favorites.prototype = +{ + initialize: function() + { + }, + AddToStatus: function(id,cid) + { + var url = "/esp/favorites.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "AddToStatus";'; + pb += 'string id = "'+id+'";'; + pb += 'string cid = "'+cid+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete: function(t) + { + if(dbg){alert(t.responseText);} + reloadPage(); + } + }; + new Ajax.Request(url, opts); + }, + RemoveFromStatus: function(id,cid) + { + var url = "/esp/favorites.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "RemoveFromStatus";'; + pb += 'string id = "'+id+'";'; + pb += 'string cid = "'+cid+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete: function(t) + { + if(dbg){alert(t.responseText);} + reloadPage(); + } + }; + new Ajax.Request(url, opts); + }, + AddToList: function(flid,id) + { + var url = "/esp/favorites.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "AddToList";'; + pb += 'string flid = "'+flid+'";'; + pb += 'string id = "'+id+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete: function(t) + { + if(dbg){alert(t.responseText);} + reloadPage(); + } + }; + new Ajax.Request(url, opts); + }, + AddSeparator: function(flid) + { + var url = "/esp/favorites.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "AddSeparator";'; + pb += 'string flid = "'+flid+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete: function(t) + { + if(dbg){alert(t.responseText);} + reloadPage(); + } + }; + new Ajax.Request(url, opts); + }, + RemoveFromList: function(flid,id) + { + var url = "/esp/favorites.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "RemoveFromList";'; + pb += 'string flid = "'+flid+'";'; + pb += 'string id = "'+id+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete: function(t) + { + if(dbg){alert(t.responseText);} + reloadPage(); + } + }; + new Ajax.Request(url, opts); + }, + AddList: function(fname) + { + var url = "/esp/favorites.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "AddList";'; + pb += 'string fname = "'+fname+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete: function(t) + { + if(dbg){alert(t.responseText);} + reloadPage(); + } + }; + new Ajax.Request(url, opts); + }, + RemoveList: function(flid) + { + var url = "/esp/favorites.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "RemoveList";'; + pb += 'string flid = "'+flid+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete: function(t) + { + if(dbg){alert(t.responseText);} + WebUI.enter(FavoriteListPage); + } + }; + new Ajax.Request(url, opts); + }, + CopyToNew: function(flid,bIsPC,bIsPDA,bIsCENTRAL,sargs) + { + var url = "/esp/favorites.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "CopyToNew";'; + pb += 'string flid = "'+flid+'";'; + pb += 'string sargs = "'+sargs+'";'; + pb += 'string bIsPC = "'+bIsPC+'";'; + pb += 'string bIsPDA = "'+bIsPDA+'";'; + pb += 'string bIsCENTRAL = "'+bIsCENTRAL+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete: function(t) + { + if(dbg){alert("CopyToNew:"+t.responseText);} + WebUI.enter(FavoriteListPage); + } + }; + new Ajax.Request(url, opts); + }, + MovePosition: function(flid,id,dir) + { + var url = "/esp/favorites.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "MovePosition";'; + pb += 'string flid = "'+flid+'";'; + pb += 'string id = "'+id+'";'; + pb += 'string dir = "'+dir+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete: function(t) + { + if(dbg){alert(t.responseText);} + reloadPage(); + } + }; + new Ajax.Request(url, opts); + }, + FavColumnCount: function(id,count) + { + var url = "/esp/favorites.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "FavColumnCount";'; + pb += 'string id = "'+id+'";'; + pb += 'string count = "'+count+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete: function(t) + { + if(dbg){alert(t.responseText);} + reloadPage(); + } + }; + new Ajax.Request(url, opts); + }, + FavColumnAlign: function(id,align) + { + var url = "/esp/favorites.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "FavColumnAlign";'; + pb += 'string id = "'+id+'";'; + pb += 'string align = "'+align+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete: function(t) + { + if(dbg){alert(t.responseText);} + reloadPage(); + } + }; + new Ajax.Request(url, opts); + }, + FavNamePosition: function(id,pos) + { + var url = "/esp/favorites.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "FavNamePosition";'; + pb += 'string id = "'+id+'";'; + pb += 'string pos = "'+pos+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete: function(t) + { + if(dbg){alert(t.responseText);} + reloadPage(); + } + }; + new Ajax.Request(url, opts); + }, + SaveFavoriteList: function(flid,bIsPC,bIsPDA,bIsCENTRAL,sArgs) + { + var url = "/esp/favorites.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "SaveFavoriteList";'; + pb += 'string flid = "'+flid+'";'; + pb += 'string sargs = "'+sArgs+'";'; + if( bIsPC ) + { + pb += 'string bIsPC = "true";'; + } + else + { + pb += 'string bIsPC = "false";'; + } + if(dbg)alert(pb); + if( bIsPDA ) { pb += 'string bIsPDA = "true";'; } else { pb += 'string bIsPDA = "false";'; } + if( bIsCENTRAL ) { pb += 'string bIsCENTRAL = "true";'; } else { pb += 'string bIsCENTRAL = "false";'; } + var opts = + { + postBody: ReGa.encode(pb), + onComplete: function(t) + { + if(dbg){alert(t.responseText);} + WebUI.enter(FavoriteListPage); + } + }; + new Ajax.Request(url, opts); + } + +}; + +iseFavorites = new ise.Favorites(); + +// ################## +// ### ISE: ROOMS ### +// ################## + +/** + * @class + **/ +ise.Rooms = Class.create(); + +ise.Rooms.prototype = { + initialize: function() { + }, + + // ### CREATE ROOM ### + // [name]: room object name + CreateRoomRetId: function(name, baseId) { + name = name.replace(/[\r\n\t]/g, ""); + // alert("iseRooms.CreateRoomRetId: " + name + "(" + name.length + ")"); + var url = '/esp/rooms.htm?sid='+SessionId; + var pb = ""; + pb += 'string action = "createRoomRetId";'; + pb += 'string name = "'+name+'";'; + var opt = + { + postBody: ReGa.encode(pb), + onComplete: function(transport) { + buildPropTable(baseId); + + var id = transport.responseText; + RoomList.beginUpdate(id); + } + }; + new Ajax.Request(url,opt); + }, + + // ### DELETE ROOM ### + // [id]: room object id + DeleteRoom: function(id) { + var url = "/esp/rooms.htm?sid="+SessionId; + var pb = ""; + pb += 'string action = "deleteRoom";'; + pb += 'integer id = '+id+';'; + var opt = { + postBody: ReGa.encode(pb), + + onSuccess: function(t) { + } + }; + new Ajax.Request(url,opt); + }, + + // ### CHANGE ROOM NAME ### + // [id]: room object id + // [newName]: new name of room object + ChangeRoomName: function(id, newName) { + var url = "/esp/rooms.htm?sid="+SessionId; + var pb = ""; + pb += 'string action = "changeRoomName";'; + pb += 'integer id = '+id+';'; + pb += 'string newname = "'+newName+'";'; + var opt = { + postBody: ReGa.encode(pb) + }; + new Ajax.Request(url,opt); + }, + + // ### CHANGE ROOM COLOR### + // [id]: room object id + // [newColor]: new color of room object + ChangeRoomColor: function(id, newColor) { + var url = "/esp/rooms.htm?sid="+SessionId; + var pb = ""; + pb += 'string action = "changeRoomColor";'; + pb += 'integer id = '+id+';'; + pb += 'string newcolor = "'+newColor+'";'; + var opt = { + postBody: ReGa.encode(pb) + }; + new Ajax.Request(url,opt); + }, + + // ### CHANGE ROOM COMMENT### + // [id]: room object id + // [newColor]: new color of room object + ChangeRoomComment: function(id, newComment) { + var url = "/esp/rooms.htm?sid="+SessionId; + var pb = ""; + pb += 'string action = "changeRoomComment";'; + pb += 'integer id = '+id+';'; + pb += 'string newcomment = "'+newComment+'";'; + var opt = { + postBody: ReGa.encode(pb) + }; + new Ajax.Request(url,opt); + }, + + // ### CHANGE ROOM SYMBOL### + // [id]: room object id + // [newSymbol]: new symbol of room object + ChangeFunctionSymbol: function(id, newSymbol) { + var url = "/esp/rooms.htm?sid="+SessionId; + var pb = ""; + pb += 'string action = "changeRoomSymbol";'; + pb += 'integer id = '+id+';'; + pb += 'string newsymbol = "'+newSymbol+'";'; + var opt = { + postBody: ReGa.encode(pb) + }; + new Ajax.Request(url,opt); + }, + + buildRoomOverlay: function() { + var url = "/esp/rooms.htm?sid="+SessionId; + var pb = "string action = 'buildRoomOverlay';"; + var opts = { + postBody: ReGa.encode(pb), + onComplete: function() { + translatePage('#roomOverlay'); + } + }; + //new Ajax.Updater("roomOverlay", url, opts); + new Ajax.Updater("roomOverlay", url, opts); + } +}; + +iseRooms = new ise.Rooms(); + +// ###################### +// ### ISE: FUNCTIONS ### +// ###################### + +/** + * @class + **/ +ise.Functions = Class.create(); + +ise.Functions.prototype = { + initialize: function() { + }, + + // ### CREATE FUNCTION ### + // [name]: function object name + CreateFunctionRetId: function(name, baseId) { + var url = '/esp/functions.htm?sid='+SessionId; + var pb = ""; + pb += 'string action = "createFunctionRetId";'; + pb += 'string name = "'+name+'";'; + var opt = { + postBody: ReGa.encode(pb), + onComplete: function(transport) { + buildPropTable(baseId); + + var id = transport.responseText; + SubsectionList.beginUpdate(id); + } + }; + new Ajax.Request(url,opt); + }, + + // ### CHANGE FUNCTION NAME ### + // [id]: function object id + // [newName]: new name of function object + ChangeFunctionName: function(id, newName) { + var url = "/esp/functions.htm?sid="+SessionId; + var pb = ""; + pb += 'string action = "changeFunctionName";'; + pb += 'integer id = '+id+';'; + pb += 'string newname = "'+newName+'";'; + var opt = { + postBody: ReGa.encode(pb) + }; + new Ajax.Request(url,opt); + }, + + // ### DELETE FUNCTION ### + // [id]: function object id + DeleteFunction: function(id) { + var url = "/esp/functions.htm?sid="+SessionId; + var pb = ""; + pb += 'string action = "deleteFunction";'; + pb += 'integer id = '+id+';'; + var opt = { + postBody: ReGa.encode(pb), + + onSuccess: function(t) { + } + }; + new Ajax.Request(url,opt); + }, + + // ### CHANGE FUNCTION COLOR### + // [id]: function object id + // [newColor]: new color of function object + ChangeFunctionColor: function(id, newColor) { + var url = "/esp/functions.htm?sid="+SessionId; + var pb = ""; + pb += 'string action = "changeFunctionColor";'; + pb += 'integer id = '+id+';'; + pb += 'string newcolor = "'+newColor+'";'; + var opt = { + postBody: ReGa.encode(pb) + }; + new Ajax.Request(url,opt); + }, + + // ### CHANGE FUNCTION COMMENT### + // [id]: function object id + // [newComment]: new comment of function object + ChangeFunctionComment: function(id, newComment) { + var url = "/esp/functions.htm?sid="+SessionId; + var pb = ""; + pb += 'string action = "changeFunctionComment";'; + pb += 'integer id = '+id+';'; + pb += 'string newcomment = "'+newComment+'";'; + var opt = { + postBody: ReGa.encode(pb) + }; + new Ajax.Request(url,opt); + }, + + // ### CHANGE FUNCTION SYMBOL### + // [id]: function object id + // [newSymbol]: new symbol of function object + ChangeFunctionSymbol: function(id, newSymbol) { + var url = "/esp/functions.htm?sid="+SessionId; + var pb = ""; + pb += 'string action = "changeFunctionSymbol";'; + pb += 'integer id = '+id+';'; + pb += 'string newsymbol = "'+newSymbol+'";'; + var opt = { + postBody: ReGa.encode(pb) + }; + new Ajax.Request(url,opt); + }, + + buildFuncOverlay: function() { + var url = "/esp/functions.htm?sid="+SessionId; + var pb = "string action = 'buildFuncOverlay';"; + var opts = { + postBody: ReGa.encode(pb), + onComplete: function() { + translatePage('#funcOverlay'); + } + }; + new Ajax.Updater("funcOverlay", url, opts); + } +}; + +iseFunctions = new ise.Functions(); + +// ##################### +// ### ISE: CHANNELS ### +// ##################### + +/** + * @class + **/ +ise.Channels = Class.create(); + +ise.Channels.prototype = { + initialize: function() { + }, + + // ### SetReadyConfig + // [ctrlId]: id of checkbox + // [id]: id of channel + setReadyConfig: function(ctrlId, id) { + var url = "/esp/channels.htm?sid="+SessionId; + var state = ($(ctrlId)._isReady) ? 0 : 1; + + var pb = "string chnId = " + id + ";"; + pb += "string action= 'setReadyConfig';"; + pb += "string state = " + state + ";"; + + if(dbg){alert($(ctrlId).checked);} + new Ajax.Updater("dummy", url, {postBody: ReGa.encode(pb),evalScripts:true,onComplete:function(t){if(dbg){alert(t.responseText);}}}); + }, + + setHandling: function(id, ctrlId) { + var url = "/esp/channels.htm?sid="+SessionId; + var pb = "integer chnId = " + id + ";"; + pb += "string action= 'setHandling';"; + pb += "integer iHandling = "+($(ctrlId).checked? 1: 0)+";"; + new Ajax.Updater("dummy", url, {postBody: ReGa.encode(pb), evalScripts:true}); + }, + + setVisible: function(id, ctrlId) + { + var url = "/esp/channels.htm?sid="+SessionId; + var pb = "integer chnId = " + id + ";"; + pb += "string action= 'setVisible';"; + pb += "integer iVis = "+($(ctrlId).checked? 1: 0)+";"; + new Ajax.Updater("dummy", url, {postBody: ReGa.encode(pb), evalScripts:true}); + }, + + setProto: function(id, ctrlId) { + var url = "/esp/channels.htm?sid="+SessionId; + var pb = "integer chnId = " + id + ";"; + pb += "string action= 'setProto';"; + pb += "integer iProto = "+($(ctrlId).checked? 1: 0)+";"; + new Ajax.Updater("dummy", url, {postBody: ReGa.encode(pb), evalScripts:true}); + }, + + setTransMode: function(id, bAES) { + var url = "/esp/channels.htm?sid="+SessionId; + var pb = "integer chnId = " + id + ";"; + pb += "string action= 'setTransMode';"; + pb += "integer iAES = "+(bAES? 1: 0)+";"; + new Ajax.Updater("dummy", url, {postBody: ReGa.encode(pb), evalScripts: true}); + }, + + chnToRoom: function(idChn, idRoom, bAdd) { + var url = "/esp/channels.htm?sid="+SessionId; + var pb = "integer chnId = "+ idChn + ";"; + pb += "integer roomId = "+ idRoom + ";"; + pb += "string action= 'chnToRoom';"; + pb += "integer iAdd = "+ (bAdd ? 1 : 0) + ";"; + new Ajax.Updater('dummy', url, {postBody: ReGa.encode(pb), evalScripts: true}); + + var room = RoomList.get(idRoom); + if (room) + { + if (bAdd) { room.addChannel(idChn); } + else { room.removeChannel(idChn); } + } + }, + + delChnFromAllRooms: function(chnId,bCTV) { + var url = "/esp/channels.htm?sid="+SessionId; + var pb = ""; + pb += "string chnId = '"+ chnId + "';"; + pb += "string action= 'delChnFromAllRooms';"; + if( bCTV ) + { + pb += 'system.SetSessionVar("sessionCTV", "true");'; + } + else + { + pb += 'system.SetSessionVar("sessionCTV", "false");'; + } + var opts = + { + postBody: ReGa.encode(pb), + evalScripts: true, + onComplete: function(t) + { + reloadSortedPage(); + } + }; + new Ajax.Request(url, opts); + }, + + delChnFromAllFunctions: function(chnId,bCTV) { + var url = "/esp/channels.htm?sid="+SessionId; + var pb = ""; + pb += "string chnId = '"+ chnId + "';"; + pb += "string action= 'delChnFromAllFunctions';"; + if( bCTV ) + { + pb += 'system.SetSessionVar("sessionCTV", "true");'; + } + else + { + pb += 'system.SetSessionVar("sessionCTV", "false");'; + } + var opts = + { + postBody: ReGa.encode(pb), + evalScripts: true, + onComplete: function(t) + { + reloadSortedPage(); + } + }; + new Ajax.Request(url, opts); + }, + + chnToFunc: function(idChn, idFunc, bAdd) { + var url = "/esp/channels.htm?sid="+SessionId; + var pb = "integer chnId = "+ idChn + ";"; + pb += "integer funcId = "+ idFunc + ";"; + pb += "string action= 'chnToFunc';"; + pb += "integer iAdd = "+ (bAdd ? 1 : 0) + ";"; + new Ajax.Updater('dummy', url, {postBody: ReGa.encode(pb), evalScripts: true}); + + var subsection = SubsectionList.get(idFunc); + if (subsection) + { + if (bAdd) { subsection.addChannel(idChn); } + else { subsection.removeChannel(idChn); } + } + }, + + showOverlay: function(idChn, baseId) { + var url = "/esp/channels.htm?sid="+SessionId; + var pb = "integer chnId = "+ idChn + ";"; + pb += "integer baseId = "+ baseId + ";"; + pb += "string action= 'showOverlay';"; + new Ajax.Updater('dummy', url, {postBody: ReGa.encode(pb), evalScripts: true}); + }, + + // sChns: tab-separiert wg. ESP foreach + addChnsToID: function(sChns, destId, clearAll, onComplete) { + var _onComplete_ = onComplete; + var url = "/esp/channels.htm?sid="+SessionId; + var pb = "integer destId = "+ destId + ";"; + pb += "string arChn = '"+ sChns + "';"; + pb += "string action= 'addChnsToID';"; + pb += 'system.SetSessionVar("sessionLS","");'; + if(clearAll) + { + pb += "boolean clearAll = "+clearAll+";"; + } + else + { + pb += "boolean clearAll = false;"; + } + var opts = + { + postBody: ReGa.encode(pb), + evalScripts: true, + onComplete: function(t) + { + reloadSortedPage(); + if (_onComplete_) { _onComplete_(); } + } + }; + new Ajax.Updater("dummy", url, opts ); + }, + + Test: function(ids) + { + var url = '/esp/channels.htm?sid='+SessionId; + var pb = ''; + pb += 'string action = "Test";'; + pb += 'string ids = "'+ids+'";'; + var opts = + { + postBody: ReGa.encode(pb), + evalScripts:true, + onComplete:function(t) + { + if(dbg)alert(t.responseText); + } + }; + new Ajax.Request( url, opts ); + }, + + delChnFromID: function(chnId, destId,bCTV) { + var url = "/esp/channels.htm?sid="+SessionId; + var pb = "integer destId = "+ destId + ";"; + pb += "string chnId = '"+ chnId + "';"; + pb += "string action= 'delChnFromID';"; + if( bCTV ) + { + pb += 'system.SetSessionVar("sessionCTV", "true");'; + } + else + { + pb += 'system.SetSessionVar("sessionCTV", "false");'; + } + var opts = + { + postBody: ReGa.encode(pb), + evalScripts: true, + onComplete: function(t) + { + reloadSortedPage(); + } + }; + new Ajax.Request(url, opts); + }, + + saveDisplayValues: function(chnId) + { + var id = chnId; + conInfo( "iseChannels.saveDisplayValues("+id+");" ); + var url = "/esp/channels.htm?sid="+SessionId; + var sEnum = "TEXT\tBEEP\tUNIT\tBACKLIGHT"; + var pb = ""; + pb += 'string action = "saveDisplayValues";'; + pb += 'string chnId = "'+id+'";'; + pb += 'string varTEXT = "'+$("txt"+id).value+'";'; + pb += 'string varUNIT = "'+$("selUnit"+id).selectedIndex+'";'; + pb += 'string varBACKLIGHT = "'+$("selLight"+id).selectedIndex+'";'; + pb += 'string varBEEP = "'+$("selBeep"+id).selectedIndex+'";'; + if( $("cBulb"+id).checked ) { sEnum += "\tBULB"; } + if( $("cSwitch"+id).checked ) { sEnum += "\tSWITCH"; } + if( $("cWnd"+id).checked ) { sEnum += "\tWINDOW"; } + if( $("cDoor"+id).checked ) { sEnum += "\tDOOR"; } + if( $("cBlind"+id).checked ) { sEnum += "\tBLIND"; } + if( $("cScene"+id).checked ) { sEnum += "\tSCENE"; } + if( $("cPhone"+id).checked ) { sEnum += "\tPHONE"; } + if( $("cBell"+id).checked ) { sEnum += "\tBELL"; } + if( $("cArrUp"+id).checked ) { sEnum += "\tARROW_UP"; } + if( $("cArrDown"+id).checked ) { sEnum += "\tARROW_DOWN"; } + if( $("cClock"+id).checked ) { sEnum += "\tCLOCK"; } + sEnum += "\tSUBMIT"; + pb += 'string StateEnum = "'+sEnum+'";'; + conInfo( "StateEnum=["+sEnum+"]" ); + new Ajax.Request(url, {postBody: ReGa.encode(pb),onSuccess:function(t){conInfo(t.responseText);}}); + } +}; + +iseChannels = new ise.Channels(); + +// ##################### +// ### ISE: DEVICES ### +// ##################### + +/** + * @class + **/ +ise.Devices = Class.create(); + +ise.Devices.prototype = { + + //deviceOperateGroupOnly: false, + + initialize: function() { + //this.deviceOperateGroupOnly = false; + }, + setOperateGroupOnly: function(mode) { + //this.deviceOperateGroupOnly = mode; + }, + + // ### SetReadyConfig + // [id]: id of device + setReadyConfig: function(id) { + // dazugehörige Tabellenreihe ausblenden + //$("tr" + id).hide(); + var url = "/esp/devices.htm?sid="+SessionId; + var pb = "integer devId = " + id + ";"; + pb += "string action= 'setReadyConfig';"; + new Ajax.Updater("dummy", url, {postBody: ReGa.encode(pb), evalScripts: true, onComplete: function(t){if(dbg){alert(t.responseText);}}}); + + // Gerät in Geräteliste übernehmen + //DeviceList.beginUpdateDevice(id); + + // Gerät in Geräteliste übernehmen + DeviceList.beginUpdateDevice(id, function() { + //DeviceList.devices[id].isOperateGroupOnly = this.deviceOperateGroupOnly; + if (DeviceList.devices[id]) { + DeviceList.devices[id].isOperateGroupOnly = false; + DeviceList.devices[id].inInbox = false; + } + + }); + + }, + + setHandling: function(id, ctrlId) { + var url = "/esp/devices.htm?sid="+SessionId; + var pb = "integer devId = " + id + ";"; + pb += "string action= 'setHandling';"; + pb += "integer iHandling = "+($(ctrlId).checked? 1: 0)+";"; + new Ajax.Updater("dummy", url, {postBody: ReGa.encode(pb), evalScripts:true}); + }, + + setVisible: function(id, ctrlId, mode) { + var url = "/esp/devices.htm?sid="+SessionId; + var pb = "integer devId = " + DeviceList.getChannel(id).deviceId + ";"; + pb += "string action= 'setVisible';"; + + if (mode) { + homematic("Device.setVisibility", {"id": DeviceList.getChannel(id).deviceId, "isVisible": true}); + pb += "integer iVis = " + 1 + ";"; + } else { + pb += "integer iVis = " + ($(ctrlId).checked? 1: 0) + ";"; + } + new Ajax.Updater("dummy", url, {postBody: ReGa.encode(pb), evalScripts:true}); + }, + + setProto: function(id, ctrlId) + { + var url = "/esp/devices.htm?sid="+SessionId; + var pb = "integer devId = " + id + ";"; + pb += "string action= 'setProto';"; + pb += "integer iProto = "+($(ctrlId).checked? 1: 0)+";"; + new Ajax.Updater("dummy", url, {postBody: ReGa.encode(pb), evalScripts:true}); + } +}; + +iseDevices = new ise.Devices(); + + + + +// ##################### +// ### ISE: SYSTEM ### +// ##################### + +/** + * @class + **/ +ise.System = Class.create(); + +ise.System.prototype = { + initialize: function() { + }, + + checkName: function(name,divid) + { + var url = "/esp/exec.htm?sid="+SessionId; + var pb = ''; + pb += 'string sUniqueName;'; + pb += 'dom.CheckName("'+name+'", &sUniqueName, ID_SYSTEM_VARIABLES );'; + pb += 'Write( sUniqueName );'; + var opts = { postBody: ReGa.encode(pb) }; + new Ajax.Updater(divid,url,opts); + }, + + saveName: function(id, name, ctrlId, callStrFunc) { + var url = "/esp/system.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "saveName";'; + pb += 'string id = "'+id+'";'; + pb += 'string name = "'+name+'";'; + if(dbg){alert(pb);} + var opts = { + postBody: ReGa.encode(pb), + onComplete: function(resp) { + if ($(ctrlId)) { + // alert("iseSystem.saveName: " + resp.responseText + "(" + resp.responseText.length + ")"); + if (callStrFunc) { + if (callStrFunc == CALL_STRCUT) + $(ctrlId).innerHTML = strCut(resp.responseText, true, true); + if (callStrFunc == CALL_SPACECUT) + $(ctrlId).innerHTML = spaceCutHtmlIf(resp.responseText, 1); + } + else + $(ctrlId).innerHTML = resp.responseText; + } + } + }; + new Ajax.Request(url, opts); + }, + + saveDesc: function(id, desc) { + var url = "/esp/system.htm?sid="+SessionId; + var pb = "integer objId = " + id + ";"; + pb += "string desc = '"+desc+"';"; + pb += "string action = 'saveDesc';"; + if(dbg){alert(pb);} + new Ajax.Request(url, {postBody: ReGa.encode(pb),onComplete:function(t){if(dbg){alert(t.responseText);}}}); + }, + + saveDpProto: function(id, ctrlId) { + var url = "/esp/system.htm?sid="+SessionId; + var pb = "string action = 'saveDpProto';"; + pb += "integer dpId = " + id + ";"; + pb += "integer iProto = '"+($(ctrlId).checked ? 1 : 0)+"';"; + new Ajax.Request(url, {postBody: ReGa.encode(pb)}); + }, + + saveDpVisibility: function(id, ctrlId) { + var url = "/esp/system.htm?sid="+SessionId; + var pb = "string action = 'saveDpVisibility';"; + pb += "integer dpId = " + id + ";"; + pb += "integer iVisible = '"+($(ctrlId).checked ? 1 : 0)+"';"; + new Ajax.Request(url, {postBody: ReGa.encode(pb)}); + }, + + saveDpInternal: function(id, ctrlId) { + var url = "/esp/system.htm?sid="+SessionId; + var pb = "string action = 'saveDpInternal';"; + pb += "integer dpId = " + id + ";"; + pb += "integer iInternal = '"+($(ctrlId).checked ? 1 : 0)+"';"; + new Ajax.Request(url, {postBody: ReGa.encode(pb)}); + }, + + ClearHistoryData: function() + { + var url = "/esp/system.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "ClearHistoryData";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + reloadPage(); + } + }; + new Ajax.Request(url,opts); + } +}; + +iseSystem = new ise.System(); + +// ####################### +// ### ISE: PROGRAMS ### +// ####################### + +/** + * @class + **/ +ise.Programs = Class.create(); + +ise.Programs.prototype = { + initialize: function() { + }, + + SetBreakOnRestart: function( rid, id, value ) + { + + var url = "/esp/programs.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "SetBreakOnRestart";'; + pb += 'string id = "'+id+'";'; + pb += 'string value = "'+value+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + ReloadRule(rid); + } + }; + new Ajax.Request(url,opts); + if(dbg)alert(pb); + }, + + SetActive: function( id, value ) + { + var url = "/esp/programs.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "SetActive";'; + pb += 'string id = "'+id+'";'; + pb += 'string value = "'+value+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + //reloadPage(); + } + }; + new Ajax.Request(url,opts); + }, + + SetVisible: function( id, value ) + { + var url = "/esp/programs.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "SetVisible";'; + pb += 'string id = "'+id+'";'; + pb += 'string value = "'+value+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + //reloadPage(); + } + }; + new Ajax.Request(url,opts); + }, + + SetOperate: function( id, value ) + { + var url = "/esp/programs.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "SetOperate";'; + pb += 'string id = "'+id+'";'; + pb += 'string value = "'+value+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + //reloadPage(); + } + }; + new Ajax.Request(url,opts); + }, + + ProgramUpdate: function( id ) + { + var url = "/esp/programs.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "ProgramUpdate";'; + pb += 'string id = "'+id+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + reloadPage(); + } + }; + new Ajax.Request(url,opts); + }, + + SetVisibility: function( id, value ) + { + var url = "/esp/programs.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "SetVisibility";'; + pb += 'string id = "'+id+'";'; + pb += 'string value = "'+value+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + //reloadPage(); + } + }; + new Ajax.Request(url,opts); + }, + + // ### CONDITIONS ### + AddCondition: function(rid) { + var url = "/esp/programs.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "AddCondition";'; + pb += 'string rid = "'+rid+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + ReloadRule(rid); + } + }; + new Ajax.Request(url,opts); + }, + DeleteCondition: function(rid,cid) { + var url = "/esp/programs.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "DeleteCondition";'; + pb += 'string rid = "'+rid+'";'; + pb += 'string cid = "'+cid+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + ReloadRule(rid); + } + }; + new Ajax.Request(url,opts); + }, + // ### SINGLE CONDITIONS ### + AddSingleCondition: function(rid, cid) { + var url = "/esp/programs.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "AddSingleCondition";'; + pb += 'string cid = "'+cid+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + ReloadRule( rid ); + } + }; + new Ajax.Request(url,opts); + }, + DeleteSingleCondition: function(rid,cid,sid) { + var url = "/esp/programs.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "DeleteSingleCondition";'; + pb += 'string cid = "'+cid+'";'; + pb += 'string sid = "'+sid+'";'; + pb += 'string rid = "'+rid+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + ReloadRule(rid); + } + }; + new Ajax.Request(url,opts); + }, + // ### SINGLE DESTINATIONS ### + AddSingleDestination: function(rid,did) { + var url = "/esp/programs.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "AddSingleDestination";'; + pb += 'string did = "'+did+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + ReloadRule(rid); + } + }; + new Ajax.Request(url,opts); + }, + DeleteSingleDestination: function(rid,did,sid) { + var url = "/esp/programs.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "DeleteSingleDestination";'; + pb += 'string did = "'+did+'";'; + pb += 'string sid = "'+sid+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + ReloadRule(rid); + } + }; + new Ajax.Request(url,opts); + }, + // #### SUB RULES #### + AddSubRule: function(rid) + { + if(dbg){alert("Call AddSubRule");} + var url = "/esp/programs.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "AddSubRule";'; + pb += 'string rid = "'+rid+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + reloadPage(); + } + }; + new Ajax.Request(url,opts); + }, + AddSubRuleDest: function(rid) + { + if(dbg){alert("Call AddSubRuleDest");} + var url = "/esp/programs.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "AddSubRuleDest";'; + pb += 'string rid = "'+rid+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + reloadPage(); + //ReloadRule( rid ); + } + }; + new Ajax.Request(url,opts); + }, + AddSubRuleBreakOnRestart: function(rid) + { + if(dbg){alert("Call AddSubRuleBreakOnRestart");} + var url = "/esp/programs.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "AddSubRuleBOR";'; + pb += 'string rid = "'+rid+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + reloadPage(); + } + }; + new Ajax.Request(url,opts); + }, + AddNewElseRule: function(rid) + { + if(dbg){alert("Call AddNewElseRule");} + var url = "/esp/programs.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "AddNewElseRule";'; + pb += 'string rid = "'+rid+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + //ReloadRule(rid); + reloadPage(); + } + }; + new Ajax.Request(url,opts); + }, + DeleteSubRule: function(rid) + { + var url = "/esp/programs.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "DeleteSubRule";'; + pb += 'string rid = "'+rid+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + //ReloadRule(rid); + //ReloadProgram(pid); + reloadPage(); + } + }; + new Ajax.Request(url,opts); + }, + OperatorType: function(rid,id,value) + { + var url = "/esp/programs.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "SetOperatorType";'; + pb += 'string id = "'+id+'";'; + pb += 'string value = "'+value+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + ReloadRule(rid); + } + }; + new Ajax.Request(url,opts); + }, + Delete: function(id,prevPage) + { + var url = "/esp/programs.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "DeleteProgram";'; + pb += 'string id = "'+id+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + WebUI.enter(( prevPage && prevPage === 'control/programs' ) ? ControlProgramsPage : ProgramListPage); + } + }; + new Ajax.Request(url,opts); + }, + Restore: function(orig,copy,prevPage) + { + var url = "/esp/programs.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "RestoreProgram";'; + pb += 'string orig = "'+orig+'";'; + pb += 'string copy = "'+copy+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + WebUI.enter(( prevPage && prevPage === 'control/programs' ) ? ControlProgramsPage : ProgramListPage); + } + }; + new Ajax.Request(url,opts); + }, + CopyToNewProgram: function(id,prevPage) + { + var url = "/esp/programs.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "CopyToNewProgram";'; + pb += 'string id = "'+id+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + WebUI.enter(( prevPage && prevPage === 'control/programs' ) ? ControlProgramsPage : ProgramListPage); + } + }; + new Ajax.Request(url,opts); + } +}; + +isePrograms = new ise.Programs(); + +// ############################## +// ### ISE: SINGLE CONDITIONS ### +// ############################## + +/** + * @class + **/ +ise.SingleCondition = Class.create(); + +ise.SingleCondition.prototype = +{ + initialize: function() + { + }, + + OperatorType: function(cid,id,value) + { + var url = "/esp/sico.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "SetOperatorType";'; + pb += 'string cid = "'+cid+'";'; + pb += 'string id = "'+id+'";'; + pb += 'string value = "'+value+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + conInfo( t.responseText ); + ReloadRule(rid); + } + }; + new Ajax.Request(url,opts); + }, + + SetValueRange: function(id,rv1,rv2,ct) + { + var url = "/esp/sico.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "SetValueRange";'; + pb += 'string id = "'+id+'";'; + pb += 'string rv1 = "'+rv1+'";'; + pb += 'string rv2 = "'+rv2+'";'; + pb += 'string ct = "'+ct+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + ReloadSingleCondition(id); + } + }; + new Ajax.Request(url,opts); + }, + + SetNegateCondition: function(scid,nc) { + var url = "/esp/sico.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "SetNegateCondition";'; + pb += 'string scid = "'+scid+'";'; + pb += 'string nc = "'+nc+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + ReloadSingleCondition(scid); + } + }; + new Ajax.Request(url,opts); + }, + + SetLeftValue: function(scid,lv) + { + var url = "/esp/sico.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "SetLeftValue";'; + pb += 'string scid = "'+scid+'";'; + pb += 'string lv = "'+lv+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + ReloadSingleCondition(scid); + } + }; + new Ajax.Request(url,opts); + }, + + SetRightValue: function(scid,rv) + { + var url = "/esp/sico.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "SetRightValue";'; + pb += 'string scid = "'+scid+'";'; + pb += 'string rv = "'+rv+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + } + }; + new Ajax.Request(url,opts); + }, + + SetLeftAndRightValue: function(scid,lv,rv) + { + var url = "/esp/sico.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "SetLeftAndRightValue";'; + pb += 'string scid = "'+scid+'";'; + pb += 'string rv = "'+rv+'";'; + pb += 'string lv = "'+lv+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + conInfo( t.responseText ); + ReloadSingleCondition(scid); + } + }; + new Ajax.Request(url,opts); + }, + + SetLeftValType: function(scid,lvt) + { + var url = "/esp/sico.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "SetLeftValType";'; + pb += 'string scid = "'+scid+'";'; + pb += 'string lvt = "'+lvt+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + ReloadSingleCondition(scid); + } + }; + new Ajax.Request(url,opts); + }, + SetConditionType2: function(scid,ct) + { + var url = "/esp/sico.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "SetConditionType2";'; + pb += 'string scid = "'+scid+'";'; + pb += 'string ct = "'+ct+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + conInfo(t.responseText); + ReloadSingleCondition(scid); + } + }; + new Ajax.Request(url,opts); + }, + SetChannel: function(scid,chid) + { + var url = "/esp/sico.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "SetChannel";'; + pb += 'string scid = "'+scid+'";'; + pb += 'string chid = "'+chid+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + ReloadSingleCondition(scid); + } + }; + new Ajax.Request(url,opts); + }, + SetTimeModule: function(scid,tmid) + { + var url = "/esp/sico.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "SetTimeModule";'; + pb += 'string scid = "'+scid+'";'; + pb += 'string tmid = "'+tmid+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + ReloadSingleCondition(scid); + } + }; + new Ajax.Request(url,opts); + } +}; + +iseSingleCondition = new ise.SingleCondition(); + +// ################################ +// ### ISE: SINGLE DESTINATION ### +// ################################ + +/** + * @class + **/ +ise.SingleDestination = Class.create(); + +ise.SingleDestination.prototype = +{ + initialize: function() + { + this.reload = true; + }, + SetDP: function(id,value) + { + var url = "/esp/side.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "SetDP";'; + pb += 'string id = "'+id+'";'; + pb += 'string value = "'+value+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + //reloadPage(); + ReloadSingleDestination(id); + } + }; + new Ajax.Request(url,opts); + }, + SetChannel: function(id,value) + { + var url = "/esp/side.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "SetChannel";'; + pb += 'string id = "'+id+'";'; + pb += 'string value = "'+value+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + ReloadSingleDestination(id); + } + }; + new Ajax.Request(url,opts); + }, + SetParam: function(id,value) + { + var url = "/esp/side.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "SetParam";'; + pb += 'string id = "'+id+'";'; + pb += 'string value = "'+value+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + ReloadSingleDestination(id); + } + }; + new Ajax.Request(url,opts); + }, + SetValue: function(id,value,unit, isSysVar) + { + isSysVar = (typeof isSysVar == "undefined") ? false : true; + + var url = "/esp/side.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "SetValue";'; + pb += 'string id = "'+id+'";'; + pb += 'string value = "'+value+'";'; + pb += 'boolean isSysVar = "'+isSysVar+'";'; + if( typeof( unit ) != "undefined" ) + { + pb += 'string unit = "'+unit+'";'; + } + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + conInfo( t.responseText ); + if(iseSingleDestination.reload) { ReloadSingleDestination(id); } + iseSingleDestination.reload = true; + } + }; + new Ajax.Request(url,opts); + }, + + SetValueMinMax: function(id,value,unit,min,max) + { + var valElm = jQuery("#valSD_"+id); + + value = value.toString().replace(/,/g, "."); + + value = parseFloat(value); + if (isNaN(value)) + { + value = min; + } + + if ((unit == "°C" || unit == "°C") && (value != min) && (value != max)) { + value = roundValue05(value); + } + + if (unit == "%") {min = min * 100; max = max * 100;} + + if (value < min) {value = min;} + if (value > max) {value = max;} + + valElm.val(addTrailingZero(value)); + + var url = "/esp/side.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "SetValue";'; + pb += 'string id = "'+id+'";'; + pb += 'string value = "'+value+'";'; + if( typeof( unit ) != "undefined" ) + { + pb += 'string unit = "'+unit+'";'; + } + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + conInfo( t.responseText ); + if(iseSingleDestination.reload) { ReloadSingleDestination(id); } + iseSingleDestination.reload = true; + } + }; + new Ajax.Request(url,opts); + }, + SetValueType: function(id,value) + { + var url = "/esp/side.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "SetValueType";'; + pb += 'string id = "'+id+'";'; + pb += 'string value = "'+value+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + if(iseSingleDestination.reload) reloadPage(); + } + }; + new Ajax.Request(url,opts); + }, + SetValueAndType: function(id,value,type) + { + var url = "/esp/side.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "SetValueAndType";'; + pb += 'string id = "'+id+'";'; + pb += 'string value = "'+value+'";'; + pb += 'string type = "'+type+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + PopupClose(); + //if(iseSingleDestination.reload) reloadPage(); + } + }; + new Ajax.Request(url,opts); + }, + SetValueAndTypeMinMax: function(id,value,type, min, max) + { + + if ((value < min) || (isNaN(value))) {value = min;} + if (value > max) {value = max;} + + var url = "/esp/side.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "SetValueAndType";'; + pb += 'string id = "'+id+'";'; + pb += 'string value = "'+value+'";'; + pb += 'string type = "'+type+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + PopupClose(); + //if(iseSingleDestination.reload) reloadPage(); + } + }; + new Ajax.Request(url,opts); + }, + SetValueAndDP: function(id,value,dp, elem) + { + var url = "/esp/side.htm?sid="+SessionId; + var pb = ''; + var arValue = elem.value.split("|"); + + if (arValue[1]) { + var arParamName = arValue[1].split("."), + paramName = arParamName[arParamName.length - 1]; + if (paramName == "PARTY_MODE_SUBMIT") { + value = getDefaultPartyModeString(); + } + } + pb += 'string action = "SetValueAndDP";'; + pb += 'string id = "'+id+'";'; + pb += 'string value = "'+value+'";'; + pb += 'string dp = "'+dp+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + ReloadSingleDestination(id); + } + }; + new Ajax.Request(url,opts); + }, + SetValueParam: function(id,value) + { + var url = "/esp/side.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "SetValueParam";'; + pb += 'string id = "'+id+'";'; + pb += 'string value = "'+value+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + ReloadSingleDestination(id); + } + }; + new Ajax.Request(url,opts); + }, + SetValueParamType: function(id,value) + { + var url = "/esp/side.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "SetValueParamType";'; + pb += 'string id = "'+id+'";'; + pb += 'string value = "'+value+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + ReloadSingleDestination(id); + } + }; + new Ajax.Request(url,opts); + }, + SetScript: function(id,script) + { + var url = "/esp/side.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "SetScript";'; + pb += 'string id = "'+id+'";'; + pb += 'string value = ^'+script.replace(/\^/g, '^#\'^\'#^')+'^;'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete:function(t) + { + if(dbg){alert( t.responseText );} + ReloadSingleDestination(id); + } + }; + new Ajax.Request(url,opts); + } +}; + +iseSingleDestination = new ise.SingleDestination(); + +// ################### +// ### ISE: USER ### +// ################### + +/** + * @class + **/ +ise.User = Class.create(); + +ise.User.prototype = +{ + initialize: function() + { + }, + + buildSysVarTable: function(uid) { + var url = "/esp/system.htm?sid="+SessionId; + var pb = "string action = 'BuildUserSvTable';"; + pb += "integer userId = "+ uid +";"; + var opts = { + postBody: ReGa.encode(pb), + onComplete: function(response) { + if (200 == response.status) { + translatePage("#userSysVarTbl"); + } + } + }; + new Ajax.Updater("userSysVarTbl", url, opts); + }, + + sortSysVarTable: function(uid) { + var url = "/esp/system.htm?sid="+SessionId; + var pb = "((dom.GetObject(ID_USERS)).Get(" + uid + ")).UserSharedObjects().SortByName();"; + pb += "string action = 'BuildUserSvTable';"; + pb += "integer userId = "+ uid +";"; + var opts = { + postBody: ReGa.encode(pb), + onComplete: function(response) { + if (200 == response.status) { + translatePage("#userSysVarTbl"); + } + } + }; + new Ajax.Updater("userSysVarTbl", url, opts); + }, + + addSysVarBuildTable: function(uid, newVarId) { + //var url = "/esp/system.htm?sid="+SessionId+"&curDateTime="+new Date().getTime(); + var url = "/esp/system.htm?sid="+SessionId; + var pb = "string action = 'AddSysVarAndBuildTable';"; + pb += "integer userId = "+ uid +";"; + pb += "integer newSvId = " + newVarId + ";"; + var opts = { + postBody: ReGa.encode(pb), + onSuccess: function(t) { + // funktioniert seltsamerweise nur durch den "Updater"-Aufruf nicht + $("userSysVarTbl").innerHTML = t.responseText; + }, + onComplete: function(response) { + if (200 == response.status) { + translatePage("#userSysVarTbl"); + } + } + }; + new Ajax.Updater("userSysVarTbl", url, opts); + }, + + DeleteSysVar: function(uid, svId) { + var url = "/esp/system.htm?sid=" + SessionId; + var pb = "string action = 'UserDeleteSysVarBuildTable';"; + pb += "integer userId = "+ uid +";"; + pb += "integer svId = " + svId + ";"; + var opts = { + postBody: ReGa.encode(pb), + onSuccess: function(t) { + // funktioniert seltsamerweise nur durch den "Updater"-Aufruf nicht + $("userSysVarTbl").innerHTML = t.responseText; + }, + onComplete: function(response) { + if (200 == response.status) { + translatePage("#userSysVarTbl"); + } + } + }; + new Ajax.Updater("userSysVarTbl", url, opts); + }, + + MoveSysVar: function(uid, svId, dir) { + var url = "/esp/system.htm?sid=" + SessionId; + var pb = "string action = 'UserMoveSysVarBuildTable';"; + pb += "integer userId = "+ uid +";"; + pb += "integer svId = " + svId + ";"; + pb += "integer svMoveDirection = " + dir + ";"; + var opts = { + postBody: ReGa.encode(pb), + onSuccess: function(t) { + // funktioniert seltsamerweise nur durch den "Updater"-Aufruf nicht + $("userSysVarTbl").innerHTML = t.responseText; + }, + onComplete: function(response) { + if (200 == response.status) { + translatePage("#userSysVarTbl"); + } + } + }; + new Ajax.Updater("userSysVarTbl", url, opts); + }, + + buildTmpSysVarTable: function(arSysVars) { + var url = "/esp/system.htm?sid="+SessionId; + var pb = "string action = 'BuildUserSvTable';"; + pb += "integer userId = 0;"; + + var s = ""; + for(var i = 0; i < arSysVars.length; i++) { + s += arSysVars[i] + "\t"; + } + s = s.substr(0, s.length - 1); + pb += "string sTmpVars = '"+s+"';"; + var opts = { + postBody: ReGa.encode(pb), + onSuccess: function(t) { + // funktioniert seltsamerweise nur durch den "Updater"-Aufruf nicht + $("userSysVarTbl").innerHTML = t.responseText; + }, + onComplete: function(response) { + if (200 == response.status) { + translatePage("#userSysVarTbl"); + } + } + }; + new Ajax.Updater("userSysVarTbl", url, opts); + }, + + setAutoLogin: function(alPC, alPDA) { + var url = "/esp/system.htm?sid="+SessionId; + var pb = "string action = 'setAutoLogin';"; + pb += "integer alPC = " + alPC + ";"; + pb += "integer alPDA = " + alPDA + ";"; + + var opts = { + postBody: ReGa.encode(pb), + onComplete:function() + { + PopupClose(); + reloadPage(); + } + }; + new Ajax.Request(url, opts); + } +}; + +iseUser = new ise.User(); +/** + * ise/iseRefresher.js + **/ + +/** + * @fileOverview ? + * @author ise + **/ + +/** + * @class + **/ +iseRefresher = Class.create(); + +iseRefresher.prototype = +{ + initialize: function(iPollingInterval) + { + this.updating = false; + this.ajax = null; + this.pe = new PeriodicalExecuter(this.refresh, iPollingInterval); + }, + refresh: function() + { + if( rfr ) + { + if( !this.updating ) + { + this.updating = true; + var t = this; + SwitchOnFlashLight(); + var url = "/esp/system.htm?sid="+SessionId+"&action=UpdateUI"; + var pb = ''; + pb += 'string channels = "'+iseUpdateIDArray.join("\t")+'";'; + pb += 'string timestamps = "'+iseUpdateTMArray.join("\t")+'";'; + var opts = + { + method: 'post', + postBody: ReGa.encode(pb), + evalScripts:true, + onComplete: function() + { + delete t.ajax; + t.ajax = null; + iseRefrTimer = 0; + t.updating = false; + } + }; + if(dbg)alert(pb); + this.ajax = new Ajax.Updater("dummy", url, opts); + } + } + } +};/** + * ise/iseMessageBox.js + **/ + +/** + * @fileOverview ? + * @author ise + **/ + +/** + * @class + **/ +iseMessageBox = Class.create(); + +iseMessageBox.prototype = +{ + /* id: Steuert welches Popup dargestellt wird + * type: "Extra-parameter" für einige Popups + * secondary: Popup wird über einem anderen Popup eingeblendet + * showAll: All Kanäle auch virtuelle sollen angezeigt werden + * popUpTitle:Titel der auf dem popUp angezeigt werden soll + */ + initialize: function(id, type, secondary) + { + iseRefr(false); + this.id = id; + this.setTopMargin(6); + this.setLeftMargin(6); + this.type = type; + this.operations = iufVisible|iufReadyState|iufOperated|iufReadable|iufWriteable|iufEventable; + this.bMultiChooser = true; + this.title = ""; + this.pb = ""; + this.file = ""; + this.draggable = true; + + if(secondary) + { + this.secondary = true; + this.oldMsgHtml = $("messagebox").innerHTML; + this.oldMsgWidth = $("messagebox").getWidth(); + //$("messagebox").style.width = this.width + "px"; + } + else + { + this.secondary = false; + if (PLATFORM == 'Central') { + this.createMessagebox(); + } + } + + this.initPopup(id); + + this.load(); + }, + initPopup: function(id) + { + var screenWidth = WebUI.getWidth(); + var screenHeight = WebUI.getHeight(); + + switch(this.id) + { + case ID_ROOMS: + this.setTitle( translateKey("dialogEditRoom") /*"Raum bearbeiten"*/ ); + this.setWidth75Perc(); + this.setFile( "/pages/msg/popupPropEditor.htm" ); + break; + case ID_FUNCTIONS: + this.setTitle( translateKey("dialogEditFunction") /*"Gewerk bearbeiten"*/ ); + this.setWidth75Perc(); + this.setFile( "/pages/msg/popupPropEditor.htm" ); + break; + case ID_TRANSFER_PARAMETERS: + + if (PLATFORM == 'Central') { + this.setTitle( translateKey("dialogChooseTransmitMode") /*"Auswahl Übertragungsmodus"*/ ); + this.addToPostBody( 'integer chnId = '+this.type+';' ); + this.setWidth(1000); + this.setFile( "/pages/msg/popupTransEditor.htm" ); + } else { + + //ConfigTool + ResetPostString(); + poststr += "&title=" + translateKey("dialogChooseTransmitMode") /*"Auswahl Übertragungsmodus"*/; + poststr += "&channel=" + this.type; + //SendRequest('/popupTransEditor.cgi'); + } + + break; + case ID_CHANNEL_LIST: + this.setTitle( translateKey("dialogChannelOverView") /*"Kanalübersicht"*/ ); + //this.stretchToMax(); + this.setHeight(700); + this.setFile( "/pages/msg/channelList.htm" ); + break; + case ID_NEW_SYSVAR: + this.setTitle( translateKey("dialogCreateNewSysVar") /*"Systemvariable neu anlegen"*/ ); + this.addToPostBody( 'integer varid = 0;' ); + this.addToPostBody( 'integer createNew = 1;' ); + this.setWidth(1100); + this.setFile( "/pages/tabs/admin/msg/newSysVar.htm" ); + break; + case ID_EDIT_SYSVAR: + this.setTitle( translateKey("dialogEditSysVar") /*"Systemvariable bearbeiten"*/ ); + this.addToPostBody( 'integer varid = '+this.type+';' ); + this.addToPostBody( 'integer createNew = 0;' ); + this.setWidth(1100); + this.setFile( "/pages/tabs/admin/msg/newSysVar.htm" ); + break; + case ID_EDIT_SYSVAR_VALUE: + this.setTitle( translateKey("dialogEditSysVarValue") /*"Systemvariablenwert bearbeiten"*/ ); + this.addToPostBody( 'integer varid = '+this.type+';' ); + this.addToPostBody( 'integer createNew = 0;' ); + this.addToPostBody( 'boolean editValueOnly = 1;' ); + this.setWidth(240); + this.setFile( "/pages/tabs/admin/msg/newSysVar.htm" ); + break; + case ID_CREATE_SCRIPT: + this.setTitle( translateKey("dialogCreateScript") /*"Skript erstellen"*/ ); + this.addToPostBody( 'string iSDID = "'+this.type+'";' ); + this.setWidth(800); + this.setFile( "/pages/msg/createScript.htm" ); + break; + case ID_EDIT_SCRIPT: + this.setTitle( translateKey("dialogEditScript") /*"Skript bearbeiten"*/ ); + this.setWidth(parseInt(screenWidth * 0.8)); + this.setHeight(parseInt(screenHeight * 0.8)); + this.addToPostBody( 'string sdid = "'+this.type+'";' ); + this.addToPostBody( 'string frameHeight = "'+this.height+'";' ); + this.setFile( "/pages/msg/editScript.htm" ); + break; + case ID_CONTROL_TEST: + this.setWidth(800); + this.setFile( "/pages/msg/controls.htm" ); + break; + case ID_INSERT_VALUE: + this.setTitle( translateKey("dialogEnterValue") /*"Wert eingeben"*/ ); + this.addToPostBody( 'string type = "'+this.type+'";' ); + this.setWidth(800); + this.setFile( "/pages/msg/insertValue.htm" ); + break; + case ID_INSERT_STRING: + this.setTitle( translateKey("dialogEnterText") /*"Text eingeben" */); + this.addToPostBody( 'integer type = '+this.type+';' ); + this.setWidth(800); + this.setFile( "/pages/msg/insertValue.htm" ); + break; + case ID_SET_VALUE_RANGE: + this.setTitle( translateKey("dialogRangeOfValues") /*"Einstellung des Wertebereiches"*/ ); + this.addToPostBody( 'integer type = '+this.type+';' ); + this.setWidth(500); + this.setFile( "/pages/msg/setValueRange.htm" ); + break; + case ID_DEL_SYS_VARIABLE: + this.setTitle( translateKey("dialogDeleteSysVar") /*"Systemvariable löschen" */); + this.setWidth(800); + this.setFile( "/pages/msg/delSysVariable.htm" ); + break; + case ID_SYS_VARS_SELECTION: + this.setTitle( translateKey("dialogProgChoseSysVar") ); + this.addToPostBody( 'integer iShowAll = ' + this.type + ';' ); + this.addToPostBody( 'integer iSecondary = '+(this.secondary?"1":"0")+';' ); + this.setWidth(1000); + this.setFile( "/pages/msg/sysVarsSelection.htm" ); + this.draggable = false; // Scroll bar not working otherwise + break; + case ID_PROGRAM_CHOOSER: + this.setTitle( translateKey("dialogCreateFavChooseProg") /*"Favoritenerstellung - Programmauswahl" */); + this.addToPostBody( 'integer iSecondary = '+(this.secondary?"1":"0")+';' ); + this.setWidth(1000); + this.setFile( "/pages/msg/programChooser.htm" ); + break; + case ID_TIMEMODULE: + this.setTitle( translateKey("dialogSetTimeModul") /*"Einstellung des Zeitmoduls"*/ ); + this.addToPostBody( 'integer tmId = '+this.type+';' ); + this.setWidth(700); + this.setFile( "/pages/tabs/admin/msg/timemodule.htm" ); + break; + case ID_STATUSINFO: + this.setTitle( translateKey("dialogStateInfoDataTransferToDeviceSuccess") /*"Statusinfo: Datenübertragung zum Gerät erfolgreich abgeschlossen!" */); + this.setWidth(800); + this.setFile( "/pages/msg/statusinfo.htm" ); + break; + case ID_STATUSINFO_WARNING: + this.setTitle( translateKey("dialogWarningDataTransferToDeviceNotPossible") /*"Warnung: Übertragung der Daten zum Gerät nicht möglich!" */); + this.setWidth(800); + this.setFile( "/pages/msg/statusinfoWarning.htm" ); + break; + case ID_USER_ACCOUNT_CONFIG_ADMIN: + this.setTitle(translateKey("dialogUserAccountTitle")/*"Benutzerkonto - Konfiguration"*/); + this.addToPostBody( 'integer userid = '+this.type+';' ); + this.setWidth(800); + this.setFile( "/pages/msg/userAccountConfigAdmin.htm" ); + break; + case ID_USER_ACCOUNT_CONFIG_USER: + this.setTitle(translateKey("dialogUserAccountTitle")/*"Benutzerkonto - Konfiguration" */); + this.setWidth(1000); + this.setFile( "/pages/msg/userAccountConfigUser.htm" ); + break; + case ID_AUTO_LOGIN_CONFIG: + this.setTitle( translateKey("dialogConfigAutomaticLogin") /*"Automatische Anmeldung - Konfiguration" */); + this.setWidth(800); + this.setFile( "/pages/msg/autoLoginConfig.htm" ); + break; + case ID_SYSTEM_LANGUAGE_CONFIG: + this.setTitle( translateKey("dialogConfigSystemLanguage") /*"Systemsprache waehlen - Konfiguration" */); + this.setWidth(800); + this.setFile( "/pages/msg/systemLanguageConfig.htm" ); + break; + case ID_CHOOSE_LED: + this.setTitle( translateKey("dialogEnterValue") /*"Wert eingeben" */); + this.addToPostBody( 'string type = "'+this.type+'";' ); + this.setWidth(800); + this.setFile( "/pages/msg/chooseOULED16.htm" ); + break; + case ID_SET_OUCFM_MODE: + this.setTitle( translateKey("dialogEnterValue") /*"Wert eingeben" */); + this.addToPostBody( 'string type = "'+this.type+'";' ); + this.setWidth(400); + this.setFile( "/pages/msg/setOUCFMMode.htm" ); + break; + case ID_SET_STATUS_DISPLAY: + this.setTitle( translateKey("dialogEnterValue") /*"Wert eingeben" */); + this.addToPostBody( 'string type = "'+this.type+'";' ); + this.setWidth(400); + this.setFile( "/pages/msg/setStatusDisplay.htm" ); + break; + //ConfigTool + case ID_BIDCOS_INTERFACE: + ResetPostString(); + poststr += "&title=" + translateKey("dialogChooseBidCosInterface") /*"Auswahl BidCoS-Interface"*/; + poststr += "&channel=" + this.type; + //SendRequest('/popupInterfaceEditor.cgi'); + break; + + default: + throw new Error("unknown id (" + this.id + ")"); + break; + } + + if (this.draggable) { + jQuery("#messagebox").draggable({ + cancel: "input,textarea,button,select,option,.FooterButton,.StdButton,.CodeMirror,.CodeMirror-line" + }); + } + + }, + buildPostBody: function() + { + this.pb += 'integer id='+this.id+';'; + this.pb += 'string title="'+this.title+'";'; + this.pb += 'string sOperations = "'+this.operations+'";'; + if( this.bMultiChooser ) + { + this.pb += 'string MultiChooser = "'+this.type+'";'; + } + }, + load: function() + { + this.buildPostBody(); + //alert("PB:"+this.pb); + //alert("FN:"+this.file); + this.LoadFromFile(this.file, this.pb); + }, + setWidth: function(width) + { + this.width = width; + }, + stretchToMax: function() { + var maxHeight = 0; + if (window.innerHeight) { + maxHeight = window.innerHeight; + } + else { + if (window.document.documentElement && window.document.documentElement.clientHeight) + maxHeight = window.document.documentElement.clientHeight; + else + maxHeight = window.document.body.offsetHeight; + + this.setHeight(maxHeight - 50); + } + var maxWidth = screen.availWidth; + this.setWidth(maxWidth - 50); + }, + setWidth75Perc: function(perc) + { + var maxHeight = 0; + if (window.innerHeight) + { + maxHeight = window.innerHeight; + } + else + { + if (window.document.documentElement && window.document.documentElement.clientHeight) + maxHeight = window.document.documentElement.clientHeight; + else + maxHeight = window.document.body.offsetHeight; + + // this.setHeight(maxHeight * 0.5); + } + + var maxWidth = document.body.offsetWidth; + if(typeof(perc) == 'undefined') + { + this.setWidth(maxWidth * 0.75); + } + else + { + this.setWidth(maxWidth * perc); + } + }, + setHeight: function(height) + { + this.height = height; + }, + setLeftMargin: function(left) + { + this.LeftMargin = left; + }, + setTopMargin: function(top) + { + this.TopMargin = top; + }, + createMessagebox: function() + { + if ( !$('messagebox') ) + { + var newDiv = document.createElement("div"); + var newDivId = document.createAttribute("id"); + newDivId.nodeValue = "messagebox"; + newDiv.setAttributeNode(newDivId); + var newDivStyle = document.createAttribute("style"); + + if ((this.baseId != ID_CHANNEL_LIST)) + { + newDivStyle.nodeValue = "width:"+this.width+"px;height:"+this.height+"px;padding: 0px;position:absolute;left: 50%;margin-left: -"+(this.width/2)+"px;margin-top: -"+(this.height/2)+"px;"; + } + else + { + newDivStyle.nodeValue = "width:"+this.width+"px;height:"+this.height+"px;padding: 0px;position:absolute;"; + } + + if( typeof( newDiv.style.cssText ) == "string" ) + newDiv.style.cssText = newDivStyle.nodeValue; + else + newDiv.setAttributeNode(newDivStyle); + + $('centerbox').appendChild(newDiv); + + } + }, + removeMessagebox: function() + { + if ( $('messagebox') ) + { + $('messagebox').remove(); + } + }, + readaptSize: function() + { + if ( $('messagebox') ) + { + if ((this.baseId != ID_CHANNEL_LIST)) + { + var h = $("messagebox").getHeight(); + $('messagebox').style.marginLeft = ($('messagebox').style.width.replace(/px$/,"")/2)*(-1)+"px"; + $('messagebox').style.marginTop = (h/2)*(-1)+"px"; + } + } + }, + show: function() + { + this.readaptSize(); + $('trlayer').show(); + $('centerbox').show(); + }, + hide: function(o) + { + $('centerbox').hide(); + this.remove(); + $('trlayer').hide(); + //this.peKeepAlive.stop(); + iseRefr(true); + }, + remove: function() + { + this.removeMessagebox(); + }, + LoadFromFile: function(fn,pb) { + var url = fn; + if(url.indexOf('?sid=') === -1) + { + url = url+'?sid='+SessionId; + } + var t = this; + var opt = + { + method: 'post', + evalScripts: true, + postBody: ReGa.encode(pb), + onComplete: function(trans) + { + //$("messagebox").style.width = t.width + "px"; + if(t.width !== "undefined") { + jQuery("#messagebox").width(t.width + "px"); + } + if(t.height !== "undefined") { + jQuery("#messagebox").height(t.height + "px"); + } + jQuery("#tableContainer").css("max-height",(parseInt(jQuery(window).height() * 0.75)) + "px"); + centerMessageBox(); + iseRefr(true); + translatePage("#messagebox"); + } + }; + new Ajax.Updater('messagebox',url,opt); + }, + ShowPopup: function() { + this.show(); + setTimeout(function() { + eQ3.HomeMatic.Event.fire({type:'ContentLoaded'}); + }, 100); + }, + + restorePrevious: function() { + $("messagebox").innerHTML = this.oldMsgHtml; + $("messagebox").setStyle({width: this.oldMsgWidth + "px"}); + }, + + keepAlive: function() { + var url = "/esp/system.htm?sid="+SessionId+"&action=keepAlive"; + new Ajax.Updater("divTitle", url, {}); + }, + + addToPostBody: function(pb) + { + this.pb += pb; + }, + + setOperations: function(iOperations) + { + this.operations = iOperations; + }, + + setTitle: function(sTitle) + { + this.title = sTitle; + }, + + setFile: function(sFile) + { + this.file = sFile; + } +}; +/** + * ise/iseSubMenuControl.js + **/ + +/** + * @fileOverview ? + * @author Michael Niehaus (ise) + **/ + + +// file: iseSubMenuControl +// author: Michael Niehaus +// date created: 18.04.2007 + +/** + * @class + **/ +iseSubMenuControl = Class.create(); + +iseSubMenuControl.prototype = { + // topMenuId: Id des TopMenüs bei dessen MouseOver das Submenü eingeblendet werden soll + // subMenuId: Id des SubMenüs das eingeblendet werden soll + // offsetDivId [optional]: wird benötigt um Verhalten des IE7 bei Positionierung auszugleichen + // + // Wird eine Seite per Ajax nachgeladen ergibt im IE7 der Aufruf von Position.page() und + // Position.cumulativeOffset() (für ein Element bei dem Position auf 'aboslute' oder 'relative' + // gesetzt ist) immer die Position vom Ursprung der nachgeladenen Seite wieder, + // nicht die Position vom Ursprung des Browser-Fensters. + // Wenn ein Div direkt am Anfang der nachgeladenen Seite eingefügt wird (mit Position:'static'), kann mit + // Position.cumulativeOffset() etc. dessen Position zum Ursprung des Browser-Fenstern ermittelt + // werden, und somit kann man die Position des SubMenüs berechnen. + // shiftLeft: zur Darstellungs-Korrektur + // mouseOpts: Um Custom-MouseOvers etc. hinzuzufügen + // popup: submenüs sind in einem Popup (Darstellungskorrektur MOZ) + // bOnClick: Submenüs öffnen bei OnClick, nicht bei MouseOver + initialize: function(topMenuId, subMenuId, offsetDivId, shiftOpts, mouseOpts, popup, bOnClick,iFuncCount,iScreenHight) + { + this.bIE = NAV_IE; + this.bMoz = NAV_MOZ; + + this.top = $(topMenuId); + this.sub = $(subMenuId); + this.offsetDiv = null; + if (offsetDivId !== null) { + this.offsetDiv = $(offsetDivId); + } + //this.offsetDiv = $("indexOffset"); + this.shiftOpts = shiftOpts; + this.mouseOpts = mouseOpts; + this.popup = false; + if (popup) + this.popup = popup; + if (iFuncCount) + this.iFuncCount = iFuncCount; + if (iScreenHight) // Get iScreenHight from calling application, if possible , cause both browsers are doing wrong with screen hight. + { + this.iScreenHight = iScreenHight; + } + else + { + this.iScreenHight = document.body.clientHeight; + } + + this.positionSubMenu(); + + // Top menu Click (DEBUG) + this.topMenuClick = this.topMenuMouseClick.bindAsEventListener(this); + Event.observe($(topMenuId), 'click', this.topMenuClick); + + if (bOnClick) + { + // Top menu Mouseover + this.topMenuOver = this.topMenuMouseOver.bindAsEventListener(this); + Event.observe($(topMenuId), 'click', this.topMenuOver); + } + else + { + // Top menu Mouseover + this.topMenuOver = this.topMenuMouseOver.bindAsEventListener(this); + Event.observe($(topMenuId), 'mouseover', this.topMenuOver); + + // Top menu Mouseout + this.topMenuOut = this.topMenuMouseOut.bindAsEventListener(this); + Event.observe($(topMenuId), 'mouseout', this.topMenuOut); + + // Sub menu Mouseout + this.subMenuOut = this.subMenuMouseOut.bindAsEventListener(this); + Event.observe($(subMenuId), 'mouseout', this.subMenuOut); + } + + // Sub menu Mouseover + this.subMenuOver = this.subMenuMouseOver.bindAsEventListener(this); + Event.observe($(subMenuId), 'mouseover', this.subMenuOver); + }, + + positionSubMenu: function() + { + /* + if (this.top.id == "TestTd") { + this.sub.style.top = "20px"; + this.sub.style.left = "20px"; + return; + } + */ + + var newX = 0; + var newY = 0; + + //var topCoords = Position.cumulativeOffset(this.top); + var topCoords = Position.page(this.top); + + var dimTop = this.top.getDimensions(); + var offsetCoords = new Array(2); + + if (this.popup) + { + var tp = Position.page(this.top); + var rp = Position.page($("rowhead")); + var t = $("rowhead").getHeight() + $("rowflt").getHeight(); + if (this.bMoz) + t += $("divTitle").getHeight(); + var l = tp[0] - rp[0]; + newX = l; + newY = t; + newY -= 4; + + } + else + { + if ( this.offsetDiv && this.bIE ) + { + offsetCoords = Position.page(this.offsetDiv); + newY = topCoords[1] - offsetCoords[1] + dimTop.height; + newX = topCoords[0] - offsetCoords[0]; +/* + // Function is disabled, because another solution is avaiable, but is possibly needed once. + if (this.iFuncCount) + { + //alert(newY+170+(this.iFuncCount*16)+' > '+(this.iScreenHight)); // Have a lock for debugging. + if ( (newY+170+(this.iFuncCount*16)>this.iScreenHight) ) + newY -= (this.iFuncCount*16)+3; // Pull-down-menu pulls up, if screen is to short. + + } +*/ + if (this.shiftOpts.l) + newX -= this.shiftOpts.l; + if (this.shiftOpts.r) + newX += this.shiftOpts.r; + if (this.shiftOpts.d) + newY += this.shiftOpts.d; + if (this.shiftOpts.u) + newY -= this.shiftOpts.u; +/* + if (this.offsetDiv.getHeight() > 0) { + newY -= this.offsetDiv.getHeight(); + } +*/ + } + else + { + newY = parseInt(topCoords[1] + dimTop.height); +/* + // Function is disabled, because another solution is avaiable, but is possibly needed once. + if (this.iFuncCount) + { + if ( (newY+(this.iFuncCount*16)>this.iScreenHight) ) + { + newY -= ((this.iFuncCount*16)+1); // Pull-down-menu pulls up, if screen is to short. + } + } +*/ + newX = topCoords[0]; + if (this.bMoz) { + newY -= 1; + } + } + } + + this.sub.style.top = newY + "px"; + this.sub.style.left = newX + "px"; + + jQuery("#btnFilterFuncSub").draggable(); + jQuery("#btnFilterRoomSub").draggable(); + }, + + topMenuMouseClick: function(mEvent) + { + // this.sub.style.left = "0px"; + // this.sub.style.top = "0px"; + }, + + topMenuMouseOver: function(mEvent) + { + this.sub.show(); + this.positionSubMenu(); + if (this.mouseOpts) { + if (typeof(this.mouseOpts.onTopOver) == 'function') + this.mouseOpts.onTopOver(this.sub.id); + } + + }, + + topMenuMouseOut: function(mEvent) + { + var xPos = Event.pointerX(mEvent); + var yPos = Event.pointerY(mEvent); + if (!Position.within(this.sub, xPos, yPos)) + { + this.sub.hide(); + } + }, + + subMenuMouseOver: function(mEvent) + { + var xPos = Event.pointerX(mEvent); + var yPos = Event.pointerY(mEvent); + }, + + subMenuMouseOut: function(mEvent) + { + var xPos = Event.pointerX(mEvent); + var yPos = Event.pointerY(mEvent); + + if (this.bIE) { // IE-Probleme für linken Rand beheben + var subCoords = Position.cumulativeOffset(this.sub); + if (xPos < (subCoords[0] + 5)) // wenn Maus am linken Rand... + xPos = xPos - 3; + } + if ( (!Position.within(this.top, xPos, yPos)) && (!Position.within(this.sub, xPos, yPos)) ) { + this.sub.hide(); + } + }, + + dbgLog: function(s) + { + if ($("dbgLog")) + $("dbgLog").update(s); + } +};/** + * ise/isePropEditorRow.js + **/ + +/** + * @fileOverview ? + * @author ise + **/ + +// isePropEditorRow +// Repräsentiert eine Zeile in den Popup-Fenstern "Eigenschaft bearbeiten" + +/** + * @class + **/ +isePropEditorRow = Class.create(); + +isePropEditorRow.prototype = { + + // id: Id des Objekts dessen Inhalt in der Zeile dargestellt wird + // Bei neu angelegten Zeilen = -1 + // baseId: ID_ROOMS, ID_FUNCTIONS etc + // objInfo + // .name, .comment + initialize: function(id, baseId, objInfo) { + this.id = id; + this.baseId = parseInt(baseId); + this.objInfo = { + comment: "< "+translateKey("lblEmpty")+" >" + }; + Object.extend(this.objInfo, objInfo || {}); + + if (id == -1) { + switch(this.baseId) { + case ID_ROOMS: + this.objInfo.name = "< "+translateKey("lblNewRoom")+" >"; + break; + case ID_FUNCTIONS: + this.objInfo.name = "< "+translateKey("lblNewFunction")+" >"; + break; + default: + break; + } + } + bNecc = true; + this.oldVal = ""; + + // IDs der einzelnen Tabellenzellen + this.nameCellId = (id == -1 ? 'newName' : 'name' + id); + this.commentCellId = (id == -1 ? 'newComment' : 'comment' + id); + + var tr = Builder.node("tr", {className: "popupWhiteCells"}); + + // Namen erzeugen + var td1 = Builder.node("td", {id: this.nameCellId}, this.objInfo.name); + tr.appendChild(td1); + this.nameListener = this.editName.bindAsEventListener(this); + Event.observe(td1, 'click', this.nameListener); + + // Kommentar erzeugen + var td4 = Builder.node("td", {id: this.commentCellId}, this.objInfo.comment); + tr.appendChild(td4); + this.commentListener = this.editComment.bindAsEventListener(this); + Event.observe(td4, 'click', this.commentListener); + + $("propTable").appendChild(tr); + jQuery("#tableContainer").animate({scrollTop: jQuery("#propTable").height()},1000); + }, + + /*---------------------------------*/ + /*----- Name Functions -----*/ + /*---------------------------------*/ + editName: function() { + var inputId = 'nEdit' + this.id; + var nameElem = $(this.nameCellId); + this.oldVal = nameElem.innerHTML; + if (this.oldVal.toLowerCase().indexOf('input') == -1) { + var s = ""; + nameElem.innerHTML = s; + + // Namen im DOM ändern beim Verlassen des Textfeldes + var changeListener = this.saveNameToDom.bindAsEventListener(this); + Event.observe($(inputId), 'blur', changeListener); + + $(inputId).focus(); + } + }, + + saveNameToDom: function () { + var newName = $("nEdit" + this.id).value; + if (newName === "") { + if (this.oldVal !== "") { + $(this.nameCellId).innerHTML = this.oldVal; + } + else { + if (this.baseId == ID_ROOMS) { + $(this.nameCellId).innerHTML = "< neuer Raum >"; + } + if (this.baseId == ID_FUNCTIONS) { + $(this.nameCellId).innerHTML = "< neues Gewerk >"; + } + } + return; + } + if( !isTextAllowed( newName , 1 ) ) return; + $(this.nameCellId).innerHTML = newName; + if(newName != this.objInfo.name) { + var opts; + var t = this; + var url = "/esp/system.htm?sid="+SessionId; + var pb = ''; + pb += 'string action = "checkName";'; + pb += 'string checkName = "'+newName+'";'; + pb += 'integer checkTypeId = '+ this.baseId +';'; + + if (this.baseId == ID_ROOMS) { + if (this.id == -1) { + opts = { + postBody: ReGa.encode(pb), + asynchronous: false, + onComplete: function(resp) { + newName = resp.responseText.replace(/[\r\n\t]/g, ""); + iseRooms.CreateRoomRetId(newName, t.baseId); + } + }; + new Ajax.Request(url, opts); + } + else { + iseSystem.saveName(this.id, newName, this.nameCellId); + } + } + + + if (this.baseId == ID_FUNCTIONS) { + if (this.id == -1) { + opts = { + postBody: ReGa.encode(pb), + asynchronous: false, + onComplete: function(resp) { + newName = resp.responseText.replace(/[\r\n\t]/g, ""); + iseFunctions.CreateFunctionRetId(newName, t.baseId); + } + }; + new Ajax.Request(url, opts); + } + else { + iseSystem.saveName(this.id, newName, this.nameCellId); + } + } + } + }, + + /*---------------------------------*/ + /*----- Comment Functions -----*/ + /*---------------------------------*/ + editComment: function() { + var inputId = 'cEdit' + this.id; + var commentElem = $(this.commentCellId); + var oldVal = commentElem.innerHTML; + + if (oldVal.toLowerCase().indexOf('input') == -1) { + var s = ""; + commentElem.innerHTML = s; + + // Namen im DOM ändern beim Verlassen des Textfeldes + var changeListener = this.saveCommentToDom.bindAsEventListener(this); + Event.observe($(inputId), 'blur', changeListener); + + $(inputId).focus(); + } + }, + + saveCommentToDom: function() { + var newComment = $("cEdit" + this.id).value; + $(this.commentCellId).innerHTML = newComment; + + if (this.baseId == ID_ROOMS) { + iseRooms.ChangeRoomComment(this.id, newComment); + } + + if (this.baseId == ID_FUNCTIONS) { + iseFunctions.ChangeFunctionComment(this.id, newComment); + } + } +}; + + +/* +iseCellEditor = Class.create(); + +iseCellEditor.prototype = { + initialize: function(ctrlObj, id) { + this.cell = ctrlObj; + this.id = id; + this.oldVal = ""; + var clickListener = this.editName.bindAsEventListener(this); + Event.observe(this.cell, 'click', clickListener); + }, + + editName: function() { + var inputId = 'nEdit' + this.cell.id; + this.oldVal = this.cell.innerHTML; + + if (this.oldVal.toLowerCase().indexOf('input') == -1) { + var s = ""; + this.cell.innerHTML = s; + + // Namen im DOM ändern beim Verlassen des Textfeldes + var changeListener = this.saveNameToDom.bindAsEventListener(this); + Event.observe($(inputId), 'blur', changeListener); + + $(inputId).focus(); + } + }, + + saveNameToDom: function () { + var newName = $("nEdit" + this.cell.id).value; + $(this.cell).innerHTML = newName; + iseSystem.saveName(this.id, newName); + }, +}; +*//** + * ise/iseEventLog.js + **/ + +/** + * @fileOverview ? + * @author Michael Niehaus (ise) + **/ + +// Author: Michael Niehaus +// Created: 16.04.2007 +// 2007-08-03 ASC: added deleteAll method. +// 2007-08-04 ASC: tblId not defined error fixed. + +/** + * @class + **/ +iseEventLog = Class.create(); + +iseEventLog.prototype = { + initialize: function(parentElemId, bIsAlarms) { + this.parentElemId = parentElemId; + this.tblId = "tbl" + parentElemId; + this.bIsAlarms = bIsAlarms; + this.tBodyElem = null; + this.buildTable(); + }, + + // Add a message to the table structure + add: function(s1, s2, s3) { + var tr = Builder.node("tr"); + var td1 = Builder.node("td", {}, s1); + var td2 = Builder.node("td", {}, s2); + var td3= Builder.node("td", {}, s3); + tr.appendChild(td1); + if (!this.bIsAlarms) // Kanalname bei Alarmen ausblenden + tr.appendChild(td2); + tr.appendChild(td3); + if (this.bIsAlarms) { + var tdTmp = Builder.node("td", {}, ""); + tr.appendChild(tdTmp); + } + this.tBodyElem.appendChild(tr); + }, + + // Delete all rows in the table + deleteAll: function() + { + if( $(this.tblId) ) + { + while( $(this.tblId).rows.length ) + { + $(this.tblId).deleteRow(0); + } + } + }, + + // Build table node + buildTable: function() { + var table = Builder.node("table", {id: this.tblId, style: "width:100%;white-space: nowrap;color:Black;"}); + var colgroup = Builder.node("colgroup"); + var col1 = Builder.node("col", {width: "25%"}); + var col2 = Builder.node("col", {width: "50%"}); + var col3= Builder.node("col", {width: "25%"}); + colgroup.appendChild(col1); + colgroup.appendChild(col2); + colgroup.appendChild(col3); + table.appendChild(colgroup); + var tbody = Builder.node("tbody"); + table.appendChild(tbody); + + this.tBodyElem = tbody; + $(this.parentElemId).appendChild(table); + } +};/** + * ise/functions.js + **/ + +/** + * @fileOverview Allgemeine Funktionen + * @author ise, Änderungen durch Falk Werner (eQ-3) + **/ + +/* * * * * * * * * * * * * * * * * * * * * * * * * + * * * * * Global Constants * * * * * + * * * * * * * * * * * * * * * * * * * * * * * * */ + +iseDOM_BuildLabel = "R1.00.0381.0100"; +dbg = false; +rfr = true; + +ID_EDIT_SYSVAR_VALUE = 9921; + +ID_ROOMS = 101; // Rooms collection ID. +ID_FUNCTIONS = 151; // Functions collection ID. +ID_FAVORITES = 201; // Favorites collection ID. +ID_LINKS = 301; // Links collection ID. +ID_TRANSFER_PARAMETERS = 1001; +ID_CHANNEL_LIST = 1002; +ID_NEW_SYSVAR = 1003; +ID_CREATE_SCRIPT = 1005; +ID_EDIT_SCRIPT = 1006; +ID_CONTROL_TEST = 1007; +ID_INSERT_VALUE = 1008; +ID_INSERT_STRING = 1009; +ID_SET_VALUE_RANGE = 1010; +ID_DEL_SYS_VARIABLE = 1011; +ID_SYS_VARS_SELECTION = 1012; +ID_TIMEMODULE = 1013; +ID_STATUSINFO = 1014; +ID_STATUSINFO_WARNING = 1015; +ID_USER_ACCOUNT_CONFIG_ADMIN = 1016; +ID_USER_ACCOUNT_CONFIG_USER = 1017; +ID_AUTO_LOGIN_CONFIG = 1018; +ID_PROGRAM_CHOOSER = 1019; +ID_EDIT_SYSVAR = 1021; +ID_CHOOSE_LED = 1022; +ID_SET_OUCFM_MODE = 1023; +ID_SET_STATUS_DISPLAY = 1024; +ID_BIDCOS_INTERFACE = 1025; +ID_SYSTEM_LANGUAGE_CONFIG = 2001; + +nUA = navigator.userAgent; +NAV_IE = false; +NAV_MOZ = false; + +if (nUA.toLowerCase().indexOf("msie") > -1) { + NAV_IE = true; +} +if (nUA.toLowerCase().indexOf("gecko") > -1) { + NAV_MOZ = true; +} +SCREEN_HEIGHT = 0; // wird in index.htm gesetzt +SCREEN_WIDTH = 0; // wird in index.htm gesetzt + +// Sortier-IDs +SORT_NAME = 1; +SORT_TYPE = 2; +SORT_DESC = 3; +SORT_SN = 4; +SORT_IFACE = 5; +SORT_IMODE = 6; +SORT_FUNC = 7; +SORT_ROOM = 8; + +// Sysvar Types +SYSVAR_ALARM = 6; +SYSVAR_BOOL = 2; +SYSVAR_ENUM = 29; +SYSVAR_GENERIC = 0; +SYSVAR_STRING = 11; + +// Filter-IDs +FIL_NAME = 1; +FIL_TYPE = 2; +FIL_DESC = 3; +FIL_SN = 4; +FIL_IFACE = 5; +FIL_IFACE_S = 6; +FIL_IFACE_R = 7; +FIL_MODE = 8; +FIL_MODE_AES = 9; +FIL_MODE_STD = 10; +FIL_FUNCS = 11; +FIL_ROOMS = 12; +FIL_UNIT = 13; +FIL_CHN = 14; +FIL_TIME = 15; +FIL_DATE = 16; +FIL_USERS = 17; + +TM_ONCE = 8; // ttCalOnce +TM_PERIODIC = 4; // ttCalPeriodic +TM_DAILY = 9; // ttCalDaily +TM_WEEKLY = 5; // ttCalWeekly +TM_MONTHLY = 6; // ttCalMonthly +TM_YEARLY = 7; // ttCalYearly +TM_MON = 1; +TM_TUE = 2; +TM_WED = 4; +TM_THU = 8; +TM_FRI = 16; +TM_SAT = 32; +TM_SUN = 64; +TM_WEEKEND = 96; +TM_WORKDAYS = (TM_FRI * 2) - 1; + +CALL_STRCUT = 1; +CALL_SPACECUT = 2; + +GROUPASSIGNMENT = null; + +dlgResult = ""; +sPreviousPage = ""; +sPreviousPage2 = ""; +sPreviousPageArgs = ""; +sPreviousPageArgs2 = ""; +sActPage = ""; +sActPageArgs = ""; +sPrevVal = ""; +ul = 0; +var wndHelp; +bTxtEditMode = 0; +tmpNoOfChannels = []; +timeoutCounter = []; +deviceInputCheckedDevices = []; +doClearTempView = true; +bUpdateContentRunning = false; +bCheckForAllChannels = false; + +/*#########################*/ +/*# Erweiterte Funktionen #*/ +/*#########################*/ + +setTime = function(time) +{ + if ($("maintime")) { $("maintime").innerHTML = time; } +}; + +setDate = function(date) +{ + if ($("maindate")) { $("maindate").innerHTML = date; } +}; + +resetReGaSaveButton = function () { + document.getElementById("btnReGaSave").style.color=WebUI.getColor("textColorB"); + document.getElementById("btnReGaSave").onclick=function() { LogoClick(); }; +}; + +setAlarmMessageCount = function (count) { + if ($("msgAlarms")) { + const newMsg = translateKey('alarmMsg') + " (" + count + ")"; + if ($("msgAlarms").innerHTML !== newMsg) { + $("msgAlarms").innerHTML = newMsg; + } + } + if ($("imgAlarms")) { + const newImg = (count === 0 ? '/ise/img/dot/green.png' : '/ise/img/dot/red.png'); + if ($("imgAlarms").getAttribute('src') !== newImg) { + $("imgAlarms").src = newImg; + } + } +}; + +setServiceMessageCount = function (count) { + if ($("msgServices")) { + const newMsg = translateKey('serviceMsg') + " (" + count + ")"; + if ($("msgServices").innerHTML !== newMsg) { + $("msgServices").innerHTML = newMsg; + } + } + if ($("imgServices")) { + const newImg = (count === 0 ? '/ise/img/dot/green.png' : '/ise/img/dot/yellow.png'); + if ($("imgServices").getAttribute('src') !== newImg) { + $("imgServices").src = newImg; + } + } +}; + +ReceiptAlarm = function(id,reload) +{ + var url = '/esp/functions.htm?sid='+SessionId; + var pb = ""; + pb += 'string action = "ReceiptAlarm";'; + pb += 'string id = "'+id+'";'; + var opt = { + postBody: pb, + onComplete: function(transport) + { + if( $("al"+id) ) + { + hide( "al"+id ); + } + else + { + if( typeof(reload) == "undefined" ) + { + reloadPage(); + } + } + } + }; + new Ajax.Request(url,opt); +}; + +/*setOldEnergyCounterVal = function(chn, value) { + arrOldEnergyCounterVal[chn] = value; +}; + +getOldEnergyCounterVal = function(chn) { + + if (typeof arrOldEnergyCounterVal === "undefined") { + arrOldEnergyCounterVal = []; + arrOldEnergyCounterVal[chn] = 0; + } + + return arrOldEnergyCounterVal[chn]; +};*/ + +setValueOfEnergyCounters = function() { + jQuery.each(arrEnergyCounter, function(index, counter){ + var id = counter.name.split("_")[1], + chnVal = homematic("Channel.getValue", {"id": id}); + + // Setze EnergyCounter-Variable + homematic("SysVar.setFloat", {"name" : counter.name, "value" : chnVal}); + }); +}; + +/** + * Ermittelt die Systemvariablen f. d. Energiemessung + */ +updateSysVarEnergyCounter = function() { + // conInfo("update SysVar EnergyCounter"); + + if (typeof readEnergyCounter === "undefined" || readEnergyCounter == true) { + var allSysVars = homematic("SysVar.getAll", {}); + + arrEnergyCounter = []; + + jQuery.each(allSysVars, function(index, sysvar){ + if (sysvar.name.match(/EnergyCounter/) != null) { + arrEnergyCounter.push(sysvar); + } + }); + readEnergyCounter = false; // wird beim Anlernen eines neuen Gerätes wieder auf true gesetzt + } + setValueOfEnergyCounters(); + }; + +/** + * Markiert ein Gerät im Posteingang als fertig bzw. nicht fertig + **/ +setDeviceReadyConfig = function(id, isReady) +{ + var readyButton = $("readyBtn" + id); + + if (readyButton) + { + readyButton._isReady = isReady; + } +}; + +/** + * Markiert einen Kanal im Posteingang als ferig bzw. nicht fertig + **/ +setChannelReadyConfig = function(id, isReady) +{ + var readyBox = $("inp" + id); + + if (readyBox) + { + readyBox.checked = isReady; + readyBox._isReady = isReady; + } +}; + +/* * * * * * * * * * * * * * * * * * * * * * * * * + * * * * * Navigation Functions * * * * * + * * * * * * * * * * * * * * * * * * * * * * * * */ + +LoadingHTML = function() +{ + return ''; +}; + + + +updateContent = function(file, argsForUrl, codeToExec, bDontSaveUrl) +{ + if( !bUpdateContentRunning ) + { + bUpdateContentRunning=true; + iseRefr(false); + /* */ + if (dbg) { alert(file); } + $("content").innerHTML = LoadingHTML(); + //sPreviousPage = sActPage; + //sActPage = file; + var pb = ''; + if( doClearTempView ) + { + pb += 'system.SetSessionVar("sessionCTV", "true");'; + } + else + { + pb += 'system.SetSessionVar("sessionCTV", "false");'; + } + if(codeToExec) + { + pb += codeToExec; + } + + iseInitUpdateArrays(); + + /* */ + + //console.info( "updateContent with "+pb ); + + new Ajax.Updater("content", url, opts); + } +}; + +clearUserTempViewIDs2Room = function() +{ + clearUserTempViewIDs2('/pages/tabs/admin/views/rooms.htm'); +}; + +clearUserTempViewIDs2Function = function() +{ + clearUserTempViewIDs2('/pages/tabs/admin/views/functions.htm'); +}; + +clearUserTempViewIDs2 = function(file, args) +{ + // $("content").innerHTML = LoadingHTML(); + sPreviousPage = sActPage; + sActPage = file; + var pb = ''; + pb += 'system.SetSessionVar("sessionCTV2", "true");'; + var opts = + { + postBody: ReGa.encode(pb), + evalScripts: true + }; + var url = file + "?sid=" + SessionId; + if (args){ url += args; } + // new Ajax.Updater("content", url, opts); +}; + +reloadSortedPage = function() { + doClearTempView = false; + updateContent(sActPage, sActPageArgs, "", true); +}; + +reloadPage = function() { + doClearTempView = true; + updateContent(sActPage, sActPageArgs); +}; + +loadStartPage = function(fid) +{ + var startPage = "/pages/tabs/startpage.htm"; + + //wenn Konfigtool, dann eine andere Startseite anzeigen + if (PLATFORM != "Central") {startPage = "/configapp/devices.cgi";} + + doClearTempView = true; + if( typeof(fid) == "undefined" ) + { + updateContent(startPage); + } + else + { + updateContent(startPage,"&fid="+fid); + } +}; + +loadStartPageGuest = function() { + doClearTempView = true; + if( typeof fid == "undefined" ) + { + updateContent("/pages/tabs/guest/startpageguest.htm"); + } + else + { + updateContent("/pages/tabs/guest/startpageguest.htm","&fid="+fid); + } + +}; + +_loadHandling = function(fid) { + doClearTempView = true; + if (typeof fid == "undefined") + updateContent("/pages/tabs/handling.htm"); + else + updateContent("/pages/tabs/handling.htm", "&fid="+fid); +}; + +loadDeviceConfig = function() { + doClearTempView = true; + updateContent("/pages/tabs/admin/deviceconfig.htm"); +}; + +loadHelp = function() +{ + wndHelp = null; + doClearTempView = true; + updateContent("/config/help.cgi", "&from=internal"); +}; + +loadStatus = function() { + doClearTempView = true; + updateContent("/pages/tabs/control.htm"); +}; + +loadAlarmMessages = function() { + doClearTempView = true; + updateContent("/pages/tabs/statusviews/alarmMessages.htm"); +}; + +loadServiceMessages = function() { + var file = "serviceMessages.htm"; + if (PLATFORM != "Central") {file = "serviceMessages.cgi";} + doClearTempView = true; + updateContent("/pages/tabs/statusviews/" + file); +}; + +loadFavorites = function() { + doClearTempView = true; + updateContent("/pages/tabs/favorites.htm"); +}; + +loadFavViewer = function(id) { + doClearTempView = true; + updateContent("/pages/tabs/favViewer.htm","&id="+id); +}; + +loadFavOverview = function() { + doClearTempView = true; + updateContent("/pages/tabs/user/favOverview.htm"); +}; + +loadNewFav = function() { + doClearTempView = true; + updateContent("/pages/tabs/user/newFav.htm"); +}; + +loadLinkProg = function() { + doClearTempView = true; + updateContent("/pages/tabs/admin/linkprog.htm"); +}; + +loadSystemConfig = function() { + doClearTempView = true; + updateContent("/pages/tabs/admin/systemconfig.htm"); +}; + +loadSystemConfigUser = function() { + doClearTempView = true; + updateContent("/pages/tabs/user/systemConfigUser.htm"); +}; + +loadSystemVars = function() { + doClearTempView = true; + updateContent("/pages/tabs/admin/systemvars.htm"); +}; + +loadPrograms = function() +{ + doClearTempView = true; + updateContent("/pages/tabs/admin/views/programs.htm"); +}; + +loadProgramList = function(filter) +{ + doClearTempView = true; + if( typeof filter == "string" ) + { + conInfo("loadProgramList: Filter = ["+filter+"]"); + updateContent("/pages/tabs/admin/views/programlist.htm", "", 'system.SetSessionVar("sessionPrgIsFiltered", true);system.SetSessionVar("sessionPrgFilter","'+filter+'");' ); + } + else + { + updateContent("/pages/tabs/admin/views/programlist.htm"); + } +}; + +loadHandlingRooms = function(roomId) +{ + doClearTempView = true; + if (typeof(roomId) == "undefined") { updateContent('/pages/tabs/control/rooms.htm'); } + else { updateContent('/pages/tabs/control/rooms.htm', roomId); } +}; + +loadHandlingFunctions = function(funcId) +{ + doClearTempView = true; + if (typeof(funcId) == "undefined") { updateContent('/pages/tabs/control/functions.htm'); } + else { updateContent('/pages/tabs/control/functions.htm', funcId); } +}; + +loadHandlingDevices = function() +{ + doClearTempView = true; + updateContent('/pages/tabs/control/devices.htm'); +}; + +loadHandlingPrograms = function() +{ + doClearTempView = true; + updateContent('/pages/tabs/control/programs.htm'); +}; + +ccuAdminFirstStartup = function() { + doClearTempView = true; + updateContent('/pages/tabs/admin/adminFirstStart.htm'); +}; + +ccuUserFirstStartup = function() { + doClearTempView = true; + updateContent('/pages/tabs/user/userFirstStart.htm'); +}; + +loadSysconfigUserAdmin = function() +{ + doClearTempView = true; + updateContent('/pages/tabs/admin/userAdministration.htm'); +}; + +loadSysconfigSysVars = function() +{ + doClearTempView = true; + updateContent('/pages/tabs/admin/systemvars.htm'); +}; + +loadStatusviewSysProtocol = function() +{ + doClearTempView = true; + updateContent('/pages/tabs/control/systemProtocol.htm'); +}; + + +loadStatusviewSysVars = function() +{ + doClearTempView = true; + updateContent('/pages/tabs/control/sysvars.htm'); +}; + + +loadNewDevices = function(options) { + doClearTempView = true; + bCheckForAllChannels = true; + //bCheckForAllChannels = false; + /* + if (options) { + bCheckForAllChannels = (options.fromTeachIn == true) ? true : false; + } + */ + + updateContent("/pages/tabs/admin/views/newdevices.htm"); +}; + +loadDevicesToChange = function(SNNewDev, TypeNewDev, IDNewDev) +{ + doClearTempView = true; + updateContent("/config/ic_seldevice.cgi", "&SNNewDev="+SNNewDev+"&TypeNewDev="+TypeNewDev+"&IDNewDev="+IDNewDev); +}; + +loadRoomList = function() { + doClearTempView = true; + updateContent("/pages/tabs/admin/views/rooms.htm"); +}; + +loadFunctionList = function() { + doClearTempView = true; + updateContent("/pages/tabs/admin/views/functions.htm"); +}; + +loadSystemControl = function() { + doClearTempView = true; + updateContent("/config/control_panel.cgi"); +}; + +loadNewLinkPage = function() +{ + updateContent("/config/ic_selchannel.cgi"); +}; + +setPath = function (path) { + var title=document.title; + if (title != 'RaspberryMatic WebUI') { + title = '[' + title + '] '; + } else { + title = ''; + } + + if ($("PagePath")) { + var s = ''; + if (path.length > 0) { + s = "" + title + translateKey('startPage') + " > " + path; + } else { + s = "" + title + translateKey('startPage') + ""; + } + + $("PagePath").innerHTML = s; + translatePage("#PagePath"); + } +}; + + + +logout = function() { + // disable logout button + jQuery("#btnLogOut > div").css('color', 'graytext'); + jQuery("#btnLogOut > div").attr("onclick", "").unbind("click"); + + // create ProgressBar + ProgressBar = new ProgressBarMsgBox(translateKey('logoutInProgress'), 1); + ProgressBar.show(); + ProgressBar.StartKnightRiderLight(); + + // stop all update monitors + regaMonitor.stop(); + InterfaceMonitor.stop(); + + // logout and make sure we save the regadom + homematic('Session.logout', {}, function() { + homematic('system.saveObjectModel', {}, function() { + ProgressBar.hide(); + ProgressBar.StopKnightRiderLight(); + location.href = "/logout.htm?lang="+getLang(); + }); + }); +}; + + +/* * * * * * * * * * * * * * * * * * * * * * * * * + * * * * * Misc Functions * * * * * * * + * * * * * * * * * * * * * * * * * * * * * * * * */ + +/* Funktion für Popup */ +CreatePopup = function(id, type) +{ + dlgPopup = new iseMessageBox(id, type, false); + PopupClose = function() + { + dlgPopup.hide(); + }; + dlgPopup.ShowPopup(); +}; + +buildPropTable= function(id) { + var opts = { + evalScripts: true, + onComplete: function(trans) { + centerMessageBox(); + } + }; + var url = "/esp/system.htm?sid=" + SessionId + "&action=buildPropTable&id="+id; + new Ajax.Updater("propTable", url, opts); +}; + +TestMe = function(id) { + iseChannel.Test(id); +}; + +initCenterBox = function() { + var centerBoxSel = jQuery("#centerbox"); + centerBoxSel.css({"overflow":"", "top":"50%"}); +}; + +centerMessageBox = function() { + var dimCenterBox = $("centerbox").getDimensions(); + + initCenterBox(); + + if ($("messagebox")) { + var msgbox = $("messagebox"), + dimMsgBox = msgbox.getDimensions(); + msgbox.style.marginLeft = -(dimMsgBox.width / 2) + 'px'; + msgbox.style.left = '50%'; + msgbox.style.marginTop = -(dimMsgBox.height / 2) + 'px'; + + /*if(dimCenterBox.height == 0) { + msgbox.style.marginTop = -(dimMsgBox.height / 2) + 'px'; + } else { + msgbox.style.marginTop = (dimMsgBox.height / 2) + 'px'; + }*/ + } +}; + +saveDlgResult = function(id) { + dlgResult = id; +}; + +checkTimeVal = function(val) { + var sSplit = new Array(2); + + if (val.length != 5) { return false; } + sSplit = val.split(':'); + if (sSplit.length != 2) { return false; } + if (isNaN(sSplit[0])) { return false; } + if (isNaN(sSplit[1])) { return false; } + + var iTmp = parseInt(sSplit[0],10); + if ((iTmp < 0) || (iTmp > 23)) { return false; } + iTmp = parseInt(sSplit[1],10); + if ( (iTmp < 0) || (iTmp > 59) ) { return false; } + + return true; +}; + +setFooter = function(s) +{ + $("footer").innerHTML = s; + translatePage("#footer"); +}; + +SetFilter = function(id) +{ + return; +/* + if ($(id)) { + var inplist = $(id).getElementsByTagName('input'); + for (var i = 0; i < inplist.length; i++) { + var tmpId = inplist[i].id.substr(6); + if (inplist[i].checked === true) + filterOptions.addFilter(tmpId); + else + filterOptions.removeFilter(tmpId); + // TODO: Channel-Liste neu laden (mit Filtern) + } + } +*/ +}; + + // Prüft anhand der filterOptions ob Checkboxen in Submenüs gesetzt werden sollen +selectFilters = function(divToShow) { + if ($(divToShow)) { + var inplist = $(divToShow).getElementsByTagName('input'); + for (var i = 0; i < inplist.length; i++) { + var tmpId = inplist[i].id.substr(6); + if (filterOptions.isFilterId(tmpId)) + inplist[i].checked = true; + else + inplist[i].checked = false; + } + } +}; + +writeDevProg = function(tdParent, chnObj, bClosePopup) { + var tblSub = Builder.node('table', {width: '100%'}); + var tbodySub = Builder.node('tbody'); + var trSub = Builder.node('tr'); + var tdSub = Builder.node('td'); + var divSub = Builder.node('div', {className: 'StdButton'}, translateKey('btnDirectLinks')); + + divSub = $(divSub); + var iTmp = 0; + if( chnObj['gm'] ) + iTmp = 1; + divSub.onclick = function() + { + WebUI.enter(LinkListPage, { + "iface" : chnObj['deviface'], + "channel": chnObj['sn'], + "keypair": iTmp + }); + if (bClosePopup) { PopupClose(); } + }; + tdSub.appendChild(divSub); + trSub.appendChild(tdSub); + tbodySub.appendChild(trSub); + trSub = Builder.node('tr'); + tdSub = Builder.node('td'); + divSub = Builder.node('div', {className: 'StdButton'}, translateKey('btnPrograms')); + + divSub.onclick = function() { loadProgramList(chnObj['enumprgfilter']); if(bClosePopup)PopupClose(); }; + tdSub.appendChild(divSub); + trSub.appendChild(tdSub); + tbodySub.appendChild(trSub); + tblSub.appendChild(tbodySub); + tdParent.appendChild(tblSub); +}; + +writeTestField = function(td, ids, tm, exist, running) +{ + var cn = "TestButtonDisabled"; + var sDate = '--:--:--'; + var sStyle = "OkButton"; + if( running ) + { + sStyle = "OkButtonRunning"; + } + else + { + sDate = tm; + if( exist ) { cn = "TestButton colorGradient borderRadius2px"; } + } + + var chid = ids.toString().split("\t").join("T"); + var div = Builder.node('div', {id:'TestButtonCH'+chid,className: cn}, translateKey('btnTest') /*'Test'*/); + td.appendChild(div); + + if( exist && !running ) + { + div.onclick = function() + { + iseChannels.Test(ids); + $('TestButtonCH'+chid).className = 'TestButtonDisabled'; + $('OkButtonCH'+chid).className = 'OkButtonRunning'; + $('TestDateCH'+chid).innerHTML = '--:--:--'; + }; + } + div = Builder.node('div', {id:'OkButtonCH'+chid,className: sStyle}, translateKey('btnOk') /*'OK'*/); + td.appendChild(div); + div = Builder.node('div', {id:'TestDateCH'+chid,className: 'TestDate'}, sDate); + td.appendChild(div); +}; + +startUpdateTest = function(chid) +{ + setTimeout( "callbackStartUpdateTest("+chid+")", 5000 ); +}; + +callbackStartUpdateTest = function(chid) +{ + var url = "/esp/system.htm?sid=" + SessionId; + var pb = "string action = 'TestRunning';"; + pb += 'string id = "' + chid + '";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete: function(t) + { + $("TestDateCH"+chid).innerHTML = t.responseText; + if( t.responseText == "--:--:--" ) + { + $("OkButtonCH"+chid).className = "OkButton"; + } + else + { + $("OkButtonCH"+chid).className = "OkButtonRunning"; + } + } + }; + new Ajax.Request(url, opts); +}; + +showInvisibleElems = function(devID) { + var jBtnAddToGroupElm = jQuery("#btnAddToGroup" + devID), + jBtnCreateNewGroupElm = jQuery("#btnCreateNewGroup" + devID), + jActionElms = jQuery("[name='newDevAction" + devID + "']"), + jBtnAutoRename = jQuery("#btnRename_" + devID); + jActionElms.show(); + jBtnAddToGroupElm.show(); + jBtnCreateNewGroupElm.show(); + jBtnAutoRename.show(); +}; + +showDeviceError = function(devID) { + jQuery("#readyBtn" + devID).text(translateKey("stringTableError")); +}; + +allChannelsAvailable = function(devID) { + var numberOfLoops = 60; + conInfo("timeoutCounter " + devID + ": " + timeoutCounter[devID] ); + if (timeoutCounter[devID] < numberOfLoops) { + timeoutCounter[devID]++; + + homematic("Device.get", {"id": devID}, function (device) { + devID = devID.toString(); + var numberOfChannels = device.channels.length; + conInfo("numberOfChannels: " + numberOfChannels); + + // Noch kein Kanal vorhanden + if (numberOfChannels == 0) { + window.setTimeout(function () { + conInfo("No channels available yet. Check again"); + allChannelsAvailable(devID); + }, 1000); + } else { + if (numberOfChannels != tmpNoOfChannels[devID]) { + window.setTimeout(function () { + conInfo("tmpNoOfChannels: " + tmpNoOfChannels[devID] + "- numberOfChannels: " + numberOfChannels + " Check again number of channels"); + tmpNoOfChannels[devID] = numberOfChannels; + allChannelsAvailable(devID); + }, 1000); + } else { + conInfo("All channels available - number of channels: " + numberOfChannels); + var jReadyBtnElm = jQuery("#readyBtn" + devID), + jWaitAnimationElm = jQuery("#waitForReadyBtn"+devID); + jWaitAnimationElm.hide(); + jReadyBtnElm.addClass("StdButton CLASS04308 border1px"); + jReadyBtnElm.text(translateKey('btnReady')); + jReadyBtnElm.bind("click", function () { + arrayDeleteVal(deviceInputCheckedDevices, devID.toString()); + SetReadyConfigAndHideImgs(devID); + }); + showInvisibleElems(devID); + deviceInputCheckedDevices.push(devID); + } + } + }); + } else { + // Emergency - timeout reached :-( + jQuery("#newDevActionDEL"+devID).show(); + showDeviceError(devID); + if (sessionStorage) { + sessionStorage.setItem("teachInFailure_" + devID, "true"); + } + return; + } +}; + +deviceAlreadyChecked = function(devID) { + var result = false; + jQuery.each(deviceInputCheckedDevices, function(index,deviceID){ + if (deviceID == devID) { + result = true; + } + }); + return result; +}; + +writeReadyField = function(tdParent, obj) { + var devAlreadyChecked = deviceAlreadyChecked(obj.id), + devFailure = false; + + if (bCheckForAllChannels && ! devAlreadyChecked) { + timeoutCounter[obj.id] = 0; + tmpNoOfChannels[obj.id.toString()] = -1; + allChannelsAvailable(obj.id); + } else { + if (sessionStorage) { + if (sessionStorage.getItem("teachInFailure_" + obj.id) == "true") { + devFailure = true; + } + } + } + + var sn = obj['sn']; + var objId = obj['id']; + var tbl = Builder.node('table', {width: '100%', cellpadding: '0', id:obj['sn'] }); + var tr = Builder.node('tr'); + var td = Builder.node('td'); + var div; + + if ((bCheckForAllChannels && (! devAlreadyChecked)) || (devFailure)) { + div = Builder.node('div', { + id: 'readyBtn' + objId + }, '' /*show waiting animation*/ ); + + img = Builder.node('img', { + id: 'waitForReadyBtn' + objId, + src: '/ise/img/ajaxload_white.gif' + }, ''); + + div.appendChild(img); + + } else { + div = Builder.node('div', { + className: 'StdButton CLASS04308 border1px', + id: 'readyBtn' + objId, + onclick: "SetReadyConfigAndHideImgs(" + objId + ")" + }, translateKey('btnReady') /*"Fertig"*/); + window.setTimeout(function() {jQuery("#btnRename_" + objId).show();}, 100); // Show the auto rename btn + } + + if( ! obj['readyconfig'] ) + { + div._isReady = false; + } + else + { + div._isReady = true; + } + td.appendChild(div); + tr.appendChild(td); + tbl.appendChild(tr); + tdParent.appendChild(tbl); +}; + +removeErrorFlag = function(devID) { + if (sessionStorage && sessionStorage.getItem("teachInFailure_" + devID) != null) { + sessionStorage.removeItem("teachInFailure_" + devID); + } +}; + +writeDeviceAction = function(tdParent, includeChecks, bIsDev, bDelBtn, obj, bIsGroup) { + var HmIPIfaceSelector = "HmIP-RF", + devFailure = false; + + if (sessionStorage) { + if (sessionStorage.getItem("teachInFailure_" + obj.id) == "true") { + devFailure = true; + } + } + + var id = 0; + var hidden = ((! bCheckForAllChannels || deviceAlreadyChecked(obj.id)) && (devFailure == false)) ? "" : "hidden"; + + if (obj) { id = obj['id']; } + var tbl = Builder.node('table', { + width: '100%', + cellpadding: '0' + }, [ + Builder.node('colgroup', [ + Builder.node('col', {width: '40%'}), + Builder.node('col', {width: '60%'}) + ]) + ]); + var tbody = Builder.node('tbody'); + var tr = Builder.node('tr'); + var tdLeft = Builder.node('td'); + var tdRight = Builder.node('td'); + + // buttons Löschen / Einstellen + var tblSub = Builder.node('table', {width: '100%'}); + var tbodySub = Builder.node('tbody'); + var trSub; + + if (!devFailure) { + trSub = Builder.node('tr', {id: "newDevActionDEL" + id, name: 'newDevAction' + id, className: hidden}); + } else { + window.setTimeout(function() {showDeviceError(id);},500); + trSub = Builder.node('tr', {id: "newDevActionDEL" + id, name: 'newDevAction' + id}); + } + var tdSub = Builder.node('td'); + var s; + + if (bIsDev && bDelBtn) { + s = "PrepareDeleteDeviceForm('"+ obj['iface']+"', '"+obj['sn']+"', '"+obj['name']+"', '"+obj['type']+"'), arrayDeleteVal(deviceInputCheckedDevices, "+obj['id']+"), removeErrorFlag("+obj['id']+");"; + + var divSub = Builder.node('div', { + className: 'StdButton', + onclick: s}, translateKey('btnRemove')); + tdSub.appendChild(divSub); + trSub.appendChild(tdSub); + tbodySub.appendChild(trSub); + } + trSub = Builder.node('tr', {name: 'newDevAction' + id, className: hidden}); + tdSub = Builder.node('td'); + + s = ""; + if ( + (obj['type'] != "HmIPW-DRBL4") + && (obj['type'] != "HmIP-DRBLI4") + && (obj['type'] != "HmIP-RGBW") + && (obj['type'] != "HmIPW-WGD") + && (obj['type'] != "HmIPW-WGD-PL") + && (obj['type'] != "HmIP-ESI") + && (obj['type'] != "HmIP-DRG-DALI") + ) { + + if (bIsDev) { + s = "WebUI.enter(DeviceConfigPage, {'iface': '" + obj['iface'] + "', 'address': '" + obj['sn'] + "', 'redirect_url':'GO_BACK'});"; + } else { + if (bIsGroup) { + s = "WebUI.enter(DeviceConfigPage, {'iface': '" + obj['deviface'] + "' ,'address': '" + obj['sn'] + "', 'redirect_url':'GO_BACK', 'with_group': 1});"; + } else { + s = "WebUI.enter(DeviceConfigPage, {'iface': '" + obj['deviface'] + "' ,'address': '" + obj['sn'] + "', 'redirect_url':'GO_BACK'});"; + } + } + } else { + s = "alert(translateKey('hintSetReady'));"; + } + divSub = Builder.node('div', {className: 'StdButton', onclick: s + "devToConfigure=" + obj['id']}, translateKey('btnConfigure') /*'Einstellen'*/); + + tdSub.appendChild(divSub); + trSub.appendChild(tdSub); + tbodySub.appendChild(trSub); + + /* Geraetetausch */ + if (bIsDev && bDelBtn && (obj['iface'] != HmIPIfaceSelector)) { + //divSub = Builder.node('div', {className: 'StdButton', onclick: 'loadDevicesToChange(\''+obj['sn']+'\',\''+obj['type']+'\')'}, translateKey('replaceDeviceBtn')); + divSub = Builder.node('div', {className: 'StdButton', onclick: 'loadDevicesToChange(\''+obj['sn']+'\',\''+obj['type']+'\',\''+obj['id']+'\')'}, translateKey('replaceDeviceBtn')); + tdSub.appendChild(divSub); + trSub.appendChild(tdSub); + tbodySub.appendChild(trSub); + } + /* END Geraetetausch */ + + tblSub.appendChild(tbodySub); + tdLeft.appendChild(tblSub); + + // checkboxes + if (includeChecks) + { + tblSub = Builder.node('table', {name: 'newDevAction' + id, width: '100%', className: hidden}); + tbodySub = Builder.node('tbody'); + trSub = Builder.node('tr'); + var h = {type: 'checkbox', id: 'ha' + id}; + var sH = ""; + + + if( bIsDev ) + { + sH = 'iseDevices.setHandling('+id+',id)'; + } + else + { + sH = 'iseChannels.setHandling('+id+',id)'; + } + switch( obj['handle'] ) + { + case "YES": + h = Object.extend(h, {checked: ''}); + break; + case "READONLY": + sH = ""; + h = Object.extend(h, {disabled: ''}); + h = Object.extend(h, {readonly: ''}); + break; + default: break; + } + h = Object.extend(h, {onclick: sH}); + tdSub = Builder.node('td', [Builder.node('input', h), translateKey('lblUsable') /*'bedienbar'*/]); + Element.setStyle(tdSub, {textAlign:"left"}); + trSub.appendChild(tdSub); + tbodySub.appendChild(trSub); + trSub = Builder.node('tr'); + var v = {type: 'checkbox', id: 'vi' + id}; + if( obj['vis'] ) + { + v = Object.extend(v, {checked: ''}); + conInfo("Object "+obj['id']+":"+obj['name']+" is visble"); + } + else + { + conInfo("Object "+obj['id']+":"+obj['name']+" is NOT visble"); + } + if( bIsDev ) + { + v = Object.extend(v, {onclick: 'iseDevices.setVisible('+id+',id)'}); + } + else + { + v = Object.extend(v, {onclick: 'iseChannels.setVisible('+id+',id)'}); + } + tdSub = Builder.node('td', [Builder.node('input', v), translateKey('lblVisible') /*'sichtbar'*/]); + Element.setStyle(tdSub, {textAlign:"left"}); + + trSub.appendChild(tdSub); + tbodySub.appendChild(trSub); + trSub = Builder.node('tr'); + var p = {type: 'checkbox', id: 'pr' + id}; + if (obj['proto']) + p = Object.extend(p, {checked: ''}); + if (bIsDev) + p = Object.extend(p, {onclick: 'iseDevices.setProto('+id+',id)'}); + else + p = Object.extend(p , {onclick: 'iseChannels.setProto('+id+',id)'}); + tdSub = Builder.node('td', [Builder.node('nobr', [Builder.node('input', p), translateKey('lblRecorded') /*'protokolliert'*/])]); + Element.setStyle(tdSub, {textAlign:"left"}); + trSub.appendChild(tdSub); + tbodySub.appendChild(trSub); + tblSub.appendChild(tbodySub); + tdRight.appendChild(tblSub); + } + + tr.appendChild(tdLeft); + tr.appendChild(tdRight); + tbody.appendChild(tr); + tbl.appendChild(tbody); + tdParent.appendChild(tbl); +}; + +spaceCut = function(s) { + if (s) + { + var arTmp = s.split(' '); + var z = new Array(); + + for(var i = 0; i < arTmp.length; i++) + { + if (arTmp[i] !== "") + { + z[z.length] = document.createTextNode(arTmp[i]); + z[z.length] = document.createElement('br'); + } + } + z.pop(); + return z; + } + return ""; +}; + +spaceCutHtmlIf = function(s, iCount) { + if (s) + { + var sRet = ""; + var arTmp = s.split(' '); + var iTmp = 0; + + if (arTmp.length > iCount) + { + for (var i = 0; i < arTmp.length; i++) + { + sRet += arTmp[i] + " "; + iTmp++; + if (iTmp == iCount) + { + sRet += "
"; + iTmp = 0; + } + } + return sRet; + } + else { return s; } + } + else { return ""; } +}; + +semCut = function(s) { + if (s) + { + var arTmp = s.split(';'); + var z = new Array(); + for (var i = 0; i < arTmp.length; i++) + { + if (arTmp[i] !== "") + { + z[z.length] = document.createTextNode(arTmp[i]); + z[z.length] = document.createElement('br'); + } + } + z.pop(); + return z; + } + return ""; +}; + +strCut = function(s, bCountOnly, bPlainText) { + var CUTS = ".:-"; + var MAX_WITHOUT_CUT = 8; + var bCutChar = false; + var iSinceLastCut = 0; + var ret = ""; + var arSplit = new Array(); + var iLastCutPos = 0; + var i; + + if(s) + { + for (i = 0; i < s.length; i++) { + var c = s.charAt(i); + + if (!bCountOnly) { + for (var x = 0; x < CUTS.length; x++) { + bCutChar = false; + if (c == CUTS.charAt(x)) { + arSplit[arSplit.length] = s.slice(iLastCutPos, i+1); + iLastCutPos = i+1; + iSinceLastCut = 0; + break; + } + } + } + + iSinceLastCut++; + if (iSinceLastCut == MAX_WITHOUT_CUT) { + arSplit[arSplit.length] = s.slice(iLastCutPos, i); + iLastCutPos = i; + iSinceLastCut = 0; + } + } + if (iLastCutPos !== 0) { arSplit[arSplit.length] = s.slice(iLastCutPos, i); } + else { arSplit[arSplit.length] = s; } + + if (bPlainText) { + var _s = ""; + for (i = 0; i < arSplit.length; i++) { + _s += arSplit[i] + "
"; + } + return _s; + } + else { + var z = new Array(); + for (i = 0; i < arSplit.length; i++) { + z[z.length] = document.createTextNode(arSplit[i]); + z[z.length] = document.createElement('br'); + } + return z; + } + } +}; + +tabToBr = function(s) { + if (s) { + var arTmp = s.split('\t'); + var z = new Array(); + for(var i = 0; i < arTmp.length; i++) + { + if (arTmp[i] !== "") + { + z[z.length] = document.createTextNode(arTmp[i]); + z[z.length] = document.createElement('br'); + } + } + z.pop(); + return z; + } + return ""; +}; + +insertBR = function(s) { + var z = new Array(); + var arSplit = s.split('\t'); + for (var i = 0; i < arSplit.length; i++) + { + if (arSplit[i] !== "") + { + z[z.length] = document.createTextNode(arSplit[i]); + z[z.length] = document.createElement('br'); + } + } + if (z.length > 1) + z.pop(); + return z; +}; + +show = function(id) { + if ($(id)) + $(id).show(); +}; + +hide = function(id) { + if($(id)) + $(id).hide(); +}; + +setProtoIfExist = function(id, bProto) { + if ($("pr" + id)) { + $("pr" + id).checked = bProto; + } +}; + +setHandlingIfExist = function(id, bHand) { + if ($("ha" + id)) { + $("ha" + id).checked = bHand; + } +}; + +setVisibleIfExist = function(id, bVisi) { + if ($("vi" + id)) { + $("vi" + id).checked = bVisi; + } +}; + +/* +textEdit = function(ctrlId, id, allowEmptyString, callback, callStrFunc) +{ + bTxtEditMode = true; + var iSize = 8; + if (screen.availWidth >= 1024) iSize = 12; + if (!$(ctrlId+"inp")) + { + sPrevVal = $(ctrlId).innerHTML; + var isEmptyAllowed = false; + if ((allowEmptyString !== null) && (allowEmptyString === true)) + { + isEmptyAllowed = true; + } + var sValue = $(ctrlId).innerHTML; + while (sValue.indexOf("
") > -1){ + sValue = sValue.replace("
",""); + } + while (sValue.indexOf("
") > -1){ + sValue = sValue.replace("
",""); + } + sValue = sValue.replace(/^\s+/,""); // Left trim + sValue = sValue.replace(/$\s+/,""); // Left trim + sValue = sValue.replace(/
/gi, ""); + var s = ""; + //var s = ""; + s = s+""; + // var s = ""; + $(ctrlId).innerHTML = s; + $(ctrlId+'inp').focus(); + $(ctrlId+'inp').select(); + } +}; +*/ + +textEdit = function(ctrlId, id, allowEmptyString, callback, callStrFunc) +{ + bTxtEditMode = true; + var iSize = 8; + if (screen.availWidth >= 1024) iSize = 12; + if (!$(ctrlId+"inp")) + { + sPrevVal = $(ctrlId).innerHTML; + var isEmptyAllowed = false; + var s; + if ((allowEmptyString !== null) && (allowEmptyString === true)) + { + isEmptyAllowed = true; + } + var sValue = $(ctrlId).innerHTML; + while (sValue.indexOf("
") > -1){ + sValue = sValue.replace("
",""); + } + while (sValue.indexOf("
") > -1){ + sValue = sValue.replace("
",""); + } + sValue = sValue.replace(/^\s+/,""); // Left trim + sValue = sValue.replace(/$\s+/,""); // Left trim + sValue = sValue.replace(/
/gi, ""); + // var s = ""; + if (PLATFORM == "Central") { + s = ""; + s = s+""; + } else { + s = ""; + s = s+""; + } + $(ctrlId).innerHTML = s; + $(ctrlId+'inp').focus(); + $(ctrlId+'inp').select(); + } +}; + +checkkey = function(ctrlId, id, allowEmptyString, callback, callStrFunc, e) { + var keycode = 0; + if (window.event) keycode = window.event.keyCode; + else if(e) keycode = e.which; + if (keycode == 13) + saveEdit(ctrlId, id, allowEmptyString, callback, callStrFunc); +}; + +checkKeyInfo = function(ctrlId, id, allowEmptyString, e) { + var keycode = 0; + if (window.event) keycode = window.event.keyCode; + else if(e) keycode = e.which; + if (keycode == 13) + saveEditInfo(ctrlId, id, allowEmptyString); +}; + +textEditInfo = function(ctrlId, id, allowEmptyString) +{ + bTxtEditMode = true; + var iSize = 8; + if (screen.availWidth >= 1024) iSize = 12; + if (!$(ctrlId+"inp")) + { + var isEmptyAllowed = false; + if ((allowEmptyString !== null) && (allowEmptyString === true)) + { + isEmptyAllowed = true; + } + sPrevValInfo = $(ctrlId).innerHTML; + var sValue = $(ctrlId).innerHTML; + sValue = sValue.replace(/^\s+/,""); // Left trim + sValue = sValue.replace(/$\s+/,""); // Left trim + sValue = sValue.replace(/
/gi,""); + sValue = sValue.replace(/ /gi,""); + $(ctrlId).innerHTML = ""; + $(ctrlId+'inp').focus(); + $(ctrlId+'inp').select(); + } +}; + +isPasswordAllowed = function(text,minLen,suppressAlert) +{ + var re = new RegExp( '^[a-zA-Z0-9.=!$():;#*ßüäö-]{'+minLen+',}$', 'i' ); + var bRet = re.test( text ); + var bShowAlert = (typeof(suppressAlert)=="undefined"); + //if( !bRet && ( bShowAlert ) ) alert( "Bitte verwenden Sie nur die erlaubten Sonderzeichen [., !, $, (, ), :, ;, #, ß, ä, ö, ü, -]." ); + if( !bRet && ( bShowAlert ) ) alert( translateKey("alertUseOnlySpecialChars") ); + return bRet; +}; + +/** + * Prüft, ob ein Text verbotene Sonderzeichen verwendet. + * Zu diesen Zeichen gehören: <, >, ', ", &, $, [, ], {, } und \ + * --> Es ist alles erlaubt, was nicht verboten ist + **/ +isTextAllowed = function(text, minLen, suppressAlert) +{ + var forbidden = /[<>'"&$\[\]\{\}\\]/; + var isForbidden = forbidden.test( text ); + + if ((isForbidden) && (typeof(suppressAlert) == "undefined")) + { + //alert("Bezeichnungen dürfen keines der folgenden Zeichen enthalten: <, >, ', \", &, $, [, ], {, } und \\"); + alert(translateKey("alertCharsNotAllowed")); + } + + return !(isForbidden); +}; + + + +isNumber = function(str) { + var reg = new RegExp('^[0-9]+$'); + return reg.test(str); +}; + +if (PLATFORM == "Central") +{ + saveEdit = function(ctrlId, id, allowEmptyString, callback, callStrFunc) + { + // verhindern dass das OnBlur-Event ausgelöst wird wenn mit ENTER bestätigt wurde + if (!bTxtEditMode) return; + bTxtEditMode = false; + var divId = ctrlId.substr(0, ctrlId.length - 3); + var newVal = $(ctrlId).value; + var oldV = ""; + if($(divId+"old")){ + oldV = $(divId+"old").value; + oldV = oldV.replace(/\n/,""); // trim + if (NAV_IE) { + oldV = oldV.replace(/^\s+|$\s+/,""); // trim + } else { + oldV = oldV.replace(/^\s+|\s+$/,""); // trim + } + } + var minLen = 1; + if ((allowEmptyString !== null) && (allowEmptyString === true)) + { + minLen = 0; + } + if ( isTextAllowed(newVal,minLen) ) + { + if( id !== 0 ) + { + if (typeof callback == "function") + { + callback(id, newVal); + } + iseSystem.saveName(id, newVal, divId, callStrFunc); + $(divId).innerHTML = newVal; + } + else + { + if (newVal != oldV){ + iseSystem.checkName( newVal, divId ); + } else { + $(divId).innerHTML = sPrevVal; + } + } + } + else + { + $(divId).innerHTML = sPrevVal; + } + }; + + saveEditInfo = function(ctrlId, id, allowEmptyString) + { + // verhindern dass das OnBlur-Event ausgelöst wird wenn mit ENTER bestätigt wurde + if (!bTxtEditMode) return; + bTxtEditMode = false; + var divId = ctrlId.substr(0, ctrlId.length - 3); + var newVal = $(ctrlId).value; + var minLen = 1; + if ((allowEmptyString !== null) && (allowEmptyString === true)) + { + minLen = 0; + } + if ( isTextAllowed(newVal,minLen) ) + { + $(divId).innerHTML = newVal; + if( id !== 0 ) { iseSystem.saveDesc(id, newVal); } + } + else + { + $(divId).innerHTML = sPrevValInfo; + } + }; +} +else +{ + //Funktionen für das Konfigtool + saveEdit = function(ctrlId, id, allowEmptyString, callback, callStrFunc) + { + // verhindern dass das OnBlur-Event ausgelöst wird wenn mit ENTER bestätigt wurde + if (!bTxtEditMode) return; + bTxtEditMode = false; + var divId = ctrlId.substr(0, ctrlId.length - 3); + var newVal = $(ctrlId).value; + var oldV = ""; + if($(divId+"old")){ + oldV = $(divId+"old").value; + oldV = oldV.replace(/\n/,""); // trim + if (NAV_IE) { + oldV = oldV.replace(/^\s+|$\s+/,""); // trim + } else { + oldV = oldV.replace(/^\s+|\s+$/,""); // trim + } + } + var minLen = 1; + if(allowEmptyString != null && allowEmptyString == true) + { + minLen = 0; + } + if ( isTextAllowed(newVal,minLen) ) + { + if( id != 0 ) + { + if (typeof callback == "function") + { + callback(id, newVal); + }else{ + configMetadata.save(id, newVal, divId, callStrFunc); + } + $(divId).innerHTML = newVal; + } + else + { + if (newVal != oldV){ + //iseSystem.checkName( newVal, divId ); + } else { + $(divId).innerHTML = sPrevVal; + } + } + } + else + { + $(divId).innerHTML = sPrevVal; + } + }; + saveEditInfo = function(ctrlId, id, allowEmptyString) + { + // verhindern dass das OnBlur-Event ausgelöst wird wenn mit ENTER bestätigt wurde + if (!bTxtEditMode) return; + bTxtEditMode = false; + var divId = ctrlId.substr(0, ctrlId.length - 3); + var newVal = $(ctrlId).value; + var minLen = 1; + if(allowEmptyString != null && allowEmptyString == true) + { + minLen = 0; + } + if ( isTextAllowed(newVal,minLen) ) + { + $(divId).innerHTML = newVal; + if( id != 0 ) iseSystem.saveDesc(id, newVal); + } + else + { + $(divId).innerHTML = sPrevValInfo; + } + }; +} + + +/* * * * * * * Overlay * * * * * * * * * * * * * * * * * * * */ +showRoomOverlay = function(tdId, chnId) { + var chnType = homematic("Channel.getChannelType", {"id": chnId}); + iLastChnId = chnId; + + // A channel of type CCESSPOINT_GENERIC_RECEIVER (e. g. DRAP chn 1 and 2) is not eligible for assigning to a room + if (chnType != "ACCESSPOINT_GENERIC_RECEIVER") { + translatePage("#roomOverlay"); + var elmPos = getElemCenterPos("#roomOverlay"); + $("roomOverlay").style.top = elmPos.top; //tdPos[1]+"px"; + $("roomOverlay").style.left = elmPos.left; //tdPos[0]+"px"; + iseChannels.showOverlay(chnId, ID_ROOMS); + } else { + alert(translateKey("lblChnNotAllowedInRoom")); + } +}; + +showFuncOverlay = function(tdId, chnId) { + var chnType = homematic("Channel.getChannelType", {"id": chnId}); + iLastChnId = chnId; + + // A channel of type ACCESSPOINT_GENERIC_RECEIVER (e. g. DRAP chn 1 and 2) is not eligible for assigning to a function + if (chnType != "ACCESSPOINT_GENERIC_RECEIVER") { + translatePage("#funcOverlay"); + var elmPos = getElemCenterPos("#funcOverlay"); + $("funcOverlay").style.top = elmPos.top; //tdPos[1]+"px"; + $("funcOverlay").style.left = elmPos.left; //tdPos[0]+"px"; + iseChannels.showOverlay(chnId, ID_FUNCTIONS); + } else { + alert(translateKey("lblChnNotAllowedInFunc")); + } +}; + +addRoom = function(ctrlId, roomId) { + iseChannels.chnToRoom(iLastChnId, roomId, $(ctrlId).checked); +}; + +addFunc = function(ctrlId, funcId) { + iseChannels.chnToFunc(iLastChnId, funcId, $(ctrlId).checked); +}; + +convertDomDate = function(s) +{ + var arTmp = s.split(' '); + arTmp = arTmp[0].split('-'); + return arTmp[2]+'.'+arTmp[1]+'.'+arTmp[0]; +}; + +convertDomTime = function(s) { + if (s.length === 0) { return ""; } + var arTmp = s.split(' '); + arTmp = arTmp[1].split(':'); + return arTmp[0]+':'+arTmp[1]; +}; + +ExecuteProgram = function(dpid, thenOnly) +{ + var url = "/esp/exec.htm?sid=" + SessionId; + var pb = ""; + pb += "object o = dom.GetObject( "+dpid+" );"; + pb += "if( o )"; + pb += "{"; + pb += (thenOnly === true) ? " o.ProgramExecute();" : " o.State(1);"; + pb += "}"; + var opts = {postBody: ReGa.encode(pb)}; + if(dbg)alert(pb); + new Ajax.Request(url, opts); +}; + +setDpState = function(dpid, iState, boolVal) +{ + conInfo("setDPState - dpID: " + dpid + " - value: " + iState); + var url = "/esp/system.htm?sid="+SessionId; + var pb = "string action = 'setDpState';"; + pb += "integer dpid = "+dpid+";"; + if (boolVal) + { + pb += "boolean iState = "+(iState == 1? true : false)+";"; + } + else + { + pb += "integer iState = '"+iState+"';"; + } + var opts = + { + postBody: ReGa.encode(pb) + }; + if(dbg)alert(pb); + new Ajax.Request(url, opts); +}; + +removeDuplicates = function(s1, s2, splitChar, bPlainText) { + var arTmp = new Array(); + var iAr; + var bFound; + var sSC = ' '; + if (splitChar) { sSC = splitChar; } + var ar1 = s1.split(sSC); + var ar2 = s2.split(sSC); + + for (var i1 = 0; i1 < ar1.length; i1++) { + bFound = false; + for (iAr = 0; iAr < arTmp.length; iAr++) { + if (ar1[i1] == arTmp[iAr]) { + bFound = true; + break; + } + } + if (!bFound) { + arTmp[arTmp.length] = ar1[i1]; + } + } + for (var i2 = 0; i2 < ar2.length; i2++) { + bFound = false; + for (iAr = 0; iAr < arTmp.length; iAr++) { + if (ar2[i2] == arTmp[iAr]) { + bFound = true; + break; + } + } + if (!bFound) { + arTmp[arTmp.length] = ar2[i2]; + } + } + + var i; + if (bPlainText) + { + var sRet = ""; + for(i = 0; i < arTmp.length; i++) { + if (arTmp[i] !== "") { + sRet += arTmp[i] + "
"; + } + } + sRet = sRet.substr(0, sRet.length - 4); + return sRet; + } + else { + var z = new Array(); + for(i = 0; i < arTmp.length; i++) { + if (arTmp[i] !== "") { + z[z.length] = document.createTextNode(arTmp[i]); + z[z.length] = document.createElement('br'); + } + } + z.pop(); + return z; + } +}; + +lastSort = ""; +lastDir = 0; + +lastSort2 = ""; +lastDir2 = 0; + +iseSetLastSort = function(sort) +{ + lastSort = sort; +}; + +iseClearLastSort = function() +{ + lastSort = ""; + iseResetDirection(); + iseClearLastSort2(); +}; + +iseClearLastSort2 = function() +{ + lastSort2 = ""; + iseResetDirection2(); +}; + +iseChangeDirection = function() +{ + if( lastDir == 1 ) + { + lastDir = 0; + } + else + { + lastDir = 1; + } +}; + +iseChangeDirection2 = function() +{ + if( lastDir2 == 1 ) + { + lastDir2 = 0; + } + else + { + lastDir2 = 1; + } +}; + +iseResetDirection = function() +{ + lastDir = 0; +}; + +iseResetDirection2 = function() +{ + lastDir2 = 0; +}; + +iseArraySwap = function(arr,entryA,entryB) +{ + var tmp = arr[entryA]; + arr[entryA] = arr[entryB]; + arr[entryB] = tmp; + return arr; +}; + +iseSortMultiArray = function(arr,dsc,dir,sln, sessionVar,popup) +{ + conInfo("Sort multi array2."); + const collator = new Intl.Collator(undefined, {numeric: true, sensitivity: 'base'}); + /* arr.forEach( x => { if( typeof x[dsc] == "undefined" ) { x[dsc] = ""; } } ); */ + arr.sort( (x, y) => { return collator.compare(x[dsc], y[dsc]); } ); + if( dir === 1 ) { arr.reverse(); } + if (!popup) iseTransferSortedArray(arr,dsc,sln, sessionVar); +}; + +iseTransferSortedArray = function(arr,dsc,sortListNumber, sessionVar) +{ + conInfo("Transferring sorted array."); + var url = "/esp/system.htm?sid="+SessionId; + var pb = ""; + pb += 'string action = "AddToTempView'+sortListNumber+'";'; + + var s = "sessionLS"; + if (typeof(sessionVar) != 'undefined') s = sessionVar; + pb += 'system.SetSessionVar("'+s+'", "'+dsc+'");'; + pb += 'string ids = "'; + for(var i=0;i -1 ) + { + iseUpdateTMArray[iPos] = lastTimestamp; + } + else + { + iseUpdateIDArray.push( chnId ); + iseUpdateTMArray.push( lastTimestamp ); + } + + translatePage("#tblfav"); + +}; + +callbackUpdateChannelControl = function( chnId, lastTimestamp ) +{ + conInfo("callbackUpdateChannelControl"); + var url = "/esp/system.htm?sid=" + SessionId; + var pb = "string action = 'getLastTimeOfChn';"; + pb += 'string chnId = "' + chnId + '";'; + var opts = + { + postBody: Rega.encode(pb), + onComplete: function(t) + { + var sResp = t.responseText; + // CR or LF may be appended which must be ignored + if( sResp.length > lastTimestamp.length ) + { + sResp = sResp.substr( 0, lastTimestamp.length ); + } + if( sResp != lastTimestamp ) + { + reloadPage(); + } + else + { + updateChannelControl( chnId, lastTimestamp ); + } + } + }; + + new Ajax.Request(url, opts); +}; + +changeTransMode = function(chnId, ctrlId) { + dlgPopup = new iseMessageBox(ID_TRANSFER_PARAMETERS, chnId); + PopupClose = function(selIdx) + { + dlgPopup.hide(); + if (selIdx === 0) { + $(ctrlId).innerHTML = translateKey("lblStandard"); + } + else { + $(ctrlId).innerHTML = translateKey("lblSecured"); + } + }; + if (PLATFORM != 'Central') { + SendRequest('/popupTransEditor.cgi'); + } + dlgPopup.ShowPopup(); +}; + +recreateControl = function(chnId,sTimeStamp) +{ + var url; + var pb; + var opts; + + //alert("recreating control "+chnId+" at "+sTimeStamp); + conInfo("recreateControl"); + if( $("tmc"+chnId) ) + { + if( typeof sTimeStamp == "undefined" ) + { + url = "/esp/system.htm?sid="+SessionId; + pb = "string action = 'getLastTimeOfChn';"; + pb += "integer cId = "+chnId+";"; + opts = + { + postBody: ReGa.encode(pb), + onSuccess: function(t) { + translatePage("#dpc"+chnId); + } + }; + new Ajax.Updater("tmc"+chnId, url, opts); + } + else + { + $("tmc"+chnId).innerHTML = sTimeStamp; + } + } + + if( $("dpc" + chnId) ) + { + var iStatusOnly = 0; + if (sActPage.indexOf("statusviews") > -1) + { + iStatusOnly = 1; + } + url = "/esp/datapointconfigurator.htm?sid="+SessionId; + pb = "string action = 'dcCreate';"; + pb += "integer cId = "+chnId+";"; + pb += "integer iStatusOnly = " + iStatusOnly + ";"; + opts = + { + postBody: ReGa.encode(pb), + evalScripts: true, + onComplete: function(t) + { + //alert(t.responseText); + translatePage("#dpc"+chnId); + } + }; + //alert(pb); + new Ajax.Updater("dpc"+chnId, url, opts); + } +}; + +LogoClick = function() +{ + document.getElementById("btnReGaSave").style.color=WebUI.getColor("grayText"); + document.getElementById("btnReGaSave").onclick=""; + + //alert( iseUpdateIDArray.join("_") ); + //alert( iseUpdateTMArray.join("_") ); + //loadLinkList(); + saveObjectModel(); + +}; + +updateGroupCell = function(prefix, chnId1, chnId2, content) { + var sCellId = prefix + chnId1 + chnId2; + if ($(sCellId)) + $(sCellId).innerHTML = content; + else { + sCellId = prefix + chnId2 + chnId1; + if ($(sCellId)) + $(sCellId).innerHTML = content; + } +}; + + +saveObjectModel = function() { + var userNameElm = jQuery("#UserName"), + savingColor = "#afafaf", + restoreColor = "white"; + conInfo("The CCU is saving the ObjectModel"); + userNameElm.css('color',savingColor); + homematic("system.saveObjectModel", {}, function () { + conInfo("ObjectModel saved"); + userNameElm.css('color',restoreColor); + }); +}; + +pause = function(ms) +{ + var currentTime = new Date(); + var exitTime = currentTime.getTime() + ms; + while( true ) + { + currentTime = new Date(); + if( currentTime.getTime() > exitTime ) return; + } +}; + +iseFlasher = null; + +StartFlashing = function() +{ + iseFlasher = new PeriodicalExecuter( + function(pe) + { + if( $("headerLogo") ) + { + if( $("headerLogo").src.indexOf("_red") >= 0 ) + { + $("headerLogo").src = "/ise/img/rm-logo_small.png"; + } + else + { + $("headerLogo").src = "/ise/img/rm-logo_small_red.png"; + } + } + }, + 1); +}; + +StopFlashing = function() +{ + iseFlasher.stop(); + iseFlasher = null; +}; + +SwitchOnFlashLight = function() +{ + if ($("headerLogo")) { $("headerLogo").classList.add('hidden'); } + if ($("headerLogoRed")) { $("headerLogoRed").classList.remove('hidden'); } +}; + +SwitchOffFlashLight = function() +{ + if ($("headerLogo")) { $("headerLogo").classList.remove('hidden'); } + if ($("headerLogoRed")) { $("headerLogoRed").classList.add('hidden'); } +}; + +getAjaxLoadElem = function() { + return jQuery("#ajaxload"); +}; + +getWaitAnimElem = function() { + return jQuery("#waitAnim"); +}; + +isWaitAnimActive = function() { + var waitAnimElem = getWaitAnimElem(); + var result = false; + if (!waitAnimElem.hasClass("hidden")) { + result = true; + } + return result; +}; + +// Only visible when the waitAnimElem is hidden +// See ShowWaitAnim ... +ShowAjaxLoad = function() +{ + var ajaxLoadElem = getAjaxLoadElem(); + if (ajaxLoadElem && !isWaitAnimActive()) + ajaxLoadElem.show().removeClass('hidden'); +}; + +HideAjaxLoad = function() +{ + var ajaxLoadElem = getAjaxLoadElem(); + if (ajaxLoadElem) + ajaxLoadElem.hide().addClass('hidden'); +}; + +ShowWaitAnim = function() { + var waitAnimElem = getWaitAnimElem(), + ajaxLoadElem = getAjaxLoadElem(); + ajaxLoadElem.hide().addClass('hidden'); + waitAnimElem.show().removeClass('hidden'); +}; + +HideWaitAnim = function() { + var waitAnimElem = getWaitAnimElem(); + waitAnimElem.hide().addClass('hidden'); + +}; + +HideWaitAnimAutomatically = function(seconds) { + window.setTimeout("HideWaitAnim()", seconds * 1000); + +}; + +buildObj = function(id, trId, ctrlId, name, rooms, funcs, roomIDs, funcIDs) { + var tmp = new Object(); + tmp['id'] = id; + tmp['trid'] = trId; + tmp['ctrlId'] = ctrlId; + tmp['name'] = name; + tmp['room'] = rooms; + tmp['func'] = funcs; + tmp['fltOpts'] = new Object(); + tmp['fltOpts']['rooms'] = roomIDs; + tmp['fltOpts']['funcs'] = funcIDs; + return tmp; +}; + +RemoveAllRowsFromTable = function(table) +{ + if( $(table) ) + { + while($(table).rows.length ) + { + $(table).deleteRow(0); + } + } +}; + +array_merge = function(one,two) +{ + one.push(two); + return one.flatten(); +}; + +arrayDeleteVal = function(arr, item) { + var index = arr.indexOf(item); + arr.splice(index, 1); +}; + +DeleteObject = function(id) +{ + var url = "/esp/system.htm?sid="+SessionId; + var pb = ""; + pb += 'string action = "DeleteObject";'; + pb += 'string id = "'+id+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onSuccess: function(t) + { + if( t.responseText == "false" ) + { + //if(dbg){alert("Objekt konnte nicht gelöscht werden.");} + if(dbg){alert(translateKey("alertErrorDeleteObject"));} + } + reloadPage(); + } + }; + new Ajax.Request(url, opts); +}; + +DeleteObject2 = function(id) +{ + var url = "/esp/system.htm?sid="+SessionId; + var pb = ""; + pb += 'string action = "DeleteObject";'; + pb += 'string id = "'+id+'";'; + var opts = { + postBody: ReGa.encode(pb), + onSuccess: function(t) + { + if( t.responseText == "false" ) + { + //if(dbg){alert("Objekt konnte nicht gelöscht werden.");} + if(dbg){alert(translateKey("alertErrorDeleteObject"));} + } + dlgPopup.load(); + } + }; + new Ajax.Request(url, opts); +}; + +iseRefr = function(state) +{ + //rfr = state; +}; + +conInfo = function(msg) +{ + if( (typeof console != "undefined") && (urlDebug =="true") ) + { + console.info(msg); + } +}; + +conError = function(msg) +{ + if( typeof console != "undefined" ) + { + console.error(msg); + } +}; + +ResetGAC = function() +{ + conInfo("ResetGAC called."); + GetAllChannels = function() + { + conInfo("GetAllChannels: NOP"); + }; +}; + +addLeadingZero = function( iValue ) +{ + var sRet = ""+iValue; + if( iValue < 10 ) + { + sRet = "0"+iValue; + } + return sRet; +}; + +addTrailingZero = function(val) { + var sVal = val.toString(), + decPlace = sVal.split(".")[1]; + if (!decPlace) { + return sVal + ".00"; + } + if (decPlace.length == 1) { + return sVal + "0"; + } + return sVal; +}; + +roundValue05 = function(val) { + var intVal = Math.floor(val); + if (val - intVal > 0.5) { + return Math.ceil(val); + } + + if (val - intVal == 0) { + return val; + } + + return intVal + 0.5; +}; + +round = function(x, n) +{ + // x = Fließkommazahl, n = gewünschte Nachkommastellen + if (!n) n = 2; //wenn n fehlt wird n = 2 + if (n < 1 || n > 14) return false; + var e = Math.pow(10, n); + var k = (Math.round(x * e) / e).toString(); + if (k.indexOf('.') == -1) k += '.'; + k += e.toString().substring(1); + return k.substring(0, k.indexOf('.') + n+1); +}; + +convertMin2Hour = function(valMin) { + var min = parseInt(valMin), + hours = Math.floor(valMin / 60), + minutes = valMin % 60; + + hours = (isNaN(hours)) ? 0 : hours; + minutes = (isNaN(minutes)) ? 0 : minutes; + + return hours + ' h : ' + ((minutes <= 9) ? "0"+minutes+" m" : minutes+" m"); +}; + +// Check if a bit is set in val (max. 32 bit operation) +// Returns true/false +isBitSet = function (val, bit) { + return ((val>>bit) % 2 != 0); +}; + +// another way to check the bit (64 bit operation possible) +_isBitSet = function(no, index) { + var bin = no.toString(2); + // Convert to Binary + + index = bin.length - index; + // Reverse the index, start from right to left + + return bin[index] == 1; +}; + +/** + * Entfernt einen Kanal aus einem Raum. + **/ +removeChannelFromRoom = function(roomId, channelId) +{ + decChnCount(roomId); + iseChannels.delChnFromID(channelId, roomId, true); + clearUserTempViewIDs2Room(); + + var room = RoomList.get(roomId); + if (room) + { + room.removeChannel(channelId); + } +}; + +/** + * Entfernt einen Kanal aus allen Räumen. + **/ +removeChannelFromAllRooms = function(roomId, channelId) +{ + decChnCount(roomId); + iseChannels.delChnFromAllRooms(channelId, true); + clearUserTempViewIDs2Room(); + + RoomList.list().each(function (room) { + room.removeChannel(channelId); + }); +}; + +removeChannelFromSubsection = function(subsectionId, channelId) +{ + decChnCount(subsectionId); + iseChannels.delChnFromID(channelId, subsectionId, true); + clearUserTempViewIDs2Function(); + + var subsection = SubsectionList.get(subsectionId); + if (subsection) + { + subsection.removeChannel(channelId); + } +}; + +removeChannelFromAllSubsections = function(subsectionId, channelId) +{ + decChnCount(subsectionId); + iseChannels.delChnFromAllFunctions(channelId, true); + clearUserTempViewIDs2Function(); + + SubsectionList.list().each(function (subsection) { + subsection.removeChannel(channelId); + }); +}; + +removeRoomOrSubsection = function(id) +{ + var room = RoomList.get(id); + if (room) { RoomList.remove(room); } + + var subsection = SubsectionList.get(id); + if (subsection) { SubsectionList.remove(subsection); } + +}; + +changeRoomOrSubsection = function(id) +{ + var room = RoomList.get(id); + if (room) { RoomList.beginUpdate(id); } + + var subsection = SubsectionList.get(id); + if (subsection) { SubsectionList.beginUpdate(id); } +}; + + +showDutyCycle = function() { + if (jQuery("#PagePathSpan").text().endsWith(translateKey("startPage"))) { + var ifaceBidCosRF = "BidCos-RF", + ifaceHmIPRF = "HmIP-RF", + arInterfaceDutyCycle = {}, + arInterfaceCarrierSense = {}, + showPartingLine = false, + dcUnit = "%", + dcNotAvailable = -1, + csNotAvailable = -1, + dcWarn = 69, // Warning when dc >= 70% + dcAlarm = 89, // Attention when dc >= 90% + csWarn = 10, // Warning when cs >= 11% + csAlarm = 19; // Attention when cs >= 20% + + homematic("Interface.getDutyCycle", {}, function(dcArray) { + if(jQuery.isArray(dcArray)) { + jQuery.each(dcArray, function(index, iface) { + var dutyCycleValElm = jQuery("#dutyCycleVal"+index), + dutyCycleAddrElm = jQuery("#dutyCycleAddr"+index), + trDutyCycle = jQuery("[name='trDutyCycle"+index+"']"), + dutyCycleBar = jQuery("[name='dutyCycleBar"+index+"']"), + carrierSenseValElm = jQuery("#carrierSenseVal"+index), + carrierSenseBar = jQuery("[name='carrierSenseBar"+index+"']"), + carrierSenseCol = jQuery("[name='carrierSenseCol"+index+"']"), + trPartingLineElm = jQuery("#partingLine1"), + csVal, + dcVal; + + if (typeof iface.dutyCycle !== "undefined") { + dcVal = Math.floor(iface.dutyCycle); + csVal = Math.floor(iface.carrierSense); + conInfo("dutyCycle - " + ifaceBidCosRF + ": " + dcVal + " " + dcUnit); + conInfo("carrierSense - " + ifaceBidCosRF + ": " + csVal + " " + dcUnit); + arInterfaceDutyCycle[ifaceBidCosRF] = ((dcVal >= 0) && (dcVal <= 100)) ? dcVal : dcNotAvailable; + arInterfaceCarrierSense[ifaceBidCosRF] = ((csVal >= 0) && (csVal <= 100)) ? csVal : csNotAvailable; + } else { + conInfo("No gateway status for the interface " + ifaceBidCosRF + " available!"); + arInterfaceDutyCycle[ifaceBidCosRF] = dcNotAvailable; + } + + if (arInterfaceDutyCycle[ifaceBidCosRF] != dcNotAvailable) { + dutyCycleValElm.text(arInterfaceDutyCycle[ifaceBidCosRF] + " " + dcUnit); + if (iface.type === "CCU2") { + dutyCycleAddrElm.text("CCU:"); + } else if(iface.type === "HMIP-HAP") { + if(iface.name !== "") { + dutyCycleAddrElm.text("HAP ("+iface.name+"):"); + } else { + dutyCycleAddrElm.text("HAP ("+iface.address+"):"); + } + } else if(iface.name !== "") { + dutyCycleAddrElm.text("LGW ("+iface.name+"):"); + } else { + dutyCycleAddrElm.text("LGW ("+iface.address+"):"); + } + + dutyCycleBar.css("width", arInterfaceDutyCycle[ifaceBidCosRF]+"%").attr('aria-valuenow', arInterfaceDutyCycle[ifaceBidCosRF]); + dutyCycleBar.removeClass("bg-success"); + dutyCycleBar.removeClass("bg-warning"); + dutyCycleBar.removeClass("bg-danger"); + + if (arInterfaceDutyCycle[ifaceBidCosRF] > dcAlarm) { + dutyCycleBar.addClass("bg-danger"); + } else if (arInterfaceDutyCycle[ifaceBidCosRF] > dcWarn) { + dutyCycleBar.addClass("bg-warning"); + } else { + dutyCycleBar.addClass("bg-success"); + } + + if (arInterfaceCarrierSense[ifaceBidCosRF] != csNotAvailable) { + carrierSenseValElm.text(arInterfaceCarrierSense[ifaceBidCosRF] + " " + dcUnit); + carrierSenseBar.css("width", arInterfaceCarrierSense[ifaceBidCosRF]+"%").attr('aria-valuenow', arInterfaceCarrierSense[ifaceBidCosRF]); + carrierSenseBar.removeClass("bg-info"); + carrierSenseBar.removeClass("bg-warning"); + carrierSenseBar.removeClass("bg-danger"); + + if (arInterfaceCarrierSense[ifaceBidCosRF] > csAlarm) { + carrierSenseBar.addClass("bg-danger"); + } else if (arInterfaceCarrierSense[ifaceBidCosRF] > csWarn) { + carrierSenseBar.addClass("bg-warning"); + } else { + carrierSenseBar.addClass("bg-info"); + } + } else { + carrierSenseValElm.text("n/a"); + carrierSenseBar.css("width", "0%"); + } + trPartingLineElm.show(); + showPartingLine = true; + trDutyCycle.css("display", "table-row"); + } else { + trDutyCycle.css("display", "none"); + } + + if (!showPartingLine) { + trPartingLineElm.hide(); + } + }); + } + }); + } +}; + +showDutyCycleHmIP = function() { + // Currently only in use for HAPs. Here we collect the available HAP addresses. + // The display of the HAP-DutyCycle is done in showDCAllInterfaces() + if (jQuery("#PagePathSpan").text() == translateKey("startPage")) { + var linkElem = jQuery("#iFaceShowAll"), + arRelevantAddresses = []; + + jQuery.each(DeviceList.devices, function(index, dev) { + //if ((dev.typeName == "HmIP-CCU3") || (dev.typeName.indexOf("HmIP-HAP") > -1)) { + // We fetch only the HAP addresses + if (dev.typeName.indexOf("HmIP-HAP") > -1) { + arRelevantAddresses.push(dev.channels[0].address.split(":")[0]); + } + }); + + if ((arRelevantAddresses.length > 0) && (!linkElem.hasClass("UILink"))) { + linkElem + .addClass("UILink") + .on("click", function () { + showDutyCycle(); // actualize the dc value of the start page + showDCAllInterfaces(arRelevantAddresses); + }); + } + } +}; + +//Attention: To work properly Adapter.Local.Device.Enabled of the crRFD.conf must be set to true +showCarrierSense = function() { + if (jQuery("#PagePathSpan").text() == translateKey("startPage")) { + var ccuAddress = homematic("CCU.getSerial"), + linkElem = jQuery("#lblCarrierSense"), + arHAPAddresses = []; + + jQuery.each(DeviceList.devices, function(index, dev) { + if (dev.typeName.indexOf("HmIP-HAP") > -1) { + arHAPAddresses.push(dev.channels[0].address.split(":")[0]); + } + }); + + if ((arHAPAddresses.length > 0) && (!linkElem.hasClass("UILink"))) { + linkElem + .addClass("UILink") + .on("click", function () { + showCarrierSense(); // actualize the cs value of the start page + showAllCarrierSense(ccuAddress, arHAPAddresses); + }); + } + + if ((typeof ccuAddress != "undefined") && (ccuAddress != "")) { + homematic("Interface.getValue", { + "interface": "HmIP-RF", + "address": ccuAddress + ":0", + "valueKey": "CARRIER_SENSE_LEVEL" + }, function (result) { + if (result != null) { + var carrierSenseProgressElm = jQuery("#carrierSenseProgress"), + carrierSenseProgressBarElm = jQuery("#carrierSenseProgressBar"), + carrierSenseValElm = jQuery("#carrierSenseVal"), + trCarrierSense = jQuery("[name='trCarrierSense']"), + csUnit = "%", + csVal = parseInt(result), + width, value; + + if ((typeof csVal == "number") && ((csVal >= 0) && (csVal <= 100))) { + trCarrierSense.css("visibility", "visible"); + + width = parseInt(carrierSenseProgressElm.css("width")); + value = width - (width / 100 * csVal); + + carrierSenseValElm.text(csVal + csUnit); + carrierSenseProgressBarElm.css("margin-left", (width - parseInt(value)) + "px"); + + } else { + trCarrierSense.css("visibility", "hidden"); + } + } + }); + } + } +}; + +// Show the duty cycle of all relevant interfaces and available HAPs +showDCAllInterfaces = function(arRelevantAddresses) { + var ifaceBidCosRF = "BidCos-RF", + arInterfaceDutyCycle = {}, + showPartingLine = false, + dcUnit = "%", + dcNotAvailable = -1, + dcAlarm = 89, // Attention when dc >= 90% + elmCounter = 0, + html = "", + dlg; + + homematic("Interface.listBidcosInterfaces", {"interface": ifaceBidCosRF}, function (BidCosIFaces) { + html += ""; + + jQuery.each(BidCosIFaces, function(index, iFace){ + var dcVal = (typeof iFace.dutyCycle != 'undefined') ? parseInt(iFace.dutyCycle) : 'unknown'; + elmCounter = index; + html += ""; + html += ""; + html += ""; + + html += ""; + html += ""; + html += ""; + + window.setTimeout(function() { + var dutyCycleProgressElem = jQuery("#dutyCycleProgress_" + index), + dutyCycleProgressBarElm = jQuery("#dutyCycleProgressBar_" + index), + dutyCycleValElm = jQuery("#dutyCycleVal" + index), + trDutyCycle = jQuery("[name='trDutyCycle']"), + dcVal, + width, value; + + + + if (typeof iFace.dutyCycle != "undefined") { + dcVal = parseInt(iFace.dutyCycle); + conInfo("dutyCycle - " + ifaceBidCosRF + ": " + dcVal + dcUnit); + arInterfaceDutyCycle[ifaceBidCosRF] = ((dcVal >= 0) && (dcVal <= 100)) ? dcVal : dcNotAvailable; + } else { + conInfo("No gateway status for the interface " + ifaceBidCosRF + " available!"); + arInterfaceDutyCycle[ifaceBidCosRF] = dcNotAvailable; + } + + if (arInterfaceDutyCycle[ifaceBidCosRF] != dcNotAvailable) { + dutyCycleValElm.text(arInterfaceDutyCycle[ifaceBidCosRF] + dcUnit); + + width = parseInt(dutyCycleProgressElem.css("width")); + value = width - (width / 100 * arInterfaceDutyCycle[ifaceBidCosRF]); + + dutyCycleProgressBarElm.css("width", value + "px"); + } + }, 50); + }); + + /* Show HmIP HAPs */ + if (typeof arRelevantAddresses == "object" && (arRelevantAddresses.length > 0)) { + var dc = [], counter = [], + lastIndex = elmCounter + 1; + + jQuery.each(arRelevantAddresses, function (index, address) { + counter[index] = lastIndex + index; + dc[index] = parseInt(homematic("Interface.getValue", { + "interface": "HmIP-RF", + "address": address + ":0", + "valueKey": "DUTY_CYCLE_LEVEL" + })); + + if (!isNaN(dc[index])) { + html += ""; + html += ""; + html += ""; + html += ""; + html += ""; + html += ""; + + window.setTimeout(function () { + var dutyCycleProgressElem = jQuery("#dutyCycleProgress_" + counter[index]), + dutyCycleProgressBarElm = jQuery("#dutyCycleProgressBar_" + counter[index]), + dutyCycleValElm = jQuery("#dutyCycleVal" + counter[index]), + trDutyCycle = jQuery("[name='trDutyCycle']"), + dcVal = parseInt(dc[index]), + width, value; + + dcVal = ((dcVal >= 0) && (dcVal <= 100)) ? dcVal : dcNotAvailable; + + if (dcVal != dcNotAvailable) { + dutyCycleValElm.text(dcVal + dcUnit); + + width = parseInt(dutyCycleProgressElem.css("width")); + value = width - (width / 100 * dcVal); + + dutyCycleProgressBarElm.css("width", value + "px"); + } + }, 50); + } + }); + } + /* END HAP's */ + + html += "
"; + html += ""; + + html += ""; + if (iFace.type != "CCU2") { + html += ""; + } else { + html += ""; + } + html += ""; + + html += ""; + html += ""; + html += ""; + + html += "

" + iFace.type + " - " + translateKey('dialogSettingsBidCosRFLblSN') + ": " + iFace.address + "

" + translateKey('LabelCCU') + getProduct() + "

" + dcVal + dcUnit + "
"; + html += "
"; + html += ""; + html += ""; + html += ""; + html += ""; + html += ""; + html += ""; + html += ""; + html += ""; + html += "

" + translateKey('HmIP-HAP') + " - " + translateKey('dialogSettingsBidCosRFLblSN') + ": " + address + "

" + dc[index] + dcUnit + "
"; + html += "
"; + + dlg = new YesNoDialog(translateKey("lblDutyCycle"), html, "", "html"); + dlg.btnNoHide(); + dlg.btnTextYes(translateKey("btnOk")); + }); +}; + +// Show the Carrier Sense of the CCU and all available HAPs +showAllCarrierSense = function(ccuAddress, arHapAddress) { + var csCCU = null, + csHap = null, + csHAPs = [], + csUnit = "%", + html = "", + dlg; + + if ((typeof ccuAddress != "undefined") && (ccuAddress != "")) { + csCCU = homematic("Interface.getValue", { + "interface": "HmIP-RF", + "address": ccuAddress + ":0", + "valueKey": "CARRIER_SENSE_LEVEL" + }); + } + + jQuery.each(arHapAddress, function(index, hapAddress) { + csHap = homematic("Interface.getValue", { + "interface": "HmIP-RF", + "address": hapAddress + ":0", + "valueKey": "CARRIER_SENSE_LEVEL" + }); + csHAPs.push(csHap); + }); + + var getHtml = function(index, address, csVal) { + + var csValUnknown = "--"; + + var lblDev = (index == 0) ? translateKey("LabelCCU") : translateKey('HmIP-HAP'); + lblDev += " - " + translateKey('dialogSettingsBidCosRFLblSN') + ": " + address; + + var csValue = (! isNaN(parseInt(csVal))) ? parseInt(csVal) : csValUnknown, + html = ""; + + if (csValue == csValUnknown) {csUnit = "";} + + html += "
"; + html += ""; + + html += ""; + html += ""; + html += ""; + + html += ""; + html += ""; // CCU Carrier Sense + html += ""; + + html += "

"+ lblDev +"

" + csValue + csUnit + "
"; + html += "

"; + html += getHtml(0, ccuAddress, csCCU); + + jQuery.each(arHapAddress, function(index, hapAddress) { + html += getHtml(index + 1, hapAddress, csHAPs[index]); + }); + + html += "
"; + + dlg = new YesNoDialog(translateKey("lblCarrierSense"), html, "", "html"); + dlg.btnNoHide(); + dlg.btnTextYes(translateKey("btnOk")); + +}; + +encodeStringStatusDisplay = function(elmID, is4Dis, specialSZ) +{ + //Wird zur Zeit nur für die Textzeilen des HM-PB-4Dis-WM und des HM-Dis-WM55 genutzt, + //da dort einige Zeichen im Speicher an anderer Stelle liegen. + var jElm = jQuery("#"+elmID), + inString = jElm.val(), + outString = "", + szKey = "0x5f"; + + conInfo("encodeStringStatusDisplay - inString: " + inString); + + // Beim HM-PB-4Dis-WM wird die Tilde zum Darstellen des ß benutzt. + // Hier ist kein ReGa im Spiel. + // Beim HM-Dis-WM55 ist ReGA im Spiel. Leider wandelt Ise-Script + // die Tilde in ein " um, so daß der generierte String zerstört wird. + // Daher hier die Prüfung .... + szKey = (is4Dis == true) ? "~" : szKey; + + if (specialSZ) { + szKey = specialSZ; + } + + if (is4Dis == true) { + outString = inString.replace(/Ä/g, "["); + outString = outString.replace(/Ö/g, "#"); + outString = outString.replace(/Ü/g, "$"); + outString = outString.replace(/ä/g, "{"); + outString = outString.replace(/ö/g, "|"); + outString = outString.replace(/ü/g, "}"); + outString = outString.replace(/ß/g, szKey); + outString = outString.replace(/&/g, "]"); + outString = outString.replace(/=/g, "'"); + jQuery("#"+elmID.replace(/^_/, "")).val(outString); + return; + } else { + outString = inString.replace(/0xc4/g, "0x5b"); //Ä + outString = outString.replace(/0xd6/g, "0x23"); // Ö + outString = outString.replace(/0xdc/g, "0x24"); // Ü + outString = outString.replace(/0xe4/g, "0x7b"); // ä + outString = outString.replace(/0xf6/g, "0x7c"); // ö + outString = outString.replace(/0xfc/g, "0x7d"); // ü + outString = outString.replace(/0xdf/g, szKey); // ß + outString = outString.replace(/0x26/g, "0x5d"); // & + outString = outString.replace(/0x3d/g, "0x27"); // = + } + jElm.val(outString); +}; + +decodeStringStatusDisplay = function(sString) { + var outString = sString.replace(/\[/g,"Ä"); + outString = outString.replace(/#/g,"Ö"); + outString = outString.replace(/\$/g,"Ü"); + outString = outString.replace(/{/g,"ä"); + outString = outString.replace(/\|/g,"ö"); + outString = outString.replace(/}/g,"ü"); + outString = outString.replace(/\_/g,"ß"); + outString = outString.replace(/\]/g,"&"); + outString = outString.replace(/\'/g,"="); + return outString; +}; + +// For testing only +showInterfaces = function() +{ + var elemInfoPanel = jQuery("#infoPanel"); + if (elemInfoPanel.hasClass('hidden')) { + jQuery("#btnInterfaces").removeClass("hidden").bind("click", function() {showAllInterfaces();}); + elemInfoPanel.removeClass("hidden"); + } +}; + +setReGaBtn = function() { + homematic("ReGa.isPresent", null, function(result) { + //console.log("ReGa is present: " + result + " - typeof result: " + typeof result); + jQuery("#btnRestartReGa").children().first().css("color", "red").html("ReGa
Ready"); + }); +}; + +showHmAPITools = function() +{ + if (getUPL() == UPL_ADMIN) { + var elemInfoPanel = jQuery("#infoPanel"); + if (elemInfoPanel.hasClass('hidden')) { + jQuery("#btnAPITools").removeClass("hidden"); + jQuery("#btnShowAPITools").bind("click", function () { + showAllAPITools(); + }); + elemInfoPanel.removeClass("hidden"); + } + jQuery("#btnRestartReGa").bind("click", function () { + jQuery(this).children().first().css("color", "green"); + homematic("CCU.restartReGa"); + setReGaBtn(); + }); + } +}; + +getParamset = function(method) { + var iFace = jQuery("#iFace").val(), + address = jQuery("#address").val(), + paramsetKey = jQuery("#paramset").val(); + + var paramSet = homematic("Interface." + method, {"interface":iFace, "address" : address, "paramsetKey" : paramsetKey}); + console.log(address + ": " + method + " - " + paramsetKey + "\n", paramSet); +}; + +getDeviceDescription = function(method) { + var iFace = jQuery("#iFace").val(), + address = jQuery("#address").val(); + + homematic("Interface." + method, {"interface":iFace, "address" : address}, function(result) { + // result contains the device description + if (result != null) { + if (address.split(":").length == 1) { + var rfAddress = homematic("Device.getRFAddressByAddress", {'address': address}); + console.log(address + "\n" + rfAddress + " hex: 0x" + parseInt(rfAddress.split(":")[1]).toString(16) + "\n\n" + method + "\n", result); + } else { + console.log(address + ": " + method + "\n", result); + } + } else { + console.log(address + " doesn't exist"); + } + }); +}; + +getRFAddressOfAllDevices = function(method) { + var result = homematic("Device.getRFAddressOfAllDevices"), + arResult = result.split("\n"), + arOut = [], + sOut = ""; + jQuery.each(arResult, function(index,val) { + arOut = val.split("\t"); + if (typeof arOut[1] != "undefined") { + sOut = arOut[0] + " hex: 0x" + parseInt(arOut[0].split(":")[1]).toString(16); + sOut += " - " + arOut[1] + " - " + arOut[2]; + console.log((index + 1) + ": " + sOut); + } + }); +}; + +getAllSysVars = function() { + homematic("SysVar.getAll",{}, function(result) { + console.log(result); + }); +}; + +getAllDataPointIds = function() { + var + devAddress, + arValue, + counter = 0, + style = "color:blue", + tmpDevAddress, + ind, + html = ""; + + + homematic("ReGa.getAllDatapoints",{}, function(result) { + jQuery.each(result, function(index, value){ + arValue = value.split("--"); + ind = (typeof arValue[4] != "undefined") ? 4 : 3; + if (typeof arValue[ind] != "undefined") { // Device address + devAddress = arValue[ind].split(":")[0]; + if (tmpDevAddress != devAddress) { + tmpDevAddress = devAddress; + counter++; + } + style = (counter%2 == 0) ? "color:blue" : "color:red"; + console.log("%c" + translateString(value), style); + //html += "
" + translateString(value) + "
"; + } else { + console.log(translateString(value)); + //html += "
" + translateString(value) + "
"; + } + }); + + //var outWindow = window.open(); + //outWindow.document.write(html); + }); +}; + +getProduct = function() { + // Returns the mayor number of the WEBUI_VERSION + return WEBUI_VERSION.split(".")[0]; +}; + +getDevFirmware = function(addr, iface) { + if (typeof addr == "undefined" ) { + return "x.y.z"; + } + var iFace = (typeof iface == "undefined") ? "HmIP-RF" : iface, + devAddress = addr.split(":")[0], + devDescr = homematic("Interface.getDeviceDescription", { + "interface" : iFace, + "address" : devAddress + }); + + return devDescr.firmware; +}; + +showAllAPITools = function() { + var self = this; + var url = "/tools/HomeMatic-API.html"; + + var req = jQuery.ajax({ + url : url +"?sid=" + SessionId, + cache: false, + dataType: "html" + }); + + req.done(function(htmlContent) { + var boxWidth = 470, + boxHeight = 200; + + if (getUPL() != UPL_ADMIN) { + boxHeight = 105; + } + + MessageBox.show("HomeMatic API - CCU-SN: " + homematic("CCU.getSerial") + " - Address: " + homematic("CCU.getAddress"), htmlContent, null, boxWidth, boxHeight, null, null,translateKey("btnCancel")); + window.setTimeout(function() { + if (getUPL() != UPL_ADMIN) { + jQuery("[name='uLevel8']").remove(); + } else if((window.navigator.userAgent.toLowerCase().indexOf("firefox") == -1) && ((window.navigator.userAgent.toLowerCase().indexOf("chrome")) == -1)) { + jQuery("#allDPIds").hide(); + } + },100); + }); + + req.fail(function() { + alert("Error while loading " + url); + }); +}; + +showAllInterfaces = function() { + var sOutput = ""; + var iface = "Unknown Iface"; + + homematic("Interface.listBidcosInterfaces", {"interface": "BidCos-RF"}, function(interfaceStatus) { + iface = "BidCos-RF"; + if (interfaceStatus) + { + for (var loop = 0; loop < interfaceStatus.length; loop++) { + sOutput += iface + " address: " + interfaceStatus[loop].address; + sOutput += "
"+iface + " type: " + interfaceStatus[loop].type; + sOutput += "
"+iface + " fwVersion: " + interfaceStatus[loop].fwVersion; + sOutput += "
"+iface + " description: " + interfaceStatus[loop].description; + sOutput += "
"+iface + " dutyCycle: " + interfaceStatus[loop].dutyCycle; + sOutput += "
"+iface + " isConnected: " + interfaceStatus[loop].isConnected; + sOutput += "
"+iface + " isDefault: " + interfaceStatus[loop].isDefault; + sOutput += "


"; + } + MessageBox.show(translateKey("dialogAllRFInterfacesTitle"), sOutput, null, 350,150); + } + + homematic("Interface.listBidcosInterfaces", {"interface": "BidCos-Wired"}, function(interfaceStatus) { + iface = "BidCos-Wired"; + if (interfaceStatus) + { + for (var loop = 0; loop < interfaceStatus.length; loop++) { + sOutput += iface + " address: " + interfaceStatus[loop].address; + sOutput += "
"+iface + " type: " + interfaceStatus[loop].type; + sOutput += "
"+iface + " fwVersion: " + interfaceStatus[loop].fwVersion; + sOutput += "
"+iface + " description: " + interfaceStatus[loop].description; + sOutput += "
"+iface + " dutyCycle: " + interfaceStatus[loop].dutyCycle; + sOutput += "
"+iface + " isConnected: " + interfaceStatus[loop].isConnected; + sOutput += "
"+iface + " isDefault: " + interfaceStatus[loop].isDefault; + sOutput += "


"; + } + MessageBox.close(); + MessageBox.show(translateKey("dialogAllRFInterfacesTitle"), sOutput, null, 350,300); + } + + homematic("Interface.listBidcosInterfaces", {"interface": "HmIP-RF"}, function(interfaceStatus) { + iface = "HmIP-RF"; + if (interfaceStatus) + { + for (var loop = 0; loop < interfaceStatus.length; loop++) { + sOutput += iface + " address: " + interfaceStatus[loop].address; + sOutput += "
"+iface + " type: " + interfaceStatus[loop].type; + sOutput += "
"+iface + " fwVersion: " + interfaceStatus[loop].fwVersion; + sOutput += "
"+iface + " description: " + interfaceStatus[loop].description; + sOutput += "
"+iface + " dutyCycle: " + interfaceStatus[loop].dutyCycle; + sOutput += "
"+iface + " isConnected: " + interfaceStatus[loop].isConnected; + sOutput += "
"+iface + " isDefault: " + interfaceStatus[loop].isDefault; + sOutput += "


"; + } + MessageBox.close(); + MessageBox.show(translateKey("dialogAllRFInterfacesTitle"), sOutput, null, 350,300); + } + }); + }); + }); + return sOutput; +}; + +setBtnPress = function(elmId, time) { + var onTime = (time) ? time : 500, + elm = jQuery("#"+elmId); + + elm.removeClass("ControlBtnOff").addClass("ControlBtnOn"); + window.setTimeout(function() {elm.removeClass("ControlBtnOn").addClass("ControlBtnOff");},onTime); +}; + +getExtendedDescription = function(oChannelDescr) { + var result = ""; + var noDescrNecessary = "noDescrNecessary"; + var chType = "unknown"; + var channelAddress = oChannelDescr.channelAddress, + channelRegaID = oChannelDescr.channelID, + deviceType = oChannelDescr.deviceType, + channelType = oChannelDescr.channelType, + channelIndex = parseInt(oChannelDescr.channelIndex), + channelIsVisible = oChannelDescr.isVisible, + multiMode = oChannelDescr.multiMode; + var tmpDev; + + if (typeof channelAddress != "undefined") { + var channel = DeviceList.getChannelByAddress(channelAddress); + if (channel) { + chType = channel.channelType; + channelIsVisible = channel.isVisible; + } + } else if (typeof channelType != "undefined") { + chType = channelType; + } + + if (chType == "KEY_TRANSCEIVER") { + if (deviceType.toLowerCase().indexOf("hmip-asir") != -1) { + result = translateKey("chType_SABOTAGECONTACT"); + } + + if (deviceType.toLowerCase() == "hmip-mod-rc8") { + result = translateKey("chType_MOD_RC8"); + } + + } + + if (chType == "SWITCH_TRANSMITTER") { + var devType = deviceType.toLowerCase(); + if ((devType == "hmip-mod-oc8") || (devType == "elv-sh-sb8")) { + if (devType == "elv-sh-sb8") { + result = translateKey("chType_SWITCH_TRANSMITTER_LED"); + } else { + result = translateKey("chType_SWITCH_TRANSMITTER_OC"); + } + } + } + + // HM-LC-RGBW-WM - special description for the HM-LC-RGBW-WM + /* Uncomment this to hide the channel description of a general dimmer + if (chType == "DIMMER") { + result = (deviceType == "HM-LC-RGBW-WM" ) ? translateKey("chType_DIMMER") : noDescrNecessary; + } + */ + + if (chType == "DIMMER_TRANSMITTER") { + if (deviceType == "HmIP-WUA" || deviceType == "ELV-SH-WUA") { + result = translateKey("chType_UNIVERSAL_ACTOR_TRANSMITTER_010V"); + } + + if (deviceType == "HmIP-BSL") { + result = translateKey("chType_OPTICAL_SIGNAL_RECEIVERB"); + } + } + + if (chType == "DIMMER_VIRTUAL_RECEIVER") { + if (deviceType == "HmIP-WUA" || deviceType == "ELV-SH-WUA") { + result = translateKey("chType_UNIVERSAL_ACTOR_VIRTUAL_RECEIVER_010V"); + } + + if (deviceType == "HmIP-BSL") { + // console.log("B firmware:q! " + getDevFirmware(channelAddress)); + result = translateKey("chType_OPTICAL_SIGNAL_RECEIVER"); + } + } + + if (chType == "SWITCH_VIRTUAL_RECEIVER") { + if ((deviceType.toLowerCase() == "hmip-ps" + || deviceType.toLowerCase() == "hmip-psm" + || deviceType.toLowerCase() == "hmip-psm-pe" + || deviceType.toLowerCase() == "hmip-ps-uk" + || deviceType.toLowerCase() == "hmip-psm-it" + || deviceType.toLowerCase() == "hmip-psm-ch" + ) && (! channelIsVisible)) { + result = translateKey("lblHmIP_NotSupported"); + } else { + if (deviceType.toLowerCase() == "elv-sh-sb8") { + result = translateKey("chType_SWITCH_VIRTUAL_RECEIVER_LED"); + } else { + result = translateKey("chType_SWITCH_VIRTUAL_RECEIVER"); + } + } + } + + if (chType == "SWITCH_SENSOR") { + tmpDev = deviceType.toLowerCase(); + if (tmpDev == "hm-sec-sir-wm" && channelIndex == 1) { + result = translateKey("chType_SWITCH_SENSOR_Int"); + } else if (tmpDev == "hm-sec-sir-wm" && channelIndex == 2) { + result = translateKey("chType_SWITCH_SENSOR_Ext"); + } + } + + if (chType == "COND_SWITCH_TRANSMITTER") { + tmpDev = deviceType.toLowerCase(); + + switch (tmpDev) { + case "hmip-stho": + case "hmip-stho-a": + case "elv-sh-cth": + if (channelIndex == 2) result = translateKey("chType_COND_TEMPERATURE"); + if (channelIndex == 3) result = translateKey("chType_COND_HUMIDITY"); + break; + case "hmip-scth230": + if (channelIndex == 2) result = translateKey("chType_COND_CO2"); + if (channelIndex == 3) result = translateKey("chType_COND_CO2"); + if (channelIndex == 5) result = translateKey("chType_COND_TEMPERATURE"); + if (channelIndex == 6) result = translateKey("chType_COND_HUMIDITY"); + break; + } + } + + if (chType == "LEVEL_COMMAND_TRANSMITTER_CO2") { + result = translateKey("chType_COND_CO2"); + } + + if (chType == "LEVEL_COMMAND_TRANSMITTER_HUMIDITY") { + result = translateKey("chType_COND_HUMIDITY"); + } + + if (chType == "LEVEL_COMMAND_TRANSMITTER_TEMPERATURE") { + result = translateKey("chType_COND_TEMPERATURE"); + } + + if (chType == "PASSAGE_DETECTOR_DIRECTION_TRANSMITTER") { + if (channelIndex == 2) result = translateKey("chType_PASSAGE_DETECTOR_DIRECTION_TRANSMITTER_RL"); + if (channelIndex == 3) result = translateKey("chType_PASSAGE_DETECTOR_DIRECTION_TRANSMITTER_LR"); + } + + if (chType == "ROTARY_CONTROL_TRANSCEIVER") { + if (deviceType.toLowerCase() == "hmip-wrcr") { + if (channelIndex == 2) result = translateKey("chType_ROTARY_CONTROL_TRANSCEIVER_TR"); + if (channelIndex == 3) result = translateKey("chType_ROTARY_CONTROL_TRANSCEIVER_TL"); + } + } + + if (chType == "DOOR_RECEIVER") { + switch ( deviceType.toLowerCase()) { + case "hmip-mod-tm": + result = translateKey("chType_DOOR_RECEIVER_MOD_TM"); + break; + case "hmip-mod-ho": + result = translateKey("chType_DOOR_RECEIVER_MOD_HO"); + break; + } + } + + if (chType == "SIMPLE_SWITCH_RECEIVER") { + switch ( deviceType.toLowerCase()) { + case "hmip-mod-tm": + result = translateKey("chType_SIMPLE_SWITCH_RECEIVER_MOD_TM"); + break; + case "hmip-mod-ho": + result = translateKey("chType_SIMPLE_SWITCH_RECEIVER_MOD_HO"); + break; + } + } + + if (chType == "MULTI_MODE_INPUT_TRANSMITTER") { + var getMode = false, + typeExt = ""; + + if (typeof channelRegaID != "undefined") { + getMode = true; + } else if (typeof channel != "undefined" ) { + channelRegaID = channel.id; + getMode = true; + } + + if (getMode) { + if ((multiMode != "--") && (typeof multiMode != "undefined")) { + typeExt = "_" + multiMode; + } else { + if (channelAddress != "undefined") { + var chn = DeviceList.getChannelByAddress(channelAddress), + chnMode = parseInt(chn.multiMode); + if (! isNaN(chnMode)) { + typeExt = "_" + chnMode; + } else { + typeExt = ""; + } + } else { + typeExt = "_1"; + } + } + } + result = translateKey("chType_MULTI_MODE_INPUT_TRANSMITTER" + typeExt); + } + + if (((deviceType.indexOf("HmIPW-") != -1) && (chType.indexOf("BLIND_") != -1)) + || (deviceType.toLowerCase() == "hmip-drbli4") + || (deviceType.toLowerCase() == "hmip-bbl-2") + ) { + + if (chType == "BLIND_WEEK_PROFILE") { + result = translateKey("chType_BLIND_WEEK_PROFILE"); + } else { + if (typeof channel != "undefined") { + var virtChannelType = channel.getVirtChannelType(), + devMode = virtChannelType.split("_")[0].toLowerCase(); + result = (devMode == "shutter") ? translateKey("chType_" + chType.replace("BLIND", "SHUTTER")) : translateKey("chType_" + chType.replace("SHUTTER", "BLIND")); + } + } + } + + if ((chType == "COND_SWITCH_TRANSMITTER_TEMPERATURE") && (deviceType.toLowerCase() == "hmip-ste2-pcb")) { + if (channelIndex == 3) { + result = translateKey("chType_COND_SWITCH_TRANSMITTER_TEMPERATURE_DIFF"); + } + } + + if ((chType == "COND_SWITCH_TRANSMITTER_PARTICULATE_MATTER") && (deviceType.toLowerCase() == "hmip-sfd")) { + if (channelIndex == 4) { + result = translateKey("chType_COND_SWITCH_TRANSMITTER_PARTICULATE_MATTER25"); + } + + if (channelIndex == 5) { + result = translateKey("chType_COND_SWITCH_TRANSMITTER_PARTICULATE_MATTER100"); + } + + if (channelIndex == 6) { + result = translateKey("chType_COND_SWITCH_TRANSMITTER_PARTICULATE_MATTER10"); + } + + } + + if (chType == "OPTICAL_SIGNAL_RECEIVER") { + //HmIPW-WRC6 - ch. 13 activates all keys + result = (channelIndex < 13) ? translateKey("chType_OPTICAL_SIGNAL_RECEIVER") : translateKey("chType_OPTICAL_SIGNAL_RECEIVERA"); + } + + if (chType == "ACCESS_RECEIVER") { + if ((deviceType.toLowerCase() == "hmip-dld") || (deviceType.toLowerCase() == "hmip-dld-a") || (deviceType.toLowerCase() == "hmip-dld-s") ) { + result = translateKey("chType_ACCESS_RECEIVER") + " " + (channelIndex - 1); + } + } + + if (chType == "DOOR_LOCK_STATE_TRANSMITTER") { + if ((deviceType.toLowerCase() == "hmip-dld") || (deviceType.toLowerCase() == "hmip-dld-a") || (deviceType.toLowerCase() == "hmip-dld-s") ) { + result = translateKey("chType_DOOR_LOCK_STATE_TRANSMITTER"); + } + } + + if (chType == "SERVO_TRANSMITTER") { + if (deviceType.toLowerCase() == "hmip-wsc") { + result = translateKey("chType_SERVO_TRANSMITTER"); + } + } + + if (chType == "SERVO_VIRTUAL_RECEIVER") { + if (deviceType.toLowerCase() == "hmip-wsc") { + result = translateKey("chType_SERVO_VIRTUAL_RECEIVER"); + } + } + + if (chType == "ACCESS_TRANSCEIVER") { + if (deviceType.toLowerCase() == "hmip-fwi") { + tmpfCounter = (typeof tmpfCounter == "undefined") ? 1 : tmpfCounter; + result = translateKey("lblUser") + " " + tmpfCounter + " "; + tmpfCounter++; + if (typeof tmpfTimer == "undefined") { + tmpfTimer = window.setTimeout(function () { + delete tmpfCounter; + delete tmpfTimer; + }, 1000); + } + } + + if (deviceType.toLowerCase() == "hmip-wkp") { + tmpCounter = (typeof tmpCounter == "undefined") ? 1 : tmpCounter; + result = translateKey("lblUser") + " " + tmpCounter + " "; + + if (channelIndex % 2 != 0) { + result += translateKey("chType_ACCESS_TRANSCEIVER_LOCk"); + } else { + result += translateKey("chType_ACCESS_TRANSCEIVER_UNLOCk"); + tmpCounter++; + } + + if (typeof tmpTimer == "undefined") { + tmpTimer = window.setTimeout(function () { + delete tmpCounter; + delete tmpTimer; + }, 1000); + } + //result += (channelIndex % 2 == 0) ? translateKey("chType_ACCESS_TRANSCEIVER_UNLOCk") : translateKey("chType_ACCESS_TRANSCEIVER_LOCk"); + } + } + + if ((chType == "DISPLAY_INPUT_TRANSMITTER") && (deviceType.toLowerCase() == "hmipw-wgd" || deviceType.toLowerCase() == "hmipw-wgd-pl")) { + var oddChn = [1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39, 41]; + jQuery.each(oddChn, function(index, value) { + if (channelIndex == value) { + if (channelIndex <=7) { + result = translateKey("chType_DISPLAY_SCREEN") + " 1 - " + translateKey("chType_DISPLAY_TILE") + " " + (index + 1) + translateKey("chType_DISPLAY_KEY"); + return; // leave each loop + } else if (channelIndex >=9 && channelIndex <= 15) { + result = translateKey("chType_DISPLAY_SCREEN") + " 2 - " + translateKey("chType_DISPLAY_TILE") + " " + (index -3) + translateKey("chType_DISPLAY_KEY"); + return; // leave each loop + } else if (channelIndex >=17 && channelIndex <= 23) { + result = translateKey("chType_DISPLAY_SCREEN") + " 3 - " + translateKey("chType_DISPLAY_TILE") + " " + (index - 7) + translateKey("chType_DISPLAY_KEY"); + return; // leave each loop + } else if (channelIndex >=25 && channelIndex <= 31) { + result = translateKey("chType_DISPLAY_SCREEN") + " 4 - " + translateKey("chType_DISPLAY_TILE") + " " + (index - 11) + translateKey("chType_DISPLAY_KEY"); + return; // leave each loop + } else if (channelIndex >=33 && channelIndex <= 39) { + result = translateKey("chType_DISPLAY_SCREEN") + " 5 - " + translateKey("chType_DISPLAY_TILE") + " " + (index - 15) + translateKey("chType_DISPLAY_KEY"); + return; // leave each loop + } else if (channelIndex == 41) { + result = translateKey(("chType_DISPLAY_UNKNOWN")); + } + } + }); + } + + if ((chType == "DISPLAY_LEVEL_INPUT_TRANSMITTER") && (deviceType.toLowerCase() == "hmipw-wgd" || deviceType.toLowerCase() == "hmipw-wgd-pl")) { + var evenChn = [2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40]; + + jQuery.each(evenChn, function(index, value) { + if (channelIndex == value) { + if (channelIndex <= 8) { + result = translateKey("chType_DISPLAY_SCREEN") + " 1 - " + translateKey("chType_DISPLAY_TILE") + " " + (index + 1) + translateKey("chType_DISPLAY_LEVEL"); + return; // leave each loop + } else if (channelIndex >= 10 && channelIndex <= 16) { + result = translateKey("chType_DISPLAY_SCREEN") + " 2 - " + translateKey("chType_DISPLAY_TILE") + " " + (index - 3) + translateKey("chType_DISPLAY_LEVEL"); + return; // leave each loop + } else if (channelIndex >= 18 && channelIndex <= 24) { + result = translateKey("chType_DISPLAY_SCREEN") + " 3 - " + translateKey("chType_DISPLAY_TILE") + " " + (index - 7) + translateKey("chType_DISPLAY_LEVEL"); + return; // leave each loop + } else if (channelIndex >= 26 && channelIndex <= 32) { + result = translateKey("chType_DISPLAY_SCREEN") + " 4 - " + translateKey("chType_DISPLAY_TILE") + " " + (index - 11) + translateKey("chType_DISPLAY_LEVEL"); + return; // leave each loop + } else if (channelIndex >= 34 && channelIndex <= 40) { + result = translateKey("chType_DISPLAY_SCREEN") + " 5 - " + translateKey("chType_DISPLAY_TILE") + " " + (index - 15) + translateKey("chType_DISPLAY_LEVEL"); + return; // leave each loop + } + } + }); + } + + if ((chType == "DISPLAY_THERMOSTAT_INPUT_TRANSMITTER") && (deviceType.toLowerCase() == "hmipw-wgd" || deviceType.toLowerCase() == "hmipw-wgd-pl")) { + var oddChn = [43,45,47,49,51], + evenChn = [42,44,46,48,50]; + + jQuery.each(oddChn, function(index, value) { + if (channelIndex == value) { + result = translateKey("chType_DISPLAY_SCREEN") + " " + (index + 6) + " - " + translateKey("chType_DISPLAY_TILE") + " 2" + translateKey("chType_DISPLAY_CLIMATE"); + return; // leave each loop + } + }); + + jQuery.each(evenChn, function(index, value) { + if (channelIndex == value) { + result = translateKey("chType_DISPLAY_SCREEN") + " " + (index + 6) + " - " + translateKey("chType_DISPLAY_TILE") + " 1" + translateKey("chType_DISPLAY_CLIMATE"); + return; // leave each loop + } + }); + } + + if ((deviceType.toLowerCase() == "hmip-drg-dali") && ((chType == "MAINTENANCE") || (chType == "UNIVERSAL_LIGHT_RECEIVER"))) { + result = translateKey("chType_DALI_UNIVERSAL_LIGHT_RECEIVER"); + if (channelIndex > 32) { + result += "
" + translateKey("lblGroup") + " " + (channelIndex - 32); + } + } + + if ((deviceType.toLowerCase().includes("hmip-smo230")) || (deviceType.toLowerCase().includes("hmipw-smo230"))) { + var arAppendix = ["", "LEFT", "RIGHT", "BOTTOM", "VIRTUEL", "ZONE1", "ZONE2", "ZONE3", "VIRTUEL"]; + + if ((channelIndex >= 1) && (channelIndex <= 8)) { + result = translateKey("chType_" + chType + "_" + arAppendix[channelIndex]); + } + } + + if (chType == "CLIMATE_TRANSCEIVER") { + if (deviceType == "ELV-SH-TACO") { + result = translateKey("chType_CLIMATE_TRANSCEIVER_TEMP"); + } + } + + /* Uncomment this to hide the channel description of a particular channel type + if (chType == "KEY") { + result = noDescrNecessary; + } + */ + + if (result == "") {result = translateKey("chType_" + chType);} + if (result == noDescrNecessary) {result = "";} + return (result.split("_")[0] == "chType") ? "" : result; +}; + +getElemCenterPos = function(jElemStr) { + var elmWindow = jQuery(window), + elm = jQuery(jElemStr), + viewPortHeight = elmWindow.height(), + viewPortWidth = elmWindow.width(), + elmHeight = elm.height(), + elmWidth = elm.width(); + + return { + "top" : ((viewPortHeight / 2) - (elmHeight / 2)) + "px", + "left" : ((viewPortWidth / 2) - (elmWidth / 2)) + "px" + }; + +}; + +getVerticalCenterPos = function(jElemStr) { + var viewPortHeight = jQuery(window).height(), + elemHeight = jQuery(jElemStr).height(); + return ((viewPortHeight / 2) - (elemHeight / 2)) + "px"; +}; + +getHorizontalCenterPos = function(jElemStr) { + var viewPortWidth = jQuery(window).width(), + elemWidth = jQuery(jElemStr).width(); + return ((viewPortWidth / 2) - (elemWidth / 2)) + "px"; +}; + +getDefaultPartyModeString = function() { + var curDate = new Date(), + partyTemp = "21", + strPartyMode = ""; + + strPartyMode += partyTemp + ","; + strPartyMode += (parseInt(curDate.getHours()) + 1) * 60 + ","; + strPartyMode += curDate.getDate() + ","; + strPartyMode += curDate.getMonth() + 1 + ","; + strPartyMode += curDate.getFullYear() - 2000 + ","; + + strPartyMode += (parseInt(curDate.getHours()) + 3) * 60 + ","; + strPartyMode += curDate.getDate() + ","; + strPartyMode += curDate.getMonth() + 1 + ","; + strPartyMode += curDate.getFullYear() - 2000; + + return strPartyMode; +}; + +isIPv4AddressValid = function(ipAddress) { + var validator = /^(\d|[1-9]\d|1\d\d|2([0-4]\d|5[0-5]))\.(\d|[1-9]\d|1\d\d|2([0-4]\d|5[0-5]))\.(\d|[1-9]\d|1\d\d|2([0-4]\d|5[0-5]))\.(\d|[1-9]\d|1\d\d|2([0-4]\d|5[0-5]))$/; + return ipAddress.match(validator); +}; + +// This validates IPv4 (e. g. 192.168.0.1 or 192.168.0.0/16 - whereas the /16 is cut off and not examined) AND IPv6 addresses +isIPAddressValid = function(ipAddress) { + ipAddress = ipAddress.split("/")[0]; + var validator = /^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-zA-Z]|[a-zA-Z][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z]|[A-Za-z][A-Za-z0-9\-]*[A-Za-z0-9])$|^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/; + return ipAddress.match(validator); +}; + +isSubnetMaskValid = function(subNet) { + var validator = /^(((255\.){3}(255|254|252|248|240|224|192|128|0+))|((255\.){2}(255|254|252|248|240|224|192|128|0+)\.0)|((255\.)(255|254|252|248|240|224|192|128|0+)(\.0+){2})|((255|254|252|248|240|224|192|128|0+)(\.0+){3}))$/g; + return subNet.match(validator); +}; + +// Currently this function checks, if the device or channel is an coupling device/channel, e. g. OSRAM-Lightify device or an OSRAM-Lightify gateway +// The parameter is either a device object, channel object or a label +isNonCCUDevice = function(dev_chn_lbl) { + var result = false; + + // Check if this an coupling device, e. g OSRAM-Lightify device + if (dev_chn_lbl.typeName != undefined) { + var headChannelType = dev_chn_lbl.typeName.slice(0,7), + isGatewayLightify = dev_chn_lbl.typeName.match("VIR-OL-GTW"), + isGatewayHue = dev_chn_lbl.typeName.match("VIR-HUE-GTW"); + result = ( + (headChannelType == "VIR-LG-") + || isGatewayLightify != null + || isGatewayHue != null + ) ? true : false; + } else if (typeof dev_chn_lbl == "string") { + result = ( + (dev_chn_lbl.slice(0,7) == "VIR-LG-") + || (dev_chn_lbl.match("VIR-OL-GTW") != null) + || (dev_chn_lbl.match("VIR-HUE-GTW") != null) + ) ? true : false; + } + return result; +}; + +// Currently this function checks, if the device or channel is a coupling gateway (e. g. OSRAM-Lightify) +// For more tests this function must be extended. +isNonCCUGateway = function(oDevChn) { + var result = false; + if (oDevChn != undefined) { + result = ( + (oDevChn.typeName.match("VIR-OL-GTW") != undefined) + || (oDevChn.typeName.match("VIR-HUE-GTW") != undefined) + ) ? true : false; + } + return result; +}; + +isDevTypeHmIPW = function(type) { + return (type.indexOf("HmIPW-") != -1) ? true : false; +}; + +// Global object for the diagrams of the dual white controller +getDualWhiteControllerDiagramURLs = function() { + if (typeof dualWhiteControllerDiagramURL != "object") { + var path = "/ise/img/icons_hm_lc_dw/"; + dualWhiteControllerDiagramURL = {}; + + dualWhiteControllerDiagramURL["0000"] = path + "Crossfade_linear_konstant_niedrigistwarm.png"; + dualWhiteControllerDiagramURL["0001"] = path + "Crossfade_linear_konstant_niedrigistkalt.png"; + dualWhiteControllerDiagramURL["0010"] = path + "Crossfade_linear_maximal_niedrigistwarm.png"; + dualWhiteControllerDiagramURL["0011"] = path + "Crossfade_linear_maximal_niedrigistkalt.png"; + dualWhiteControllerDiagramURL["0100"] = path + "Crossfade_quadratisch_konstant_niedrigistwarm.png"; + dualWhiteControllerDiagramURL["0101"] = path + "Crossfade_quadratisch_konstant_niedrigistkalt.png"; + dualWhiteControllerDiagramURL["0110"] = path + "Crossfade_quadratisch_maximal_niedrigistwarm.png"; + dualWhiteControllerDiagramURL["0111"] = path + "Crossfade_quadratisch_maximal_niedrigistkalt.png"; + + dualWhiteControllerDiagramURL["1000"] = path + "Dim2Warm_linear_halb_niedrigistwarm.png"; + dualWhiteControllerDiagramURL["1001"] = path + "Dim2Warm_linear_halb_niedrigistkalt.png"; + dualWhiteControllerDiagramURL["1010"] = path + "Dim2Warm_linear_maximal_niedrigistwarm.png"; + dualWhiteControllerDiagramURL["1011"] = path + "Dim2Warm_linear_maximal_niedrigistkalt.png"; + dualWhiteControllerDiagramURL["1100"] = path + "Dim2Warm_quadratisch_halb_niedrigistwarm.png"; + dualWhiteControllerDiagramURL["1101"] = path + "Dim2Warm_quadratisch_halb_niedrigistkalt.png"; + dualWhiteControllerDiagramURL["1110"] = path + "Dim2Warm_quadratisch_maximal_niedrigistwarm.png"; + dualWhiteControllerDiagramURL["1111"] = path + "Dim2Warm_quadratisch_maximal_niedrigistkalt.png"; + + dualWhiteControllerDiagramURL["2000"] = path + "Dim2Hot_linear_halb_niedrigistwarm.png"; + dualWhiteControllerDiagramURL["2001"] = path + "Dim2Hot_linear_halb_niedrigistkalt.png"; + dualWhiteControllerDiagramURL["2010"] = path + "Dim2Hot_linear_maximal_niedrigistwarm.png"; + dualWhiteControllerDiagramURL["2011"] = path + "Dim2Hot_linear_maximal_niedrigistkalt.png"; + dualWhiteControllerDiagramURL["2100"] = path + "Dim2Hot_quadratisch_halb_niedrigistwarm.png"; + dualWhiteControllerDiagramURL["2101"] = path + "Dim2Hot_quadratisch_halb_niedrigistkalt.png"; + dualWhiteControllerDiagramURL["2110"] = path + "Dim2Hot_quadratisch_maximal_niedrigistwarm.png"; + dualWhiteControllerDiagramURL["2111"] = path + "Dim2Hot_quadratisch_maximal_niedrigistkalt.png"; + } +}; + +setPositionAllDevices = function() { + if (ConfigData.isPresent) { + + homematic("system.getPositionData", {}, function(posData) { + var lon = posData[0].split(":")[1], + lat = posData[1].split(":")[1], + utcOffset = posData[2].split(":")[1], + utcOffsetDST = posData[3].split(":")[1]; + + jQuery.each(DeviceList.devices, function (index, device) { + var iFace = device.interfaceName; + if ((iFace.toLowerCase() == "hmip-rf") && (device.typeName.toLowerCase() != "hmip-rcv-50") && (device.typeName.toLowerCase() != "hmip-dld") && (device.typeName.toLowerCase() != "hmip-dld-a") && (device.typeName.toLowerCase() != "hmip-dld-s") ) { + // Check if the device has the channel *_WEEK_PROFILE + jQuery.each(device.channels, function (index, channel) { + if (channel.channelType.indexOf("_WEEK_PROFILE") != -1) { + conInfo("Set utcOffsets+position of this device: " + channel.address.split(":")[0] + ":0 - lon: " + lon + " - lat: " + lat + " - utcOffset: " + utcOffset + " - utcOffsetDST: " + utcOffsetDST ); + + homematic("Interface.putParamset", { + 'interface': iFace, + 'address': channel.address.split(":")[0] + ":0", + 'paramsetKey': 'MASTER', + 'set': + [ + {name: 'LONGITUDE', type: 'double', value: lon}, + {name: 'LATITUDE', type: 'double', value: lat}, + {name: 'UTC_OFFSET', type: 'double', value: utcOffset}, + {name: 'UTC_DST_OFFSET', type: 'double', value: utcOffsetDST} + ] + }, function (result) { + conInfo(result); + }); + } else if (channel.channelType == "HEATING_CLIMATECONTROL_TRANSCEIVER") { + conInfo("Set utcOffsets of this device: " + channel.address.split(":")[0] + ":0 - utcOffset: " + utcOffset + " - utcOffsetDST: " + utcOffsetDST ); + + homematic("Interface.putParamset", { + 'interface': iFace, + 'address': channel.address.split(":")[0] + ":0", + 'paramsetKey': 'MASTER', + 'set': + [ + {name: 'UTC_OFFSET', type: 'double', value: utcOffset}, + {name: 'UTC_DST_OFFSET', type: 'double', value: utcOffsetDST} + ] + }, function (result) { + conInfo(result); + }); + } + }); + } + }); + }); + } else { + window.setTimeout(function() { + conInfo("ConfigData.isPresent: " + ConfigData.isPresent); + counterSetPosition++; + if (counterSetPosition < 30) { + setPositionAllDevices(); + } + }, 2500); + } +}; + +setNewDevicePos2SystemPos = function(oDevice) { + homematic("system.getPositionData", {}, function(posData) { + var lon = posData[0].split(":")[1], + lat = posData[1].split(":")[1], + utcOffset = posData[2].split(":")[1], + utcOffsetDST = posData[3].split(":")[1]; + + var iFace = oDevice.iface; + if (iFace.toLowerCase() == "hmip-rf" && (oDevice.type.toLowerCase() != "hmip-rcv-50") && (oDevice.type.toLowerCase() != "hmip-dld") && (oDevice.type.toLowerCase() != "hmip-dld-a") && (oDevice.type.toLowerCase() != "hmip-dld-s")) { + // Check if the device has the channel *_WEEK_PROFILE + jQuery.each(oDevice.chnTypes, function (index, channelType) { + if (channelType.indexOf("_WEEK_PROFILE") != -1) { + conInfo("Set the position of this device: " + oDevice.sn +":0 - lon: " + lon + " - lat: " + lat ); + + homematic("Interface.putParamset", { + 'interface': iFace, + 'address': oDevice.sn + ":0", + 'paramsetKey': 'MASTER', + 'set': + [ + {name: 'LONGITUDE', type: 'double', value: lon}, + {name: 'LATITUDE', type: 'double', value: lat}, + {name: 'UTC_OFFSET', type: 'double', value: utcOffset}, + {name: 'UTC_DST_OFFSET', type: 'double', value: utcOffsetDST} + ] + }, function (result) { + conInfo(result); + }); + return false ; // leave jQuery.each + } + }); + } + }); +}; + +setColorWebUI = function() { + var colorKeys = [ + "background", + "activeBackground", + "contentBackground", + "white" + ]; + + var counter = 0, + copyFile = 0; + + var modifiyColorMap = function () { + copyFile = ((counter + 1) == dlg.key.length) ? 1 : 0; + homematic("WebUI.setWebUIColors", {"key": colorKeys[counter], "color": dlg.key[counter], "cpFile" : copyFile}, function (result) { + counter++; + if (counter == colorKeys.length) { + window.location.reload(); + } else { + modifiyColorMap(); + } + }); + }; + + var html = ""; + jQuery.each(colorKeys, function(index, val) { + html += ""; + }); + + html += "
"+val+"
"; + + dlg = new YesNoDialog(translateKey("SetWebUIScheme"), html, function(result) { + if ((result == YesNoDialog.RESULT_YES)) { + modifiyColorMap(); + } + }, "html"); + + dlg.key = []; + dlg.btnYesHide(); + dlg.btnTextNo(translateKey("btnCancel")); + dlg.btnTextYes(translateKey("btnOk")); + + dlg.run = function() { + jQuery.each(colorKeys, function(index, val) { + jQuery("#colorPicker_"+val).spectrum({ + preferredFormat: 'hex', + //showInput: true, + color: WebUI.getColor(val), + //showPalette: true, + cancelText: translateKey('btnCancel'), + chooseText: translateKey('btnOk'), + + show: function () { + jQuery("#colorPicker_" + val).val(WebUI.getColor(val)); + dlg.btnYesHide(); + }, + hide: function (color) { + dlg.changeColor = true; + dlg.btnYesShow(); + dlg.key[index] = color.toHexString(); + } + }); + }); + }; + dlg.run(); + dlg.resetHeight(); +}; + +function activateDeviceBetaFw() { + var showBetaDevFw = jQuery("#inputShowBetaFw").is(":checked"), + fieldTestActive = "/etc/config/fieldTestActive"; + + if (showBetaDevFw) { + if (! homematic('CCU.existsFile', {'file': fieldTestActive})) { + homematic("CCU.createFile", {'file': fieldTestActive}); + } + } else { + if (homematic('CCU.existsFile', {'file': fieldTestActive})) { + homematic("CCU.removeFieldTestActive"); + } + } +}; + + +/** + * + * Tmporarily introduced with the HmIP-RGBW - this may not be the best place here + * + */ + +// `hsvToRgb` +// Converts an HSV color value to RGB. +// *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100] +// *Returns:* { r, g, b } in the set [0, 255] + +function isOnePointZero(n) { + return typeof n == "string" && n.indexOf('.') != -1 && parseFloat(n) === 1; +} + +// Check to see if string passed in is a percentage +function isPercentage(n) { + return typeof n === "string" && n.indexOf('%') != -1; +}; + + +function bound01(n, max) { + if (isOnePointZero(n)) { n = "100%"; } + + var processPercent = isPercentage(n); + n = Math.min(max, Math.max(0, parseFloat(n))); + + // Automatically convert percentage into number + if (processPercent) { + n = parseInt(n * max, 10) / 100; + } + + // Handle floating point rounding errors + if ((Math.abs(n - max) < 0.000001)) { + return 1; + } + + // Convert into [0, 1] range if it isn't already + return (n % max) / parseFloat(max); +}; + + +function hsvToRgb(h, s, v) { + + h = bound01(h, 360) * 6; + s = bound01(s, 100); + v = bound01(v, 100); + + var i = Math.floor(h), + f = h - i, + p = v * (1 - s), + q = v * (1 - f * s), + t = v * (1 - (1 - f) * s), + mod = i % 6, + r = [v, q, p, p, t, v][mod], + g = [t, v, v, q, p, p][mod], + b = [p, p, t, v, v, q][mod]; + + return { r: r * 255, g: g * 255, b: b * 255 }; +};/** + * Created by grobelnik on 01.08.2016. + */ + + +iseAcousticDisplayReceiver = Class.create(); + +iseAcousticDisplayReceiver.prototype = { + initialize: function (id, chnAddress, iface) { + var self = this; + this.id = id; + + statusDisplayDialog = new StatusDisplayDialogAcousticEPaper(translateKey("statusDisplayDialogTitle"), this._getAnchor(), "", function (result) { + if (result == this.RESULT_YES) { + var configString = this.getConfigString(); + //conInfo("statusDisplayDialog configString: " + configString); + + if (configString.length > 0) { + conInfo("Set the display"); + setDpState(self.id, configString); + } else { + conInfo("Don't set the display"); + } + } + },"html"); + + }, + + _getAnchor: function() { + return "" + + "" + + "" + + "
"; + } +}; +/** + * ise/debug_funcs.js + **/ + +/** + * @fileOverview Debug-Funktionen + * @author ise + **/ + +debugAddMsg = function() { + if(typeof(eventLogSystem) == "undefined") { + $("dbgLog").innerHTML = "eventLogSystem -> undefined"; + } + else { + $("dbgLog").innerHTML = "calling eventLogSystem.add()"; + eventLogSystem.add("10.07.2007 12:15", "Wetterstation", "LowBat"); + } +}; + +createDebugAlarmMsgs = function() { + + var table = Builder.node("table", {id:"tblDebugAlarms", style: "width:100%;color:Black;"}); + var colgroup = Builder.node("colgroup"); + var col1 = Builder.node("col", {width: "25%"}); + var col2 = Builder.node("col", {width: "50%"}); + var col3= Builder.node("col", {width: "25%"}); + colgroup.appendChild(col1); + colgroup.appendChild(col2); + colgroup.appendChild(col3); + table.appendChild(colgroup); + // Zeile 1 erstellen + var tbody = Builder.node("tbody"); + var tr = Builder.node("tr"); + var td1 = Builder.node("td", {}, "01.03. 13:22"); + var td2 = Builder.node("td", {}, "Bewegungsmelder - Eingang"); + var td3 = Builder.node("td", {}, "Low Bat"); + + // Zeile 1 hinzufügen + tr.appendChild(td1); + tr.appendChild(td2); + tr.appendChild(td3); + tbody.appendChild(tr); + + // Zeile 2 erstellen + tr = Builder.node("tr"); + td1 = Builder.node("td", {}, "01.03. 13:19"); + td2 = Builder.node("td", {}, "Kombi-Wettersensor"); + td3 = Builder.node("td", {}, "Empfangsausfall"); + + // Zeile 2 hinzufügen + tr.appendChild(td1); + tr.appendChild(td2); + tr.appendChild(td3); + + tbody.appendChild(tr); + + tr = Builder.node("tr");td1 = Builder.node("td", {}, "01.03. 13:44");td2 = Builder.node("td", {}, "Mülleimer");td3 = Builder.node("td", {}, "Voll");tr.appendChild(td1);tr.appendChild(td2);tr.appendChild(td3); + tbody.appendChild(tr); + tr = Builder.node("tr");td1 = Builder.node("td", {}, "01.03. 13:45");td2 = Builder.node("td", {}, "Badewanne");td3 = Builder.node("td", {}, "Übergelaufen");tr.appendChild(td1);tr.appendChild(td2);tr.appendChild(td3); + tbody.appendChild(tr); + + table.appendChild(tbody); + + if( $('logAlarms') ) + { + $('logAlarms').appendChild(table); + } +}; + +debugCreatePopup = function() { + var s = $("dbgSelect").options[$("dbgSelect").selectedIndex].text; + var type = 0; + if (s == "ID_INSERT_VALUE") + type = 1; + if (s == "ID_INSERT_STRING") + type = 2; + CreatePopup(eval(s), type); +}; + +debugForcePos = function() { + if ($("btnRoomsSub")) { + var topCoords = Position.positionedOffset($("btnRooms")); + var offsetCoords = Position.positionedOffset($("subOffsetDiv")); + var dimTop = $("btnRooms").getDimensions(); + + $("btnRoomsSub").style.top = topCoords[1] - offsetCoords[1] + dimTop.height; + $("btnRoomsSub").style.left = topCoords[0] - offsetCoords[0] - 5; + $("btnRoomsSub").show(); + } +}; + +debugShowFilters = function() { + if (typeof(filterOptions) != 'undefined') { + var s = ""; + for (var i = 0; i < filterOptions.filters.length; i++) { + s += filterOptions.filters[i]["id"] + "\n"; + } + if(dbg)alert(s); + } + else { + if(dbg)alert("No filter options"); + } +}; + +showTimemodule = function() { + CreatePopup(ID_TIMEMODULE, $("tmID").value); +};/** + * ise/iseFilter.js + **/ + +/** + * @fileOverview Speichert und verwaltet Filter-Kriterien für Listen-Ansichten + * @author Michael Niehaus (ise) + **/ + +// file: iseFilter +// author: Michael Niehaus +// date created: 15.05.2007 +// +// speichert und verwaltet Filter-Kriterien für Listen-Ansichten +FLT_OBJ_TYP_VARS = 1; +bFilterUsed = false; + +/** + * @class + **/ +iseFilter = Class.create(); +iseFilter.prototype = { + initialize: function(sPageId, fltObjType) { + this.filRooms = ""; + this.filFuncs = ""; + this.filType = ""; + this.filDesc = ""; + this.filSn = ""; + this.filName = ""; + this.filUnit = ""; + this.filChnLink = ""; + this.filVarTypes = ""; + this.filTime = ""; + this.filDate = ""; + this.bSend = false; + this.bRec = false; + this.bStd = false; + this.bSafe = false; + this.bTypeLogic = false; + this.bTypeValueList = false; + this.bTypeNumber = false; + this.bTypeAlarm = false; + this.bTypeString = false; + this.bColLeft = false; + this.bColCenter = false; + this.bNameLeft = false; + this.bNameTop = false; + this.bPC = false; + this.bPDA = false; + this.bCentral = false; + this.filUsers = ""; + this.pageID = sPageId; + this.fltObjType = 0; + if (fltObjType) + this.fltObjType = fltObjType; + + var self = this; + function fltrHandler() { + eQ3.HomeMatic.Event.unsubscribe('ContentLoaded', fltrHandler); + self.restoreFilters(); + } + eQ3.HomeMatic.Event.subscribe('ContentLoaded', fltrHandler); + }, + + restoreFilters: function() { + try { + var iseSFilters = JSON.parse(localStorage.getItem('iseSFilters_' + this.pageID)); + Object.keys(iseSFilters).forEach(function(id) { + var val = iseSFilters[id]; + if ($(id)) { + $(id).value = val; + $(id).nextSiblings()[0].click(); + } + }); + } catch(e) { + console.error(e); + } + }, + + + saveModeFilter: function(bModeStd, bModeSafe) + { + this.bStd = bModeStd; + this.bSafe = bModeSafe; + var url = "/esp/system.htm?sid="+SessionId; + var pb = ""; + pb += 'string action = "saveModeFilter";'; + pb += 'string sPageId = "'+this.pageID+'";'; + pb += 'integer iModeStd = '+(bModeStd? 1:0)+';'; + pb += 'integer iModeSafe = '+(bModeSafe? 1:0)+';'; + var opt = + { + postBody: ReGa.encode(pb) + }; + new Ajax.Request(url, opt); + }, + + saveIfaceFilter: function(bSend, bRec) + { + this.bSend = bSend; + this.bRec = bRec; + var url = "/esp/system.htm?sid="+SessionId; + var pb = ""; + pb += 'string action = "saveIfaceFilter";'; + pb += 'string sPageId = "'+this.pageID+'";'; + pb += 'integer iSend = '+(bSend? 1:0)+';'; + pb += 'integer iRec = '+(bRec? 1:0)+';'; + var opt = + { + postBody: ReGa.encode(pb) + }; + new Ajax.Request(url, opt); + }, + + + addStringFilter: function(fId, s) { + s = s.toLowerCase(); + switch(fId) { + case FIL_NAME: this.filName = s; break; + case FIL_DESC: this.filDesc = s; break; + case FIL_SN: this.filSn = s; break; + case FIL_TYPE: this.filType = s; break; + case FIL_ROOMS: this.filRooms = s; break; + case FIL_FUNCS: this.filFuncs = s; break; + case FIL_UNIT: this.filUnit = s; break; + case FIL_TIME: this.filTime = s; break; + case FIL_DATE: this.filDate = s; break; + case FIL_USERS: this.filUsers = s; break; + case FIL_CHN: this.filChnLink = s; break; + default: break; + } + }, + + isFilterType: function(ft) { + switch(ft) { + case FIL_MODE_AES: return this.bSafe; + case FIL_MODE_STD: return this.bStd; + case FIL_IFACE_S : return this.bSend; + case FIL_IFACE_R : return this.bRec; + default : return null; + } + }, + + objPassFilter: function(obj) + { + var bFound; + var arF; + var arO; + var i; + var x; + + bFilterUsed = true; + if (this.filRooms !== "") + { + bFound = false; + arF = this.filRooms.split('\t'); + + if (obj['fltOpts']['rooms']) + { + arO = obj['fltOpts']['rooms'].split('\t'); + for (i = 0; i < arF.length; i++) + { + if (!bFound) + { + for (x = 0; x < arO.length; x++) + { + if (arF[i] == arO[x]) + { + bFound = true; + break; + } + } + } + } + } + if (!bFound) { return false; } + } + + if (this.filFuncs !== "") + { + bFound = false; + arF = this.filFuncs.split('\t'); + arO = obj['fltOpts']['funcs'].split('\t'); + + for (i = 0; i < arF.length; i++) + { + if (!bFound) { + for (x = 0; x < arO.length; x++) + { + if (arF[i] == arO[x]) + { + bFound = true; + break; + } + } + } + } + if (!bFound) { return false; } + } + if (this.filType !== "") + { + if (typeof obj['type'] != 'undefined') { + if (obj['type'] === "") { return false; } + if (isValidRegex(this.filType)) + { + var r = new RegExp(this.filType); + if (r.test(obj['type'].toLowerCase()) === false) { return false; } + } + else + { + if (obj['type'].toLowerCase().indexOf(this.filType) == -1) { return false; } + } + } + } + if (this.filDesc !== "") + { + //conInfo( "iseFilter: filDesc="+this.filDesc ); + if (typeof obj['desc'] != 'undefined') + { + //conInfo( "iseFilter: desc="+obj['desc'] ); + if (obj['desc'] === "") { return false; } + if (isValidRegex(this.filDesc)) + { + var r = new RegExp(this.filDesc); + if (r.test(obj['desc'].toLowerCase()) === false) { return false; } + } + else + { + if (obj['desc'].toLowerCase().indexOf(this.filDesc) == -1) { return false; } + } + } + } + if (this.filName !== "") + { + if (typeof obj['name'] != 'undefined') + { + if (obj['name'] === "") { return false; } + var transName = translateString(obj['name']); + if (isValidRegex(this.filName)) + { + var r = new RegExp(this.filName); + if (r.test(transName.toLowerCase()) === false) { return false; } + } + else + { + if (transName.toLowerCase().indexOf(this.filName) == -1) { return false; } + } + } + } + if (this.filSn !== "") + { + if (typeof obj['sn'] != 'undefined') + { + if (obj['sn'] === "") { return false; } + if (isValidRegex(this.filSn)) + { + var r = new RegExp(this.filSn); + if (r.test(obj['sn'].toLowerCase()) === false) { return false; } + } + else + { + if (obj['desc'].toLowerCase().indexOf(this.filSn) == -1) { return false; } + } + } + } + if (this.filUnit !== "") + { + if (typeof obj['unit'] != 'undefined') + { + if (obj['unit'] === "") { return false; } + if (isValidRegex(this.filUnit)) + { + var r = new RegExp(this.filUnit); + if (r.test(obj['unit'].toLowerCase()) === false) { return false; } + } + else + { + if (obj['unit'].toLowerCase().indexOf(this.filUnit) == -1) { return false; } + } + } + } + + if (this.filTime !== "") + { + if (typeof obj['time'] != 'undefined') + { + if (obj['time'] === "") { return false; } + if (obj['time'].toLowerCase().indexOf(this.filTime) == -1) { return false; } + } + } + + if (this.filDate !== "") + { + if (typeof obj['date'] != 'undefined') + { + if (obj['date'] === "") { return false; } + if (obj['date'].toLowerCase().indexOf(this.filDate) == -1) { return false; } + } + } + if (this.filChnLink !== "") + { + if (obj['chn'] === "") { return false; } + if (isValidRegex(this.filChnLink)) + { + var r = new RegExp(this.filChnLink); + if (r.test(obj['chn'].toLowerCase()) === false) { return false; } + } + else + { + if (obj['chn'].toLowerCase().indexOf(this.filChnLink) == -1) { return false; } + } + } +/* + if (this.filVarTypes !== "") + { + } +*/ + if (this.bSend != this.bRec) { + if (this.bSend) { + if (obj['fltOpts']['iCat'] == 2) + return false; + } + if (this.bRec) { + if (obj['fltOpts']['iCat'] == 1) + return false; + } + } + if (this.bStd != this.bSafe) { + if (this.bStd) { + if (obj['fltOpts']['iTrans'] === true) { return false; } + } + if (this.bSafe) { + if (obj['fltOpts']['iTrans'] === false) { return false; } + } + } + if (this.fltObjType == FLT_OBJ_TYP_VARS) { + if (this.varTypeFilterSet()) { + var bRet = false; + if (this.bTypeLogic) { + if ((obj['type'] == "bool") || (obj['type'] == "boolean") ) { bRet = true; } + } + if (this.bTypeValueList) { + if (obj['type'] == "enum") + { + if (!bRet) { bRet = true; } + } + } + if (this.bTypeNumber) { + if (obj['type'] == "generic") + { + if (!bRet) { bRet = true; } + } + } + if (this.bTypeAlarm) { + if (obj['type'] == "alarm") + { + if (!bRet) { bRet = true; } + } + } + if (this.bTypeString) { + if (obj['type'] == "string") + { + if (!bRet) { bRet = true; } + } + } + return bRet; + } + } + if (this.bColLeft != this.bColCenter) { + if (this.bColLeft) { + if (obj['colpos'] == 1) { return false; } + } + if (this.bColCenter) { + if (obj['colpos'] == 0) { return false; } + } + } + if (this.bNameLeft != this.bNameTop) { + if (this.bNameLeft) { + if (obj['namepos'] == 1) { return false; } + } + if (this.bNameTop) { + if (obj['namepos'] == 0) { return false; } + } + } + if (this.bPC){ + if (!obj['devPC']) { return false; } + } + if (this.bPDA) { + if (!obj['devPDA']) { return false; } + } + if (this.bCentral) { + if (!obj['devCentral']) { return false; } + } + if (this.filUsers) { + bFound = false; + arF = this.filUsers.split('\t'); + arO = obj['users'].split('\t'); + for (i = 0; i < arF.length; i++) { + if (!bFound) { + for (x = 0; x < arO.length; x++) { + if (arF[i] == arO[x]) { + bFound = true; + break; + } + } + } + } + if (!bFound) + return false; + } + return true; + }, + + varTypeFilterSet: function() { + if (this.bTypeLogic) return true; + if (this.bTypeValueList) return true; + if (this.bTypeNumber) return true; + if (this.bTypeAlarm) return true; + if (this.bTypeString) return true; + return false; + }, + + isFilterId: function(id, fId) + { + var i; + var rIds; + var fIds; + + switch(fId) + { + case FIL_ROOMS: + rIds = this.filRooms.split('\t'); + for(i = 0; i < rIds.length; i++) { + if (rIds[i] == id) { return true; } + } + return false; + case FIL_FUNCS: + fIds = this.filFuncs.split('\t'); + for(i = 0; i < fIds.length; i++) { + if (fIds[i] == id) { return true; } + } + return false; + case FIL_USERS: + fIds = this.filUsers.split('\t'); + for(i = 0; i < fIds.length; i++) { + if (fIds[i] == id) { return true; } + } + return false; + default: + return false; + } + }, + + clearFilters: function(id, ftType) + { +// var url = "/esp/system.htm?sid="+SessionId; +// var pb = 'string action = "clearFilter";'; +// pb += 'string sPageId = "' + this.pageID + '";'; +// var opt = +// { +// postBody: ReGa.encode(pb), +// onSuccess: function(t) +// { +// conInfo( t.responseText ); +// } +// } +// new Ajax.Request(url, opt); + + this.filRooms = ""; + this.filFuncs = ""; + this.filType = ""; + this.filDesc = ""; + this.filSn = ""; + this.filName = ""; + this.filUnit = ""; + this.filChnLink = ""; + this.filVarTypes = ""; + this.filTime = ""; + this.filDate = ""; + this.bSend = false; + this.bRec = false; + this.bStd = false; + this.bSafe = false; + this.bColLeft = false; + this.bColCenter = false; + this.bNameLeft = false; + this.bNameTop = false; + this.bPC = false; + this.bPDA = false; + this.bCentral = false; + this.filUsers = ""; + this.bTypeLogic = false; + this.bTypeValueList = false; + this.bTypeNumber = false; + this.bTypeAlarm = false; + this.bTypeString = false; + localStorage.removeItem('iseSFilters_' + this.pageID); + var filterButtons = document.querySelectorAll('.FilterSetButton[onclick*=' + this.pageID + ']'); + filterButtons.forEach(function(el) { + try { + el.parentElement.parentElement.querySelector('.FilterBtn').style.color = ''; + } catch(e) { + console.error(e); + } + }); + conInfo("Alle Filter wurden zurückgesetzt."); + } +}; + +/* * * * * * * * * * * * * HILFS-FUNKTIONEN * * * * * * * * * * * * * * */ + +// Prüft anhand der filterOptions ob Checkboxen in Submenüs gesetzt werden sollen +selectFilters = function(fltObj, divToShow) +{ + var i; + var inplist; + + switch(divToShow) { + case "btnFilterRoomSub": + inplist = $("btnFilterRoomSub").getElementsByTagName('input'); + for (i = 0; i < inplist.length; i++) { + var roomId = parseInt(inplist[i].id.substr(2)); + inplist[i].checked = fltObj.isFilterId(roomId, FIL_ROOMS); + } + break; + case "btnFilterFuncSub": + inplist = $("btnFilterFuncSub").getElementsByTagName('input'); + for (i = 0; i < inplist.length; i++) { + var funcId = parseInt(inplist[i].id.substr(2)); + inplist[i].checked = fltObj.isFilterId(funcId, FIL_FUNCS); + } + break; + case "btnFilterVarTypeSub": + $("cbLogic").checked = fltObj.bTypeLogic; + $("cbValueList").checked = fltObj.bTypeValueList; + $("cbNumber").checked = fltObj.bTypeNumber; + $("cbAlarm").checked = fltObj.bTypeAlarm; + $("cbString").checked = fltObj.bTypeString; + break; + case "btnFilterIfaceSub": + $("cbSend").checked = fltObj.isFilterType(FIL_IFACE_S); + $("cbRec").checked = fltObj.isFilterType(FIL_IFACE_R); + break; + case "btnFilterModeSub": + $("cbSafe").checked = fltObj.isFilterType(FIL_MODE_AES); + $("cbStd").checked = fltObj.isFilterType(FIL_MODE_STD); + break; + case "btnFilterNameSub": + $("ftName").value = fltObj.filName; + break; + case "btnFilterTypeSub": + $("ftType").value = fltObj.filType; + break; + case "btnFilterDescSub": + $("ftDesc").value = fltObj.filDesc; + break; + case "btnFilterSNSub": + $("ftSN").value = fltObj.filSn; + break; + case "btnFilterTimeSub": + $("ftTime").value = fltObj.filTime; + break; + case "btnFilterDateSub": + $("ftDate").value = fltObj.filDate; + break; + case "btnFilterColPos": + $("cbColLeft").checked = fltObj.bColLeft; + $("cbColCenter").checked = fltObj.bColCenter; + break; + case "btnFilterNamePos": + $("cbNameLeft").checked = fltObj.bNameLeft; + $("cbNameTop").checked = fltObj.bNameTop; + break; + case "btnFilterEndDev": + $("cbPC").checked = fltObj.bPC; + $("cbPDA").checked = fltObj.bPDA; + $("cbCentral").checked = fltObj.bCentral; + break; + case "btnFilterUsersSub": + inplist = $("btnFilterUsersSub").getElementsByTagName('input'); + for (i = 0; i < inplist.length; i++) { + var userId = parseInt(inplist[i].id.substr(2)); + inplist[i].checked = fltObj.isFilterId(userId, FIL_USERS); + } + break; + case "btnFilterChn": + $("ftChn").value = fltObj.filChnLink; + break; + default: + break; + } +}; + + +iseSFilterCheckEnterEsc = function(keyCode, idSet, idCancel) +{ + switch (keyCode) { + case 13: + // Set the filter -- press ok + jQuery("#"+ idSet).click(); + break; + case 27: + jQuery("#"+ idCancel).click(); + break; + default: + break; + } +}; + +// Freitext-Filter +setSFilter = function(fltObj, ctrlId, fId) +{ + //conInfo("iseFilter: setSFilter "+fId+" to "+$(ctrlId).value); + fltObj.addStringFilter(fId, $(ctrlId).value); + try { + var iseFilters = JSON.parse(localStorage.getItem('iseSFilters_' + fltObj.pageID)) || {}; + iseFilters[ctrlId] = $(ctrlId).value; + localStorage.setItem('iseSFilters_' + fltObj.pageID, JSON.stringify(iseFilters)); + $(ctrlId).parentElement.previous().style.color = $(ctrlId).value ? 'red' : 'black'; + } catch(e) { console.error(e); } +}; + +// Integer-Filter (Modus, Iface) +setIFilter = function(fltObj, sId) +{ + switch (sId) + { + case "mode": + fltObj.saveModeFilter($("cbStd").checked, $("cbSafe").checked); + break; + case "iface": + fltObj.saveIfaceFilter($("cbSend").checked, $("cbRec").checked); + break; + default: + break; + } +}; + +// ID-Filter (rooms, funcs) +setAFilter = function(fltObj, sId) +{ + var sTmp = ""; + var inplist; + var i; + + switch(sId) { + case "rooms": + inplist = $("btnFilterRoomSub").getElementsByTagName('input'); + for (i = 0; i < inplist.length; i++) { + var roomId = parseInt(inplist[i].id.substr(2)); + if (inplist[i].checked) + sTmp += roomId + "\t"; + } + sTmp = sTmp.substr(0, sTmp.length - 1); + fltObj.addStringFilter(FIL_ROOMS, sTmp); + break; + case "funcs": + inplist = $("btnFilterFuncSub").getElementsByTagName('input'); + for (i = 0; i < inplist.length; i++) { + var funcId = parseInt(inplist[i].id.substr(2)); + if (inplist[i].checked) + sTmp += funcId + "\t"; + } + sTmp = sTmp.substr(0, sTmp.length - 1); + fltObj.addStringFilter(FIL_FUNCS, sTmp); + break; + case "vartypes": + fltObj.bTypeLogic = $("cbLogic").checked; + fltObj.bTypeValueList = $("cbValueList").checked; + fltObj.bTypeNumber = $("cbNumber").checked; + fltObj.bTypeAlarm = $("cbAlarm").checked; + fltObj.bTypeString = $("cbString").checked; + break; + case "colPos": + fltObj.bColLeft = $("cbColLeft").checked; + fltObj.bColCenter = $("cbColCenter").checked; + break; + case "namePos": + fltObj.bNameLeft = $("cbNameLeft").checked; + fltObj.bNameTop = $("cbNameTop").checked; + break; + case "endDev": + fltObj.bPC = $("cbPC").checked; + fltObj.bPDA = $("cbPDA").checked; + fltObj.bCentral = $("cbCentral").checked; + break; + case "users": + inplist = $("btnFilterUsersSub").getElementsByTagName('input'); + for (i = 0; i < inplist.length; i++) { + var userId = parseInt(inplist[i].id.substr(2)); + if (inplist[i].checked) + sTmp += userId + "\t"; + } + sTmp = sTmp.substr(0, sTmp.length - 1); + fltObj.addStringFilter(FIL_USERS, sTmp); + break; + default: + break; + } +}; + +filterBtn = function(id) { + if ($(id)) + $(id).style.backgroundColor = WebUI.getColor("clickable"); +}; + +filterBtnSelected = function(id) { + if ($(id)) + $(id).style.backgroundColor = WebUI.getColor("active"); +}; + +colorFilterBtns = function(fltObj) +{ + if (fltObj.filName !== "") filterBtnSelected('btnFilterName'); + else filterBtn('btnFilterName'); + if (fltObj.filType !== "") filterBtnSelected('btnFilterType'); + else filterBtn('btnFilterType'); + if (fltObj.filDesc !== "") filterBtnSelected('btnFilterDesc'); + else filterBtn('btnFilterDesc'); + if (fltObj.filSn !== "") filterBtnSelected('btnFilterSN'); + else filterBtn('btnFilterSN'); + if (fltObj.filRooms !== "") filterBtnSelected('btnFilterRoom'); + else filterBtn('btnFilterRoom'); + if (fltObj.filFuncs !== "") filterBtnSelected('btnFilterFunc'); + else filterBtn('btnFilterFunc'); + if (fltObj.bSend||fltObj.bRec) filterBtnSelected('btnFilterIface'); + else filterBtn('btnFilterIface'); + if (fltObj.bStd||fltObj.bSafe) filterBtnSelected('btnFilterMode'); + else filterBtn('btnFilterMode'); + if (fltObj.varTypeFilterSet()) filterBtnSelected('btnFilterVarType'); + else filterBtn('btnFilterVarType'); + if (fltObj.filTime !== "") filterBtnSelected('btnFilterTime'); + else filterBtn('btnFilterTime'); + if (fltObj.filDate !== "") filterBtnSelected('btnFilterDate'); + else filterBtn('btnFilterDate'); + if (fltObj.bColLeft) filterBtnSelected('btnFilterColPos'); + else filterBtn('btnFilterColPos'); + if (fltObj.bColCenter) filterBtnSelected('btnFilterColPos'); + else filterBtn('btnFilterColPos'); + if (fltObj.bNameLeft) filterBtnSelected('btnFilterNamePos'); + else filterBtn('btnFilterNamePos'); + if (fltObj.bNameTop) filterBtnSelected('btnFilterNamePos'); + else filterBtn('btnFilterNamePos'); + if (fltObj.filChnLink !== "") filterBtnSelected('btnFilterChn'); + else filterBtn('btnFilterChn'); + +}; +/** + * ise/iseButtonsSwitch.js + **/ + +/** + * @fileOverview ? + * @author ise + **/ + +/** + * @class + **/ +iseButtonsSwitch = Class.create(); + +iseButtonsSwitch.prototype = { + /* + * id = datapoint-ID of switch + * initState = Creation State (0 or 1) + * idDpState = id of state-DP + */ + initialize: function(id, initState, idDpState, iViewOnly, chnAddress, chnLabel, iFace) { + this.id = id; + this.state = initState; + this.divOn = $(this.id + "On"); + this.divOff = $(this.id + "Off"); + this.idDpState = idDpState; + this.chnAddress = chnAddress; + this.chnLabel = chnLabel; + this.iFace = iFace; + this.HmIPInterfaceID = "HmIP-RF"; + this.labelGarageDoorController = "HmIP-WGC"; + this.labelVIR_LG_ONOFF = "VIR-LG-ONOFF"; + this.labeldrgDali = "HmIP-DRG-DALI"; + + this.garageDoorControllerOnTime = 0.5; + + if (initState) { ControlBtn.on(this.divOn); } + else { ControlBtn.on(this.divOff); } + + // Add event handlers + if (iViewOnly === 0) + { + this.clickOff = this.onClickOff.bindAsEventListener(this); + Event.observe(this.divOff, 'mousedown', this.clickOff); + + this.clickOn = this.onClickOn.bindAsEventListener(this); + Event.observe(this.divOn, 'mousedown', this.clickOn); + } + }, + + onClickOff: function() { + ControlBtn.pushed(this.divOff); + //this.state = false; + if ((this.chnLabel != this.labelVIR_LG_ONOFF) && (this.chnLabel != this.labeldrgDali)) { + setDpState(this.idDpState, 0, true); + } else { + setDpState(this.idDpState,0); + } + var t = this; + new PeriodicalExecuter(function(pe) { + t.refresh(); + pe.stop(); + }, 1); + }, + + onClickOn: function() { + ControlBtn.pushed(this.divOn); + if (this.chnLabel != this.labelGarageDoorController) { + if ((this.chnLabel != this.labelVIR_LG_ONOFF) && (this.chnLabel != this.labeldrgDali)) { + setDpState(this.idDpState, 1, true); + } else { + setDpState(this.idDpState,1); + } + } else { + homematic("Interface.putParamset",{'interface': this.HmIPInterfaceID, 'address' : this.chnAddress, 'paramsetKey' : 'VALUES', 'set': + [ + {name:'ON_TIME', type: 'double', value: this.garageDoorControllerOnTime}, + {name:'STATE', type: 'bool', value: true} + ] + },function(result){conInfo(result);}); + } + var t = this; + new PeriodicalExecuter(function(pe) { + t.refresh(); + pe.stop(); + }, 1); + }, + + + refresh: function() { + if (this.state) { + ControlBtn.on(this.divOn); + ControlBtn.off(this.divOff); + } + else { + ControlBtn.off(this.divOn); + ControlBtn.on(this.divOff); + } + } +}; + +/** + * @class + **/ +iseButtonsKey = Class.create(); + +iseButtonsKey.prototype = { + /* + * id = datapoint-ID of switch + */ + initialize: function(id, shortId, longId, iViewOnly) { + this.id = id; + this.divShort = $(this.id + "Short"); + this.divLong = $(this.id + "Long"); + this.shortId = shortId; + this.longId = longId; + + if( this.divShort ) { ControlBtn.off(this.divShort); } + if( this.divLong ) { ControlBtn.off(this.divLong); } + + // Add event handlers + if (iViewOnly === 0) + { + if (this.divShort) { + this.clickShort = this.onClickShort.bindAsEventListener(this); + Event.observe(this.divShort, 'mousedown', this.clickShort); + } + if (this.divLong) { + this.clickLong = this.onClickLong.bindAsEventListener(this); + Event.observe(this.divLong, 'mousedown', this.clickLong); + } + } + }, + + onClickShort: function() { + setDpState(this.shortId, 1); + ControlBtn.pushed(this.divShort); + $("btn" + this.shortId + "s").src = "/ise/img/btn_press.png"; + var t = this; + new PeriodicalExecuter(function(pe) { + ControlBtn.off(t.divShort); + $("btn" + t.shortId + "s").src = "/ise/img/btn_no_press.png"; + pe.stop(); + }, 1); + }, + + onClickLong: function() { + setDpState(this.longId, 1); + ControlBtn.pushed(this.divLong); + $("btn" + this.longId + "l").src = "/ise/img/btn_press.png"; + var t = this; + new PeriodicalExecuter(function(pe) { + ControlBtn.off(t.divLong); + $("btn" + t.longId + "l").src = "/ise/img/btn_no_press.png"; + pe.stop(); + }, 1); + } +}; + +/** + * @class + **/ +iseButtonProg = Class.create(); +iseButtonProg.prototype = { + initialize: function(id, progActive, thenOnly) { + this.id = id; + this.progActive = progActive; + + this.startBtn = (thenOnly === true) ? $(id + "StartThenOnly") : $(id + "Start"); + this.actBtn = $(id + "Act"); + + this.thenOnly = thenOnly; + + if ( progActive ) { ControlBtn.on(this.actBtn); } + + // Add event handlers + this.clickStart = this.onClickStart.bindAsEventListener(this); + Event.observe(this.startBtn, 'mousedown', this.clickStart); + }, + + onClickStart: function() + { + ControlBtn.pushed(this.startBtn); + ExecuteProgram(this.id, this.thenOnly); + var t = this; + new PeriodicalExecuter(function(pe) + { + ControlBtn.off(t.startBtn); + pe.stop(); + }, 1); + } +}; + +/** + * @class + **/ +iseButtonsEvent = Class.create(); +iseButtonsEvent.prototype = { + /* + * id = datapoint-ID of Event + */ + initialize: function(id, eventId, iViewOnly) { + this.id = id; + this.divEvent = $(this.id + "event"); + this.eventId = eventId; + + if( this.divEvent ) { ControlBtn.off(this.divEvent); } + + // Add event handlers + if (iViewOnly === 0) + { + this.clickEvent = this.onClickEvent.bindAsEventListener(this); + Event.observe(this.divEvent, 'mousedown', this.clickEvent); + } + }, + + onClickEvent: function() { + setDpState(this.eventId, 1); + ControlBtn.pushed(this.divEvent); + $("btn" + this.id + "s").src = "/ise/img/btn_press.png"; + var t = this; + new PeriodicalExecuter(function(pe) { + ControlBtn.off(t.divEvent); + $("btn" + t.id + "s").src = "/ise/img/btn_no_press.png"; + pe.stop(); + }, 1); + } + +};/** + * ise/iseButtonsDimmer.js + **/ + +/** + * @fileOverview ? + * @author ise + **/ + +/** + * @class + **/ +iseButtonsDimmer = Class.create(); + +iseButtonsDimmer.prototype = { + /* + * id = DOM-ID of switch + * initState = Creation State + */ + initialize: function(id, initState, lvlDP, oldLvlDP, iViewOnly, bSliderPosFlag, label) + { + conInfo( "iseDimmer: initialize()" ); + this.id = id; + this.state = initState; + this.lvlDP = lvlDP; + this.oldLvlDP = oldLvlDP; + // For some new devices (OSRAM-Lightify e. g.) we don`t know the state of the button + // so we treat the On/Off button as a push-button instead of a switch. + this.OnOffEqualsSwitch = (isNonCCUDevice(label)) ? false : true; + + + if(bSliderPosFlag) + { + this.bSliderPosFlag = bSliderPosFlag; + } + else + { + this.bSliderPosFlag = false; + } + this.slider = new sliderControl("dimmer", this.id, initState, iViewOnly,this.bSliderPosFlag); + + this.hasRampClicked = false; + + this.txtPerc = $(this.id + "Perc"); + + // Add event handlers + if (iViewOnly === 0) + { + this.mouseOut = this.onMouseOut.bindAsEventListener(this); + //Event.observe($("slidCtrl" + this.id), 'mouseout', this.mouseOut); + Event.observe($("slidCtrl" + this.id), 'mouseleave', this.mouseOut); + + this.rampClick = this.onRampClick.bindAsEventListener(this); + Event.observe(this.slider.e_base, 'mousedown', this.rampClick); + + this.handleClick = this.onHandleClick.bindAsEventListener(this); + Event.observe($("slidCtrl" + this.id), 'mouseup', this.handleClick); + + this.clickUp = this.onClickUp.bindAsEventListener(this); + Event.observe($(this.id + "Up"), 'click', this.clickUp); + + this.clickDown = this.onClickDown.bindAsEventListener(this); + Event.observe($(this.id + "Down"), 'click', this.clickDown); + + if (this.oldLvlDP >= 1 ) { + this.clickOn = this.onClickOn.bindAsEventListener(this); + Event.observe($(this.id + "On"), 'mousedown', this.clickOn); + } else { + this.clickOn = this.onClickOnA.bindAsEventListener(this); + Event.observe($(this.id + "On"), 'mousedown', this.clickOn); + } + this.clickOff = this.onClickOff.bindAsEventListener(this); + Event.observe($(this.id + "Off"), 'mousedown', this.clickOff); + + this.percChange = this.onPercChange.bindAsEventListener(this); + Event.observe($(this.id + "Perc"), 'change', this.percChange); + } + this.refresh(false); + }, + + onMouseOut: function(event) + { + var self = this; + var e = event; + if (!e) { e = window.event; } + var relTarg = e.relatedTarget || e.fromElement; + if( relTarg ) + { + var b1 = (relTarg.id.indexOf("slider")!=-1); + var b2 = (relTarg.id.indexOf("base")!=-1); + var b3 = (relTarg.id.indexOf("green")!=-1); + if( !b1 && !b2 && !b3 ) + { + if( this.hasRampClicked ) + { + conInfo( "iseDimmer: onMouseOut() ["+relTarg.id+"]" ); + this.hasRampClicked = false; + window.setTimeout(function() { + self.state = self.slider.n_value; + self.refresh(); + },100); + } + } + } + }, + + onRampClick: function(ev) + { + conInfo( "iseDimmer: onRampClick()" ); + this.hasRampClicked = true; + var pos = Position.page(this.slider.e_base); + var offset = ev.clientX - pos[0]; + var val = ( offset * 100 ) / this.slider.n_controlWidth; + var oldstate = parseInt(this.state); + this.state = Math.floor(val); + if (this.state < (oldstate-3)) + { + this.slider.f_setValue(val); + } + else if (this.state > (oldstate+3)) + { + this.slider.f_setValue(val); + } + //conInfo("setting Dimmer DP "+this.lvlDP+" State --> " + this.state + " -- old State --> "+oldstate); + //window.setTimeout("ibd"+this.id+".refresh()",1000); + }, + + onHandleClick: function() + { + conInfo( "iseDimmer: onHandleClick()" ); + this.state = this.txtPerc.value; + this.refresh(); + }, + + onClickUp: function() + { + conInfo( "iseDimmer: onClickUp()" ); + this.state = this.slider.n_value; + this.state += 10; + if (this.state > 100) + { + this.state = 100; + } + this.refresh(); + }, + + onClickDown: function() + { + conInfo( "iseDimmer: onClickDown()" ); + this.state = this.slider.n_value; + this.state -= 10; + if (this.state < 0) + this.state = 0; + this.refresh(); + }, + + onClickOn: function() + { + conInfo( "iseDimmer: onClickOn()" ); + var url = "/esp/channels.htm?sid=" + SessionId; + var pb = "integer chnId = "+this.id+";"; + pb += "string action = 'dimmerOldVal';"; + var t = this; + new PeriodicalExecuter(function(pe) + { + if( t.state > 0 ) + { + if( $(t.id + "On") ) { ControlBtn.on($(t.id + "On")); } + if( $(t.id + "Off") ) {ControlBtn.off($(t.id + "Off")); } + } + else + { + if( $(t.id + "On") ) { ControlBtn.off($(t.id + "On")); } + if( $(t.id + "Off") ) { ControlBtn.on($(t.id + "Off")); } + } + pe.stop(); + }, 1); + var opts = + { + postBody: ReGa.encode(pb), + onComplete: function(resp) + { + t.refresh(false); + } + }; + new Ajax.Request(url, opts); + ControlBtn.pushed($(this.id + "On")); + }, + + onClickOnA: function() + { + conInfo( "iseDimmer: onClickOnA()" ); + var t = this; + if (this.OnOffEqualsSwitch) { + new PeriodicalExecuter(function (pe) { + if (t.state > 0) { + if ($(t.id + "On")) { + ControlBtn.on($(t.id + "On")); + } + if ($(t.id + "Off")) { + ControlBtn.off($(t.id + "Off")); + } + } + else { + if ($(t.id + "On")) { + ControlBtn.off($(t.id + "On")); + } + if ($(t.id + "Off")) { + ControlBtn.on($(t.id + "Off")); + } + } + pe.stop(); + }, 1); + } + setDpState(this.lvlDP, 1); + ControlBtn.pushed($(this.id + "On")); + + if (! this.OnOffEqualsSwitch) { + window.setTimeout(function() {ControlBtn.off( $(t.id + "On") );},1000); + } + + }, + + onClickOff: function() + { + conInfo( "iseDimmer: onClickOff()" ); + var t = this; + if (this.OnOffEqualsSwitch) { + new PeriodicalExecuter(function (pe) { + if (t.state > 0) { + if ($(t.id + "On")) { + ControlBtn.on($(t.id + "On")); + } + if ($(t.id + "Off")) { + ControlBtn.off($(t.id + "Off")); + } + } + else { + if ($(t.id + "On")) { + ControlBtn.off($(t.id + "On")); + } + if ($(t.id + "Off")) { + ControlBtn.on($(t.id + "Off")); + } + } + pe.stop(); + }, 1); + } + setDpState(this.lvlDP, 0); + ControlBtn.pushed($(this.id + "Off")); + + if (! this.OnOffEqualsSwitch) { + window.setTimeout(function() {ControlBtn.off( $(t.id + "Off") );},1000); + } + + }, + + + onPercChange: function() + { + conInfo( "iseDimmer: onPercChange()" ); + if( isNaN(this.txtPerc.value) ) return; + if( parseInt(this.txtPerc.value) > 100 ) this.txtPerc.value = 100; + if( parseInt(this.txtPerc.value) < 0 ) this.txtPerc.value = 0; + this.state = this.txtPerc.value; + this.refresh(); + }, + + update: function(newVal) + { + conInfo( "iseDimmer: update()" ); + this.state = newVal; + this.refresh(newVal); + }, + + refresh: function(setstate) + { + conInfo( "iseDimmer: refresh()" ); + var self = this; + this.slider.f_setValue(this.state, true); + this.txtPerc.value = this.state; + + if (this.OnOffEqualsSwitch) { + + window.setTimeout(function() { + if (self.state > 0) { + ControlBtn.on($(self.id + "On")); + ControlBtn.off($(self.id + "Off")); + } else { + ControlBtn.off($(self.id + "On")); + ControlBtn.on($(self.id + "Off")); + } + },1000); + + } else { + // This is for devices without a state, e. g. OSRAM-Lightify + ControlBtn.off($(this.id + "On")); + ControlBtn.off($(this.id + "Off")); + } + if(typeof setstate == "undefined") + { + conInfo("setting Dimmer DP "+this.lvlDP+" State -------> " + this.state); + setDpState(this.lvlDP, (this.state / 100)); + } + } +}; +/** + * ise/iseThermostat.js + **/ + +/** + * @fileOverview ? + * @author ise + **/ + + /** + * @class + **/ +iseThermostat = Class.create(); + +iseThermostat.prototype = { + /* + * id = DOM-ID of switch + * initState = Creation State + */ + initialize: function(id, initState, lvlDP, min, max, iViewOnly, bSliderPosFlag, opts) + { + conInfo( "iseThermostat: initialize()" ); + conInfo ("value(: " + initState + ") min(" + min + ") max(" + max + ")"); + this.id = id; + this.state = initState; + this.lvlDP = lvlDP; + this.min = min; + this.max = max; + this.factor = 100/(max-min); + this.unit = " °C"; + this.statusOFF = "OFF"; + this.statusON = "ON"; + this.opts = opts; + if(bSliderPosFlag) + { + this.bSliderPosFlag = bSliderPosFlag; + } + else + { + this.bSliderPosFlag = false; + } + // AG this.slider = new sliderControl( "thermo", this.id, initState, iViewOnly, this.bSliderPosFlag,this.min, this.max, this.factor, this.unit); + this.slider = new sliderControl( "thermo", this.id, this.state, iViewOnly, this.bSliderPosFlag,this.min, this.max, this.factor, this.unit); + this.hasRampClicked = false; + this.txtDeg = $(this.id + "Deg"); + this.unitDegree = $(this.id + "unitDegree"); + // Add event handlers + if (iViewOnly === 0) + { + this.mouseOut = this.onMouseOut.bindAsEventListener(this); + Event.observe($("slidCtrl" + this.id), 'mouseout', this.mouseOut); + + this.rampClick = this.onRampClick.bindAsEventListener(this); + Event.observe(this.slider.e_base, 'mousedown', this.rampClick); + + this.handleClick = this.onHandleClick.bindAsEventListener(this); + Event.observe($("slidCtrl" + this.id), 'mouseup', this.handleClick); + + this.clickUp = this.onClickUp.bindAsEventListener(this); + Event.observe($(this.id + "Up"), 'click', this.clickUp); + + this.clickDown = this.onClickDown.bindAsEventListener(this); + Event.observe($(this.id + "Down"), 'click', this.clickDown); + + this.percChange = this.onPercChange.bindAsEventListener(this); + Event.observe($(this.id + "Deg"), 'change', this.percChange); + + this.init2ndGen(); + } + this.refresh(false); + }, + + init2ndGen: function() {}, + + onMouseOut: function(event) + { + var e = event; + if (!e) { e = window.event; } + var relTarg = e.relatedTarget || e.fromElement; + if( relTarg ) + { + var b1 = (relTarg.id.indexOf("slider")!=-1); + var b2 = (relTarg.id.indexOf("base")!=-1); + var b3 = (relTarg.id.indexOf("green")!=-1); + var b4 = (relTarg.id.indexOf("spec")!=-1); + if( !b1 && !b2 && !b3 && !b4) + { + if( this.hasRampClicked ) + { + conInfo( "iseThermostat: onMouseOut() ["+relTarg.id+"], wanna set: " + ( (this.slider.n_value/this.factor) + this.min) ); + this.hasRampClicked = false; + + this.state = (this.slider.n_value/this.factor) + this.min; + this.refresh(); + } + } + } + }, + + onRampClick: function(ev) + { + this.hasRampClicked = true; + var pos = Position.page(this.slider.e_base); + var offset = ev.clientX - pos[0]; + var val = ( offset * 100 ) / this.slider.n_controlWidth; + this.slider.f_setValue(val); + this.state = (Math.floor(val)/ this.factor) + this.min; + conInfo( "iseThermostat: onRampClick() at ("+val + ") set-> " + this.state ); + // this.refresh(); + //window.setTimeout("ibd"+this.id+".refresh()",1000); + }, + + onHandleClick: function() + { + conInfo( "iseThermostat: onHandleClick() deg: " + this.txtDeg.value); + this.hasRampClicked = false; + this.state = this.txtDeg.value; + //this.refresh(); + + if(this.state < this.min){ this.state = this.min; } + if (this.state > this.max) this.state = this.max; + conInfo("onHandleClick - setting DP "+this.lvlDP+" State -------> " + this.state); + setDpState(this.lvlDP, (this.state)); + }, + + onClickUp: function() + { + conInfo( "iseThermostat: onClickUp()" ); + // this.state = (this.slider.n_value/this.factor); + this.state = Math.round(this.state + 1); + if (this.state > this.max) + this.state = this.max; + + this.refresh(); + }, + + onClickDown: function() + { + conInfo( "iseThermostat: onClickDown()" ); + // this.state = (this.slider.n_value/this.factor); + this.state = Math.round(this.state - 1); + if (this.state < this.min) + this.state = this.min; + + this.refresh(); + }, + + onPercChange: function() + { + conInfo( "iseThermostat: onPercChange()" ); + if( isNaN(this.txtDeg.value) ) return; + if( parseInt(this.txtDeg.value) > this.max ) this.txtDeg.value = this.max; + if( parseInt(this.txtDeg.value) < this.min ) this.txtDeg.value = this.min; + this.state = this.txtDeg.value; + this.refresh(); + }, + + update: function(newVal) + { + conInfo( "iseThermostat: update()" ); + this.state = newVal; + this.refresh(newVal); + }, + + hideUnitDegree: function() + { + if (this.unitDegree != null) { + this.unitDegree.hide(); + } + }, + + refresh: function(setstate) + { + conInfo( "iseThermostat: refresh()"+this.state ); + if(this.state < 0){ this.state = 0; } + if (this.state > this.max) this.state = this.max; + this.slider.f_setValue((this.state -this.min) * this.factor, true); + switch (this.state) { + case 4.5: + this.txtDeg.value = this.statusOFF; + this.hideUnitDegree(); + break; + case 30.5: + this.txtDeg.value = this.statusON; + this.hideUnitDegree(); + break; + default: + this.txtDeg.value = round(this.state, 1); + if(this.unitDegree != null) { + this.unitDegree.show(); + } + } + if(typeof setstate == "undefined") + { + conInfo("setting DP "+this.lvlDP+" State -------> " + this.state); + setDpState(this.lvlDP, (this.state)); + } + } +}; + +iseThermostat_2ndGen = Class.create(iseThermostat, { + + init2ndGen: function() { + conInfo("2nd Generation"); + conInfo(this.opts); + this.level = parseFloat(this.opts.stLevel); + this.activeMode = this.opts.stControlMode; // stControlMode = 0 - 3 / AUTO, MANU, HOLIDAY, BOOST + this.inputDegree = $(this.id + "Deg"); + this.btnHeatingUncertain = $(this.id + "HeatingModeUncertain"); + this.btnHeatingON = $(this.id + "modeON"); + this.btnHeatingOFF = $(this.id + "modeOFF"); + this.btnModeAuto = $(this.id + "mode0"); + this.btnModeManu = $(this.id + "mode1"); + this.btnModeParty = $(this.id + "mode2"); + this.btnModeBoost = $(this.id + "mode3"); + this.btnTempComfort = $(this.id + "tempCOMFORT"); + this.btnTempEco = $(this.id + "tempECO"); + this.chn = homematic("Device.get",{"id": this.id}); + + if (this.opts.stTemp) { + this.showActualTemp(); + } + if (this.opts.stHum) { + this.showActualHumidity(); + } + if (this.opts.stBat) { + this.showActualBat(); + } + if (this.opts.stValve !== null) { + this.showActualValve(); + } + if (this.opts.idComfort && this.opts.idLowering) { + this.showComfortEco(); + } + if (this.opts.idAuto && this.opts.idManu && this.opts.idBoost) { + this.showChangeMode(); + } + + if (this.opts.idPartyTemp) { + this.showPartyMode(); + } + + this.showOnOff(); + + // opts.stPartyStartTime and opts.stPartyStopTime will be overwritten here because ReGa is setting this values wrong. + // This seems to be a 8 bit problem. ReGa sets a real value of 300 (5 hours since midnight ) e. g. to 44 which equals 300 - 256 + // As a result the party mode dialog will show a time of AM 5:00 as AM 0:44 + this.opts.stPartyStartTime = homematic("Interface.getValue", {'interface': this.chn["interface"], 'address' : this.chn["address"], 'valueKey': 'PARTY_START_TIME'}); + this.opts.stPartyStopTime = homematic("Interface.getValue", {'interface': this.chn["interface"], 'address' : this.chn["address"], 'valueKey': 'PARTY_STOP_TIME'}); + + if (this.activeMode == 2) { + // Holiday mode active + this.showHolidayEndTime(); + } + try { + this.initButtons(); + this.bindEvents(); + } catch (e) {} + }, + + initButtons: function() { + this.initOnOffBtn(); + this.setActiveMode(); + }, + + initOnOffBtn: function() { + + if (this.level < 4.5 || this.level > 30.5) { + //ControlBtn.on(this.btnHeatingUncertain); + ControlBtn.off(this.btnHeatingON); + ControlBtn.off(this.btnHeatingOFF); + this.clearDegree(); + return; + } + + if (this.level < 5.0) { + ControlBtn.on(this.btnHeatingOFF); + ControlBtn.off(this.btnHeatingON); + this.clearDegree(); + } else if (this.level > 30.0) { + ControlBtn.on(this.btnHeatingON); + ControlBtn.off(this.btnHeatingOFF); + this.clearDegree(); + } else { + ControlBtn.off(this.btnHeatingON); + ControlBtn.off(this.btnHeatingOFF); + } + }, + + // sets the button of the active mode + setActiveMode: function() { + ControlBtn.on(this.id + "mode" + this.activeMode); + }, + + // Clears the temperature field whithin the temp. box + clearDegree: function() { + this.inputDegree.value = ""; + }, + + bindEvents: function() { + this.clickModeAuto = this.onClickModeAuto.bindAsEventListener(this); + Event.observe(this.btnModeAuto, 'mousedown', this.clickModeAuto); + + this.clickModeManu = this.onClickModeManu.bindAsEventListener(this); + Event.observe(this.btnModeManu, 'mousedown', this.clickModeManu); + + this.clickModeBoost = this.onClickModeBoost.bindAsEventListener(this); + Event.observe(this.btnModeBoost, 'mousedown', this.clickModeBoost); + + // Party Mode currently deactivated + this.clickModeParty = this.onClickModeParty.bindAsEventListener(this); + Event.observe(this.btnModeParty, 'mousedown', this.clickModeParty); + + this.clickHeatingOFF = this.onClickHeatingOFF.bindAsEventListener(this); + Event.observe(this.btnHeatingOFF, 'mousedown', this.clickHeatingOFF); + + this.clickHeatingON = this.onClickHeatingON.bindAsEventListener(this); + Event.observe(this.btnHeatingON, 'mousedown', this.clickHeatingON); + + this.clickTempCOMFORT = this.onClickTempComfort.bindAsEventListener(this); + Event.observe(this.btnTempComfort, 'mousedown', this.clickTempCOMFORT); + + this.clickTempECO = this.onClickTempEco.bindAsEventListener(this); + Event.observe(this.btnTempEco, 'mousedown', this.clickTempECO); + + }, + + onClickModeAuto: function() { + conInfo("clickModeAuto"); + setDpState(this.opts.idAuto, 1); + this.setModeButton(this.btnModeAuto); + }, + + onClickModeManu: function() { + conInfo("clickModeManu"); + setDpState(this.opts.idManu, this.level); + this.setModeButton(this.btnModeManu); + }, + + + onClickModeBoost: function() { + conInfo("clickModeBoost"); + setDpState(this.opts.idBoost, 1); + this.setModeButton(this.btnModeBoost); + }, + + onClickModeParty: function() { + conInfo("clickModeParty"); + var self = this; + var url = "/pages/msg/setPartyMode.htm"; + + var req = jQuery.ajax({ + url : url +"?sid=" + SessionId, + cache: false, + dataType: "html" + }); + + req.done(function(data) { + + partyModeDialog = new PartyModeDialog(translateKey("partyModeDialogTitle"), data, self.opts ,function(result) { + if (result == 1) { + conInfo("SET PARTYMODE"); + var oPartyMode = this.getPartyModeObject(); + conInfo("iseThermostat_2ndGen - oPartyMode: "); + conInfo(oPartyMode); + homematic("Interface.putThermParamset",{'interface': self.chn["interface"], 'address' : self.chn["address"], 'set': + [ + {name:'PARTY_TEMPERATURE', type: 'string', value: oPartyMode.temp}, + {name:'PARTY_START_TIME', type: 'string', value: oPartyMode.startMinutesSinceMidnight}, + {name:'PARTY_START_DAY', type: 'string', value: oPartyMode.startDay}, + {name:'PARTY_START_MONTH', type: 'string', value: oPartyMode.startMonth}, + {name:'PARTY_START_YEAR', type: 'string', value: oPartyMode.startYear}, + {name:'PARTY_STOP_TIME', type: 'string', value: oPartyMode.stopMinutesSinceMidnight}, + {name:'PARTY_STOP_DAY', type: 'string', value: oPartyMode.stopDay}, + {name:'PARTY_STOP_MONTH', type: 'string', value: oPartyMode.stopMonth}, + {name:'PARTY_STOP_YEAR', type: 'string', value: oPartyMode.stopYear} + ] + }); + self.setModeButton(self.btnModeParty); + } + }, "html"); + }); + + req.fail(function() { + alert("Error while loading " + url); + }); + //this.setModeButton(this.btnModeParty); + }, + + + onClickHeatingOFF: function() { + conInfo("clickTempOFF"); + setDpState(this.opts.idManu, 4.5); + ControlBtn.on(this.btnHeatingOFF); + ControlBtn.off(this.btnHeatingON); + }, + + onClickHeatingON: function() { + conInfo("clickTempON"); + setDpState(this.opts.idManu, 30.5); + ControlBtn.on(this.btnHeatingON); + ControlBtn.off(this.btnHeatingOFF); + }, + + onClickTempComfort: function() { + var self = this; + conInfo("clickTempComfort"); + setDpState(this.opts.idComfort, 1); + ControlBtn.pushed(this.btnTempComfort); + setTimeout(function() {ControlBtn.off(self.btnTempComfort);},3000); + }, + + onClickTempEco: function() { + var self = this; + conInfo("clickTempEco"); + setDpState(this.opts.idLowering, 1); + ControlBtn.pushed(this.btnTempEco); + setTimeout(function() {ControlBtn.off(self.btnTempEco);},3000); + }, + + showActualTemp: function() { + jQuery("#"+this.id +"actTemp").text(this.opts.stTemp); + jQuery("#"+this.id +"tblShowTemp").show(); + }, + + showActualHumidity: function() { + if (parseInt(this.opts.stHum) === 20) { + jQuery("#"+this.id +"actHumidity").text('n/a'); + } else { + jQuery("#"+this.id +"actHumidity").text(this.opts.stHum); + jQuery("#"+this.id +"actHumidityUnit").show(); + } + jQuery("#"+this.id +"tblShowHumidity").show(); + }, + + showActualBat: function() { + jQuery("#"+this.id +"actBatteryState").text(this.opts.stBat); + jQuery("#"+this.id +"tblShowBatteryState").show(); + }, + + showActualValve: function() { + jQuery("#"+this.id +"actValveState").text(this.opts.stValve); + jQuery("#"+this.id +"tblShowValveState").show(); + }, + + showHolidayEndTime: function() { + var stopTime = this.getHolidayEndTime(); + if (stopTime) { + jQuery("#"+this.id+"partyEndTime").text(stopTime); + jQuery("#"+this.id+"showPartyEnd").show(); + } + }, + + showChangeMode: function() { + jQuery("#tblChangeMode"+this.id).show(); + }, + + showOnOff: function() { + jQuery("#"+this.id+"modeOFF, #"+this.id+"modeON").show(); + }, + + showComfortEco: function() { + jQuery("#"+this.id+"tempECO, #"+this.id+"tempCOMFORT").show(); + }, + + showPartyMode: function() { + jQuery("#"+this.id + "mode2").show(); + }, + + setModeButton: function(btn) { + ControlBtn.off(this.btnModeAuto); + ControlBtn.off(this.btnModeManu); + ControlBtn.off(this.btnModeBoost); + ControlBtn.off(this.btnModeParty); + ControlBtn.on(btn); + }, + + getHolidayEndTime: function() { + if (isNaN(parseInt(this.opts.stPartyStopTime))) {return false;} + var stopTime = ""; + stopTime += addLeadingZero(this.opts.stPartyStopDay) + "."; + stopTime += addLeadingZero(this.opts.stPartyStopMonth) + "."; + stopTime += addLeadingZero(this.opts.stPartyStopYear) + " - "; + stopTime += addLeadingZero(parseInt((parseInt(this.opts.stPartyStopTime) / 60))) + ":" + addLeadingZero(parseInt(this.opts.stPartyStopTime) % 60); + + // Device firmware < 1.3 + if ((stopTime == "01.01.00 - 00:00") || (stopTime.indexOf("undefined") > -1)) {return false;} + + return stopTime; + } + +}); + +iseThermostatHMIP = Class.create(); + +iseThermostatHMIP.prototype = { + + initialize: function(opts) { + conInfo(opts); + var self = this; + this.opts = opts; + this.devId = opts.devID; + this.chId = this.opts.chID; + this.chAddress = this.opts.chAddress; + this.iface = this.opts.chInterface; + this.setPointID = this.opts.setPointID; + this.setPointModeID = this.opts.setPointModeID; + this.controlModeID = this.opts.controlModeID; + this.boostID = this.opts.boostID; + this.partyStartID = this.opts.partyStartID; + this.partyEndID = this.opts.partyEndID; + this.partyEndValue = this.opts.partyEndValue; + this.partyMode = this.opts.partyMode; + this.windowStateID = this.opts.windowStateID; + this.statusOFF = "OFF"; + this.statusON = "ON"; + this.activeProfileID = this.opts.activeProfileID; + + var paramSetMaster = homematic('Interface.getParamset', {"interface": this.iface, "address" : this.chAddress, "paramsetKey" : "MASTER"}); + + this.confTempMin = parseFloat(paramSetMaster["TEMPERATURE_MINIMUM"]); // Configured min temp (device settings) + this.confTempMax = parseFloat(paramSetMaster["TEMPERATURE_MAXIMUM"]); // Configured max temp (device settings); + + this.offTemp = 4.5; + this.onTemp = 30.5; + this.min = (this.confTempMin < 5) ? 5 : this.confTempMin; + this.max = (this.confTempMax > 30) ? 30 : this.confTempMax; + this.off = (this.confTempMin < 5) ? this.offTemp : this.confTempMin; + this.on = (this.confTempMax > 30) ? this.onTemp : this.confTempMax; + this.unit = " °C"; + this.factor = 100/(this.max-this.min); + this.iViewOnly = false; + this.bSliderPosFlag = false; + this.hasRampClicked = false; + this.btnUpElem = this.getElemByID("Up"); + this.btnDownElem = this.getElemByID("Down"); + this.percentElem = this.getElemByID("Deg"); + this.sliderControl = jQuery("#slidCtrl"+ this.chId); + this.btnAuto = this.getElemByID("Auto"); + this.btnManu = this.getElemByID("Manu"); + this.btnBoost = this.getElemByID("Boost"); + this.btnParty = this.getElemByID("Party"); + this.btnON = this.getElemByID("On"); + this.btnOFF = this.getElemByID("Off"); + + this.btnHeating = this.getElemByID("Heating"); + this.btnCooling = this.getElemByID("Cooling"); + + this.activeProfileElm = this.getElemByID("ActiveProfile"); + this.unitDegree = this.getElemByID("unitDegree"); + this.unknownState = "--"; + + this.heatingCoolingAllowed = (this.iface != 'VirtualDevices') ? true : false; + this.checkIfHeatingCoolingAllowed(); + + + this.setResult(opts); + this.setSControl("ACTUAL_TEMPERATURE", this.ACTUAL_TEMPERATURE); + this.setSControl("HUMIDITY", this.HUMIDITY); + this.setSControl("WINDOW_STATE", this.WINDOW_STATE); + this.setSControl("BATTERY_STATE", this.BATTERY_STATE); + this.setSControl("LEVEL", this.LEVEL); + this.setSlider(); + this.initElements(); + this.bindEvents(); + }, + + setResult: function(opts) { + //conInfo(opts); + this.ACTIVE_PROFILE = this.checkValue(opts.ACTIVE_PROFILE, 0); + this.ACTUAL_TEMPERATURE = this.checkValue(parseFloat(opts.ACTUAL_TEMPERATURE).toFixed(2), this.unknownState); + this.BOOST_MODE = (this.checkBool(opts.BOOST_MODE, false) == "true") ? true : false; + //this.FROST_PROTECTION = opts.FROST_PROTECTION; + this.HUMIDITY = this.checkValue(opts.HUMIDITY, this.unknownState); + this.BATTERY_STATE = this.checkValue(opts.BATTERY_STATE, this.unknownState); + this.LEVEL = this.checkValue(opts.LEVEL, this.unknownState); + //this.PARTY_MODE = opts.PARTY_MODE; + this.SET_POINT_MODE = this.checkValue(opts.SET_POINT_MODE, 0); + this.SET_POINT_TEMPERATURE = this.checkValue(opts.SET_POINT_TEMPERATURE, 4.5); + this.WINDOW_STATE = this.checkWindowState(opts.WINDOW_STATE); + this.state = this.SET_POINT_TEMPERATURE; + }, + + checkValue: function(val, substitute) { + return ((val == undefined) || (isNaN(parseFloat(val)))) ? substitute : val; + }, + + checkBool: function(val, substitute) { + return ((val == undefined) || (val == "")) ? substitute : val; + }, + + checkWindowState: function(windowState) { + var state = (windowState == undefined || windowState == "") ? this.unknownState : windowState; + if (parseInt(state) == 0) { + state = translateKey("infoStatusControlLblClosed"); + } else if (parseInt(state) == 1) { + state =translateKey("infoStatusControlLblOpen"); + } + return state; + }, + + initElements: function() { + + if (this.confTempMin == this.offTemp) {this.btnOFF.show().text(translateKey("actionStatusControlLblOff"));} else {this.btnOFF.show().html(translateKey("minTemp")).css("line-height", "");} + if (this.confTempMax == this.onTemp) {this.btnON.show().text(translateKey("actionStatusControlLblOn"));} else {this.btnON.show().html(translateKey("maxTemp")).css("line-height", "");} + + + if (this.BOOST_MODE) { + JControlBtn.on(this.btnBoost); + } else { + JControlBtn.off(this.btnBoost); + } + + switch (this.SET_POINT_MODE) { + case "0": + JControlBtn.off(this.btnManu); + JControlBtn.off(this.btnParty); + JControlBtn.on(this.btnAuto); + break; + case "1": + JControlBtn.off(this.btnAuto); + JControlBtn.off(this.btnParty); + JControlBtn.on(this.btnManu); + break; + case "2": + JControlBtn.off(this.btnAuto); + JControlBtn.off(this.btnManu); + JControlBtn.on(this.btnParty); + } + + if (this.SET_POINT_TEMPERATURE < 5.0) { + JControlBtn.off(this.btnAuto); + JControlBtn.on(this.btnOFF); + this.percentElem.val(this.statusOFF); + } else if (this.SET_POINT_TEMPERATURE > 30.0) { + JControlBtn.off(this.btnOFF); + JControlBtn.on(this.btnON); + this.percentElem.val(this.statusON); + } else { + JControlBtn.off(this.btnOFF); + JControlBtn.off(this.btnON); + this.percentElem.val(parseFloat(this.state).toFixed(1)); + } + + switch (this.percentElem.val()) { + case this.statusOFF: + this.hideUnitDegree(); + break; + case this.statusON: + this.hideUnitDegree(); + break; + default: + if(this.unitDegree != null) { + this.unitDegree.show(); + } + } + this.activeProfileElm.val(this.ACTIVE_PROFILE); + + if (this.partyMode == "true") { + // Holiday mode active + this.showHolidayEndTime(); + } + + }, + + getHolidayEndTime: function() { + var result = null; + if (this.partyEndValue) { + var arTimeString = this.partyEndValue.split(" "), + arDate = arTimeString[0].split("_"), + oDate = {}, + time = arTimeString[1]; + + oDate.year = addLeadingZero(parseInt(arDate[0])); + oDate.month = addLeadingZero(parseInt(arDate[1])); + oDate.day = addLeadingZero(parseInt(arDate[2])); + + result = oDate.day + "." + oDate.month + "." + oDate.year + " - " + time; + } + return result; + }, + + showHolidayEndTime: function() { + var stopTime = this.getHolidayEndTime(); + if (stopTime != null) { + jQuery("#"+this.chId+"partyEndTime").text(stopTime); + jQuery("#"+this.chId+"showPartyEnd").show(); + } + }, + + getElemByID: function(elm) { + var chId = this.chId; + return jQuery("#"+chId + elm); + }, + + getElemByName: function(elm) { + var chId = this.chId; + return jQuery("[name='"+chId+elm+"']"); + }, + + // Control with string value + setSControl: function(elm, val) { + this.getElemByID("val"+elm).text(val); + this.getElemByID(elm).show(); + }, + + setSlider: function() { + this.slider = new sliderControl( "thermo", this.chId, this.SET_POINT_TEMPERATURE, this.iViewOnly, this.bSliderPosFlag,this.min, this.max, this.factor, this.unit); + this.slider.f_setValue((this.SET_POINT_TEMPERATURE - this.min) * this.factor, true); + }, + + bindEvents: function() { + + this.sliderControl.bind("mouseout", {that: this}, this.onMouseOut); + //this.sliderControl.bind("mouseup", {that: this}, this.onHandleClick); + jQuery(this.slider.e_base).bind("mousedown", {that: this}, this.onRampClick); + + this.btnUpElem.bind("click", {that:this}, this.onClickUp); + this.btnDownElem.bind("click", {that:this}, this.onClickDown); + this.percentElem.bind("change", {that:this}, this.onPercChange); + + this.btnAuto.bind("click", {that:this}, this.onClickModeAuto); + this.btnManu.bind("click", {that:this}, this.onClickModeManu); + this.btnBoost.bind("click", {that:this}, this.onClickModeBoost); + this.btnParty.bind("click", {that:this}, this.onClickModeParty); + this.btnON.bind("click", {that:this}, this.onClickModeON); + this.btnOFF.bind("click", {that:this}, this.onClickModeOFF); + }, + + onRampClick: function(event){ + event.data.that.hasRampClicked = true; + + var pos = Position.page(event.data.that.slider.e_base); + var offset = event.clientX - pos[0]; + var val = ( offset * 100 ) / event.data.that.slider.n_controlWidth; + event.data.that.slider.f_setValue(val); + event.data.that.state = (Math.floor(val)/ event.data.that.factor) + event.data.that.min; + conInfo( "iseThermostat: onRampClick() at ("+val + ") set-> " + event.data.that.state ); + }, + + onMouseOut: function(event) + { + var e = event; + if (!e) { e = window.event; } + var relTarg = e.relatedTarget || e.fromElement; + + if( relTarg ) + { + var b1 = (relTarg.id.indexOf("slider")!=-1); + var b2 = (relTarg.id.indexOf("base")!=-1); + var b3 = (relTarg.id.indexOf("green")!=-1); + var b4 = (relTarg.id.indexOf("spec")!=-1); + if( !b1 && !b2 && !b3 && !b4) + { + if( event.data.that.hasRampClicked ) + { + event.data.that.hasRampClicked = false; + event.data.that.state = event.data.that.percentElem.val(); + event.data.that.refresh(event.data.that.setPointID); + } + } + } + }, + + onHandleClick: function(event) { + conInfo("onHandleClick- hasRampClicked: " +event.data.that.hasRampClicked); + }, + + onClickUp: function(event) + { + conInfo( "iseThermostat: onClickUp()" ); + event.data.that.state = (parseFloat(event.data.that.state) + 1); + if (event.data.that.state > event.data.that.max) + event.data.that.state = event.data.that.max; + event.data.that.refresh(event.data.that.setPointID); + }, + + onClickDown: function(event) + { + conInfo( "iseThermostat: onClickDown()" ); + event.data.that.state = (parseFloat(event.data.that.state) -1); + if (event.data.that.state < event.data.that.min) + event.data.that.state = event.data.that.min; + event.data.that.refresh(event.data.that.setPointID); + }, + + onPercChange: function(event) + { + conInfo( "iseThermostat: onPercChange()" ); + if( isNaN(event.data.that.percentElem.val()) ) return; + if( parseInt(event.data.that.percentElem.val()) > event.data.that.max ) event.data.that.percentElem.val(event.data.that.max); + if( parseInt(event.data.that.percentElem.val()) < this.min ) event.data.that.percentElem.val(event.data.that.min); + event.data.that.state = event.data.that.percentElem.val(); + + event.data.that.refresh(event.data.that.setPointID); + }, + + onClickModeAuto: function(event) { + conInfo("clickModeAuto"); + if (event.data.that.SET_POINT_MODE != 0) { + setDpState(event.data.that.controlModeID, 0); + //JControlBtn.off(event.data.that.btnManu); + JControlBtn.pressed(event.data.that.btnAuto); + } + }, + + onClickModeManu: function(event) { + conInfo("clickModeManu"); + if (event.data.that.SET_POINT_MODE != 1) { + setDpState(event.data.that.controlModeID, 1); + //JControlBtn.off(event.data.that.btnAuto); + JControlBtn.pressed(event.data.that.btnManu); + } + }, + + onClickModeBoost: function(event) { + conInfo("clickModeBoost"); + var self = event.data.that; + if ((parseFloat(self.state) > 4.5) && (parseFloat(self.state) < 30.5)) { + if (! self.BOOST_MODE) { + setDpState(self.boostID, 1); + JControlBtn.pressed(self.btnBoost); + } else { + setDpState(self.boostID, 0); + JControlBtn.off(self.btnBoost); + } + } else { + JControlBtn.pressed(self.btnBoost); + } + }, + + onClickModeON: function(event) { + conInfo("clickModeON"); + //setDpState(event.data.that.setPointID, event.data.that.on); + //JControlBtn.off(event.data.that.btnOFF); + + var self = event.data.that; + JControlBtn.pressed(self.btnON); + homematic("Interface.putParamset",{'interface': self.iface, 'address' : self.chAddress, 'paramsetKey' : 'VALUES', 'set': + [ + {name:'SET_POINT_MODE', type: 'int', value: "1"}, + {name:'CONTROL_MODE', type: 'int', value: "1"}, + {name:'SET_POINT_TEMPERATURE', type: 'double', value:self.on} + ] + }); + + }, + + onClickModeOFF: function(event) { + conInfo("clickModeOFF - SET_POINT_TEMPERATURE: " + this.off); + //setDpState(event.data.that.setPointID, event.data.that.off); + //JControlBtn.off(event.data.that.btnON); + + var self = event.data.that; + JControlBtn.pressed(self.btnOFF); + homematic("Interface.putParamset",{'interface': self.iface, 'address' : self.chAddress, 'paramsetKey' : 'VALUES', 'set': + [ + {name:'SET_POINT_MODE', type: 'int', value: "1"}, + {name:'CONTROL_MODE', type: 'int', value: "1"}, + {name:'SET_POINT_TEMPERATURE', type: 'double', value: self.off} + ] + }); + }, + + onClickModeParty: function(event) { + conInfo("clickModeParty"); + var self = this; + var url = "/pages/msg/setPartyMode.htm"; + + var partyStartTime = event.data.that.opts.partyStartValue, + partyEndTime = event.data.that.opts.partyEndValue, + partySetPointTemp = event.data.that.opts.partySetPointTempValue; + + var oPartyValues = event.data.that.formatPartyTime(partyStartTime, partyEndTime); + oPartyValues.stPartyTemp = parseInt(partySetPointTemp); + + var req = jQuery.ajax({ + url : url +"?sid=" + SessionId, + cache: false, + dataType: "html" + }); + + req.done(function(htmlContent) { + partyModeDialog = new PartyModeDialog(translateKey("partyModeDialogTitle"), htmlContent, oPartyValues,function(result) { + + var self = event.data.that; + var iface = self.iface, + chAddress = self.chAddress; + + if (result == 1) { + conInfo("SET PARTYMODE"); + var oPartyMode = self.formatPartyMode(this.getPartyModeObject()); + + var partyTimeStart = + oPartyMode.startYear + "_" + oPartyMode.startMonth + "_" + oPartyMode.startDay + " " + oPartyMode.startHour + ":" + oPartyMode.startMin, + partyTimeEnd = + oPartyMode.stopYear + "_" + oPartyMode.stopMonth + "_" + oPartyMode.stopDay + " " + oPartyMode.stopHour + ":" + oPartyMode.stopMin; + + conInfo("iseThermostatHMIP - partyTimeStart: " + partyTimeStart + " - partyTimeEnd: " + partyTimeEnd + " - temp: " + oPartyMode.temp); + + homematic("Interface.putParamset",{'interface': iface, 'address' : chAddress, 'paramsetKey' : 'VALUES', 'set': + [ + {name:'SET_POINT_MODE', type: 'int', value: "2"}, + {name:'SET_POINT_TEMPERATURE', type: 'double', value: oPartyMode.temp}, + {name:'PARTY_TIME_START', type: 'string', value: partyTimeStart}, + {name:'PARTY_TIME_END', type: 'string', value: partyTimeEnd} + ] + }); + //self.setModeButton(self.btnModeParty); + } + }, "html"); + }); + + req.fail(function() { + alert("Error while loading " + url); + }); + //this.setModeButton(this.btnModeParty); + }, + + formatPartyTime: function(partyStart, partyEnd) { + + var result = {}; + + if (this.isPartyTimeAvailable(partyStart) && this.isPartyTimeAvailable(partyEnd)) { + var arPartyStartDate = partyStart.split(" ")[0].split("_"), + arPartyStartTime = partyStart.split(" ")[1].split(":"), + startYear = arPartyStartDate[0], + startMonth = arPartyStartDate[1], + startDay = arPartyStartDate[2], + startTime = parseInt(arPartyStartTime[0]) * 60 + parseInt(arPartyStartTime[1]); + + var arPartyStopDate = partyEnd.split(" ")[0].split("_"), + arPartyStopTime = partyEnd.split(" ")[1].split(":"), + stopYear = arPartyStopDate[0], + stopMonth = arPartyStopDate[1], + stopDay = arPartyStopDate[2], + stopTime = parseInt(arPartyStopTime[0]) * 60 + parseInt(arPartyStopTime[1]); + + result.stPartyStartDay = startDay; + result.stPartyStartMonth = startMonth; + result.stPartyStartYear = startYear; + result.stPartyStartTime = startTime; + + result.stPartyStopDay = stopDay; + result.stPartyStopMonth = stopMonth; + result.stPartyStopYear = stopYear; + result.stPartyStopTime = stopTime; + } else { + result.showEmptyFields = true; + } + + return result; + }, + + isPartyTimeAvailable: function(timeString) { + return ((timeString != undefined) && (timeString != "")) ? true : false; + }, + + formatTimeVal: function(val) { + return (parseInt(val) < 10) ? "0" + val : val; + }, + + formatPartyMode: function(oPartyMode) { + oPartyMode.startYear = "20" + oPartyMode.startYear; + oPartyMode.stopYear = "20" + oPartyMode.stopYear; + oPartyMode.startMonth = this.formatTimeVal(oPartyMode.startMonth); + oPartyMode.stopMonth = this.formatTimeVal( oPartyMode.stopMonth); + oPartyMode.startDay = this.formatTimeVal(oPartyMode.startDay); + oPartyMode.stopDay = this.formatTimeVal(oPartyMode.stopDay); + oPartyMode.startHour = this.formatTimeVal(oPartyMode.startHour); + oPartyMode.stopHour = this.formatTimeVal(oPartyMode.stopHour); + oPartyMode.startMin = this.formatTimeVal(oPartyMode.startMin); + oPartyMode.stopMin = this.formatTimeVal(oPartyMode.stopMin); + return oPartyMode; + }, + + hideUnitDegree: function() + { + if (this.unitDegree != null) { + this.unitDegree.hide(); + } + }, + + refresh: function(setPointID) + { + if(this.state < this.min) { this.state = this.min; } + if (this.state > this.max) { this.state = this.max; } + this.slider.f_setValue((this.state -this.min) * this.factor, true); + this.percentElem.val(parseFloat(this.state).toFixed(1)); + conInfo("refresh: setting DP "+this.setPointID+" State -------> " + this.state); + setDpState(setPointID, this.state); + }, + + // SPHM-1231 - When a link between a CLIMATECONTROL_FLOOR_TRANSMITTER (eg. WTH chn. 7) and a CLIMATECONTROL_FLOOR_TRANSCEIVER (e. g. FALMOT-C12 chn. 1 - 12) exists, + // the buttons Heating and Cooling must be only readable. + checkIfHeatingCoolingAllowed: function () { + var self = this; + if (this.heatingCoolingAllowed) { + var dev, chn, arLinkPeers = []; + + dev = DeviceList.getDeviceByAddress(this.chAddress.split(":")[0]); + if (typeof dev != "undefined") { + jQuery.each(dev.channels, function (index, chn) { + if (chn.channelType == "CLIMATECONTROL_FLOOR_TRANSMITTER") { + arLinkPeers = homematic("Interface.getLinkPeers", {'interface': self.iface, 'address': chn.address}); + jQuery.each(arLinkPeers, function (index, chnAddress) { + chn = DeviceList.getChannelByAddress(chnAddress); + if (chn.channelType == "CLIMATECONTROL_FLOOR_TRANSCEIVER") { + self.heatingCoolingAllowed = false; + } + }); + } + }); + + if (!this.heatingCoolingAllowed) { + this.btnHeating.prop("onclick", null); + this.btnCooling.prop("onclick", null); + this.btnHeating.unbind("click").click(function () { + MessageBox.show(translateKey("dialogHint"), translateKey("hintHeatingCoolngNotAllowed"), function () { + loadChannels(self.devId); + }, 500, 125); + }).css("cursor", "default"); + this.btnCooling.unbind("click").click(function () { + MessageBox.show(translateKey("dialogHint"), translateKey("hintHeatingCoolngNotAllowed"), function () { + loadChannels(self.devId); + }, 500, 125); + }).css("cursor", "default"); + } + } else { + window.setTimeout(function() {self.checkIfHeatingCoolingAllowed();}, 2000); + } + } + } + +};/** + * ise/iseFrequency.js + **/ + +/** + * @fileOverview ? + * @copy of iseThermostat.js + **/ + + /** + * @class + **/ +iseFrequency = Class.create(); + +iseFrequency.prototype = { + /* + * id = DOM-ID of switch + * initState = Creation State + */ + initialize: function(id, initState, lvlDP, min, max, iViewOnly, bSliderPosFlag) + { + conInfo( "iseFrequency: initialize()" ); + conInfo ("value(: " + initState + ") min(" + min + ") max(" + max + ")"); + this.id = id; + this.state = initState; + this.lvlDP = lvlDP; + this.min = min; + this.max = max; + this.factor = 100/(max-min); + this.unit = " mHz"; + if(bSliderPosFlag) + { + this.bSliderPosFlag = bSliderPosFlag; + } + else + { + this.bSliderPosFlag = false; + } + this.slider = new sliderControl( "thermo", this.id, initState, iViewOnly, this.bSliderPosFlag,this.min, this.max, this.factor, this.unit); + this.hasRampClicked = false; + this.txtDeg = $(this.id + "Deg"); + // Add event handlers + if (iViewOnly === 0) + { + this.mouseOut = this.onMouseOut.bindAsEventListener(this); + Event.observe($("slidCtrl" + this.id), 'mouseout', this.mouseOut); + + this.rampClick = this.onRampClick.bindAsEventListener(this); + Event.observe(this.slider.e_base, 'mousedown', this.rampClick); + + this.handleClick = this.onHandleClick.bindAsEventListener(this); + Event.observe($("slidCtrl" + this.id), 'mouseup', this.handleClick); + + this.clickUp = this.onClickUp.bindAsEventListener(this); + Event.observe($(this.id + "Up"), 'click', this.clickUp); + + this.clickDown = this.onClickDown.bindAsEventListener(this); + Event.observe($(this.id + "Down"), 'click', this.clickDown); + + this.percChange = this.onPercChange.bindAsEventListener(this); + Event.observe($(this.id + "Deg"), 'change', this.percChange); + } + this.refresh(false); + }, + + onMouseOut: function(event) + { + var e = event; + if (!e) { e = window.event; } + var relTarg = e.relatedTarget || e.fromElement; + if( relTarg ) + { + var b1 = (relTarg.id.indexOf("slider")!=-1); + var b2 = (relTarg.id.indexOf("base")!=-1); + var b3 = (relTarg.id.indexOf("green")!=-1); + var b4 = (relTarg.id.indexOf("spec")!=-1); + if( !b1 && !b2 && !b3 && !b4) + { + if( this.hasRampClicked ) + { + conInfo( "iseFrequency: onMouseOut() ["+relTarg.id+"], wanna set: " + ( (this.slider.n_value/this.factor) + this.min) ); + this.hasRampClicked = false; + + this.state = (this.slider.n_value/this.factor) + this.min; + this.refresh(); + } + } + } + }, + + onRampClick: function(ev) + { + this.hasRampClicked = true; + var pos = Position.page(this.slider.e_base); + var offset = ev.clientX - pos[0]; + var val = ( offset * 100 ) / this.slider.n_controlWidth; + this.slider.f_setValue(val); + this.state = (Math.floor(val)/ this.factor) + this.min; + conInfo( "iseFrequency: onRampClick() at ("+val + ") set-> " + this.state ); + // this.refresh(); + //window.setTimeout("ibd"+this.id+".refresh()",1000); + }, + + onHandleClick: function() + { + conInfo( "iseFrequency: onHandleClick() perc: " + this.txtDeg.value); + this.hasRampClicked = false; + this.state = this.txtDeg.value; + this.refresh(); + }, + + onClickUp: function() + { + conInfo( "iseFrequency: onClickUp()" ); + // this.state = (this.slider.n_value/this.factor); + this.state = Math.round(this.state + 100); + if (this.state > this.max) + this.state = this.max; + + this.refresh(); + }, + + onClickDown: function() + { + conInfo( "iseFrequency: onClickDown()" ); + // this.state = (this.slider.n_value/this.factor); + this.state = Math.round(this.state - 100); + if (this.state < this.min) + this.state = this.min; + + this.refresh(); + }, + + onPercChange: function() + { + conInfo( "iseFrequency: onPercChange()" ); + if( isNaN(this.txtDeg.value) ) return; + if( parseInt(this.txtDeg.value) > this.max ) this.txtDeg.value = this.max; + if( parseInt(this.txtDeg.value) < this.min ) this.txtDeg.value = this.min; + this.state = this.txtDeg.value; + this.refresh(); + }, + + update: function(newVal) + { + conInfo( "iseFrequency: update()" ); + this.state = newVal; + this.refresh(newVal); + }, + + refresh: function(setstate) + { + conInfo( "iseFrequency: refresh()"+this.state ); + if(this.state < 0){ this.state = 0; } + if (this.state > this.max) this.state = this.max; + this.slider.f_setValue((this.state -this.min) * this.factor, true); + this.txtDeg.value = round(this.state,2); + if(typeof setstate == "undefined") + { + conInfo("setting DP "+this.lvlDP+" State -------> " + this.state); + setDpState(this.lvlDP, (this.state)); + } + } +}; +/** + * ise/iseButtonsDoorContact.js + **/ + +/** + * @fileOverview ? + * @author ise + **/ + +/** + * @class + **/ +iseButtonsDoorContact = Class.create(); + +iseButtonsDoorContact.prototype = { + /* + * id = datapoint-ID of switch + * initState = Creation State (0 or 1) + */ + initialize: function(id, initState) + { + this.id = id; + this.state = this.convertInitState(initState); + this.divOpen = $(this.id + "Open"); + this.divClosed = $(this.id + "Closed"); + + if( this.state > 0 ) + { + ControlBtn.on(this.divOpen); + } + else + { + ControlBtn.on(this.divClosed); + } + }, + + convertInitState: function(initState) { + + switch (initState) { + case "0": + case "false": + case "CLOSED": + return 0; + case "1": + case "200": + case "true": + case "OPEN": + return 1; + } + return -1; + } + +};/** + * ise/iseButtonsWindow.js + **/ + +/** + * @fileOverview ? + * @author ise + **/ + +/* * * * * * * * * * * * * * * * * * * * * * * * + * iseButtonsWindow * + * * * * * * * * * * * * * * * * * * * * * * * */ + +/** + * @class + **/ +iseButtonsWindow = Class.create(); + +iseButtonsWindow.prototype = { + /* + * id = datapoint-ID of switch + * initState = Creation State (0 or 1) + */ + initialize: function(id, initState) { + this.id = id; + this.state = initState; + this.divOpenH = $(this.id + "OpenH"); + this.divOpenV = $(this.id + "OpenV"); + this.divClosed = $(this.id + "Closed"); + + switch (initState) { + case 0: + case false: + ControlBtn.on(this.divClosed); + break; + case 1: + ControlBtn.on(this.divOpenV); + break; + case 2: + case true: + ControlBtn.on(this.divOpenH); + break; + default: + break; + } + } +}; + + +/* * * * * * * * * * * * * * * * * * * * * * * * + * iseButtonsWinMatic * + * * * * * * * * * * * * * * * * * * * * * * * */ + +/** + * @class + **/ +iseButtonsWinMatic= Class.create(); + +iseButtonsWinMatic.prototype = { + /* + * id = datapoint-ID of switch + * initState = Creation State (0 or 1) + */ + initialize: function(id, opts, iViewOnly) + { + this.Window = "WinMatic"; + conInfo(this.Window); + this.id = id; + this.opts = opts; + this.Circle = $(this.id + "Circle"); + this.Perc = $(this.id + "Perc"); + this.divPercUp = $(this.id + "PercUp"); + this.divPercDown = $(this.id + "PercDown"); + this.divStop = $(this.id + "Stop"); + this.divOpen = $(this.id + "Open"); + this.divClose = $(this.id + "Close"); + this.divLocked = $(this.id + "Locked"); + this.divUnknown = $(this.id + "Unknown"); + this.state = this.opts.stLevel * 100; + Released = false; + // Draw WinMatic Control + var s = "
" + + "
"; + this.Circle.innerHTML = s; + this.graphics = new jsGraphics(this.id+"Ctrl"); + this.graphics.setColor(WebUI.getColor("active")); // grün + + // Add event handlers + if (iViewOnly === 0) { + this.bindEvents(); + this.initSpecialDevice(); + } + this.refresh(false); + }, + + onClickCtrl: function(ev) { + var pos = Position.page(this.Circle); + var offsetX = ev.clientX - pos[0]; + var offsetY = ev.clientY - pos[1]; + if (offsetX < 60) + this.state = 0; + else { + if (this.isInZone50(offsetX, offsetY) ) + this.state = 50; + else + this.state = 100; + } + this.refresh(); + }, + + isInZone50: function(x, y) + { + var px = x; + var py = y; + var x1 = 57; + var y1 = 0; + var x2 = 57; + var y2 = 100; + var x3 = 120; + var y3 = 0; + + var fAB = (py-y1)*(x2-x1) - (px-x1)*(y2-y1); + var fCA = (py-y3)*(x1-x3) - (px-x3)*(y1-y3); + var fBC = (py-y2)*(x3-x2) - (px-x2)*(y3-y2); + + var bRet = false; + if ( (fAB*fBC > 0) && (fBC*fCA > 0) ) + { + bRet = true; + } + return bRet; + }, + + onClickPercUp: function() + { + this.state += 10; + if( this.state > 100 ) this.state = 100; + this.Perc.value = this.state; + this.refresh(); + }, + + onClickPercDown: function() + { + this.state -= 10; + if( this.state < 0 ) this.state = 0; + this.refresh(); + }, + + onChangePerc: function() + { + if( !isNaN( this.Perc.value ) ) + { + var iTmp = parseInt(this.Perc.value); + if (iTmp < 0) + iTmp = 0; + this.state = iTmp; + this.refresh(); + } + }, + + onClickOpen: function() { + this.state = 100; + ControlBtn.pushed(this.divOpen); + var t = this; + new PeriodicalExecuter(function(pe) { + ControlBtn.off(t.divOpen); + t.refresh(); + pe.stop(); + }, 1); + }, + + onClickClose: function() { + this.state = 0; + this.Perc.value = this.state; + ControlBtn.pushed(this.divClose); + var t = this; + new PeriodicalExecuter(function(pe) { + ControlBtn.off(t.divClose); + t.refresh(); + pe.stop(); + }, 1); + }, + + onClickStop: function() + { + var t = this; + conInfo( this.Window + " OnClickStop [ID:"+this.opts.idStop+"]" ); + setDpState(this.opts.idStop, 1); + ControlBtn.pushed(this.divStop); + new PeriodicalExecuter(function(pe) + { + ControlBtn.off(t.divStop); + pe.stop(); + }, 1); + }, + + onClickLock: function() { + ControlBtn.pushed(this.divLocked); + this.state = -5; + var t = this; + new PeriodicalExecuter(function(pe) { + ControlBtn.off(t.divLocked); + t.refresh(); + pe.stop(); + }, 1); + }, + + bindEvents: function() { + this.clickCtrl = this.onClickCtrl.bindAsEventListener(this); + Event.observe(this.Circle, 'mousedown', this.clickCtrl); + + this.clickPercUp = this.onClickPercUp.bindAsEventListener(this); + Event.observe($(this.id + "PercUp"), 'click', this.clickPercUp); + this.clickPercDown = this.onClickPercDown.bindAsEventListener(this); + Event.observe($(this.id + "PercDown"), 'click', this.clickPercDown); + this.changePerc = this.onChangePerc.bindAsEventListener(this); + Event.observe(this.Perc, 'change', this.changePerc); + + this.clickOpen = this.onClickOpen.bindAsEventListener(this); + Event.observe($(this.id + "Open"), 'mousedown', this.clickOpen); + + this.clickClose = this.onClickClose.bindAsEventListener(this); + Event.observe($(this.id + "Close"), 'mousedown', this.clickClose); + + this.clickLock = this.onClickLock.bindAsEventListener(this); + Event.observe($(this.id + "Locked"), 'mousedown', this.clickLock); + + this.clickStop = this.onClickStop.bindAsEventListener(this); + Event.observe($(this.id + "Stop"), 'mousedown', this.clickStop); + }, + + + initSpecialDevice: function() {}, + + refresh: function(bRefresh) + { + this.Perc.value = this.state; + if (this.state == -5 || this.state == -0.5 || isNaN(this.state)) + { + this.Perc.value = "0"; + } + + + this.graphics.clear(); + var startAngle = 90 - (this.state * 0.45); + if( (startAngle > 0) && (startAngle < 90)) + { + // verhindern dass ein voller Kreis gezeichnet wird + this.graphics.fillArc(-65, 5, 188, 179 , startAngle, 90); + } + this.graphics.paint(); + + if( typeof( bRefresh ) == "undefined" ) + { + setDpState(this.opts.idLevel, (this.state / 100)); + } + if (this.state == -0.5) + { + // Zustand verriegelt ?? + ControlBtn.off(this.divOpen); + ControlBtn.on(this.divClose); + ControlBtn.on(this.divLocked); + } + else + { + ControlBtn.off(this.divLocked); + if (this.state > 0) + { + ControlBtn.on(this.divOpen); + ControlBtn.off(this.divClose); + } + else + { + ControlBtn.off(this.divOpen); + ControlBtn.on(this.divClose); + } + } + + if( this.opts.stUncertain ) + { + ControlBtn.on(this.divUnknown); + } + else + { + ControlBtn.off(this.divUnknown); + } + } +}; + +iseButtonsWin_SC = Class.create(iseButtonsWinMatic, { + + initSpecialDevice: function() { + this.Window = "WIN_SC"; + conInfo(this.Window); + this.LEDMode1 = $(this.id + "LEDMode1"); + this.LEDMode2 = $(this.id + "LEDMode2"); + this.LEDMode3 = $(this.id + "LEDMode3"); + this.SummerMode = $(this.id + "SummerMode"); + this.WinterMode = $(this.id + "WinterMode"); + this.HandleLock = $(this.id + "HandleLock"); + this.HandleUnlock = $(this.id + "HandleUnlock"); + this.Open = $(this.id + "Open"); + this.Close = $(this.id + "Close"); + this.Release = $(this.id + "Release"); + this.elmHH = jQuery("#winterModeHH"); + this.elmMM = jQuery("#winterModeMM"); + this.elmSS = jQuery("#winterModeSS"); + this.initControls(); + this.bindAdditionalEvents(); + }, + + + initControls: function() { + var controls = [ + this.LEDMode1, + this.LEDMode2, + this.LEDMode3, + this.SummerMode, + this.WinterMode, + this.HandleLock, + this.HandleUnlock + //this.Open, + //this.Close, + //this.Release + ]; + + // All off + jQuery(controls).each(function(){ + ControlBtn.off(this); + }); + + switch (this.opts.stLEDMode.toString()) { + case "0" : + ControlBtn.on(this.LEDMode1); + break; + case "1" : + ControlBtn.on(this.LEDMode2); + break; + case "2" : + ControlBtn.on(this.LEDMode3); + break; + } + + if (this.opts.stWinterMode != 111600) { + ControlBtn.on(this.WinterMode); + this.setValueWinterMode(true); + } else { + ControlBtn.on(this.SummerMode); + this.setValueWinterMode(false); + } + + if (this.opts.stHandleLock) { + ControlBtn.on(this.HandleLock); + } else { + ControlBtn.on(this.HandleUnlock); + } + + // Window is released + /* + if (this.opts.stRelease) { + ControlBtn.on(this.Release); + ControlBtn.off(this.Open); + ControlBtn.off(this.Close); + } else { + // Window is either closed or open + ControlBtn.off(this.Release); + + if (this.opts.stLevel <= 0) { + // Window is closed + ControlBtn.on(this.Close); + ControlBtn.off(this.Open); + } else { + // Window is open + ControlBtn.on(this.Open); + ControlBtn.off(this.Close); + } + } + */ + }, + + /** + * Sets the input fields for the time of the winter mode control + * @param bMode true = winter mode - false = summer mode + */ + setValueWinterMode: function(bMode) { + if (bMode) { + var oTime = this.getHHMMSSWinterMode(); + this.elmHH.val(oTime.hh); + this.elmMM.val(oTime.mm); + this.elmSS.val(oTime.ss); + } else { + this.elmHH.val("18"); + this.elmMM.val("12"); + this.elmSS.val("15"); + } + }, + + getHHMMSSWinterMode: function() { + var s = this.opts.stWinterMode; + var h = Math.floor(s/3600); + s -= h*3600; + var m = Math.floor(s/60); + s -= m*60; + return {"hh" : h, "mm":m, "ss": s}; + }, + + getSecondsWinterMode: function() { + return (parseInt(this.elmHH.val() * 3600)) + (parseInt(this.elmMM.val() * 60)) + parseInt(this.elmSS.val()); + }, + + checkValue: function(val) { + + switch (val) { + case "hh" : + var val = parseInt(this.elmHH.val()); + if (val > 18) {this.elmHH.val("18");break;} + if (val < 0 ) {this.elmHH.val("0");break;} + if (isNaN(val)) {this.elmHH.val("0");} + break; + case "mm" : + var val = parseInt(this.elmMM.val()); + if (val > 59) {this.elmMM.val("59");break;} + if (val < 0 ) {this.elmMM.val("0");break;} + if (isNaN(val)) {this.elmMM.val("0");} + break; + case "ss" : + var val = parseInt(this.elmSS.val()); + if (val > 59) {this.elmSS.val("59");break;} + if (val < 0 ) {this.elmSS.val("0");break;} + if (isNaN(val)) {this.elmSS.val("0");} + break; + } + }, + + bindAdditionalEvents : function() { + var self = this; + + this.clickWinRelease = this.onClickWinRelease.bindAsEventListener(this); + Event.observe($(this.id + "Release"), 'mousedown', this.clickWinRelease); + + this.clickHandleUnlock = this.onClickHandleUnlock.bindAsEventListener(this); + Event.observe($(this.id + "HandleUnlock"), 'mousedown', this.clickHandleUnlock); + + this.clickHandleLock = this.onClickHandleLock.bindAsEventListener(this); + Event.observe($(this.id + "HandleLock"), 'mousedown', this.clickHandleLock); + + this.clickSummerMode = this.onClickSummerMode.bindAsEventListener(this); + Event.observe(this.SummerMode, 'mousedown', this.clickSummerMode); + + this.clickWinterMode = this.onClickWinterMode.bindAsEventListener(this); + Event.observe(this.WinterMode, 'mousedown', this.clickWinterMode); + + this.clickLEDMode1 = this.onClickLEDMode1.bindAsEventListener(this); + Event.observe(this.LEDMode1, 'mousedown', this.clickLEDMode1); + + this.clickLEDMode2 = this.onClickLEDMode2.bindAsEventListener(this); + Event.observe(this.LEDMode2, 'mousedown', this.clickLEDMode2); + + this.clickLEDMode3 = this.onClickLEDMode3.bindAsEventListener(this); + Event.observe(this.LEDMode3, 'mousedown', this.clickLEDMode3); + + this.elmHH.bind("blur", function() {self.checkValue("hh");}); + this.elmMM.bind("blur", function() {self.checkValue("mm");}); + this.elmSS.bind("blur", function() {self.checkValue("ss");}); + + }, + + onClickOpen: function() { + if (Released == undefined || Released == false) { + this.state = 100; + setDpState(this.opts.idLevel, (this.state / 100)); + } + }, + + onClickClose: function() { + if (Released == undefined || Released == false) { + this.state = 0; + this.Perc.value = this.state; + setDpState(this.opts.idLevel, (this.state / 100)); + } + }, + + _onClickWinRelease : function() { + //setDpState(this.opts.idRelease, true); + setDpState(this.opts.idRelease, 1); + if (this.state > 0) { + ControlBtn.off(this.Open); + ControlBtn.off(this.Close); + ControlBtn.on(this.Release); + } + }, + + onClickWinRelease : function() { + setDpState(this.opts.idRelease, 1); + }, + + onClickHandleUnlock : function() { + //alert("HANDLE UNLOCK"); + setDpState(this.opts.idHandleLock, false); + //ControlBtn.pushed(this.HandleUnlock); + //ControlBtn.on(this.HandleUnlock); + //ControlBtn.off(this.HandleLock); + }, + + onClickHandleLock : function() { + //alert("HANDLE LOCK"); + setDpState(this.opts.idHandleLock, true); + //ControlBtn.pushed(this.HandleLock); + //ControlBtn.off(this.HandleUnlock); + //ControlBtn.on(this.HandleLock); + }, + + onClickSummerMode : function() { + //alert("Summer Mode"); + setDpState(this.opts.idWinterMode, 111600); + ControlBtn.pushed(this.SummerMode); + var t = this; + new PeriodicalExecuter(function(pe) { + //ControlBtn.on(t.SummerMode); + //ControlBtn.off(t.WinterMode); + pe.stop(); + }, 1); + }, + + onClickWinterMode : function() { + //alert("Winter Mode"); + fixTimeForWinterMode = 600; + + this.checkValue("hh"); + this.checkValue("mm"); + this.checkValue("ss"); + + //setDpState(this.opts.idWinterMode, this.getSecondsWinterMode()); // for development only + + setDpState(this.opts.idWinterMode, fixTimeForWinterMode); + ControlBtn.pushed(this.WinterMode); + var t = this; + new PeriodicalExecuter(function(pe) { + //ControlBtn.off(t.SummerMode); + //ControlBtn.on(t.WinterMode); + pe.stop(); + }, 1); + }, + + onClickLEDMode1 : function() { + // LED OFF + conInfo("WIN_SC.HANDLE_LED_MODE 0"); + setDpState(this.opts.idLEDMode, 0); + ControlBtn.pushed(this.LEDMode1); + var t = this; + new PeriodicalExecuter(function(pe) { + //ControlBtn.on(t.LEDMode1); + //ControlBtn.off(t.LEDMode2); + //ControlBtn.off(t.LEDMode3); + pe.stop(); + }, 1); + }, + + onClickLEDMode2 : function() { + // LED LOW + conInfo("WIN_SC.HANDLE_LED_MODE 1"); + setDpState(this.opts.idLEDMode, 1); + ControlBtn.pushed(this.LEDMode2); + var t = this; + new PeriodicalExecuter(function(pe) { + //ControlBtn.off(t.LEDMode1); + //ControlBtn.on(t.LEDMode2); + //ControlBtn.off(t.LEDMode3); + pe.stop(); + }, 1); + }, + + onClickLEDMode3 : function() { + // LED ON + conInfo("WIN_SC.HANDLE_LED_MODE 2"); + setDpState(this.opts.idLEDMode, 2); + ControlBtn.pushed(this.LEDMode3); + var t = this; + new PeriodicalExecuter(function(pe) { + //ControlBtn.off(t.LEDMode1); + //ControlBtn.off(t.LEDMode2); + //ControlBtn.on(t.LEDMode3); + pe.stop(); + }, 1); + }, + + onClickPercUp: function() + { + if (this.state <= 0) { + this.state = 20; + } else { + this.state += 10; + } + if( this.state > 100 ) this.state = 100; + this.Perc.value = this.state; + this.refresh(); + }, + + onClickPercDown: function() + { + if (this.state >= 30) { + this.state -= 10; + } else { + this.state-= 20; + } + if( this.state < 0 ) this.state = 0; + this.refresh(); + } + +}); + +iseButtonsWin_SC_SENSOR = Class.create(iseButtonsWinMatic, { + + initSpecialDevice: function() { + this.Window = "WIN_SC_SENSOR"; + conInfo(this.Window); + this.imgWinClosed = "/ise/img/window/closed.png"; + this.imgWinOpen = "/ise/img/window/open_v.png"; + this.imgWinReleased = "/ise/img/window/open_h.png"; + + //this.Open = $(this.id + "Open"); + //this.Close = $(this.id + "Close"); + this.stateIndicatorImgElem = jQuery("#" + this.id + "stateIndicatorImg"); + this.stateIndicatorDescrElem = jQuery("#" + this.id + "stateIndicatorDescr"); + this.stateDescrElem = jQuery("#" + this.id + "stateDescr"); + this.windowTypeDescr = jQuery("#" + this.id + "windowType"); + + + this.level = (this.state < 0 ) ? 0 : this.state; + + jQuery("#" + this.id + "lblPerc").html("Öffnungs-
winkel
" + this.level); + this.initControls(); + }, + + initControls: function() { + var tmpLevel; + + var release = $$(".j_winSC_Release")[0], + open = jQuery(".j_winSC_Open")[0], + close = jQuery(".j_winSC_Close")[0], + perc = jQuery(".j_winSC_Perc")[0], + + codeReleasedDue = 9, + codeReleased = 10; + + // Window released + if ((this.opts.stTipTronicState == codeReleased) || (this.opts.stTipTronicState == codeReleasedDue)) { + Released = true; + ControlBtn.on(release); + ControlBtn.off(open); + ControlBtn.off(close); + + this.stateIndicatorImgElem.attr('src', this.imgWinReleased); + this.stateIndicatorDescrElem.html(translateKey("actionStatusControlReleased")); + } else { + Released = false; + new PeriodicalExecuter(function(pe) { + ControlBtn.off(release); // channel 1 + pe.stop(); + }, 1); + tmpLevel = this.level; + // Window open + if (parseInt(tmpLevel) > 0) { + ControlBtn.on(open); // channel 1 + ControlBtn.off(close); // channel 1 + ControlBtn.off(release); // channel 1 + + this.stateIndicatorImgElem.attr('src', this.imgWinOpen); + this.stateIndicatorDescrElem.html(translateKey("actionStatusControlOpenB") + "
" + this.level + "%"); + } else { + // window closed + ControlBtn.on(close); // channel 1 + ControlBtn.off(open); // channel 1 + ControlBtn.off(release); // channel 1 + this.stateIndicatorImgElem.attr('src', this.imgWinClosed); + this.stateIndicatorDescrElem.html(translateKey("actionStatusControlClosed")); + } + } + jQuery(perc).val(this.level); + this.stateDescrElem.html(translateKey("stringTableActorWindowTT_"+this.opts.stTipTronicState)); + this.windowTypeDescr.html(translateKey("stringTableSensorWindowType_"+this.opts.stWindowType)); + + }, + + // No action when clicking the buttons + onClickCtrl: function() {}, + onClickOpen: function() {}, + onClickClose : function() {} +});/** + * ise/iseButtonsKeyMatic.js + **/ + +/** + * @fileOverview ? + * @author ise + **/ + +/* * * * * * * * * * * * * * * * * * * * * * * * + * iseButtonsKeyMatic * + * * * * * * * * * * * * * * * * * * * * * * * */ + +/** + * @class Bedien-Control für die KeyMatic + **/ +iseButtonsKeyMatic = Class.create(); + +iseButtonsKeyMatic.prototype = { + /* + * id = ID of KeyMatic + */ + initialize: function(id, opts, iViewOnly) { + this.id = id; + this.opts = opts; + this.divOpen = $(opts.idState + "Open"); + this.divClosed = $(opts.idState + "Close"); + this.divOpenDoor = $(opts.idOpen + "OpenDoor"); + this.divStatusIndefinite = $(opts.idUncertain + "na"); + + if (iViewOnly === 0) + { + this.clickClose = this.onClickClose.bindAsEventListener(this); + Event.observe(this.divClosed, 'mousedown', this.clickClose); + + this.clickOpen = this.onClickOpen.bindAsEventListener(this); + Event.observe(this.divOpen, 'mousedown', this.clickOpen); + + this.clickDoorOpen = this.onClickDoorOpen.bindAsEventListener(this); + Event.observe(this.divOpenDoor, 'mousedown', this.clickDoorOpen); + } + + if (opts.stState == 1) + { + ControlBtn.on(this.divOpen); + } + else + { + ControlBtn.on(this.divClosed); + } + + if (opts.stUncertain == 1) { + ControlBtn.on(this.divStatusIndefinite); + } + if (opts.stOpen == 1) { + ControlBtn.on(this.divOpenDoor); + } + }, + + onClickClose: function() { + ControlBtn.pushed(this.divClosed); + setDpState (this.opts.idState, 0); + var t = this; + new PeriodicalExecuter(function(pe) { + ControlBtn.on(t.divClosed); + ControlBtn.off(t.divOpen); + pe.stop(); + }, 1); + }, + + onClickOpen: function() { + ControlBtn.pushed(this.divOpen); + setDpState (this.opts.idState, 1); + var t = this; + new PeriodicalExecuter(function(pe) { + ControlBtn.on(t.divOpen); + ControlBtn.off(t.divClosed); + pe.stop(); + }, 1); + }, + + onClickDoorOpen: function() { + ControlBtn.pushed(this.divOpenDoor); + setDpState(this.opts.idOpen, 1); + var t = this; + new PeriodicalExecuter(function(pe) { + if (t.opts.stOpen == 1) { ControlBtn.on(t.divOpenDoor); } + else { ControlBtn.off(t.divOpenDoor); } + pe.stop(); + }, 1); + } +}; +/** + * ise/DoorOpener.js + * Türöffner. + **/ + +/** + * @fileOverview ? + * @author ise + **/ + +/** + * @class Bedien-Control für den Türöffner + **/ +DoorOpenerControl = Class.create(); +DoorOpenerControl.prototype = { + + /** + * Konstruktor. + * channelId : Id des Türöffners (Kanal) + * dataPointId: Id des Datenpunkts DOOROPENER.STATE + * iViewOnly : 0: Control bedienbar + * sonst: Control nicht bedienbar + **/ + initialize: function(channelId, dataPointId, iViewOnly) + { + this.channelId = channelId; + this.dataPointId = dataPointId; + this.doorOpenerDiv = $(channelId + "DoorOpener"); + + if( this.doorOpenerDiv ) { ControlBtn.off(this.doorOpenerDiv); } + + if (iViewOnly === 0) + { + this.click = this.onClick.bindAsEventListener(this); + Event.observe(this.doorOpenerDiv, 'mousedown', this.click); + Element.setStyle(this.doorOpenerDiv, {"cursor": "pointer"}); + } + }, + + /** + * Ereignis: Click auf this.doorOpenerDiv + * Öffnet die Tür. + **/ + onClick: function() + { + setDpState(this.dataPointId, 1); + ControlBtn.pushed(this.doorOpenerDiv); + var t = this; + new PeriodicalExecuter(function(pe) { + ControlBtn.off(t.doorOpenerDiv); + pe.stop(); + }, 1); + } + +}; +/** + * ise/iseSysProtoLoader.js + **/ + +/** + * @fileOverview ? + * @author ise + **/ + +/** + * @class + **/ +iseSysProtoLoader = Class.create(); +iseSysProtoLoader.prototype = +{ + initialize: function(sTBody,iCount,bUpdateOnly) + { + this.tbody = $(sTBody); + this.updateOnly = bUpdateOnly; + this.currentIndex = 0; + this.count = iCount; + this.url = "/pages/tabs/control/systemProtocolLoader.htm?sid="+SessionId; + Cursor.set(Cursor.WAIT); + if( this.updateOnly ) + { + this.updateTable(); + } + else + { + arHistoryData = new Array(); + this.loadHistoryData(); + } + }, + + loadHistoryData: function() + { + var btnRefreshTable = jQuery("#btnRefreshTable"); + btnRefreshTable.prop("onclick","").unbind(); + var t = this; + var pb = ''; + pb += 'string sStart = "'+this.currentIndex+'";'; + pb += 'string sCount = "'+this.count+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete: function(transParams) + { + transParams.responseText.evalScripts(); + var resp = iseStripAll(transParams.responseText.stripScripts()); + var iResponse = parseInt( resp ); + if( isNaN(iResponse) ) { iResponse = 0; } + if( iResponse !== 0 ) + { + t.updateTable(); + t.currentIndex += iResponse; + t.loadHistoryData(); + } + else + { + Cursor.set(Cursor.NORMAL); + // SPHM-645 + //if( !t.updateOnly ) DivSort("sqldate"); + btnRefreshTable.click(function() {refreshTable(false);}); + } + } + }; + new Ajax.Updater("dummy",this.url,opts); + }, + + updateTable: function() + { + if( this.updateOnly ) + { + arTempHistoryData = arHistoryData; + } + for (var i = 0; i < arTempHistoryData.length; i++) + { + var sName = arTempHistoryData[i]['name']; + var sValue = arTempHistoryData[i]['value']; + var sDateTime = arTempHistoryData[i]['datetime']; + var sDate = arTempHistoryData[i]['date']; + var sTime = arTempHistoryData[i]['time']; + + var tr = Builder.node('tr', {id: arTempHistoryData[i]['trid']} ); + var td; + + if( this.tbody.id == "sysprotopreview" ) + { + td = Builder.node('td', {className: "GrayBkg"}, sDate+" "+sTime); + tr.appendChild(td); + } + else + { + td = Builder.node('td', {className: "GrayBkg"}, sTime); + tr.appendChild(td); + + td = Builder.node('td', {className: "GrayBkg"}, sDate); + tr.appendChild(td); + } + + td = Builder.node('td', {className: "GrayBkg"}, translateString(sName)); + tr.appendChild(td); + + var div = document.createElement("div"); + //div.innerHTML = sValue; + div.innerHTML = translateString(sValue) ; + td = Builder.node('td', {className: "GrayBkg"}, div); + Element.setStyle(td, {textAlign: "left", paddingLeft: "6px"}); + tr.appendChild(td); + + if( this.tbody ) + { + this.tbody.appendChild(tr); + } + } + if( this.updateOnly ) Cursor.set(Cursor.NORMAL); + updateTable(); + arTempHistoryData = new Array(); + } +}; +/** + * ise/iseChannelLoader.js + **/ + +/** + * @fileOverview ? + * @author ise + **/ + +/** + * @class + **/ +iseChannelLoader = Class.create(); +iseChannelLoader.prototype = +{ + initialize: function(sTBody,iCountPerUpdate,bUpdateOnly) + { + this.tbody = $(sTBody); + this.updateOnly = bUpdateOnly; + this.currentIndex = 0; + this.count = iCountPerUpdate; + this.url = "/pages/tabs/statusviews/channelLoader.htm?sid="+SessionId; + Cursor.set(Cursor.WAIT); + if( this.updateOnly ) + { + this.updateTable(); + } + else + { + arChannels = new Array(); + this.loadChannels(); + } + }, + loadChannels: function() + { + var t = this; + var pb = ''; + pb += 'string sStart = "'+this.currentIndex+'";'; + pb += 'string sCount = "'+this.count+'";'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete: function(transParams) + { + transParams.responseText.evalScripts(); + var resp = iseStripAll(transParams.responseText.stripScripts()); + //alert("["+resp+"]"); + if( resp != "0" ) + { + t.updateTable(); + t.currentIndex += parseInt(resp,10); + t.loadChannels(); + } + else + { + Cursor.set(Cursor.NORMAL); + if( !t.updateOnly ) DivSort("name"); + } + } + }; + new Ajax.Updater("dummy",this.url,opts); + }, + updateTable: function() + { + if( this.updateOnly ) + { + arTempChannels = arChannels; + } + for (var i = 0; i < arTempChannels.length; i++) + { + var tr = Builder.node('tr', {id: 'tr'+arTempChannels[i]['id']} ); + var td; + + var sName = arTempChannels[i]['name']; + td = Builder.node('td', {className: "GrayBkg"}, sName); + tr.appendChild(td); + + var sRooms = arTempChannels[i]['rooms']; + td = Builder.node('td', {className: "GrayBkg"}, sRooms); + tr.appendChild(td); + + var sFunctions = arTempChannels[i]['funcs']; + td = Builder.node('td', {className: "GrayBkg"}, sFunctions); + tr.appendChild(td); + + var sLastTime = arTempChannels[i]['lasttime']; + td = Builder.node('td', {id: 'tmc'+arTempChannels[i]['id'], className: "GrayBkg"}, sLastTime); + tr.appendChild(td); + + var sDatapoint = arTempChannels[i]['id']; + td = Builder.node('td', {id: 'dpc'+arTempChannels[i]['id'], className: "GrayBkg"}); + tr.appendChild(td); + + if( this.tbody ) this.tbody.appendChild(tr); + + recreateControl(arTempChannels[i]['id'],sLastTime); + } + + if( this.updateOnly ) Cursor.set(Cursor.NORMAL); + arTempChannels = new Array(); + } +}; +/** + * ise/shutterControl.js + **/ + +/** + * @fileOverview ? + * @author ise + **/ + +/** + * @class + **/ +shutterControl = Class.create(); + +shutterControl.prototype = { + + m_color: WebUI.getColor("shutterOpeningDegree"), + + /* + * id = id of div containing shutter-image + * initState + */ + initialize: function(id, initState) { + this.MAX_HEIGHT = 100; + this.state = initState; + + + $("shutter" + id).innerHTML = "
" + + "
" + + "
"; + this.divShutter = $("shutterCtrl" + id); + this.divShutterBg = $("shutterBg" + id); + }, + + setValue: function(val) { + this.state = val; + this.divShutter.style.height = parseInt(this.MAX_HEIGHT - (val * (this.MAX_HEIGHT / 100))) + "px"; + } +};/** + * ise/channelLoader.js + **/ + +/** + * @fileOverview ? + * @author ise + **/ + +/** + * @class + **/ +channelLoader = Class.create(); + +channelLoader.prototype = { + /* + * id = DOM-ID of switch + * initState = Creation State + */ + initialize: function(channelCount) { + this.channelCount = channelCount; + this.currentIndex = 0; + this.loadChannels(this.currentIndex); + }, + + + loadChannels: function(index) { + var url = ""; + var t = this; + var pb =""; + //pb += "system.SetSessionVar('sessionIdx', " + this.currentIndex + ");"; + pb += 'string index = "'+index+'";'; + var opts = { + postBody: ReGa.encode(pb), + evalScripts: true, + onComplete: function(transParams) { + t.currentIndex+=5; + if (t.currentIndex <= t.channelCount) + { + t.loadChannels(t.currentIndex); + } + else + { + if(FirstSort){FirstSort();} + } + Cursor.set(Cursor.NORMAL); + } + }; + new Ajax.Updater("dummy", "/pages/tabs/statusviews/channelBody.htm?sid=" + SessionId, opts); + } +}; + +/** + * @class + **/ +newDevChnLoader = Class.create(); +newDevChnLoader.prototype = { + /* + * id = DOM-ID of switch + * initState = Creation State + */ + initialize: function(channelCount) { + this.channelCount = channelCount; + this.currentIndex = 0; + this.loadChannels(channelCount); + }, + + + loadChannels: function(index) + { + var url = ""; + var t = this; + var pb =""; + pb += "system.SetSessionVar('sessionIdx', '" + this.currentIndex + "');"; + //pb += 'string index = "'+index+'";'; + var opts = { + postBody: ReGa.encode(pb), + evalScripts: true, + onComplete: function(transParams) { + t.currentIndex+=5; + if (t.currentIndex <= t.channelCount) + { + t.loadChannels(t.currentIndex); + } + else + { + Cursor.set(Cursor.NORMAL); + } + } + }; + new Ajax.Updater("dummy", "/pages/tabs/admin/views/newdevicechannelsloader.htm?sid=" + SessionId, opts); + } +}; + + +/** + * ise/channelPopupLoader.js + **/ + +/** + * @fileOverview ? + * @author ise + **/ + +/** + * @class + **/ +channelPopupLoader = Class.create(); +channelPopupLoader.prototype = +{ + initialize: function(path,colName,bSecondary,operations,channellist) + { + this.currentIndex = 0; + this.count = 5; + this.path = path; + this.colName = colName; + this.operations = operations; + this.channellist = channellist; + this.loadArray(this.currentIndex); + }, + + loadArray: function() + { + var url = this.path+"?sid="+SessionId; + var pb = ''; + pb += 'string sStartPos = "'+this.currentIndex+'";'; + pb += 'string sCount = "'+this.count+'";'; + pb += 'string sOperations = "'+this.operations+'";'; + pb += 'string eChannelList = "'+this.channellist+'";'; + var me = this; + var opts = + { + postBody: ReGa.encode(pb), + onComplete: function(t) + { + t.responseText.evalScripts(); + var resp = iseStripAll(t.responseText.stripScripts()); + if( resp == "stop" ) + { + ChnSort(ccLastSort); + } + else + { + me.currentIndex+=me.count; + me.loadArray(); + } + } + }; + Cursor.set(Cursor.WAIT); + new Ajax.Updater("dummy",url,opts); + } + +}; +/** + * ise/programPopupLoader.js + **/ + +/** + * @fileOverview ? + * @author ise + **/ + +/** + * @class + **/ +programPopupLoader = Class.create(); +programPopupLoader.prototype = +{ + + initialize: function(path,colName) + { + this.currentIndex = 0; + this.path = path; + this.colName = colName; + this.loadPopupProgram(this.currentIndex); + }, + + loadPopupProgram: function(index) + { + var t = this; + var url = t.path+"?sid="+SessionId; + var pb = ''; + pb += 'integer iCurrentIndex = '+this.currentIndex+';'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete: function(transParams) + { + transParams.responseText.evalScripts(); + var resp = iseStripAll(transParams.responseText.stripScripts()); + if( resp == "true" ) + { + t.currentIndex+=5; + t.loadPopupProgram(t.currentIndex); + } + else + { + t.updateTable(); + } + } + }; + new Ajax.Updater("dummy",url,opts); + }, + + updateTable: function() + { + var tableBody = $("prgBody"); + if( tableBody ) + { + var count = tableBody.rows.length-1; + for(var x=count; x > -1; x--) + { + tableBody.deleteRow(x); + } + + IseSort(arProgs,this.colName,false); + for (var i = 0; i < arProgs.length; i++) + { + var tr = Builder.node('tr', {id: arProgs[i]['trid']}); + //var td = Builder.node('td', {className: 'SysVarsTblPopup'}, strCut(translateString(arProgs[i]['name']) , true) ); + var td = Builder.node('td', {className: 'SysVarsTblPopup'}, translateString(arProgs[i]['name'])); + tr.appendChild(td); + td = Builder.node('td', {className: 'SysVarsTblPopup'}, arProgs[i]['prginfo']); + tr.appendChild(td); + td = Builder.node('td', {className: 'SysVarsTblPopup'}, translateString(arProgs[i]['active']) ); + tr.appendChild(td); + + td = Builder.node('td', {className: 'WhiteBkg'}, [ + Builder.node('div', {className: 'StdButton', onclick:"saveDlgResult(" + arProgs[i]['id'] + ");PopupClose();"}, translateKey('btnSelect')) + ]); + tr.appendChild(td); + + tableBody.appendChild(tr); + } + Cursor.set(Cursor.NORMAL); + } + } + +}; +/** + * ise/sysVarsPopupLoader.js + **/ + +/** + * @fileOverview ? + * @author ise + **/ + +/** + * @class + **/ +sysVarsPopupLoader = Class.create(); + +sysVarsPopupLoader.prototype = { + /* + * id = DOM-ID of switch + * initState = Creation State + */ + + initialize: function(path,colName,iSec) + { + this.currentIndex = 0; + this.path = path; + this.colName = colName; + this.sec = iSec; + this.loadPopupsysVars(this.currentIndex); + }, + + loadPopupsysVars: function() + { + var t = this; + var url = t.path+"?sid="+SessionId; + var pb = ''; + pb += 'integer iCurrentIndex = '+this.currentIndex+';'; + var opts = + { + postBody: ReGa.encode(pb), + onComplete: function(transParams) + { + transParams.responseText.evalScripts(); + var resp = iseStripAll(transParams.responseText.stripScripts()); + if( resp == "true" ) + { + t.currentIndex+=5; + t.loadPopupsysVars(t.currentIndex); + } + else + { + t.updateTable(); + } + } + }; + new Ajax.Updater("dummy",url,opts); + }, + + updateTable: function() + { + var tableBody = $("sysVarDisplay"); + if( tableBody ) + { + var count = tableBody.rows.length-1; + for(var x=count; x > -1; x--) + { + tableBody.deleteRow(x); + } + + IseSort(arSysVars,this.colName,false,true); + for (var i = 0; i < arSysVars.length; i++) + { + var sOnclick = "PopupClose();"; + if( this.sec ) sOnclick = "restorePrevious();"; + sOnclick = "saveDlgResult("+arSysVars[i]['id']+");"+sOnclick; + + var cName = 'SysVarsTblPopup'; + if( arSysVars[i]['internal'] === 'true' ) { + cName = 'LightGrayBkg SysVarsTblPopup'; + } + + var tr = Builder.node('tr', {id: arSysVars[i]['trid'], className:cName, onclick:sOnclick, onmouseover:'this.className="SysVarsTblPopup_Highlight";', onmouseout:'this.className="' + cName + '";'}); + var td = Builder.node('td', {}, translateString(arSysVars[i]['name'])); + tr.appendChild(td); + td = Builder.node('td', {}, translateString(arSysVars[i]['desc'])); + tr.appendChild(td); + td = Builder.node('td', {}, translateString(arSysVars[i]['typenames'])); + tr.appendChild(td); + td = Builder.node('td', {}, translateString(arSysVars[i]['values'])); + tr.appendChild(td); + td = Builder.node('td', {}, translateString(arSysVars[i]['unit'])); + tr.appendChild(td); + + tableBody.appendChild(tr); + } + Cursor.set(Cursor.NORMAL); + } + + + } +}; +/** + * ise/checkUserInput.js + **/ + +/** + * @fileOverview ? + * @author ise + **/ + +/* + * * * checkUserInput.js + * * * Enthaltene Funktionen + * + * checkTemperatureMinMax(input, MinVal, MaxVal) + * Überprüft ob Temperatur gültig und innerhalb von MinVal und MaxVal ist + * + * checkTemperature(input) + * Überprüft Temperatur ohne Min- und Max-Werte + * Erlaubt sind Eingaben wie 12, 13, 12C, 12°C, 87F, 87°F (sowie Dezimalwerte) + * + * checkCharOnly(input) + * + * checkDigitsOnly(input) + * + * checkDecimal(input) + * Prüft auf eine Dezimalzahl + * + * checkPercentage(input) + * Erlaubte Eingaben: 50, 12, 13%, 13 % + * + * convertPercentage(input) + * Entfernt das Prozentzeichen der Eingabe und gibt (input / 100) zurück + * + * checkInput(input, type) + * Kann mit einer der globalen Konstanten aufgerufen werden + * + * checkTime(val) + * gültige Eingabe --> 12:54 + * + * checkDate(val) + * gültige Eingabe --> 18.09.2007 oder 18.09.07 + */ + + +// * * * Global Constants +CHK_TEMP = 1; +CHK_CHAR_ONLY = 2; +CHK_DIGITS_ONLY = 3; +CHK_PERCENT = 4; +CHK_DECIMAL = 5; + + +// * * * * * * * * * * * * * * * * +// * * * FUNCTIONS * +// * * * * * * * * * * * * * * * * + +// Temperatur: erlaubt sind Zahlen sowie '.' und ',' +// ausserdem: 'C', 'F', '°C'und '°F' als letzte Zeichen +// Bei Fahrenheit-Werten wird ausserdem nach Celsius umgerechnet +// und mit MinVal und MaxVal verglichen +// +// Wenn kein Vergleich mit Minimal- und Maximal-Werten gewünscht ist +// müssen MinVal und MaxVal auf 0 gesetzt werden +checkTemperatureMinMax = function(input, MinVal, MaxVal) { + var doMinMaxCheck = ((MinVal !== 0) || (MaxVal !== 0)); + var tmpInput = input; + var isFarVal = false; + if (!checkDecimal(tmpInput)) { + // Zeichen für Temperaturangaben rausfiltern + if (tmpInput.indexOf('°C') != -1) { + tmpInput = tmpInput.substr(0, tmpInput.indexOf('°C')); + } + if (tmpInput.indexOf('°C') != -1) { + tmpInput = tmpInput.substr(0, tmpInput.indexOf('°C')); + } + if (tmpInput.indexOf('C') != -1) { + tmpInput = tmpInput.substr(0, tmpInput.indexOf('C')); + } + if (tmpInput.indexOf('°F') != -1) { + tmpInput = tmpInput.substr(0, tmpInput.indexOf('°F')); + isFarVal = true; + } + if (tmpInput.indexOf('°F') != -1) { + tmpInput = tmpInput.substr(0, tmpInput.indexOf('°F')); + isFarVal = true; + } + if (tmpInput.indexOf('F') != -1) { + tmpInput = tmpInput.substr(0, tmpInput.indexOf('F')); + isFarVal = true; + } + + // Fall Abgleich mit MinValue und MaxValue gewünscht wird und ein + // Fahrenheit-Wert eingegeben wurde... + if (doMinMaxCheck) { + if (isFarVal) { + if (checkDecimal(tmpInput)) { + var celVal = farToCel(tmpInput); // Umrechnen und prüfen ob innerhalb MinVal und MaxVal + return ((celVal > MinVal) && (celVal < MaxVal)); + } + else { + return false; + } + } + } + } + // Falls Chars entfernt wurden nochmal auf Dezimalwert testen + if (checkDecimal(tmpInput)) { + if (doMinMaxCheck) { + tmpInput = tmpInput.replace(/,/, "."); // für WerteVergleich + return ((tmpInput >= MinVal) && (tmpInput <= MaxVal )); + } + else { + return true; + } + } + else { + return false; + } +}; + +// Temperatur-Überprüfung ohne Beachtung von Minimal- und Maximal-Werten +checkTemperature = function(input) { + return checkTemperatureMinMax(input, 0, 0); +}; + +checkCharOnly = function(input) { + ok = true; + for(var i = 0; i < input.length; i++) { + if (!isChar(input.charAt(i))) { + ok = false; + break; + } + } + return ok; +}; + +checkDigitsOnly = function(input) { + var ok = true; + for (var i = 0; i < input.length; i++) { + if (isNaN(input.charAt(i))) { + ok = false; + break; + } + } + return ok; +}; + +// CheckDecimal: erlaubt sind [0..9] und ' und . +// True wird auch bei ganzen oder negativen Zahlen zurückgegeben +checkDecimal = function(input) { + var ok = true; + var i = 0; + if (input.charAt(0) == '-') // für negative Zahlen + i = 1; + for (i; i < input.length; i++) { + tmp = input.charAt(i); + if (isNaN(tmp)) { + // Ausnahmen für '.' und ',' + if (tmp != '.' && tmp != ',') { + ok = false; + break; + } + } + } + return ok; +}; + +// Percentage: Erlaubt sind Zahlen zwischen 0 und 100, sowie +// Eingaben mit Prozentzeichen mit evtl. Leerzeichen zwischen +// Zahl und Prozentzeichen. Keine Dezimalwerte. +checkPercentage = function(input) { + var tmpInput = ""; + // Evtl. vorhandenes Prozentzeichen zuerst entfernen + if (input.indexOf('%') != -1) { + tmpInput = input.substr(0, input.indexOf('%')); + if(tmpInput.length < 1) { // falls nur '%' übergeben wurde + return false; + } + } + else { + tmpInput = input; + } + if (checkDigitsOnly(tmpInput)) { + if (tmpInput < 0) + return false; + if (tmpInput > 100) + return false; + } + else { + return false; + } + return true; +}; + +// Von einem Prozentwert (string: 50, 50%, 50 % usw.) wird das +// Prozentzeichen entfernt und der Wert geteilt durch 100 zurückgegeben +convertPercentage = function(input) { + var tmpInput = ""; + // Evtl. vorhandenes Prozentzeichen zuerst entfernen + if (input.indexOf('%') != -1) { + tmpInput = input.substr(0, input.indexOf('%')); + if(tmpInput.length < 1) { // falls nur '%' übergeben wurde + return false; + } + } + else { + tmpInput = input; + } + return parseInt(tmpInput,10) / 100; + +}; + +checkInput = function(input, type) { + if (type == CHK_TEMP){ + return checkTemperature(input); + } + if (type == CHK_CHAR_ONLY) { + return checkCharOnly(input); + } + if (type == CHK_DIGITS_ONLY) { + return checkDigitsOnly(input); + } + if (type == CHK_PERCENT) { + return checkPercentage(input); + } + if (type == CHK_DECIMAL) { + return checkDecimal(input); + } + // Wenn man hier ankommt wurde der typ nicht erkannt + alert("checkInput: type unknown"); + return null; +}; + +// * * * * * * * * * * * * * * * * +// * * * DATUMS-FUNKTIONEN * +// * * * * * * * * * * * * * * * * +checkDay = function(val) { + var ret = false; + if (checkDigitsOnly(val)) { + if ( (val >= 1) && (val <=31) ) + ret = true; + } + return ret; +}; + +checkMonth = function(val) { + var ret = false; + if (checkDigitsOnly(val)) { + if ( (val >= 1) && (val <=12) ) + ret = true; + } + return ret; +}; + +checkYear = function(val) { + var ret = false; + if (checkDigitsOnly(val)) { + if ( (val > 0) ) + ret = true; + } + return ret; +}; + +checkHours = function(val) +{ + if( checkDigitsOnly(val) ) + { + if( (val >= 0) && (val <= 23) ) return true; + } + return false; +}; + +checkMinutes = function(val) +{ + if( checkDigitsOnly(val) ) + { + if( (val >= 0) && ( val <= 59) ) return true; + } + return false; +}; + +checkSeconds = function(val) +{ + if( checkDigitsOnly(val) ) + { + if( (val >= 0) && ( val <= 59) ) return true; + } + return false; +}; + +// Eingabe abhängig von Parameter bSeparator +checkTime = function(val) +{ + var sSplit = new Array(2); + sSplit = val.split(":"); + if( val === "" ) return false; + if( sSplit.length != 2 ) return false; + var tHours = parseInt(sSplit[0],10); + var tMinutes = parseInt(sSplit[1],10); + if( isNaN(tHours) || isNaN(tMinutes) ) return false; + return ( checkHours(sSplit[0]) && checkMinutes(sSplit[1]) ); +}; + + +// Eingabe abhängig von Parameter bSeparator +checkDate = function(val) { + var ret = false; + var sSplit = new Array(3); + + if (val === "") + return false; + sSplit = val.split("."); + + if (sSplit.length != 3) + return false; + if (checkDay(sSplit[0])) { + if (checkMonth(sSplit[1])) { + if (checkYear(sSplit[2])) { + ret = true; + } + } + } + return ret; +}; + + +// * * * * * * * * * * * * * * * * +// * * * HILFS-FUNKTIONEN * +// * * * * * * * * * * * * * * * * + +// Konvertiert einen Fahrenheit- in einen Celsius-Wert +farToCel = function(farVal) { + return ((farVal - 32) / 1.8); +}; + +// Gibt true zurück falls ein Character übergeben wurde +isChar = function(Data) { + var varChars = "éèàùûôoöë-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ "; + return (varChars.indexOf(Data) != -1); +}; +/** + * ise/js/PowerMeter.js + * POWERMETER. POWERMETER_IGL + **/ + +/** + * @author gral + **/ + +/** + * @class Control for the 'POWERMETER' + **/ +isePowerMeter = Class.create(); + +isePowerMeter.prototype = { + + initialize: function(id, opts) { + conInfo("PowerMeter"); + var self = this; + this.opts = opts; + this.powerMeter = "POWERMETER"; // e. g. Hm-ES-PMSw1-PL-DN-R1 + this.POWERMETER_IEC = "POWERMETER_IEC"; // e. g. Hm-ES-TX-WM + this.energyMeterTransmitter = "ENERGIE_METER_TRANSMITTER"; // e. g. HmIP-PSM + this.arMeasurementTypes = []; + this.sensorTypeID = {}; + this.sensorTypeID.gas = "Gas"; + this.sensorTypeID.eletricity = "Electricity"; + this.sensorTypeID.iec = "IEC"; + this.sensorTypeID.unknown = "Unknown"; + this.kiloPrefix = ""; + this.hasFeedIn = (this.opts.chLabel == "HmIP-PSMCO") ? true : false; + + this.id = id; + this.summedUpEnergy = 0.0; + this.summedUpFeedIn = 0.0; + this.measurementType = this.getSensorType(); + conInfo("Identified sensor: " + this.measurementType); + + this.panel2Show = null; + + // Channel 2 is only visible when a IEC-Sensor is attached + if (this.opts.chType == "POWERMETER_IEC2") { + this.panel2Show = (this.measurementType == this.sensorTypeID.iec) ? this.getJElemsByName("channelActiv") : this.getJElemByID("channelNotActiv"); + + this.panel2Show.show(); + } else { + this.panel2Show = this.getJElemsByName("channelActiv"); + this.panel2Show.show(); + } + + this.EnergyCounterID = "svEnergyCounter" + this.getSensorExtension() + "_" + this.id + "_" + this.opts.chAddress; + this.EnergyCounterRESETID = "svEnergyCounter_" + this.id + "_" + this.opts.chAddress + "_RESET"; + this.EnergyCounterOldValID = "svEnergyCounter" + this.getSensorExtension() + "OldVal_" + this.id; + this.EnergyPrice = "unknown"; + + this.EnergyCounterFeedInID = "svEnergyCounterFeedIn_" + this.id + "_" + this.opts.chAddress; + + this.bindEvents(); + + this.setGenericInfoPanels(this.getVisibleInfoPanels()); + + // When gas sensor change the unit from Wh to m^3 and change the EnergyCounterID + if (this.measurementType == this.sensorTypeID.gas) { + this.opts.unitEnergyCounter = "m3"; + this.EnergyCounterID = "svEnergyCounterGas_" + this.id + "_" + this.opts.chAddress; + this.EnergyCounterRESETID = "svEnergyCounterGas_" + this.id + "_" + this.opts.chAddress + "_RESET"; + this.EnergyCounterOldValID = "svEnergyCounterGasOldVal_" + this.id; + } else if (this.measurementType == this.sensorTypeID.unknown) { + // Unknown sensor + this.opts.unitEnergyCounter = ""; + } else if (this.measurementType == this.sensorTypeID.iec) { + this.opts.unitEnergyCounter = this.opts.unitEnergyCounterIEC; + } + jQuery("[name = '" + this.id + "EnergyCostDeviceUnit']").html(this.opts.unitEnergyCounter).show(); + this.setEnergyCounterPanel(); + + if (this.hasFeedIn) { + this.setEnergyCounterFeedInPanel(); + } + + this.energyConfig = homematic("system.getEnergyPrice", {}, function (result) { + self.energyConfig = result; + // When the energy price config is available and it´s a known sensor (electricity or gas) + // then show the energy cost + if (result && (self.measurementType != self.sensorTypeID.unknown)) { + self.showEnergyCost(); + } + }); + jQuery("[name = '" + this.id + "sensor" + this.getSensorExtension() + "']").show(); + conInfo("Interface: " + this.opts.iface); + conInfo("MeasurementType: " + this.measurementType); + + }, + + getVisibleInfoPanels: function() { + switch (this.opts.chType) { + //Wireless sender for power meter sensor + case "POWERMETER_IGL": + case "POWERMETER_IEC1": + case "POWERMETER_IEC2": + return ["Power"]; + default: + // POWERMETER - power meter switch actuator + return ["Voltage", "Current", "Power", "Frequency"]; + } + }, + + getSensorType: function() { + // Determine the type of measurement (gas or electicity) + var paramSet = homematic("Interface.getParamset", {"interface": this.opts.iface, "address" : this.opts.chAddress, "paramsetKey" :"MASTER"}); + + /* No meter type available + this.energyMeterTransmitter = e. g. a PSM or a Hm-ES-TX-WM Fw. >= 2.0.0 + */ + if (typeof paramSet.METER_TYPE == "undefined") { + return ((this.opts.chType == this.energyMeterTransmitter) || (this.opts.chType == this.powerMeter)) ? this.sensorTypeID.eletricity : this.sensorTypeID.iec; + } + + // No IEC Sensor + // 0 = Gas-Sensor, 1 = Electricity (IR-Sensor), 2 = Electricity (LED-Sensor), 3 = Unknown + + // IEC-Sensor + // 0 = Gas-Sensor, 1 = Electricity (IR-Sensor), 2 = Electricity (LED-Sensor), 3 = IEC-Sensor, 4 = Unknown + + switch (this.opts.chType) { + case "POWERMETER": + case "POWERMETER_IGL": + this.arMeasurementTypes = ["Gas", "Electricity", "Electricity", "Unknown"]; + break; + case "POWERMETER_IEC1": + case "POWERMETER_IEC2": + this.arMeasurementTypes = ["Gas", "Electricity", "Electricity", "IEC", "Unknown"]; + break; + } + return this.arMeasurementTypes[parseInt(paramSet.METER_TYPE)]; + }, + + buttonPressed: function(btn) { + var elem = jQuery(btn); + elem.addClass("ControlBtnOn").removeClass("ControlBtnOff"); + setTimeout(function() { + elem.addClass('ControlBtnOff').removeClass('ControlBtnOn'); + }, 500); + + }, + + bindEvents: function() { + var self = this; + + + jQuery("#"+ this.id + "resetEnergyCounter").bind("click", function(){ + conInfo("Set EnergyCounter"); + var dlgContent = "
"+translateKey('lblEnergyConsumptionInWatt')+"
", + valMeterReading; + + setEnergyCounterDlg = new YesNoDialog(translateKey("lblSetEnergyCounter"), dlgContent, function(result) { + if (result == YesNoDialog.RESULT_YES) { + valMeterReading = parseFloat(jQuery("#meterReading").val()); + + // This removes the dialog from the screen + Layer.remove(this.m_layer); + + if (! isNaN(valMeterReading)) { + // This sets the new value of the power meter + homematic("SysVar.setFloat", {"name": self.EnergyCounterID, "value": valMeterReading}, function () { + self.setEnergyCounterPanel(); + self.showEnergyCost(); + }); + } + } else { + // NO pressed + // This removes the dialog from the screen + Layer.remove(this.m_layer); + } + }, "html"); + + setEnergyCounterDlg.btnTextNo(translateKey("dialogBack")); + setEnergyCounterDlg.btnTextYes(translateKey("btnOk")); + + // Overwrites the original close method + setEnergyCounterDlg.close = function(result) { + if (this.m_callback) { this.m_callback(result); } + }; + + }); + + // Feed In + jQuery("#"+ this.id + "resetFeedInCounter").bind("click", function(){ + conInfo("Set Feed In Counter"); + var dlgContent = "
"+translateKey('lblEnergyConsumptionInWatt')+"
", + valMeterReading; + + setEnergyCounterDlg = new YesNoDialog(translateKey("lblSetEnergyCounter"), dlgContent, function(result) { + if (result == YesNoDialog.RESULT_YES) { + valMeterReading = parseFloat(jQuery("#meterReading").val()); + + // This removes the dialog from the screen + Layer.remove(this.m_layer); + + if (! isNaN(valMeterReading)) { + // This sets the new value of the power meter + homematic("SysVar.setFloat", {"name": self.EnergyCounterFeedInID, "value": valMeterReading}, function () { + self.setEnergyCounterFeedInPanel(); + //self.showEnergyCost(); + }); + } + } else { + // NO pressed + // This removes the dialog from the screen + Layer.remove(this.m_layer); + } + }, "html"); + + setEnergyCounterDlg.btnTextNo(translateKey("dialogBack")); + setEnergyCounterDlg.btnTextYes(translateKey("btnOk")); + + // Overwrites the original close method + setEnergyCounterDlg.close = function(result) { + if (this.m_callback) { this.m_callback(result); } + }; + + }); + + }, + + /** + * Sets the different parameter elements of the powermeter + */ + setGenericInfoPanels: function(arElements) { + var self = this; + jQuery.each(arElements, function(index, panel) { + self.setGenericPanel(panel); + }); + }, + + /** + * Returns the jQuery element of a given parameter + * @param {string} elem The name of the desired element + * @return {object} The desired element + */ + getJElemByID: function(elem) { + return jQuery("#" + this.id + elem); + }, + + getJElemsByName: function(elem) { + return jQuery("[name='" + this.id + elem + "']"); + }, + + getSensorExtension: function() { + switch (this.measurementType) { + case this.sensorTypeID.gas: + return this.sensorTypeID.gas; + case this.sensorTypeID.iec: + return this.sensorTypeID.iec; + default: return ""; + } + }, + /** + * Sets the text (value + unit) of the desired element + * @param {string} panel The name of the desired element + */ + setGenericPanel: function(panel) { + var sensorExtension = this.getSensorExtension(); + var j_panel = this.getJElemByID(panel), + value = this.opts["val" + panel + sensorExtension], + unit = this.opts["unit" + panel + sensorExtension]; + if (value && unit) { + j_panel.text(value.toFixed(2) + " " + unit); + } + }, + + changeToKilo: function(x) { + if (x == "summedUpFeedIn") { + return (this.summedUpFeedIn/1000).toFixed(3); + } else { + return (this.summedUpEnergy/1000).toFixed(3); + } + + }, + + setEnergyCounterPanel: function() { + var j_panel = this.getJElemByID("EnergyCounter"); + // For a Hm-ES-TX-WM (POWERMETER_IEC) with a firmware >= 2.0.0 show 4 decimal places + var decimalPlace = ((this.opts.chType.indexOf(this.POWERMETER_IEC) != -1) && (parseInt(this.opts.devFirmwareMajor) >= 2)) ? 4 : 2; + this.summedUpEnergy = parseFloat(homematic("SysVar.getValue", {"id" : this.EnergyCounterID})).toFixed(decimalPlace); + conInfo("setEnergyCounterPanel - this.summedUpEnergy: " + this.summedUpEnergy); + + this.kiloPrefix = ""; + if (this.summedUpEnergy >= 1000.0 && (this.measurementType != this.sensorTypeID.gas) && (this.measurementType != this.sensorTypeID.iec)) { + this.kiloPrefix = "k"; + this.summedUpEnergy = this.changeToKilo('summedUpEnergy'); + } + + j_panel.html(this.summedUpEnergy + " " + this.kiloPrefix + this.opts.unitEnergyCounter); + }, + + setEnergyCounterFeedInPanel: function() { + var j_panel = this.getJElemByID("energyCounterFeedIn"); + var decimalPlace = 2; + + this.summedUpFeedIn = parseFloat(homematic("SysVar.getValue", {"id" : this.EnergyCounterFeedInID})).toFixed(decimalPlace); + conInfo("setEnergyCounterFeedInPanel - this.summedUpFeedIn: " + this.summedUpFeedIn); + + this.kiloPrefix = ""; + if (this.summedUpFeedIn >= 1000.0) { + this.kiloPrefix = "k"; + this.summedUpFeedIn = this.changeToKilo('summedUpFeedIn'); + } + + j_panel.html(this.summedUpFeedIn + " " + this.kiloPrefix + this.opts.unitEnergyCounter); + }, + + getEnergyConsumption: function(sType) { + // Electricity sensor + if ((this.measurementType == this.sensorTypeID.eletricity )) { + if (sType == "CCU") return this.summedUpEnergy; + if (sType == "Device") return this.opts.valEnergyCounter; + } + + // Gas sensor + if (this.measurementType == this.sensorTypeID.gas) { + if (sType == "CCU") return (this.summedUpEnergy * this.energyConfig.gasHeatingValue * this.energyConfig.gasConditionNumber) ; + if (sType == "Device") return (this.opts.valEnergyCounterGas * this.energyConfig.gasHeatingValue * this.energyConfig.gasConditionNumber); + } + + // IEC sensor + if ((this.measurementType == this.sensorTypeID.iec)) { + if (sType == "CCU") return this.summedUpEnergy; + if (sType == "Device") return this.opts["valEnergyCounter" + this.getSensorExtension()]; + } + + }, + + // Some channels aren't allowed to show the energy cost + // E. g. the channel POWERMETER_IEC2 measures the energy which a client feeds into the power supply system (solar, wind or so) + isChannelValid2ShowEnergyCost: function() { + return (this.opts.chType == "POWERMETER_IEC2") ? false : true; + }, + + showEnergyCost: function() { + if (this.energyConfig && (this.measurementType != this.sensorTypeID.unknown) && ( this.isChannelValid2ShowEnergyCost()) ) { + var unitFactorCCU = 1000, + unitFactorDevice = 1000, + kWh = " kWh"; + + if (this.kiloPrefix == "k") { + unitFactorCCU = 1; + } + + if ((this.measurementType == this.sensorTypeID.iec)) { + unitFactorCCU = 1; + unitFactorDevice = 1; + } + + if (this.measurementType == this.sensorTypeID.gas) { + this.EnergyPrice = this.energyConfig.gasPrice; + unitFactorCCU = 1; + unitFactorDevice = 1; + } + if (this.measurementType == this.sensorTypeID.eletricity || this.measurementType == this.sensorTypeID.iec) this.EnergyPrice = this.energyConfig.curPrice; + + if (this.EnergyPrice != "unknown" && this.energyConfig.currency != null) { + var j_energyCostCCU = this.getJElemByID("EnergyCostCCU"), + j_energyCostDevice = this.getJElemByID("EnergyCostDevice"+this.getSensorExtension()), + energyConsumptionCCU = this.getEnergyConsumption("CCU"), + energyConsumptionDevice = this.getEnergyConsumption("Device"), + energyCostCCU = ((energyConsumptionCCU * this.EnergyPrice) / unitFactorCCU).toFixed(2) + " " + this.energyConfig.currency, + energyCostDevice = ((energyConsumptionDevice * this.EnergyPrice) / unitFactorDevice).toFixed(2) + " " + this.energyConfig.currency; + if (this.measurementType == this.sensorTypeID.gas) { + j_energyCostCCU.text(energyConsumptionCCU.toFixed(1) + kWh + " = " + energyCostCCU).show(); + j_energyCostDevice.text(energyConsumptionDevice.toFixed(1) + kWh + " = " + energyCostDevice).show(); + } else { + j_energyCostCCU.text(energyCostCCU).show(); + j_energyCostDevice.text(energyCostDevice).show(); + } + } else { + conInfo("Unknown energy price"); + } + } + } +}; + + +isePowerMeterESI = Class.create(); + +isePowerMeterESI.prototype = { + + initialize: function(id, opts) { + //console.log(opts); + var self = this; + + this.iface = "HmIP-RF"; + this.id = id; + this.opts = opts; + + this.powerMeter = "POWERMETER"; // e. g. Hm-ES-PMSw1-PL-DN-R1 + this.POWERMETER_IEC = "POWERMETER_IEC"; // e. g. Hm-ES-TX-WM + + this.energyMeterTransmitter = "ENERGIE_METER_TRANSMITTER"; // e. g. HmIP-PSM + this.sensorTypeID = {}; + this.sensorTypeID.gas = "Gas"; + this.sensorTypeID.eletricity = "Electricity"; + this.sensorTypeID.iec = "IEC"; + this.sensorTypeID.unknown = "Unknown"; + this.kiloPrefix = ""; + + this.idBtnSelfCalibration = this.opts.idBtnSelfCalibration; + + this.chn = parseInt(this.opts.chn); + + this.summedUpEnergy = 0.0; + + this.arSensorTypes = [ + "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" + ]; + + this.measurementType = this.getSensorType(); // Connected Sensor + + if (this.chn == 1) { + this.sensor = homematic("Interface.getMetadata", {"objectId": this.id, "dataId": "sensor"}); + console.log("this.measurementType: " + this.measurementType ,"this.sensor: " + this.sensor); + + this.showPowerGasFlowPanel(); + + if (this.measurementType != this.sensor) { + console.log("set MetaData sensor: " + this.measurementType); + homematic("Interface.setMetadata", {"objectId": this.id, "dataId": "sensor", "value": this.measurementType}); + } + + } + + this.EnergyPrice = "unknown"; + + this.bindEvents(); + + jQuery("[name = '" + this.id + "EnergyCostDeviceUnit']").html(this.opts.unitEnergyCounter).show(); + this.setEnergyCounterPanel(); + + this.energyConfig = homematic("system.getEnergyPrice", {}, function (result) { + self.energyConfig = result; + // When the energy price config is available and it´s a known sensor (electricity or gas) + // then show the energy cost + if (result && (self.measurementType != self.sensorTypeID.unknown)) { + self.showEnergyCost(); + } + }); + jQuery("[name = '" + this.id + "sensor" + this.getSensorExtension() + "']").show(); + conInfo("Interface: " + this.opts.iface); + conInfo("MeasurementType: " + this.measurementType); + + }, + + + showPowerGasFlowPanel: function() { + var panelElm = jQuery("[name='curConsumptionPanel_"+this.id+"']"), + noSensorElm = jQuery("#noSensorAvailable_" + this.id), + sensorGas = jQuery("#gasFlow_" + this.id), + sensorElec = jQuery("#power_" + this.id); + + // console.log("showPowerGasFlowPanel", "this.measurementType: " + this.measurementType); + + if ((typeof this.measurementType == "undefined") || (this.measurementType == null) ) { + panelElm.hide(); + noSensorElm.show(); + return; + } + + switch (this.measurementType) { + case this.arSensorTypes[0]: // SENSOR_UNKNOWN + panelElm.hide(); + noSensorElm.show(); + break; + case this.arSensorTypes[1]: // SENSOR_ES_GAS + noSensorElm.hide(); + panelElm.show(); + sensorElec.hide(); + sensorGas.show(); + break; + default: + noSensorElm.hide(); // SENSOR_ES_LED and all SENSOR_ES_IEC sensors (e. g. SENSOR_ES_IEC_SML) + panelElm.show(); + sensorGas.hide(); + sensorElec.show(); + } + }, + + getSensorType: function() { + var paramSet = homematic("Interface.getParamset", {"interface": this.opts.iface, "address" : this.opts.chAddress, "paramsetKey" :"MASTER"}); + + // With the HmIP-ESI only channel 1 has the parameter CHANNEL_OPERATION_MODE + return (typeof paramSet.CHANNEL_OPERATION_MODE == "undefined") ? -1 : this.arSensorTypes[parseInt(paramSet.CHANNEL_OPERATION_MODE)]; + }, + + buttonPressed: function(btn) { + var elem = jQuery(btn); + elem.addClass("ControlBtnOn").removeClass("ControlBtnOff"); + setTimeout(function() { + elem.addClass('ControlBtnOff').removeClass('ControlBtnOn'); + }, 500); + + }, + + bindEvents: function() { + var self = this; + + jQuery("#"+ this.id + "startSelfCalibration").bind("click", function() { + // self.searchSensor(self.idBtnSelfCalibration); for setDpState + self.searchSensor(self.iface, self.opts.chAddress); + }); + + + jQuery("#"+ this.id + "resetEnergyCounter").bind("click", function() { + conInfo("Set EnergyCounter"); + var dlgContent = "
"+translateKey('lblEnergyConsumptionInWatt')+"
", + valMeterReading; + + setEnergyCounterDlg = new YesNoDialog(translateKey("lblSetEnergyCounter"), dlgContent, function(result) { + if (result == YesNoDialog.RESULT_YES) { + valMeterReading = parseFloat(jQuery("#meterReading").val()); + + // This removes the dialog from the screen + Layer.remove(this.m_layer); + + if (! isNaN(valMeterReading)) { + // This sets the new value of the power meter + homematic("SysVar.setFloat", {"name": self.EnergyCounterID, "value": valMeterReading}, function () { + self.setEnergyCounterPanel(); + self.showEnergyCost(); + }); + } + } else { + // NO pressed + // This removes the dialog from the screen + Layer.remove(this.m_layer); + } + }, "html"); + + setEnergyCounterDlg.btnTextNo(translateKey("dialogBack")); + setEnergyCounterDlg.btnTextYes(translateKey("btnOk")); + + // Overwrites the original close method + setEnergyCounterDlg.close = function(result) { + if (this.m_callback) { this.m_callback(result); } + }; + + }); + }, + + /** + * Returns the jQuery element of a given parameter + * @param {string} elem The name of the desired element + * @return {object} The desired element + */ + getJElemByID: function(elem) { + return jQuery("#" + this.id + elem); + }, + + getJElemsByName: function(elem) { + return jQuery("[name='" + this.id + elem + "']"); + }, + + getSensorExtension: function() { + switch (this.measurementType) { + case this.sensorTypeID.gas: + return this.sensorTypeID.gas; + case this.sensorTypeID.iec: + return this.sensorTypeID.iec; + default: return ""; + } + }, + + changeToKilo: function() { + return (this.summedUpEnergy/1000).toFixed(2); + }, + + setEnergyCounterPanel: function() { + var j_panel = this.getJElemByID("EnergyCounter"); + // For a Hm-ES-TX-WM (POWERMETER_IEC) with a firmware >= 2.0.0 show 4 decimal places + var decimalPlace = ((this.opts.chType.indexOf(this.POWERMETER_IEC) != -1) && (parseInt(this.opts.devFirmwareMajor) >= 2)) ? 4 : 2; + this.summedUpEnergy = parseFloat(homematic("SysVar.getValue", {"id" : this.EnergyCounterID})).toFixed(decimalPlace); + conInfo("setEnergyCounterPanel - this.summedUpEnergy: " + this.summedUpEnergy); + + this.kiloPrefix = ""; + if (this.summedUpEnergy >= 1000.0 && (this.measurementType != this.sensorTypeID.gas) && (this.measurementType != this.sensorTypeID.iec)) { + this.kiloPrefix = "k"; + this.summedUpEnergy = this.changeToKilo(); + } + + j_panel.html(this.summedUpEnergy + " " + this.kiloPrefix + this.opts.unitEnergyCounter); + }, + + getEnergyConsumption: function(sType) { + // Electricity sensor + if ((this.measurementType == this.sensorTypeID.eletricity )) { + if (sType == "CCU") return this.summedUpEnergy; + if (sType == "Device") return this.opts.valEnergyCounter; + } + + // Gas sensor + if (this.measurementType == this.sensorTypeID.gas) { + if (sType == "CCU") return (this.summedUpEnergy * this.energyConfig.gasHeatingValue * this.energyConfig.gasConditionNumber) ; + if (sType == "Device") return (this.opts.valEnergyCounterGas * this.energyConfig.gasHeatingValue * this.energyConfig.gasConditionNumber); + } + + // IEC sensor + if ((this.measurementType == this.sensorTypeID.iec)) { + if (sType == "CCU") return this.summedUpEnergy; + if (sType == "Device") return this.opts["valEnergyCounter" + this.getSensorExtension()]; + } + + }, + + // Some channels aren't allowed to show the energy cost + // E. g. the channel POWERMETER_IEC2 measures the energy which a client feeds into the power supply system (solar, wind or so) + isChannelValid2ShowEnergyCost: function() { + return (this.opts.chType == "POWERMETER_IEC2") ? false : true; + }, + + showEnergyCost: function() { + if (this.energyConfig && (this.measurementType != this.sensorTypeID.unknown) && ( this.isChannelValid2ShowEnergyCost()) ) { + var unitFactorCCU = 1000, + unitFactorDevice = 1000, + kWh = " kWh"; + + if (this.kiloPrefix == "k") { + unitFactorCCU = 1; + } + + if ((this.measurementType == this.sensorTypeID.iec)) { + unitFactorCCU = 1; + unitFactorDevice = 1; + } + + if (this.measurementType == this.sensorTypeID.gas) { + this.EnergyPrice = this.energyConfig.gasPrice; + unitFactorCCU = 1; + unitFactorDevice = 1; + } + if (this.measurementType == this.sensorTypeID.eletricity || this.measurementType == this.sensorTypeID.iec) this.EnergyPrice = this.energyConfig.curPrice; + + if (this.EnergyPrice != "unknown" && this.energyConfig.currency != null) { + var j_energyCostCCU = this.getJElemByID("EnergyCostCCU"), + j_energyCostDevice = this.getJElemByID("EnergyCostDevice"+this.getSensorExtension()), + energyConsumptionCCU = this.getEnergyConsumption("CCU"), + energyConsumptionDevice = this.getEnergyConsumption("Device"), + energyCostCCU = ((energyConsumptionCCU * this.EnergyPrice) / unitFactorCCU).toFixed(2) + " " + this.energyConfig.currency, + energyCostDevice = ((energyConsumptionDevice * this.EnergyPrice) / unitFactorDevice).toFixed(2) + " " + this.energyConfig.currency; + if (this.measurementType == this.sensorTypeID.gas) { + j_energyCostCCU.text(energyConsumptionCCU.toFixed(2) + kWh + " = " + energyCostCCU).show(); + j_energyCostDevice.text(energyConsumptionDevice.toFixed(2) + kWh + " = " + energyCostDevice).show(); + } else { + j_energyCostCCU.text(energyCostCCU).show(); + j_energyCostDevice.text(energyCostDevice).show(); + } + } else { + conInfo("Unknown energy price"); + } + } + }, + + searchSensor: function(iface, chnAddress) { + conInfo("searchSensor"); + ShowWaitAnim(); + homematic("Interface.putParamset",{'interface': iface, 'address' : chnAddress, 'paramsetKey' : 'VALUES', 'set': + [ + {name:'SELF_CALIBRATION', type: 'int', value: 1} + ] + },function(result){ + if (result) { + window.setTimeout(function() { + HideWaitAnim(); + reloadPage(); + },1000); + } else { + HideWaitAnim(); + alert("Please press the system button and try again."); + } + }); + HideWaitAnimAutomatically(5); + } +};// This class is currently not in use +// See esp/controls/rgbw.fn - CreateRGBWAutomaticControl + +iseRGBWController = Class.create(); + +iseRGBWController.prototype = { + + + initialize: function (chnId, opts) { + conInfo("iseRGBWController"); + this.chnId = chnId; + this.opts = opts; + this.program = this.opts.valProgram; + jQuery("#"+ this.chnId).text(this.program); + + this.brightness = this.opts.valBrightness; + this.rampTime = this.opts.valRampTime; + this.onTime = this.opts.valOnTime; + this.minColor = this.opts.valMinBorder; + this.maxColor = this.opts.valMaxBorder; + + this.chn = homematic("Device.get",{"id": this.chnId}); + this.value = + this.program + "," + + this.brightness + "," + + this.rampTime + "," + + this.onTime + "," + + this.minColor + "," + + this.maxColor; + + this.bindEvents(); + }, + + bindEvents: function() { + var self = this; + jQuery("#"+ this.chnId).bind("click", function(){ + conInfo("show program dialog"); + + + /*************/ + var url = "/pages/msg/setRGBWController.htm"; + + var req = jQuery.ajax({ + url : url +"?sid=" + SessionId, + cache: false, + dataType: "html" + }); + + req.done(function(htmlContent) { + + //var rgbwControllerDialog = new RGBWControllerDialog(translateKey("titleRGBWControllerDialogTitle"), htmlContent, "RGBW_AUTOMATIC", self.value, function(result) { + var rgbwControllerDialog = new RGBWControllerDialog(translateKey("titleRGBWControllerDialogTitle"), htmlContent, "USER_PROGRAM", self.value, function(result) { + if (result == 1) { + conInfo("SetRGBWController: Yes pressed"); + var arConfigString = this.getConfigString().split(","); + conInfo("rgbwControllerDialog: configString: " + arConfigString); + + homematic("Interface.putParamset",{'interface': self.chn["interface"], 'address' : self.chn["address"], 'paramsetKey' : 'VALUES', 'set': + [ + {name:'PROGRAM', type: 'string', value: arConfigString[0]}, + {name:'ACT_BRIGHTNESS', type: 'string', value: arConfigString[1]}, + {name:'RAMP_TIME', type: 'string', value: arConfigString[2]}, + {name:'ON_TIME', type: 'string', value: arConfigString[3]}, + {name:'ACT_MIN_BOARDER', type: 'string', value: arConfigString[4]}, + {name:'ACT_MAX_BOARDER', type: 'string', value: arConfigString[5]} + ] + }, function(result){jQuery("#"+ self.chnId).text( arConfigString[0] );}); + } + }, "html"); + }); + + req.fail(function() { + alert("Error while loading " + url); + }); + }); + } + +}; + + + +// This class is responsible for the handling of the CONTROL +iseVIR_LGRGBColorControl = Class.create(); + +iseVIR_LGRGBColorControl.prototype = { + + initialize: function (chnId, opts) { + + this.chnId = chnId; + + this.rgbType = opts.Type; + this.rgbID = opts.rgbID; + this.rgbVal = opts.rgbVal; + //this.defaultRGBW = opts.rgbDefault; + this.defaultRGBW = "rgb(255,255,255,255)"; + + this.rgbwID = "RGBW"; + + + this.bindEvents(); + + if (this.rgbType == this.rgbwID) { + // this.initSlider(); + } + }, + + bindEvents: function() { + var self = this; + jQuery(".sp-container #rgbwBtnColor" +this.chnId).bind("click", function() { + var color = jQuery("#colorPicker"+self.chnId).val(); + if (!color) {color = self.defaultRGBW;} + self.rgbVal = color; + setDpState(self.rgbID,self.getColorString()); + }); + }, + + getColorString: function() { + var colorString = "", + arParamVal = this.rgbVal.split(","); + + if (this.rgbType == this.rgbwID) { + if (arParamVal.size() > 3) { + colorString = arParamVal[0] +","+arParamVal[1]+","+arParamVal[2]+",255)"; + } else { + colorString = this.rgbVal.slice(0, -1) + ",255)"; + } + } else { + // This is a RGB device + colorString = this.rgbVal; + } + + return colorString; + } + +}; + +iseVIR_LGWhiteLevelControl = Class.create(); + +iseVIR_LGWhiteLevelControl.prototype = { + + initialize: function (chnId, opts) { + var self = this; + conInfo("iseVIR_LGWhiteLevelControl"); + + this.chnId = chnId; + this.whiteLevelId = opts.whiteLevelID; + this.whiteLevel = parseInt(opts.whiteLevelValue); + this.whiteLevelMin = parseInt(opts.whiteLevelMin); + this.whiteLevelMax = parseInt(opts.whiteLevelMax); + + this.whiteLevelStep = parseInt(opts.whiteLevelStep); + + window.setTimeout(function() { + self.sliderInfoElm = jQuery("#infoSliderPos" + self.chnId); + self.sliderElm = jQuery("#slider" + self.chnId); + self.initSlider(); + },100); + }, + + initSlider: function () { + + if (this.whiteLevel == "-1") {this.whiteLevel = this.whiteLevelMin;} + this.sliderInfoElm.val(this.whiteLevel); + + var self = this; + this.sliderElm.slider({ + animate: "fast", + value: this.whiteLevel, + min: this.whiteLevelMin, + max: this.whiteLevelMax, + step: this.whiteLevelStep, + orientation: "horizontal", + slide: function (event, ui) {}, + stop: function( event, ui ) {} + }); + this.sliderElm.on("slide", function (event, ui) { + self.onSliderChange(ui.value); + }); + + this.sliderElm.on("slidestop", function(event, ui){ + self.onSliderStop(ui.value); + }); + }, + + onSliderChange: function (val) { + this.sliderInfoElm.val(val); + this.whiteLevel = val; + }, + + onSliderStop: function(val) { + setDpState(this.whiteLevelId,this.whiteLevel); + } + +}; + + +/** + * ise/iseButtonsSwitch.js + **/ + +/** + * @fileOverview ? + * @author ise + **/ + +/** + * @class + **/ +iseSmokeDetectorHmIP = Class.create(); + +iseSmokeDetectorHmIP.prototype = { + + initialize: function(id, controlID, dangerState) { + + this.id = id; + this.state = parseInt(dangerState); + this.divOn = $(this.id + "On"); + this.divOff = $(this.id + "Off"); + this.idDpState = controlID; + + if (this.state == 2) { ControlBtn.on(this.divOn); } + else { ControlBtn.on(this.divOff); } + + // Add event handlers + this.clickOff = this.onClickOff.bindAsEventListener(this); + Event.observe(this.divOff, 'mousedown', this.clickOff); + + this.clickOn = this.onClickOn.bindAsEventListener(this); + Event.observe(this.divOn, 'mousedown', this.clickOn); + + + }, + + onClickOff: function() { + ControlBtn.pushed(this.divOff); + setDpState(this.idDpState, 1, false); + var t = this; + new PeriodicalExecuter(function(pe) { + t.refresh(); + pe.stop(); + }, 1); + }, + + onClickOn: function() { + ControlBtn.pushed(this.divOn); + setDpState(this.idDpState, 2, false); + var t = this; + new PeriodicalExecuter(function(pe) { + t.refresh(); + pe.stop(); + }, 1); + }, + + + refresh: function() { + if (this.state == 2) { + ControlBtn.on(this.divOn); + ControlBtn.off(this.divOff); + } + else { + ControlBtn.off(this.divOn); + ControlBtn.on(this.divOff); + } + } +}; + +/** + * @class + **/ +iseArmAlarmSiren = Class.create(); + +iseArmAlarmSiren.prototype = { + + initialize: function(id, initState, idDpState) { + conInfo("iseArmAlarmSiren - id: " + id + " - initState: " + initState + " - idDpState: " + idDpState); + this.id = id; + this.state = initState; + this.divOff = $(this.id + "Off"); + this.divExtern = $(this.id + "Extern"); // all sensors + this.divIntern = $(this.id + "Intern"); // only the outside sensors + this.divBlocked = $(this.id + "Blocked"); + this.idDpState = idDpState; + + this.initAllElements(); + + // Add event handlers + this.clickOff = this.onClickOff.bindAsEventListener(this); + Event.observe(this.divOff, 'mousedown', this.clickOff); + + this.clickExtern = this.onClickExtern.bindAsEventListener(this); + Event.observe(this.divExtern, 'mousedown', this.clickExtern); + + this.clickIntern = this.onClickIntern.bindAsEventListener(this); + Event.observe(this.divIntern, 'mousedown', this.clickIntern); + + }, + + initAllElements: function() { + ControlBtn.off(this.divOff); + ControlBtn.off(this.divExtern); + ControlBtn.off(this.divIntern); + ControlBtn.off(this.divBlocked); + switch(this.state) { + case 0: + ControlBtn.on(this.divOff); + break; + case 1: + ControlBtn.on(this.divIntern); // outside sensors + break; + case 2: + ControlBtn.on(this.divExtern); // all sensors + break; + case 3: + ControlBtn.on(this.divBlocked); + } + }, + + onClickOff: function() { + ControlBtn.pushed(this.divOff); + setDpState(this.idDpState, 0, false); + var t = this; + new PeriodicalExecuter(function(pe) { + t.refresh(); + pe.stop(); + }, 1); + }, + + // all sensors + onClickExtern: function() { + ControlBtn.pushed(this.divExtern); + setDpState(this.idDpState, 2, false); + var t = this; + new PeriodicalExecuter(function(pe) { + t.refresh(); + pe.stop(); + }, 1); + }, + + // outside sensors + onClickIntern: function() { + ControlBtn.pushed(this.divIntern); + setDpState(this.idDpState, 1, false); + var t = this; + new PeriodicalExecuter(function(pe) { + t.refresh(); + pe.stop(); + }, 1); + }, + + refresh: function() { + this.initAllElements(); + } +};/** + * @class + **/ +iseAlarmSirenHMIP = Class.create(); + +iseAlarmSirenHMIP.prototype = { + + initialize: function(opts) { + conInfo(opts); + this.opts = opts; + this.chnId = this.opts.chID; + this.iface = this.opts.chInterface; + this.chAddress = this.opts.chAddress; + + this.startAlarmElm = jQuery("#"+this.chnId+"startAlarm"); + + this.initAllElements(); + + // Add event handlers + + }, + + initAllElements: function() { + var self = this; + /* Not in use currently + if (self.opts.ZoneActive[1]) { + var zoneActive, + zoneAlarmElm, + dataPointID, + elemID, + elemIsChecked, + arZoneActive, + arZoneAlarm; + + for (var loop = 1; loop < 8; loop++) { + arZoneActive = self.opts.ZoneActive[loop].split(","); + arZoneAlarm = self.opts.ZoneAlarm[loop].split(","); + dataPointID = arZoneActive[0]; + elemID = arZoneAlarm[0]; + elemIsChecked = (arZoneActive[1] == "true") ? true : false; + zoneAlarmElm = jQuery("#ZoneAlarm_" + loop + "_" + elemID); + + zoneAlarmElm.prop("checked", elemIsChecked); + zoneAlarmElm.val(loop); // we use this in the method setAlarmZone >> elm.val() + + zoneAlarmElm.change(function () { + self.setAlarmZone(this.id); + }); + } + } + */ + this.startAlarmElm.click(function() { + self.activateAlarm(); + }); + + }, + + /* + setAlarmZone: function(elmID) { + var elm = jQuery("#" + elmID); + setDpState(this.opts.ZoneActive[parseInt(elm.val())].split(",")[0], elm.prop("checked"), true); + }, + */ + + // Here we have to use putParamset for the whole bunch of parameters + activateAlarm: function() { + var self = this; + var url = "/pages/msg/asir_setAlarm.htm"; + + var req = jQuery.ajax({ + url : url +"?sid=" + SessionId, + cache: false, + dataType: "html" + }); + + req.done(function(htmlContent) { + + setAlarmDialog = new ASIR_SetAlarmDialog(translateKey("setAlarmDialogTitle"), htmlContent, function(result) { + + var oUnit = {}; + var acousticSignal = this.selectedAcousticSignalElm.val(), + opticalSignal = this.selectedOpticalSignalElm.val(), + durationUnit = this.durationUnitElm.val(), + durationValue = this.durationValueElm.val(); + + oUnit.S = 0; oUnit.M = 1; oUnit.H = 2; oUnit.D = 3; + + if (result == 1) { + conInfo("SET ALARM"); + homematic("Interface.putParamset",{'interface': self.iface, 'address' : self.chAddress, 'paramsetKey' : 'VALUES', 'set': + [ + {name:'DURATION_UNIT', type: 'int', value: oUnit[durationUnit]}, + {name:'DURATION_VALUE', type: 'int', value: durationValue}, + {name:'ACOUSTIC_ALARM_SELECTION', type: 'int', value: acousticSignal}, + {name:'OPTICAL_ALARM_SELECTION', type: 'int', value: opticalSignal} + ] + },function(result){conInfo(result);}); + } + }, "html"); + }); + + req.fail(function() { + alert("Error while loading " + url); + }); + } + + +}; + +/** + * Created by grobelnik on 01.08.2016. + */ + + +iseDigitalState = Class.create(); + +iseDigitalState.prototype = { + initialize: function (id, initState) { + + var elmOn, elmOff; + var currentState = parseInt(initState); + currentState = currentState.toString(2).reverse(); + + for (var loop = 0; loop <= 7; loop++) { + elmOn = jQuery('#bit' + loop + '1'); + elmOff = jQuery('#bit' + loop + '0'); + + if (parseInt(currentState[loop]) == 1) { + elmOn.prop('checked', true); + } else { + elmOff.prop('checked', true); + } + } + } +}; +/* * * * * * * * * * * * * * * * * * * * * * * * + * iseButtonsShutter * + * * * * * * * * * * * * * * * * * * * * * * * */ + +/** + * @class + **/ +iseButtonsShutter = Class.create(); + +iseButtonsShutter.prototype = { + /* + * id = datapoint-ID of switch + * initState = Creation State (0 or 1) + */ + initialize: function(id, initState, dpLevel, dpStop, iViewOnly, opts) { + this.id = id; + this.state = initState; + this.dpLevel = dpLevel; + this.dpStop = dpStop; + this.Perc = $(this.id + "Perc"); + this.divPercUp = $(this.id + "PercUp"); + this.divPercDown = $(this.id + "PercDown"); + this.divStop = $(this.id + "Stop"); + this.divUp = $(this.id + "Up"); + this.divDown = $(this.id + "Down"); + + this.shutter = new shutterControl(id, initState); + + this.Perc.value = initState; + this.shutter.setValue(initState); + this.opts = opts; + + this.pressedUpDown = ""; + + if (typeof blindLevelDestination == "undefined") { + blindLevelDestination = []; + } + + blindLevelDestination[id] = (blindLevelDestination[id] != null) ? blindLevelDestination[id] : null; + + // Add event handlers + if (iViewOnly === 0) + { + this.clickCtrl = this.onClickShutter.bindAsEventListener(this); + Event.observe(this.shutter.divShutterBg, 'mousedown', this.clickCtrl); + this.clickPercUp = this.onClickPercUp.bindAsEventListener(this); + Event.observe(this.divPercUp, 'click', this.clickPercUp); + this.clickPercDown = this.onClickPercDown.bindAsEventListener(this); + Event.observe(this.divPercDown, 'click', this.clickPercDown); + this.changePerc = this.onChangePerc.bindAsEventListener(this); + Event.observe(this.Perc, 'change', this.changePerc); + + this.clickUp = this.onClickUp.bindAsEventListener(this); + Event.observe(this.divUp, 'mousedown', this.clickUp); + this.clickDown = this.onClickDown.bindAsEventListener(this); + Event.observe(this.divDown, 'mousedown', this.clickDown); + + this.clickStop = this.onClickStop.bindAsEventListener(this); + Event.observe(this.divStop, 'mousedown', this.clickStop); + } + this.initJalousie(); + this.initHmIPJalousieShutter(); + + }, + + initJalousie: function() {}, + initHmIPJalousieShutter: function() {}, + + onClickShutter: function(ev) { + var pos = Position.page(this.shutter.divShutterBg); + var offset = ev.clientY - pos[1]; + var val = 100 - (( offset * 100 ) / this.shutter.MAX_HEIGHT); + var setVal = 0; + if ( (val > 0) && ( val <= 20) ) setVal = 0; + if ( (val > 20) && ( val <= 40) ) setVal = 25; + if ( (val > 40) && ( val <= 60) ) setVal = 50; + if ( (val > 60) && ( val <= 80) ) setVal = 75; + if ( (val > 80) && ( val <= 100) ) setVal = 100; + this.pressedUpDown = ""; + this.state = setVal; + this.Perc.value = this.state; + this.shutter.setValue(this.state); + this.saveValue(); + }, + + onClickPercUp: function() { + if ((this.state % 10) != 0) { + this.state = Math.round(Math.ceil(this.state / 10) * 10); + } else { + this.state += 10; + } + this.pressedUpDown = ""; + if (this.state > 100) + this.state = 100; + this.Perc.value = this.state; + this.shutter.setValue(this.state); + this.saveValue(); + }, + + onClickPercDown: function() { + if ((this.state % 10 ) != 0) { + this.state = Math.round(Math.floor(this.state / 10) * 10); + } else { + this.state -= 10; + } + + this.pressedUpDown = ""; + if (this.state < 0) + this.state = 0; + this.Perc.value = this.state; + this.shutter.setValue(this.state); + this.saveValue(); + }, + + onChangePerc: function() { + var min = 0, max = 100, + value = this.Perc.value; + + this.pressedUpDown = ""; + + if ((value < min) || (isNaN(value))) {value = min;} + if (value > max) {value = max;} + + this.Perc.value = value; + this.state = parseInt(value); + this.shutter.setValue(this.state); + this.saveValue(); + }, + + onClickUp: function() { + //jQuery("#" +this.id + "Stop").text(translateKey("actionStatusControlStop")); + this.state = 100; + this.Perc.value = this.state; + ControlBtn.pushed(this.divUp); + this.shutter.setValue(this.state); + this.pressedUpDown = "UP"; + this.saveValue(); + var t = this; + new PeriodicalExecuter(function(pe) { + ControlBtn.off(t.divUp); + pe.stop(); + }, 1); + }, + + onClickDown: function() { + //jQuery("#" +this.id + "Stop").text(translateKey("actionStatusControlStop")); + this.state = 0; + this.Perc.value = this.state; + this.shutter.setValue(this.state); + this.pressedUpDown = "DOWN"; + this.saveValue(); + var t = this; + ControlBtn.pushed(this.divDown); + new PeriodicalExecuter(function(pe) { + ControlBtn.off(t.divDown); + pe.stop(); + }, 1); + }, + + onClickStop: function() { + ControlBtn.pushed(this.divStop); + this.pressedUpDown = ""; + setDpState(this.dpStop, 1); + var t = this; + new PeriodicalExecuter(function(pe) { + ControlBtn.off(t.divStop); + pe.stop(); + }, 1); + blindLevelDestination[this.id] = null; + }, + + saveValue: function() { + setDpState(this.dpLevel, this.state / 100); + } +}; + +iseButtonsJalousie = Class.create(iseButtonsShutter, { + initJalousie: function () { + conInfo("initJalousie"); + this.sliderInfoElm = jQuery("#infoSliderPos" + this.id); + this.sliderElm = jQuery("#slider" + this.id); + this.btnSendData = jQuery("#btnSendValues" + this.id); + + this.levelSlats = this.opts.levelSlatsValue; + this.dpLevelCombined = this.opts.levelCombinedID; + this.initSliderInfoElm(); + this.initSendBtn(); + this.initSlider(); + this.sliderElm.slider('value', this.opts.levelSlatsValue); + this.sliderInfoElm.val(this.opts.levelSlatsValue); + + }, + + + + initSliderInfoElm: function() { + var self = this; + this.sliderInfoElm.change(function() { + self.levelSlats = jQuery(this).val(); + self.sliderElm.slider("value", self.levelSlats); + }); + }, + + initSendBtn: function () { + var self = this; + + this.btnSendData.click(function () { + self.saveValue(); + JControlBtn.pushed(self.btnSendData); + + new PeriodicalExecuter(function (pe) { + JControlBtn.off(self.btnSendData); + pe.stop(); + }, 1); + }); + }, + + initSlider: function () { + var self = this; + this.sliderElm.slider({ + animate: "fast", + min: 0, + max: 100, + step: 5, + orientation: "horizontal", + slide: function (event, ui) {}, + stop: function( event, ui ) {} + }); + this.sliderElm.on("slide", function (event, ui) { + self.onSliderChange(ui.value); + }); + + this.sliderElm.on("slidestop", function(event, ui){ + self.onSliderStop(); + }); + }, + + onSliderChange: function (val) { + this.levelSlats = val; //this.sliderElm.slider("value"); + this.sliderInfoElm.val(this.levelSlats); + //this.saveValue(); + }, + + onSliderStop: function() { + this.pressedUpDown = ""; + }, + + onClickShutter: function (ev) { + var pos = Position.page(this.shutter.divShutterBg); + var offset = ev.clientY - pos[1]; + var val = 100 - (( offset * 100 ) / this.shutter.MAX_HEIGHT); + var setVal = 0; + if ((val > 0) && ( val <= 20)) setVal = 0; + if ((val > 20) && ( val <= 40)) setVal = 25; + if ((val > 40) && ( val <= 60)) setVal = 50; + if ((val > 60) && ( val <= 80)) setVal = 75; + if ((val > 80) && ( val <= 100)) setVal = 100; + this.state = setVal; + this.Perc.value = this.state; + this.shutter.setValue(this.state); + //this.saveValue(); + }, + + + + onChangePerc: function() { + if (isNaN(this.Perc.value)) { return; } + this.pressedUpDown = ""; + this.state = parseInt(this.Perc.value); + //this.shutter.setValue(this.state); + //this.saveValue(); + }, + + + saveValue: function() { + var level = parseInt(this.state) * 2, + levelHex = level.toString(16), + levelSlat = parseInt(this.levelSlats) * 2, + levelSlatHex = levelSlat.toString(16), + dpValue; + + dpValue = (levelHex.length < 2) ? "0X0" + levelHex : "0X" + levelHex; + dpValue += ","; + dpValue += (levelSlatHex.length < 2) ? "0X0" + levelSlatHex : "0X" + levelSlatHex; + setDpState(this.dpLevelCombined, dpValue); + } + +}); + +iseHmIPJalousieShutter = Class.create(iseButtonsShutter, { + initHmIPJalousieShutter: function() { + + this.Interface = this.opts.chnInterface; + this.levelStatus = parseInt(this.opts.levelStatusRealChannel); + this.levelSlatsStatus = parseInt(this.opts.levelStatusRealChannelSlatsValue); + + jQuery("#hintVirtualChannelChanged" + this.id).click(function() { + MessageBox.show(translateKey("hintVirtualChannelChanged"), translateKey("hintVirtualChannelChangedMsg"), "", 500, 150); + }); + + + // TWIST-1873 + // When the expert mode is active the visual shutter element will be displayed on the transmitter channel (real channel) + // Then this element shouldn't be visible with the virtual channels. + if (! this.opts.easyLinkMode) { + this.shutterAnchor = jQuery("#shutter"+this.id ); + this.shutterAnchor.hide(); + } + + // When the user is no expert the first virtual channel displays the value of the hidden real channel + this.initState = (this.opts.easyLinkMode) ? parseInt(this.opts.levelRealChannel * 100) : this.opts.levelValue; + this.initState = (parseInt(this.initState) == -100) ? -1 : this.initState; + + this.state = this.initState; + + this.Perc.value = (this.levelStatus > 0 || this.initState == -1) ? "??" : this.initState; + + if (this.initState == -1) { + this.shutter.setValue(0); + } else { + this.shutter.setValue(this.initState); + } + + this.hasSlats = (this.opts.levelSlatsID) ? true : false; + if (this.hasSlats) { + this.sliderInfoElm = jQuery("#infoSliderPos" + this.id); + this.sliderElm = jQuery("#slider" + this.id); + + // When the user is no expert the first virtual channel displays the value of the hidden real channel + this.levelSlats = (this.opts.easyLinkMode) ? parseInt(this.opts.levelRealChannelSlatsValue * 100) : this.opts.levelSlatsValue; + this.levelSlats = (parseInt(this.levelSlats) == -100) ? 0 : this.levelSlats; + + this.levelReal = this.opts.levelRealChannel; + this.initSliderInfoElm(); + this.initSlider(); + this.sliderElm.slider('value', this.levelSlats); + this.sliderInfoElm.val((this.levelSlatsStatus > 0) ? "??" : this.levelSlats); + } + this.blockElements(); + }, + + // Prevent certain elements to work when the levelStatus or levelSlatsStatus != 0 (NORMAL) + blockElements: function() { + var controlOperableNone = "none", + controlOperableAuto = "auto", + activityState = parseInt(this.opts.activityStateRealChannel); + + if (this.levelStatus > 0) { + jQuery("#shutter" + this.id).css("pointer-events", controlOperableNone); // visual blind element + jQuery("#" + this.Perc.id).css("pointer-events", controlOperableNone); // text value in % + $(this.divPercUp).stopObserving('click'); // up button + $(this.divPercDown).stopObserving('click'); // down button + + // Only when the ACTIVITY_STATE of the device = 0 (UNKNOWN) or 3 (STABLE) -- the other values ara 1/2 = UP/DOWN + //if ((activityState == 0) || (activityState == 3)) { + // jQuery("#" + this.id + "Stop").text("Refresh"); // Refresh + //} + } + + if (! isNaN(this.levelSlatsStatus) && this.levelSlatsStatus > 0) { + jQuery("#tdSlider" + this.id).css("pointer-events", controlOperableNone); + } + }, + + initSliderInfoElm: function() { + var self = this; + this.sliderInfoElm.change(function() { + var value = jQuery(this).val(), + min = 0, max = 100; + + if ((value < min) || (isNaN(value))) {value = min;} + if (value > max) {value = max;} + this.value = value; + self.levelSlats = value; + self.sliderElm.slider("value", self.levelSlats); + self.saveSliderValue(); + }); + }, + + initSlider: function () { + var self = this; + this.sliderElm.slider({ + animate: "fast", + min: 0, + max: 100, + step: 5, + orientation: "horizontal", + slide: function (event, ui) {}, + stop: function( event, ui ) {} + }); + this.sliderElm.on("slide", function (event, ui) { + self.onSliderChange(ui.value); + }); + + this.sliderElm.on("slidestop", function(event, ui){ + self.onSliderStop(); + }); + }, + + onSliderChange: function (val) { + this.levelSlats = val; //this.sliderElm.slider("value"); + this.sliderInfoElm.val(this.levelSlats); + }, + + onSliderStop: function() { + this.saveSliderValue(); + }, + + saveSliderValue: function() { + //var levelValue = (blindLevelDestination[this.id] != null) ? blindLevelDestination[this.id] : this.levelReal; + homematic("Interface.putParamset",{'interface': this.Interface, 'address' : this.opts.chnAddress, 'paramsetKey' : 'VALUES', 'set': + [ + //{name:'LEVEL', type: 'double', value: 1.005}, + // {name:'LEVEL', type: 'double', value: levelValue}, LEVEL wird intern vom Realkanal durch den crRFD ermittelt. + {name:'LEVEL_2', type: 'double', value: this.levelSlats / 100} + ] + },function(result){conInfo(result);}); + }, + + // See SPHM-1301 - this was the previous version + _saveValue: function() { + var level2Value; + + this.state = (this.state != -1) ? this.state : 0; + + if (this.hasSlats) { + blindLevelDestination[this.id] = this.state; + + if (this.pressedUpDown == "DOWN") { + level2Value = 0; + } else if (this.pressedUpDown == "UP") { + level2Value = 1; + } + + // twist-1551 + if ((this.pressedUpDown != "") && (typeof level2Value != "undefined") ) { + homematic("Interface.putParamset", { + 'interface': this.Interface, 'address': this.opts.chnAddress, 'paramsetKey': 'VALUES', 'set': [ + {name: 'LEVEL', type: 'double', value: this.state / 100}, + {name: 'LEVEL_2', type: 'double', value: level2Value} + ] + }, function (result) { + conInfo(result); + }); + } else { + + setDpState(this.dpLevel, this.state / 100); + + } + } else { + setDpState(this.dpLevel, this.state / 100); + } + }, + + // See SPHM-1301 + saveValue: function() { + var self=this, level2Value; + this.state = (this.state != -1) ? this.state : 0; + blindLevelDestination[this.id] = this.state; + if (this.pressedUpDown == "DOWN") { + level2Value = 0; + } else if (this.pressedUpDown == "UP") { + level2Value = 1; + } + level2Value = (typeof level2Value == "undefined") ? 0 : level2Value; + homematic("Interface.putParamset", { + 'interface': this.Interface, 'address': this.opts.chnAddress, 'paramsetKey': 'VALUES', 'set': [ + {name: 'LEVEL', type: 'double', value: this.state / 100}, + {name: 'LEVEL_2', type: 'double', value: level2Value} + ] + }, function (result) { + conInfo("1st try: " + result); + if (result == null) { + homematic("Interface.putParamset", { + 'interface': self.Interface, 'address': self.opts.chnAddress, 'paramsetKey': 'VALUES', 'set': [ + {name: 'LEVEL', type: 'double', value: self.state / 100} + ] + }, function (result) { + conInfo("2nd try: " + result); + }); + } + }); + } +}); +iseDualWhiteColorController = Class.create(); + +iseDualWhiteColorController.prototype = { + initialize: function (opts) { + var self = this; + this.iFace = "BidCos-RF"; + this.id = opts.chnId; + this.chnAddress = opts.chnAddress; + this.devAddress = this.chnAddress.split(":")[0]; + this.val = parseInt(opts.value * 100); + this.minVal = 0; + this.maxVal = 100; + this.sliderStep = 5; + this.colorPlusMinusTimeoutObject; + this.colorPlusMinusTimeout = 1000; + + + this.sliderInfoElm = jQuery("#infoSliderPos" + this.id); + this.sliderElm = jQuery("#slider" + this.id); + this.colorPlusElm = jQuery("#colorPlus" + this.id); + this.colorMinusElm = jQuery("#colorMinus" + this.id); + + this.loadImg = "/ise/img/loading.gif"; + this.currentDiagram; + + this.diagramURLs = {} ; + + if (opts.isVirtualChannel == "false") { + if (typeof hm_lc_dw_diagram == "undefined") { + jQuery("[name='imgDualWhiteController']").attr("src", this.loadImg); + hm_lc_dw_diagram = {}; + this.initDiagramURLs(); + this.getConfigAndSetDiagram(); + } else { + // Here we have a hm_lc_dw_diagram object from another device + if (typeof hm_lc_dw_diagram[this.devAddress] == "undefined") { + jQuery("[name='imgDualWhiteController']").attr("src", this.loadImg); + delete hm_lc_dw_diagram; + hm_lc_dw_diagram = {}; + this.initDiagramURLs(); + this.getConfigAndSetDiagram(); + } else { + this.currentDiagram = hm_lc_dw_diagram[this.devAddress]; + jQuery("[name='imgDualWhiteController']").attr("src", self.currentDiagram); + this.initBigDiagram(); + } + } + } else { + if (typeof hm_lc_dw_diagram == "undefined") { + hm_lc_dw_diagram = {}; + var elem = jQuery("[name='imgDualWhiteController']")[0]; + hm_lc_dw_diagram[this.devAddress] = jQuery(elem).attr("src"); + this.currentDiagram = hm_lc_dw_diagram[this.devAddress]; + jQuery("[name='imgDualWhiteController']").attr("src", this.currentDiagram); + this.initBigDiagram(); + } else { + this.currentDiagram = hm_lc_dw_diagram[this.devAddress]; + jQuery("[name='imgDualWhiteController']").attr("src", self.currentDiagram); + this.initBigDiagram(); + } + } + + this.sliderVal; + this.initSlider(); + this.sliderElm.slider('value', this.val); + this.sliderInfoElm.val(this.val); + + if (typeof clearCachedPath != "undefined") { + clearTimeout(clearCachedPath); + } + + clearCachedPath = setTimeout(function() {delete hm_lc_dw_diagram;}, 15000); + this.bindEvents(); + }, + + bindEvents: function () { + + var self = this; + this.sliderInfoElm.on('change',function() { + thisElm = jQuery(this); + var value = parseInt(thisElm.val()); + + if (isNaN(value)) { + value = self.minVal; + thisElm.val(value); + } else if (value < self.minVal) { + value = this.minVal; + thisElm.val(value); + } else if (value > self.maxVal) { + value = self.maxVal; + thisElm.val(value); + } + self.sliderVal = value; + self.sliderElm.slider("value", value); + self.setValue(); + }); + + this.sliderInfoElm.on('keypress', function (e) { + if(e.which === 13){ + jQuery(this).change(); + } + }); + + this.colorPlusElm.on('click', function() { + clearTimeout(self.colorPlusMinusTimeoutObject); + var val = parseInt(self.sliderInfoElm.val()); + if (val < self.maxVal) { + val++; + } + + self.sliderInfoElm.val(val); + self.colorPlusMinusTimeoutObject = setTimeout(function() { + self.sliderInfoElm.change(); + }, self.colorPlusMinusTimeout); + }); + + this.colorMinusElm.on('click', function() { + clearTimeout(self.colorPlusMinusTimeoutObject); + var val = parseInt(self.sliderInfoElm.val()); + if (val > self.minVal) { + val--; + } + self.sliderInfoElm.val(val); + self.colorPlusMinusTimeoutObject = setTimeout(function(){ + self.sliderInfoElm.change(); + },self.colorPlusMinusTimeout); + }); + + }, + + + + initDiagramURLs: function() { + getDualWhiteControllerDiagramURLs(); + this.diagramURLs = dualWhiteControllerDiagramURL; + }, + + getConfigAndSetDiagram: function () { + var self = this; + var address = this.chnAddress; + var iFace = this.iFace; + var config = ""; + + homematic("Interface.getParamset", {"interface": iFace, "address": address, "paramsetKey": "MASTER"}, function(result) { + config += result.CHARACTERISTIC_BASETYPE; + config += result.CHARACTERISTIC_LINSQUARETYPE; + config += result.CHARACTERISTIC_LEVELLIMIT; + config += result.CHARACTERISTIC_COLOURASSIGNMENT; + + self.showCurrentDiagram(config); + }); + }, + + showCurrentDiagram: function (config) { + this.currentDiagram = this.diagramURLs[config]; + + hm_lc_dw_diagram[this.devAddress] = this.currentDiagram; + + // All channels (real and virtual) are using the same picture + jQuery("[name='imgDualWhiteController']").attr("src", this.currentDiagram); + this.initBigDiagram(); + }, + + initBigDiagram: function() { + var srcDiagram = hm_lc_dw_diagram[this.devAddress]; + var tooltip = ""; + jQuery("[name='imgDualWhiteController']").data('powertip', tooltip); + jQuery("[name='imgDualWhiteController']").powerTip({smartPlacement: true, followMouse: false}); + }, + + initSlider: function () { + var self = this; + this.sliderElm.slider({ + animate: "fast", + min: self.minVal, + max: self.maxVal, + step: self.sliderStep, + orientation: "horizontal", + slide: function (event, ui) {}, + stop: function( event, ui ) {} + }); + this.sliderElm.on("slide", function (event, ui) { + self.onSliderChange(ui.value); + }); + + this.sliderElm.on("slidestop", function(event, ui){ + self.onSliderStop(); + }); + }, + + onSliderChange: function (val) { + this.sliderVal = val; + this.sliderInfoElm.val(this.sliderVal); + }, + + onSliderStop: function() { + this.setValue(); + }, + + setValue: function() { + if (this.sliderVal >= this.minVal || this.sliderVal <= this.maxVal) { + setDpState(this.id, (this.sliderVal / 100)); + } + } + +};/** + * Created by grobelnik on 01.08.2016. + */ + + +iseHmIPWeeklyProgram = Class.create(); + +iseHmIPWeeklyProgram.prototype = { + initialize: function (id, opts, callback) { + var self = this; + conInfo("opts", opts); + virtChnCounterWP = 0; + //conInfo(opts); + this.callback = callback; + this.opts = opts; + this.id = id; + + this.fwMajor = opts.fwMajor; + this.fwMinor = opts.fwMinor; + this.fwPatch = opts.fwPatch; + + this.devLabel = opts.deviceLabel; + this.iface = this.opts.chInterface; + this.chAddress = this.opts.chnAddress; + + this.wiegandInterface = (this.isDeviceType("HmIP-FWI")) ? true : false; + this.deviceIsHmIPWKP = this.isDeviceType("HmIP-WKP"); + this.deviceIsHmIP_MOD_WD_VK = this.isDeviceType("HmIP-MOD-WD-VK"); + this.deviceIsHmIP_RGBW = this.isDeviceType("HmIP-RGBW"); + this.deviceIsHmIP_DALI = this.isDeviceType("HmIP-DRG-DALI"); + this.deviceIsHmIP_FLC = (this.isDeviceType("HmIP-FLC") || (this.isDeviceType("HmIP-FDC"))); + + this.expert = (! this.opts.userEasyLinkMode || this.deviceIsHmIP_FLC) ? true : false; + + this.device = this.getDevice(this.opts.deviceID); + this.relevantChn = this.getRelevantChannels(); + + // The HmIP-BSL consists of SWITCH and DIMMER channels. For the weekly program we are currently using only the SWITCH channels. + /* + if (this.isDeviceType("HmIP-BSL")) { + this.relevantChn = (this.expert) ? [4, 5, 6] : [4]; + } + */ + + if (this.isDeviceType("HmIP-BSL")) { + if (this.fwMajor < 2) { + this.relevantChn = (this.expert) ? [4, 5, 6] : [4]; + } else { + this.relevantChn = (this.expert) ? [4, 5, 6, 8, 9, 10, 12, 13, 14] : [4, 8, 12]; + } + } + + if (this.deviceIsHmIPWKP) { + this.relevantChn = [1, 3, 5, 7, 9, 11, 13, 15]; + } + + if (this.deviceIsHmIP_MOD_WD_VK) { + this.relevantChn = [2]; + } + + if ((this.isDeviceType("HmIP-SMO230")) || (this.isDeviceType("HmIP-SMO230-A")) || (this.isDeviceType("HmIPW-SMO230")) || (this.isDeviceType("HmIPW-SMO230-A"))) { + this.relevantChn = [10, 11, 12]; + } + + if (this.deviceIsHmIP_RGBW) { + var oChannel = DeviceList.getChannelByAddress(this.chAddress), + oMaintChannel = DeviceList.getChannelByAddress(this.chAddress.split(":")[0] + ":0"), // The maintenance channel stores the deviceMode + deviceMode = parseInt(homematic("Interface.getMetadata", {"objectId": oMaintChannel.id, "dataId": "deviceMode"})); + + if (oChannel.channelType == "UNIVERSAL_LIGHT_WEEK_PROFILE") { + switch (deviceMode) { + case 0: + case 1: + // RGB/RGBW Mode + this.relevantChn = [1]; + break; + case 2: + // Tunable White Mode + this.relevantChn = [1, 2]; + break; + default: + // PWM Mode - all channels visible + this.relevantChn = [1, 2, 3, 4]; + } + } + } + + if (this.deviceIsHmIP_DALI) { + + /* + Das erste angeschlossene DAlI Gerät belegt Kanal 1, das nächste DALI Gerät bekommt Kanal 2 usw. + Es können 32 DAlI Geräte angeschlossen werden, d. h. Kanal 1 - 32 + Angezeigt werden nur die Kanäle, welche auch benutzt werden. Damit kein XML-RPC Aufruf für ungenutzte Kanäle gemacht wird, + wird die Variable lastUsedDaliChn eingesetzt. + Die Kanäle 33 - 48 sind Gruppenkanäle und werden immer angezeigt. + + The first DAlI device connected occupies channel 1, the next DALI device gets channel 2, etc. + 32 DAlI devices can be connected, i.e. channel 1 - 32. + Only those channels are displayed which are actually used. So that no XML-RPC call is made for unused channels, + the variable lastUsedDaliChn is used. + Channels 33 - 48 are group channels and are always displayed. + */ + + var self = this, + oDevice = DeviceList.getDeviceByAddress(this.chAddress.split(":")[0]), + lastUsedDaliChn = false, + maxCap; + + this.relevantChn = []; + + jQuery.each(oDevice.channels, function(index, chn) { + + if (chn.channelType == "UNIVERSAL_LIGHT_RECEIVER") { + if (index < 33) { + if (! lastUsedDaliChn) { + maxCap = parseInt(homematic("Interface.getMetadata", {"objectId": chn.id, "dataId": "maxCap"})); + } + if ((!isNaN(maxCap)) && (maxCap < 5)) { + self.relevantChn.push(index); + } else { + lastUsedDaliChn = true; + } + } else { + self.relevantChn.push(index); + } + } + }); + } + + this.anchor = jQuery("#anchor_"+this.id); + this.anchor.html(this.getMainHtml()); + + this.initChannelState(); + + jQuery("#weekprg_"+this.id).show(); + window.setTimeout(function() {delete virtChnCounterWP;},5000); + this.initBtnEvents(); + }, + + initBtnEvents: function() { + var that = this; + jQuery("#setChannelMode_"+this.id).click(function(){ + var self = this; + jQuery(this).toggleClass("ControlBtnOn"); + window.setTimeout(function(){jQuery(self).toggleClass("ControlBtnOn");},500); + that.getModeDialog(); + window.setTimeout(function(){ + that.modeElm = jQuery("#wpChannelMode_" + that.id); + that.chnElems = jQuery("[name='wpChannelSel_"+that.id+"']"); + },500); + + }); + }, + + getModeDialog: function() { + var that = this; + var sOutput = this.getDialogHtml(); + var dlg = new YesNoDialog(translateKey("dialogSetWPModeTitle"), sOutput, function(result) { + var selectedMode = that.modeElm.val(), + selectedCh = 0; + if (result == YesNoDialog.RESULT_YES) { + jQuery.each(that.chnElems, function(index,elm){ + if (jQuery(elm).is(":checked")) { + selectedCh += parseInt(jQuery(elm).val()); + } + }); + that.selectedCh = selectedCh; + conInfo("iface: " + that.iface + " - address: " + that.chAddress); + conInfo("selectedMode: " + selectedMode + " - selectedCh: " + selectedCh); + + if (typeof that.callback == "undefined" ) { + homematic("Interface.putParamset", { + 'interface': that.iface, + 'address': that.chAddress, + 'paramsetKey': 'VALUES', + 'set': + [ + {name: 'WEEK_PROGRAM_TARGET_CHANNEL_LOCK', type: 'string', value: selectedMode}, + {name: 'WEEK_PROGRAM_TARGET_CHANNEL_LOCKS', type: 'int', value: selectedCh} + ] + }, function (result) { + conInfo(result); + }); + } + } + + if (that.callback) {that.callback(result);} + },"html"); + + if(that.deviceIsHmIP_DALI) { + dlg.setWidth(700); + } + + }, + + + initChannelState: function() { + var self = this, + binChannelState = this.getBinChannelState(), + chState, + relevantChn = []; + + if (! this.expert) { + relevantChn = (!this.wiegandInterface) ? this.relevantChn : [1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12]; + } else { + relevantChn = this.relevantChn; + } + jQuery.each(relevantChn, function (index, value) { + //debugger; + chState = (binChannelState[index]) ? binChannelState[index] : "1"; + if (! self.deviceIsHmIP_DALI) { + if (chState == "0") { + jQuery("#" + self.id + "_bit" + index + "0").attr("checked", true); // Auto + } else { + jQuery("#" + self.id + "_bit" + index + "1").attr("checked", true); // Manu + } + } else { + if (chState == "0") { + jQuery("#" + self.id + "_bit" + (value - 1) + "0").attr("checked", true); // Auto + } else { + jQuery("#" + self.id + "_bit" + (value - 1) + "1").attr("checked", true); // Manu + } + } + }); + }, + + getMainHtml: function() { + var self = this, + html = ""; + + var valCheckBox, + tmpVal; + + function getHTML(selectedChannels) { + var html = "", relevantChn; + + if (selectedChannels) { + relevantChn = selectedChannels; + html += "

"; + } else { + relevantChn = self.relevantChn; + } + + html += ""; + html += ""; + + // channel number + html += ""; + if (!self.deviceIsHmIPWKP) { + html += ""; + } else { + html += ""; + } + + if (!self.deviceIsHmIP_MOD_WD_VK) { + jQuery.each(relevantChn, function (index, val) { + if (!self.deviceIsHmIPWKP) { + html += ""; + } else { + html += ""; + } + }); + } + html += ""; + html += ""; + + html += ""; + // row auto + html += ""; + html += ""; + var _tmpIndex; + jQuery.each(relevantChn, function (index, val) { + + if (self.wiegandInterface) { + // index 0 - 7 = 3 - 10 - index 9 - 10 = 0 - 2 + if (index <= 7) { + _tmpIndex = index + 3; + } else { + _tmpIndex = index - 8; + } + html += ""; + } else if (self.deviceIsHmIP_DALI) { + html += ""; + } else { + html += ""; + } + + }); + html += ""; + + // row manu + html += ""; + html += ""; + jQuery.each(relevantChn, function (index, val) { + if (self.wiegandInterface) { + //****************** + if (self.expert) { + // index 0 - 7 = 3 - 10 - index 9 - 10 = 0 - 2 + if (index <= 7) { + _tmpIndex = index + 3; + } else { + _tmpIndex = index - 8; + } + valCheckBox = Math.pow(2, _tmpIndex); + } else { + if (index <= 7) { + _tmpIndex = index + 3; + valCheckBox = Math.pow(2, _tmpIndex); + } else { + _tmpIndex = index - 8; + valCheckBox = 1; + } + } + html += ""; + //****************** + } else if (self.deviceIsHmIP_DALI) { + valCheckBox = Math.pow(2, (val-1)); + html += ""; + } else { + if (self.expert) { + valCheckBox = Math.pow(2, index); + } else { + if (index == 0) { + valCheckBox = 1; + tmpVal = 1; + } else { + valCheckBox = tmpVal << 3; + tmpVal = valCheckBox; + } + } + html += ""; + } + }); + html += ""; + html += ""; + html += "
" + translateKey('lblUser') + "" + val + "" + (index + 1) + "
" + translateKey("stringTableClimateControlRTTransceiverAutoMode") + ""; + html += ""; + html += ""; + html += ""; + html += ""; + html += ""; + html += "
" + translateKey("stringTableClimateControlRTTransceiverManuMode") + ""; + html += ""; + html += ""; + html += ""; + html += ""; + html += ""; + html += "
"; + + return html; + + }; + + if (! this.deviceIsHmIP_DALI) { + html += getHTML(); + } else { + // DALI - Create one row for the normal channels and one row for the group channels. + var self = this, + oDevice = DeviceList.getDeviceByAddress(this.chAddress.split(":")[0]), + lastUsedDaliChn = false, + maxCap; + + var chnInUse = []; + + jQuery.each(oDevice.channels, function(index, chn) { + + if (chn.channelType == "UNIVERSAL_LIGHT_RECEIVER") { + if (index < 33) { + if (! lastUsedDaliChn) { + maxCap = parseInt(homematic("Interface.getMetadata", {"objectId": chn.id, "dataId": "maxCap"})); + } + if ((!isNaN(maxCap)) && (maxCap < 5)) { + chnInUse.push(index); + } else { + lastUsedDaliChn = true; + } + } + } + }); + + html += getHTML(chnInUse); + // DALI group channels + chnInUse = []; + for (var i = 33; i <= 48; i++) { + chnInUse.push(i); + } + html += getHTML(chnInUse); + } + return html; + }, + + getDialogHtml: function() { + var self = this, + newTR = false, + html = ""; + + var valCheckBox, + tmpVal; + + html += ""; + html += ""; + html += ""; + html += ""; + html += ""; + + if (! self.deviceIsHmIP_MOD_WD_VK) { + html += ""; + } else { + html += ""; + } + if (! this.deviceIsHmIPWKP) { + html += ""; + } else { + html += ""; + } + html += ""; + html += ""; + html += ""; + html += ""; + + html += "
"+translateKey("lblMode")+": "; + html += ""; + html+= "
"+translateKey('btnSettingsGroups')+""; + newTR = true; + } + } + }); + + html += "
"; + return html; + }, + + getDevice: function(id) { + var device = DeviceList.getDevice(this.opts.deviceID); + if (typeof device != "object") { + device = homematic("Device.get", {"id": id}); + } + return device; + }, + + getRelevantChannels: function() { + var self = this, + result = [], + virtualChID = "_VIRTUAL_RECEIVER", + AccessReceiverID = "ACCESS_RECEIVER", // HmIP-DLD + AccessTransceiverID = "ACCESS_TRANSCEIVER", // HmIP-FWI (Wiegand Iface) + DoorLockTransmitterID = "DOOR_LOCK_STATE_TRANSMITTER", // HmIP-DLD + OpticalSignalID = "OPTICAL_SIGNAL_RECEIVER", // HmIPW-WRC6 + UniversalLightReceiver = "UNIVERSAL_LIGHT_RECEIVER", // HmIP-RGBW + PermissionTranseiverID = "PERMISSION_TRANSCEIVER", // HmIP-FLC/FLD + SwitchTranseiverID = "SWITCH_TRANSCEIVER", // HmIP-FLC/FLD + expertChn; + + jQuery.each(this.device.channels, function(index,chn) { + if ( + (chn.channelType.indexOf(virtualChID) !== -1) + || (chn.channelType.indexOf(AccessReceiverID) !== -1) + || (chn.channelType.indexOf(AccessTransceiverID) !== -1) + || (chn.channelType.indexOf(DoorLockTransmitterID) !== -1) + || (chn.channelType.indexOf(OpticalSignalID) !== -1) + || (chn.channelType.indexOf(UniversalLightReceiver) !== -1) + || (chn.channelType.indexOf(PermissionTranseiverID) !== -1) + || (chn.channelType.indexOf(SwitchTranseiverID) !== -1) + ) { + if (self.expert) { + result.push(index); + } else { + expertChn = self.getOnlyExpertChannels(chn.channelType, index); + if (expertChn) { + result.push(expertChn); + } + } + } + }); + return result; + }, + + getOnlyExpertChannels: function(channelType, channelNr) { + var result = null, self=this; + + if ( + channelType == "DIMMER_VIRTUAL_RECEIVER" || + channelType == "SWITCH_VIRTUAL_RECEIVER" || + channelType == "BLIND_VIRTUAL_RECEIVER" || + channelType == "SHUTTER_VIRTUAL_RECEIVER" || + channelType == "ACOUSTIC_SIGNAL_VIRTUAL_RECEIVER" || + channelType == "SERVO_VIRTUAL_RECEIVER" + ) { + virtChnCounterWP = (virtChnCounterWP >= 3) ? 0 : virtChnCounterWP; + virtChnCounterWP++; + if (virtChnCounterWP == 1) { + return channelNr; + } else { + return null; + } + } else if ( + channelType == "ACCESS_RECEIVER" + || channelType == "ACCESS_TRANSCEIVER" + || channelType == "DOOR_LOCK_STATE_TRANSMITTER" + || channelType == "OPTICAL_SIGNAL_RECEIVER" + || channelType == "UNIVERSAL_LIGHT_RECEIVER" + || channelType == "PERMISSION_TRANSCEIVER" + || channelType == "SWITCH_TRANSCEIVER") + { + return channelNr; + } + + return result; + }, + + // Checks if the device type is of a particular kind + // This is useful for the treatment of special cases (e.g. the HmIP-BSL which is a DIMMER_WEEKLY_PROFILE but must be treated as a SWITCH_WEEKLY_PROFILE + isDeviceType: function(devType) { + return (this.devLabel == devType) ? true : false; + }, + + getBinChannelState: function() { + var missingZero = "", + tmp = "", + bVal = this.opts.channelLocks.toString(2); + + jQuery.each(this.relevantChn, function(index, value) { + missingZero += "0"; + }); + + bVal = missingZero.substr(bVal.length)+bVal; + bVal = this.reverseString(bVal); + if (! this.expert) { + + if (! this.wiegandInterface) { + for (var x = 0; x < bVal.length; x += 3) { + tmp += bVal[x]; + } + bVal = tmp; + } else { + // 3 virtual switch actor channels _ Bit 1, 2, 3 + // 8 access control channels - Bit 4 - 11 + for (var loop = 0; loop <= 10; loop++) { + tmp += (bVal.charAt(loop) != "") ? bVal.charAt(loop) : "0"; + } + bVal = tmp; + } + } + return bVal; + }, + + reverseString: function (str) { + return str.split("").reverse().join(""); + }, + + getConfigString: function() { + var arMode = ["MANU_MODE", "AUTO_MODE_WITH_RESET", "AUTO_MODE_WITHOUT_RESET"]; + return "WPTCLS="+this.selectedCh+",WPTCL="+arMode.indexOf(this.modeElm.val()); + } +}; +/** + * Created by grobelnik on 04.12.2020. + */ + + +iseHmIPWeeklyProgramAccessReceiver = Class.create(); + +iseHmIPWeeklyProgramAccessReceiver.prototype = { + initialize: function (id, opts, callback) { + var self = this; + + virtChnCounterWP = 0; + //conInfo(opts); + this.callback = callback; + this.opts = opts; + this.id = id; + this.devLabel = opts.deviceLabel; + this.iface = this.opts.chInterface; + + this.doorLockStateTransmitterID = "DOOR_LOCK_STATE_TRANSMITTER"; + this.accessReceiverID = "ACCESS_RECEIVER"; + + this.expert = (! this.opts.userEasyLinkMode) ? true : false; + + this.chAddress = this.opts.chnAddress; + + this.device = this.getDevice(this.opts.deviceID); + this.relevantChn = this.getRelevantChannels(); + + // This can be used for later devices that require special treatment. + /*if (this.isDeviceType("HmIP-XXX")) { + this.relevantChn = (this.expert) ? [4, 5, 6] : [4]; + }*/ + + this.anchor = jQuery("#anchor_"+this.id); + this.anchor.html(this.getMainHtml(this.doorLockStateTransmitterID) + this.getMainHtml(this.accessReceiverID)); + + this.initChannelState(); + + jQuery("#weekprg_"+this.id).show(); + window.setTimeout(function() {delete virtChnCounterWP;},5000); + this.initBtnEvents(); + }, + + initBtnEvents: function() { + var that = this; + jQuery("#setChannelMode_"+this.id).click(function(){ + var self = this; + jQuery(this).toggleClass("ControlBtnOn"); + window.setTimeout(function(){jQuery(self).toggleClass("ControlBtnOn");},500); + that.getModeDialog(); + window.setTimeout(function(){ + that.modeElm = jQuery("#wpChannelMode_" + that.id); + that.chnElems = jQuery("[name='wpChannelSel_"+that.id+"']"); + },500); + + }); + }, + + getModeDialog: function() { + var that = this; + var sOutput = this.getDialogHtml(this.doorLockStateTransmitterID) + this.getDialogHtml(this.accessReceiverID); + + var dlg = new YesNoDialog(translateKey("dialogSetWPModeTitle"), sOutput, function(result) { + var selectedMode = that.modeElm.val(), + selectedCh = 0; + if (result == YesNoDialog.RESULT_YES) { + jQuery.each(that.chnElems, function(index,elm){ + if (jQuery(elm).is(":checked")) { + selectedCh += parseInt(jQuery(elm).val()); + } + }); + that.selectedCh = selectedCh; + conInfo("iface: " + that.iface + " - address: " + that.chAddress); + conInfo("selectedMode: " + selectedMode + " - selectedCh: " + selectedCh); + + if (typeof that.callback == "undefined" ) { + homematic("Interface.putParamset", { + 'interface': that.iface, + 'address': that.chAddress, + 'paramsetKey': 'VALUES', + 'set': + [ + {name: 'WEEK_PROGRAM_TARGET_CHANNEL_LOCK', type: 'string', value: selectedMode}, + {name: 'WEEK_PROGRAM_TARGET_CHANNEL_LOCKS', type: 'int', value: selectedCh} + ] + }, function (result) { + conInfo(result); + }); + } + } + + if (that.callback) {that.callback(result);} + },"html"); + + dlg.btnTextNo(translateKey("btnCancel")); + dlg.btnTextYes(translateKey("btnOk")); + }, + + + initChannelState: function() { + var self = this, + binChannelState = this.getBinChannelState(), + chState; + + jQuery.each(this.relevantChn, function(index, value){ + chState = (binChannelState[index]) ? binChannelState[index] : "0"; + + if (chState == "1") { + jQuery("#"+self.id+"_bit"+(index+1)+"1").attr("checked",true); + } else { + jQuery("#"+self.id+"_bit"+(index+1)+"0").attr("checked",true); + } + }); + }, + + getMainHtml: function(chnType) { + var self = this, + html = "", + valCheckBox, + tmpVal; + + var chType = this.getChannelOfType(chnType); + + if (chnType == this.accessReceiverID) { + html += "
"; + html += "
"+translateKey('optionDoorLockUser')+"
"; + } else if (chnType == this.doorLockStateTransmitterID) { + html += "
"+translateKey('optionDoorLockAction')+"
"; + } + + html += ""; + html += ""; + // channel number + html += ""; + if (chnType == this.accessReceiverID) { + html += ""; + jQuery.each(chType, function (index, val) { + html += ""; + }); + } + html += ""; + html += ""; + + html += ""; + // row auto + html += ""; + html += ""; + jQuery.each(chType, function(index,val){ + html += ""; + }); + html += ""; + + // row manu + html += ""; + html += ""; + // This works if only one doorLockStateTransmitter channel is available. + // For new devices with more of this channels this must be reworked. + jQuery.each(chType, function(index,val){ + if (chnType == self.doorLockStateTransmitterID) { + valCheckBox = 1; // + } else if (chnType == self.accessReceiverID) { + valCheckBox = Math.pow(2, (index + 1)); + } + html += ""; + }); + html += ""; + html += ""; + html += "
"+translateKey('lblUser')+"" + (parseInt(val) - 1) + "
"+translateKey("stringTableClimateControlRTTransceiverAutoMode")+""; + html += ""; + html += "
"+translateKey("stringTableClimateControlRTTransceiverManuMode")+""; + html += ""; + html += "
"; + return html; + }, + + getDialogHtml: function(chnType) { + + var self = this, + html = ""; + + var valCheckBox, + tmpVal; + + if (chnType == this.doorLockStateTransmitterID) { + html += ""; + html += ""; + html += ""; + html += ""; + html += ""; + } + + html += ""; + if (chnType == this.doorLockStateTransmitterID) { + html += ""; + } else if (chnType == this.accessReceiverID) { + html += ""; + } + html += ""; + html += ""; + + if (chnType == this.accessReceiverID) { + html += "
" + translateKey("lblMode") + ": "; + html += ""; + html += ""; + html += "
" + translateKey("lblDoorLock") + ": " + translateKey("lblUser") + ": "; + if (chnType == this.doorLockStateTransmitterID) { + html += ""; + } else { + jQuery.each(this.relevantChn, function (index, val) { + if (index > 0) { + valCheckBox = Math.pow(2, index); + html += ""; + html += ""; + } + }); + } + + html += "
"; + } + + return html; + }, + + getDevice: function(id) { + var device = DeviceList.getDevice(this.opts.deviceID); + if (typeof device != "object") { + device = homematic("Device.get", {"id": id}); + } + return device; + }, + + getRelevantChannels: function() { + var self = this, + result = [], + AccessReceiverID = "ACCESS_RECEIVER", // HmIP-DLD :2 - :9 = User access + DoorLockTransmitterID = "DOOR_LOCK_STATE_TRANSMITTER"; // HmIP-DLD :1 = Device behaviour + + jQuery.each(this.device.channels, function(index,chn) { + if ( + (chn.channelType.indexOf(AccessReceiverID) !== -1) + || (chn.channelType.indexOf(DoorLockTransmitterID) !== -1) + ) { + result.push(index); + } + }); + return result; + }, + + // The chType should be ACCESS_RECEIVER or DOOR_LOCK_STATE_TRANSMITTER + getChannelOfType: function(chType) { + var result = []; + jQuery.each(this.device.channels, function(index,chn) { + if (chn.channelType.indexOf(chType) != -1) { + result.push(index); + } + }); + return result; + }, + + // Checks if the device type is of a particular kind + // This is useful for the treatment of special cases (e.g. the HmIP-BSL which is a DIMMER_WEEKLY_PROFILE but must be treated as a SWITCH_WEEKLY_PROFILE + isDeviceType: function(devType) { + return (this.devLabel == devType) ? true : false; + }, + + getBinChannelState: function() { + var missingZero = "", + tmp = "", + bVal = this.opts.channelLocks.toString(2); + + jQuery.each(this.relevantChn, function(index, value) { + missingZero += "0"; + }); + + bVal = missingZero.substr(bVal.length)+bVal; + bVal = this.reverseString(bVal); + return bVal; + }, + + reverseString: function (str) { + return str.split("").reverse().join(""); + }, + + getConfigString: function() { + var arMode = ["MANU_MODE", "AUTO_MODE_WITH_RESET", "AUTO_MODE_WITHOUT_RESET"]; + return "WPTCLS="+this.selectedCh+",WPTCL="+arMode.indexOf(this.modeElm.val()); + } + +}; +iseHmIPPassageDetector = Class.create(); +iseHmIPPassageDetector.prototype = { + + + initialize: function(opts) { + conInfo(opts); + this.opts = opts; + this.chn3Elm = jQuery("#"+this.opts.devId + this.opts.chnId); + }, + + show: function() { + this.chn3Elm.show(); + }, + + hide: function() { + this.chn3Elm.hide(); + } +}; + + +iseMOD_RC8 = Class.create(); +iseMOD_RC8.prototype = { + + initialize: function(chId, chAddress) + { + var self = this; + this.channelId = chId; + this.channelAddress = chAddress; + this.noFunctionElm = jQuery("#"+self.channelId+"noFunction"); + this.TFKElm = jQuery("#"+self.channelId+"scControl"); + this.WaitElm = jQuery("#"+self.channelId+"resultWaitAnim"); + + var tmp = homematic("Interface.getMasterValue", {"interface": "HmIP-RF", "address": this.channelAddress, "valueKey": "CHANNEL_OPERATION_MODE"},function(result) { + + var optionTFK = 3; + + self.WaitElm.hide(); + + if (result == optionTFK) { + self.noFunctionElm.hide(); + self.TFKElm.show(); + } else { + self.noFunctionElm.show(); + self.TFKElm.hide(); + } + }); + + } +};iseAccelerationTransceiver = Class.create(); +iseAccelerationTransceiver.prototype = { + initialize: function (chnId, valMotion, chnAddress, tiltAngle, tiltAngleUnit) { + var self = this; + this.chnId = chnId; + this.valMotion = valMotion; + this.chnAddress = chnAddress; + this.tiltAngle = tiltAngle; + this.tiltAngleUnit = tiltAngleUnit; + + var tmp = homematic("Interface.getMasterValue", {"interface": "HmIP-RF", "address": this.chnAddress, "valueKey": "CHANNEL_OPERATION_MODE"},function(result) { + var outputElm = jQuery("#accelerationState" + chnId); + var arMessage = ["",translateKey("lblVibration"),translateKey("lblPosition"), translateKey("lblTilt")], + arMotion = [translateKey("lblNo"), translateKey("lblYes")], + arPosition = [translateKey("lblHorizontal"), translateKey("lblNonHorizontal")], + res = "--"; + + switch (parseInt(result)) { + case 1: + res = (self.valMotion == "false") ? arMotion[0] : arMotion[1]; + break; + case 2: + res = (self.valMotion == "false") ? arPosition[0] : arPosition[1]; + break; + case 3: + res = self.tiltAngle + self.tiltAngleUnit; + break; + } + outputElm.html(arMessage[result] + ":
"+ res ); + }); + } +}; + +iseAccelerationTransceiverTaco = Class.create(); +iseAccelerationTransceiverTaco.prototype = { + initialize: function (chnId, valMotion, chnAddress, tiltAngle, tiltAngleUnit, position) { + var self = this; + this.chnId = chnId; + this.valMotion = valMotion; + this.chnAddress = chnAddress; + this.position = position; // 0 waagerecht, 1 geneigt, 2 senkrecht + this.tiltAngle = tiltAngle; + this.tiltAngleUnit = tiltAngleUnit; + + var tmp = homematic("Interface.getMasterValue", {"interface": "HmIP-RF", "address": this.chnAddress, "valueKey": "CHANNEL_OPERATION_MODE"},function(result) { + var firstElm = jQuery("#firstElm" + chnId), + secondElm = jQuery("#secondElm" + chnId), + angleElm = jQuery("#angleElm" + chnId), + arMessage = ["",translateKey("lblVibration"),translateKey("lblPosition"), translateKey("lblPositionA")], + arMotion = [translateKey("lblNo"), translateKey("lblYes")], + arPosition = ["waagerecht","geneigt" ,"senkrecht"], + arPositionA = ["waagerecht","geneigt" ,"geneigt"], + lblAngle = translateKey("lblAngle") + ":
", + motion = (self.valMotion == "false") ? arMotion[0] : arMotion[1]; + + + + switch (parseInt(result)) { + case 1: + firstElm.html(arMessage[result] + "
" + motion ); + break; + case 2: + firstElm.html(arMessage[result] + ":
" + arPositionA[position]); + break; + case 3: + firstElm.html(arMessage[result] + ":
" + arPosition[position]); + break; + } + angleElm.html(lblAngle + self.tiltAngle + self.tiltAngleUnit); + + }); + } +}; +iseHmIPServo = Class.create(); +iseHmIPServo.prototype = { + + initialize: function(chId, opts) + { + var self = this, + metaRampTime; + conInfo("iseHmIPServo"); + this.id = chId; + this.opts = opts; + + this.minServoPos = 0; + this.maxServoPos = 100; + this.stepServoPos = 0.5; + + this.minRampTime = 0; + this.maxRampTime = 50; + this.stepRampTime = 1; + + this.sliderPosInfoElm = jQuery("#infoSliderPos" + this.id); + this.sliderPosElm = jQuery("#sliderPos" + this.id); + this.levelServoPos = this.opts.levelServoPos; + + this.sliderRampInfoElm = jQuery("#infoSliderRamp" + this.id); + this.sliderRampElm = jQuery("#sliderRamp" + this.id); + + this.levelServoRampTime = 0; + + // This is to store the ramp time value which is only writable (RAMP_TIME = operations 2) + // This remembers the last setting. Otherwise the value would always be set to 0 after a status message. + if (typeof tmpRampTime == "undefined") { + tmpRampTime = []; + metaRampTime = homematic("Interface.getMetadata", {"objectId": this.id, "dataId": "rampTime"}); + this.levelServoRampTime = (metaRampTime != "null") ? metaRampTime : 0; + tmpRampTime['a_' + this.id] = this.levelServoRampTime; + } else if (typeof tmpRampTime['a_' + this.id] != "undefined") { + this.levelServoRampTime = tmpRampTime['a_' + this.id]; + } + + this.initSliderPosInfoElm(); + this.initSliderPos(); + this.initSliderRampInfoElm(); + this.initSliderRamp(); + this.sliderPosElm.slider('value', this.opts.levelServoPos * 100); + this.sliderPosInfoElm.val(parseFloat(this.opts.levelServoPos * 100).toFixed(1)); + this.sliderRampElm.slider('value', this.levelServoRampTime); + this.sliderRampInfoElm.val(parseInt(this.levelServoRampTime)); + }, + + initSliderPos: function () { + var self = this; + this.sliderPosElm.slider({ + animate: "fast", + min: self.minServoPos, + max: self.maxServoPos, + step: self.stepServoPos, + orientation: "horizontal", + slide: function (event, ui) {}, + stop: function( event, ui ) {} + }); + this.sliderPosElm.on("slide", function (event, ui) { + self.onSliderPosChange(parseFloat(ui.value.toString().replace(",", ".")).toFixed(1)); + }); + + this.sliderPosElm.on("slidestop", function(event, ui){ + self.onSliderPosStop(ui.value); + }); + }, + + initSliderRamp: function () { + var self = this; + this.sliderRampElm.slider({ + animate: "fast", + min: self.minRampTime, + max: self.maxRampTime, + step: self.stepRampTime, + orientation: "horizontal", + slide: function (event, ui) {}, + stop: function( event, ui ) {} + }); + this.sliderRampElm.on("slide", function (event, ui) { + self.onSliderRampChange(ui.value); + }); + + this.sliderRampElm.on("slidestop", function(event, ui){ + self.onSliderRampStop(ui.value); + }); + }, + + + initSliderPosInfoElm: function() { + var self = this; + this.sliderPosInfoElm.change(function() { + var value = jQuery(this).val().replace(",", "."), + min = 0, max = 100; + + if ((value < min) || (isNaN(value))) {value = min;} + if (value > max) {value = max;} + self.levelServoPos = roundValue05(parseFloat(value).toFixed(1)); + self.sliderPosElm.slider("value", self.levelServoPos); + self.sliderPosInfoElm.val(self.levelServoPos); + self.saveSliderPosValue(); + }); + }, + + initSliderRampInfoElm: function() { + var self = this; + this.sliderRampInfoElm.change(function() { + var value = jQuery(this).val(), + min = self.minRampTime, max = self.maxRampTime; + + if ((value < min) || (isNaN(value))) {value = min;} + if (value > max) {value = max;} + self.levelServoRampTime = value; + + if ((value < self.minRampTime) || (value > self.minRampTime)) { + self.sliderRampElm.slider("value", self.levelServoRampTime); + self.sliderRampInfoElm.val(self.levelServoRampTime); + } + + tmpRampTime['a_'+ self.id] = self.levelServoRampTime; + + }); + }, + + onSliderPosChange: function (val) { + this.levelServoPos = val; + this.sliderPosInfoElm.val(parseFloat(this.levelServoPos).toFixed(1)); + }, + + onSliderPosStop: function(val) { + this.levelServoPos = val; + this.sliderPosInfoElm.val(this.levelServoPos).change(); + }, + + onSliderRampChange: function (val) { + this.levelServoRampTime = val; + this.sliderRampInfoElm.val(parseInt(this.levelServoRampTime)); + }, + + onSliderRampStop: function(val) { + this.levelServoRampTime = val; + this.sliderRampInfoElm.val(this.levelServoRampTime).change(); + homematic("Interface.setMetadata", {"objectId": this.id, "dataId": "rampTime", "value": this.levelServoRampTime}); + }, + + + saveSliderPosValue: function() { + this.levelServoRampTime = (this.levelServoRampTime == "") ? this.minRampTime : this.levelServoRampTime; + homematic("Interface.putParamset",{'interface': this.opts.chnInterface, 'address' : this.opts.chnAddress, 'paramsetKey' : 'VALUES', 'set': + [ + {name:'LEVEL', type: 'double', value: this.levelServoPos / 100}, + {name:'RAMP_TIME', type: 'double', value: this.levelServoRampTime} + ] + },function(result){conInfo(result);}); + } + +};iseHmIPWiegandIface = Class.create(); +iseHmIPWiegandIface.prototype = { + + initialize: function (opts) { + conInfo("iseHmIPWiegandIface"); + + this.opts = opts; + + this.iface = this.opts.chInterface; + this.chAddress = this.opts.chnAddress; + this.deviceType = this.opts.deviceType; + + this.chnid = this.opts.chnID; + + this.idCodeID = this.opts.idCodeID; + this.anchorCodeCommandElm = jQuery("#anchorCodeCommand_" + this.chnid); + this.anchorClearErrorElm = jQuery("#anchorClearError_" + this.chnid); + + this.selectedCodeIDElm; + this.selectedCodeID = 0; + this.selectedCommandMode = 1; + + this.selectedClearError; + + this.initBtnElms(); + }, + + initBtnElms: function () { + var self = this; + this.anchorCodeCommandElm.click(function() {self._setCodeCommand();}); + this.anchorClearErrorElm.click(function() {self._clearError();}); + }, + + _setCodeCommand: function() { + // open Dialog for setting one of the following code commands + // ERASE, START_OF_LEARN, STOP_OF_LEARN + var self = this; + dlg = new YesNoDialog(translateKey("dialogCodeCommandTitle"), this._getHTMLSetCodeCommand(), function(result) { + if (result == YesNoDialog.RESULT_YES) { + + var codeCommand = parseInt(self.selectedCommandMode), + codeID = parseInt(self.selectedCodeID); + + + // Transmit the code command incl. codeID - putPutparamset + console.log("interface: " + self.iface, "chAddress: " + self.chAddress); + console.log("codeID: " + codeID, "codeCommand: " + codeCommand); + + homematic("Interface.putParamset",{'interface': self.iface, 'address' : self.chAddress, 'paramsetKey' : 'VALUES', 'set': + [ + {name:'CODE_COMMAND', type: 'int', value: codeCommand}, + {name:'CODE_ID', type: 'int', value: codeID} + ] + },function(result){console.log(result);}); + + } + }, "html"); + dlg.btnTextNo(translateKey("btnCancel")); + dlg.btnTextYes(translateKey("btnOk")); + }, + _getHTMLSetCodeCommand: function () { + // ERASE, START_OF_LEARN, STOP_OF_LEARN + var self = this; + + getCodeID = function(elm) { + jQuery("[name='codeID']").prop("checked", false); + self.selectedCodeIDElm = jQuery(elm); + self.selectedCodeIDElm.prop("checked",true); + self.selectedCodeID = parseInt(self.selectedCodeIDElm.val()); + //console.log("selected val: " + self.selectedCodeID); + }; + + setCommandMode = function(val) { + self.selectedCommandMode = parseInt(val); + //console.log("selected command: " + self.selectedCommandMode); + }; + + var result = ""; + + result = "
"; + + result += "
"+translateKey('helpFWICodeCommand')+"
"; + result += "
"; + + result += ""; + result += ""; + for (var loop = 1; loop < 21; loop++) { + result += ""; + } + result += ""; + + result += ""; + for (var loop = 1; loop < 21; loop++) { + result += ""; + } + result += ""; + result += "
"+loop+"
"; + + result += "
"; + + result += ""; + result += ""; + result += ""; + result += ""; + result += ""; + result += "
"+translateKey('lblFWISetCodeCommand')+""; + result += ""; + result += "
"; + result += "
"; + + + return result; + }, + + _clearError: function() { + var self = this; + // open Dialog with a selection option for + // SABOTAGE_STICKY, BLOCKED_TEMPORARY, BLOCKED_PERMANENT, ALL + dlg = new YesNoDialog(translateKey("dialogClearErrorTitle"), this._getHTMLClearError(), function(result) { + if (result == YesNoDialog.RESULT_YES) { + var clearError = parseInt(self.selectedClearError); + conInfo("Send Clear error: " + clearError); + homematic("Interface.putParamset",{'interface': self.iface, 'address' : self.chAddress, 'paramsetKey' : 'VALUES', 'set': + [ + {name:'CLEAR_ERROR', type: 'int', value: clearError} + ] + },function(result){self.selectedClearError = 4;}); + } else { + //self.selectedClearError = 4; Is this necessary? + } + }, "html"); + dlg.btnTextNo(translateKey("btnCancel")); + dlg.btnTextYes(translateKey("btnOk")); + }, + + _getHTMLClearError: function() { + var self = this; + clearError = function (val) { + self.selectedClearError = parseInt(val); + //console.log("selected command: " + self.selectedCommandMode); + }; + + // SABOTAGE_STICKY, BLOCKED_TEMPORARY, BLOCKED_PERMANENT, ALL + var result = ""; + if (this.deviceType == "HmIP-FWI") { + result += "
" + translateKey('helpFWIClearError') + "
"; + } else { + // e. g. HmIP-WKP + result += "
" + translateKey('helpClearError') + "
"; + } + result += "
"; + + result += ""; + result += ""; + result += ""; + result += ""; + result += ""; + result += "
"+translateKey('lblFWIClearError')+""; + result += ""; + result += "
"; + return result; + + } +};iseUniversalLightReceiver = Class.create(); +iseUniversalLightReceiver.prototype = { + + initialize: function(chnId, opts) { + conInfo("opts", opts); + var self = this; + this.oDimmerElm = opts.oDimmerSlider; + this.colorPicker; + selectedColor = "not set"; + this.chnId = chnId; + this.iface = opts.iface; + this.chAddress = opts.chAddress; + this.HUE = opts.hue; + this.SATURATION = opts.saturation; + this.LEVEL = opts.level; + this.EFFECT = opts.effect; + this.DURATION_VALUE = 31; + this.DURATION_UNIT = 2; // hour + + this.hueStatus = opts.hueStatus; + + this.colorPickerInit = { + hue : parseInt(opts.hue), + saturation : parseInt((opts.saturation*100)), + level : parseInt((opts.level * 100) ) + }; + + this.percLevelElm = jQuery("#"+this.chnId+"Perc"); + + this.hueElm = jQuery("#hueElmId_"+ this.chnId); + this.satElm = jQuery("#satElmId_"+ this.chnId); + this.bckGndElm = jQuery("#bckGndlmId_"+ this.chnId); + this.setActiveElm(); + this.setKeyHandler(); + this.getColorPicker(); + }, + + setActiveElm: function() { + if (this.EFFECT > 0) { + jQuery(".j_ControlBtnInfo").first().removeClass("ControlBtnInfoActive").addClass("ControlBtnInfo"); + + // set the active effect button blue + var btnEffect = jQuery("#ulrEffect_"+(parseInt(parseInt(this.EFFECT + (this.EFFECT % 2)) / 2))+"_" + this.chnId); + jQuery("[name='urlEffect_"+this.chnId+"']").switchClass("ControlBtnOn","ControlBtnOff", 0); // deactivate all effect buttons + btnEffect.switchClass('ControlBtnOff', 'ControlBtnOn', 0); // activate the active effect button + + } else { + jQuery(".j_ControlBtnInfo").first().removeClass("ControlBtnInfo").addClass("ControlBtnInfoActive"); + } + }, + + + setKeyHandler: function() { + var self = this; + + this.bckGndElm.click(function(event) { + self.activateColorPicker(); + jQuery(this).change(); + self.saveColor(); + }); + + this.hueElm.keyup(function(event) { + var val; + if (event.keyCode == 13) { + val = parseInt(jQuery(this).val()); + if (val < 0 || isNaN(val)) {self.HUE = 0;} else if (val > 360) {self.HUE = 360;} else {self.HUE = val;}; + jQuery(this).val(self.HUE); + self.saveColor(); + } + }); + + this.hueElm.blur(function(event) { + self.activateColorPicker(); + var val; + val = parseInt(jQuery(this).val()); + if (val < 0 || isNaN(val)) {self.HUE = 0;} else if (val > 360) {self.HUE = 360;} else {self.HUE = val;}; + jQuery(this).val(self.HUE); + self.saveColor(); + }); + + this.satElm.keyup(function(event) { + var val; + if (event.keyCode == 13) { + val = (parseInt(jQuery(this).val()) / 100); + if (val < 0 || isNaN(val)) {self.SATURATION = 0;} else if (val > 1) {self.SATURATION = 1;} else {self.SATURATION = val;}; + jQuery(this).val(parseInt((self.SATURATION * 100))); + self.saveColor(); + } + }); + + this.satElm.blur(function(event) { + self.activateColorPicker(); + var val; + val = (parseInt(jQuery(this).val()) / 100); + if (val < 0 || isNaN(val)) {self.SATURATION = 0;} else if (val > 1) {self.SATURATION = 1;} else {self.SATURATION = val;}; + jQuery(this).val(parseInt((self.SATURATION * 100))); + self.saveColor(); + }); + + }, + + onPercChange: function() { + conInfo("***** onPercChange *****"); + }, + + onHandleClick: function() { + this.LEVEL = (parseInt(this.percLevelElm.val()) / 100); + //this.saveColor(); + //this.btnOkElm.click(); + }, + + getColorPicker: function() { + var self = this, + lastHueSat; + + if (this.hueStatus == 0) { + this.hueElm.val(this.colorPickerInit.hue); + this.satElm.val(this.colorPickerInit.saturation); + + homematic("Interface.setMetadata", { + "objectId": self.chnId, + "dataId": "lastValHueSat", + "value": "HUE:" + self.HUE + ",SAT:" + self.SATURATION * 100 + }, function (result) { + conInfo("iseUniversalLightReceiver getColorPicker - Metadata set: " + result); + }); + + } else { + lastHueSat = homematic("Interface.getMetadata", { + "objectId": this.chnId, + "dataId": "lastValHueSat" + }); + + // get the meta data HUE and SAT + var arHueSat = [], + valHUE = 0, + valSATPercent = 0, + valSAT = 0; + + if (lastHueSat != "null") { + arHueSat = lastHueSat.split(","); + valHUE = arHueSat[0].split(":")[1]; + valSATPercent = parseInt(arHueSat[1].split(":")[1]); + valSAT = valSATPercent / 100; + } + + this.HUE = valHUE; + this.SATURATION = valSAT; + this.hueElm.val(this.HUE); + this.satElm.val(valSATPercent); + + this.colorPickerInit.hue = this.HUE; + this.colorPickerInit.saturation = valSATPercent; + } + + + this.oDimmerElm.percChange = this.onPercChange.bindAsEventListener(this); + Event.observe($(this.chnId + "Perc"), 'change', this.oDimmerElm.percChange); + + this.oDimmerElm.handleClick = this.onHandleClick.bindAsEventListener(this); + Event.observe($("slidCtrl" + this.chnId), 'mouseup', this.oDimmerElm.handleClick); + + this.colorPicker = new iro.ColorPicker("#colorPicker_" + this.chnId, { + // Set the size of the color picker + width: 90, + color: {h: self.colorPickerInit.hue, s: self.colorPickerInit.saturation, v: self.colorPickerInit.level}, + wheelLightness: false, // If set to false, the color wheel will not fade to black when the lightness decreases. + layout: [{component: iro.ui.Wheel}], // don't show the V slider below the wheel - this value comes from the dimmer slider + handleRadius: 4 + } + ); + + this.colorPicker.on("mount", function(color) { + //var rgbVal = hsvToRgb(self.colorPickerInit.hue, self.colorPickerInit.saturation, self.colorPickerInit.level); + var rgbVal = hsvToRgb(self.colorPickerInit.hue, self.colorPickerInit.saturation, 100); + self.bckGndElm.css("background-color", "rgb("+rgbVal.r+","+rgbVal.g+","+rgbVal.b+")"); + }); + + this.colorPicker.on("input:end", function(color) { + var hsv_H = color.hsv.h, + hsv_S, + hsv_S_Percent = parseInt(color.hsv.s), + rgbVal; + + hsv_S = (parseInt(color.hsv.s) / 100); + + self.hueElm.val(hsv_H).change(); + self.HUE = hsv_H; + + self.satElm.val(hsv_S_Percent).change(); + self.SATURATION = hsv_S; + + rgbVal = hsvToRgb(color.hsv.h, color.hsv.s, 100); + self.bckGndElm.css("background-color", "rgb("+rgbVal.r+","+rgbVal.g+","+rgbVal.b+")"); + + self.saveColor(); + }); + }, + + activateColorPicker: function() { + jQuery("[name='urlEffect_"+this.chnId+"']").switchClass("ControlBtnOn","ControlBtnOff", 0); // deactivate all effect buttons + jQuery(".j_ControlBtnInfo").first().removeClass("ControlBtnInfoNotActive").addClass("ControlBtnInfoActive"); + }, + + saveColor: function() { + var self = this; + conInfo( + "saveColor - HUE: " + self.HUE + + " - SAT: " + self.SATURATION + + " - LEVEL: " + this.LEVEL + ); + + homematic("Interface.putParamset", { + 'interface': self.iface, + 'address': self.chAddress, + 'paramsetKey': 'VALUES', + 'set': + [ + {name: 'LEVEL', type: 'double', value: self.LEVEL}, + {name: 'HUE', type: 'int', value: self.HUE}, + {name: 'SATURATION', type: 'double', value: self.SATURATION}, + {name: 'DURATION_VALUE', type: 'int', value: self.DURATION_VALUE}, + {name: 'DURATION_UNIT', type: 'int', value: self.DURATION_UNIT} + + ] + }, function (result) { + if (result) { + conInfo("storeHueSat as MetaData"); + homematic("Interface.setMetadata", { + "objectId" : self.chnId, + "dataId" : "lastValHueSat", + "value" : "HUE:" + self.HUE + ",SAT:" + self.SATURATION * 100 + }, function(result) { + conInfo("iseUniversalLightReceiver saveColor - Metadata set: " + result); + }); + } + }); + } +}; + +function setULREffectToolTips (chnId) { + jQuery("#ulrEffect_0_"+chnId).powerTip({placement: "ne"}).data("powertip", "Effekt Beenden"); + for (var loop = 1; loop <= 10; loop++) { + jQuery("#ulrEffect_"+loop+"_"+chnId).powerTip({placement: "ne"}).data("powertip", "Effekt Nr: "+loop+""); + } +} + +function setURLEffectBtnActive (chnId, devAddress) { + // 01_EFFECT_01_COLOR_HUE_SATURATION_COLOR_TEMPERATURE_TYPE + var paramSet = homematic("Interface.getParamset", {"interface": "HmIP-RF", "address" : devAddress, "paramsetKey" :"MASTER"}), + effect, subEffect, btnEffect, + effectActive = false, cntSubEffect; + + for (var effect = 1; effect <= 10; effect++) { + btnEffect = jQuery("#ulrEffect_" + effect + "_" + chnId); + cntSubEffect = 0; + + for (var subEffect = 1; subEffect <= 8; subEffect++) { + if (parseInt(paramSet[addLeadingZero(effect) + "_EFFECT_" + addLeadingZero(subEffect) + "_COLOR_HUE_SATURATION_COLOR_TEMPERATURE_TYPE"]) == 0) { + cntSubEffect++; + } + } + if (cntSubEffect == 8) { // No subEffect active + btnEffect.css("color", "grey"); + btnEffect.removeAttr("onclick"); + btnEffect.click(function() { + alert(translateKey("lblEffectNotActive")); + }); + } + } +} + + +// Not in use - the effect name will be set by ReGa +function setULREffectName (chnId, devId) { + var effectName, effectNo; + for (effectNo = 1; effectNo <= 10; effectNo++) { + effectName = homematic("Interface.getMetadata", {"objectId": devId, "dataId": "effectName_" + effectNo}); + if ((effectName == "") || (effectName == "null")) {effectName = translateKey("lblEffect") + " " + effectNo;} + jQuery("#ulrEffect_"+effectNo+"_"+chnId).text(effectName); + } +} + +// This determines if the old status will be restored after the effect has come to its end. +// true = Restore the old status - false = the light will be switched off. +function setULReffectMode(chkBox, chnId) { + var mode = (jQuery(chkBox).is(":checked")) ? true : false; + homematic("Interface.setMetadata", {"objectId": chnId, "dataId": "effectMode", "value": mode}); +} + +function setULREffect (elm, effectNr, chnAddress, level) { + var effectLevel = level, + chnId = elm.id.split("_")[2], + saveOldStatus = homematic("Interface.getMetadata", {"objectId": chnId, "dataId": "effectMode"}); + jQuery(".j_Button_"+chnId).switchClass("ControlBtnOn","ControlBtnOff", 0); // deactivate the color temp slider and the buttons HCL / Dim2Warm + jQuery(".ControlBtnInfoActive").switchClass("ControlBtnInfoActive","ControlBtnInfoNotActive", 0); // deactivate the colorpicker panel for the H and S value + + jQuery("[name='urlEffect_"+chnId+"']").switchClass("ControlBtnOn","ControlBtnOff", 0); // deactivate all effect buttons + jQuery(elm).switchClass('ControlBtnOff', 'ControlBtnOn', 0); // activate the selected button. + + // saveOldStatus 'true' will determine if the old status will be restored. Otherwise the light will be switched off. + if (saveOldStatus == "true") {effectNr++;} + + homematic("Interface.putParamset", { + 'interface': "HmIP-RF", + 'address': chnAddress, + 'paramsetKey': 'VALUES', + 'set': + [ + {name: 'LEVEL', type: 'double', value: effectLevel}, + {name: 'EFFECT', type: 'int', value: effectNr} + ] + }, function (result) { + conInfo("setULREffect: ",result); + }); +} + + +iseHmIPUniversalLightRGBWSlider = Class.create(); +iseHmIPUniversalLightRGBWSlider.prototype = { + + + initialize: function (chnId, opts) { + var self = this; + conInfo("opts", opts); + + this.iface = opts.iface; + this.chAddress = opts.chAddress; + this.chnId = chnId; + this.defaultColorTmpMin = 2000; + this.defaultColorTmpMax = 6500; + + this.colorTempID = opts.colorTempID; + this.colorTempMin = (!isNaN(opts.colorTempMin)) ? opts.colorTempMin : this.defaultColorTmpMin; + this.colorTempMax = (!isNaN(opts.colorTempMax)) ? opts.colorTempMax : this.defaultColorTmpMax; + + this.colorTemp = parseInt(opts.colorTemp); + this.colorTempUnknown = (this.colorTemp < this.colorTempMin) ? true : false; + + this.valHCLVal = 10200; + this.valDim2WarmVal = 10150; + + this.hueStatus = opts.hueStatus; + + this.valHCL = (opts.hcl == 'true') ? true : false; + this.valDim2Warm = (opts.dim2Warm == 'true') ? true : false; + + this.hideSliderPanel = (this.valHCL || this.valDim2Warm) ? true : false; + + this.colorTemp = (this.colorTemp < this.colorTempMin) ? this.colorTempMin : this.colorTemp; + + this.devIsDali = (opts.devLabel == "HmIP-DRG-DALI") ? true : false; + + this.effect = opts.effect; + + window.setTimeout(function() { + self.btnColorTemp = jQuery("#btnColorTemp" + self.chnId); + self.trBtnColorTemp = jQuery("#trBtnColorTemp" + self.chnId); + self.btnHCL = jQuery("#btnHCL" + self.chnId); + self.btnDim2Warm = jQuery("#btnDim2Warm" + self.chnId); + self.sliderPanel = jQuery("#sliderPanel" + self.chnId); + self.trSliderPanel = jQuery("#trSliderPanel" + self.chnId); + self.sliderInfoElm = jQuery("#infoSliderPos" + self.chnId); + self.sliderElm = opts.oSlider; + self.colorSetElm = jQuery(".j_ControlBtnInfo")[0]; + self.hueElm = jQuery("#hueElmId_" + self.chnId); + self.satElm = jQuery("#satElmId_" + self.chnId); + self.bckGndElm = jQuery("#bckGndlmId_"+ self.chnId); + + homematic("Interface.setMetadata", { + "objectId": this.chnId, + "dataId": "lastValColorTemp", + "value": this.colorTemp + }, function (result) { + conInfo("iseUniversalLightReceiver setColorTemp - Metadata set: " + result); + }); + + self.initButtons(); + self.initSlider(); + },20); + }, + + showHideSliderPanel: function () { + if (this.hideSliderPanel) { + this.trSliderPanel.hide(); + this.trBtnColorTemp.show(); + } else { + this.trBtnColorTemp.hide(); + this.trSliderPanel.show(); + } + }, + + initButtons: function() { + var self = this; + + if (this.effect == 0) { + if (self.valHCL) { + self.setElmColorActive("hcl"); + } else if (self.valDim2Warm) { + self.setElmColorActive("dim2Warm"); + } else { + self.setElmColorActive("sliderPanel"); + } + } else { + // set the active effect button blue + var btnEffect = jQuery("#ulrEffect_"+(parseInt(parseInt(self.effect + (self.effect % 2)) / 2))+"_" + self.chnId); + jQuery("[name='urlEffect_"+self.chnId+"']").switchClass("ControlBtnOn","ControlBtnOff", 0); // deactivate all effect buttons + btnEffect.switchClass('ControlBtnOff', 'ControlBtnOn', 0); // activate the active effect button + } + + self.showHideSliderPanel(); + + this.hueElm.change(function() { + self.setAll2Off(); + jQuery(self.colorSetElm).removeClass("ControlBtnInfo").addClass("ControlBtnInfoActive"); + }); + + this.satElm.change(function() { + self.setAll2Off(); + jQuery(self.colorSetElm).removeClass("ControlBtnInfo").addClass("ControlBtnInfoActive"); + }); + + this.bckGndElm.change(function() { + self.setAll2Off(); + jQuery(self.colorSetElm).removeClass("ControlBtnInfo").addClass("ControlBtnInfoActive"); + }); + + this.bckGndElm.click(function() { + self.setAll2Off(); + jQuery(self.colorSetElm).removeClass("ControlBtnInfo").addClass("ControlBtnInfoActive"); + }); + + this.btnColorTemp.click(function() { + self.hideSliderPanel = false; + self.hueStatus == 1; + setDpState(self.colorTempID,self.colorTemp); + self.sliderElm.slider('value', self.colorTemp); + self.sliderInfoElm.val(self.colorTemp); + self.setElmColorActive("sliderPanel"); + self.showHideSliderPanel(); + }); + + this.btnHCL.click(function() { + self.hideSliderPanel = true; + self.hueStatus == 1; + setDpState(self.colorTempID,self.valHCLVal); + self.setElmColorActive("hcl"); + self.showHideSliderPanel(); + }); + + this.btnDim2Warm.click(function() { + self.hideSliderPanel = true; + self.hueStatus == 1; + setDpState(self.colorTempID,self.valDim2WarmVal); + self.setElmColorActive("dim2Warm"); + self.showHideSliderPanel(); + }); + }, + + setAll2Off: function() { + jQuery(this.colorSetElm).removeClass("ControlBtnInfoActive").addClass("ControlBtnInfo"); + jQuery(this.btnHCL).removeClass("ControlBtnOn").addClass("ControlBtnOff"); + jQuery(this.btnDim2Warm).removeClass("ControlBtnOn").addClass("ControlBtnOff"); + jQuery(this.sliderPanel).removeClass("ControlBtnOn").addClass("ControlBtnOff"); + jQuery("[name='urlEffect_"+this.chnId+"']").switchClass("ControlBtnOn","ControlBtnOff", 0); // deactivate all effect buttons + }, + + setElmColorActive: function (activeElm) { + this.setAll2Off(); + + if (this.hueStatus == 0) { + jQuery(this.colorSetElm).removeClass("ControlBtnInfo").addClass("ControlBtnInfoActive"); + } else { + switch (activeElm) { + case "hcl" : + this.btnHCL.removeClass("ControlBtnOff").addClass("ControlBtnOn"); + break; + case "dim2Warm" : + this.btnDim2Warm.removeClass("ControlBtnOff").addClass("ControlBtnOn"); + break; + case "sliderPanel" : + this.sliderPanel.removeClass("ControlBtnOff").addClass("ControlBtnOn"); + break; + } + } + }, + + initSlider: function () { + + var metaColorTemp = homematic("Interface.getMetadata", { + "objectId": this.chnId, + "dataId": "lastValColorTemp" + }); + + if ((metaColorTemp == "-1") || (metaColorTemp== "null") || (metaColorTemp == null) || (isNaN(metaColorTemp))) {this.colorTemp = this.colorTempMin;} + + var self = this; + + if (! self.devIsDali) { + this.sliderInfoElm.val(this.colorTemp); + this.sliderElm.slider('value', this.colorTemp); + + } else { + if (this.colorTempUnknown) { + this.sliderInfoElm.val("--"); + } else { + this.sliderInfoElm.val(this.colorTemp); + } + } + this.sliderElm.on("slide", function (event, ui) { + self.onSliderChange(ui.value); + }); + + this.sliderElm.on("slidestop", function(event, ui){ + self.onSliderStop(ui.value); + }); + }, + + onSliderChange: function (val) { + this.sliderInfoElm.val(val); + this.colorTemp = val; + }, + + onSliderStop: function(val) { + this.hueStatus = 1; + this.setAll2Off(); + this.setElmColorActive("sliderPanel"); + setDpState(this.colorTempID,this.colorTemp); + + homematic("Interface.setMetadata", { + "objectId": this.chnId, + "dataId": "lastValColorTemp", + "value": this.colorTemp + }, function (result) { + conInfo("iseUniversalLightReceiver setColorTemp - Metadata set: " + result); + }); + + } + +}; +/** + * ic_gd.js + **/ + +//Defines +BORDER_COLOR = WebUI.getColor("channelBorder"); //Border +HL_COLOR = WebUI.getColor("channelHighlight"); //Highlight +BG_COLOR = 'inherit'; //Background +HL_STROKE = 4;//Background +//----- + +InitGD = function(jg, size) +{ + //alert(jg); + + ClearCanvas(jg, size); + jg.setColor(HL_COLOR); + jg.setStroke(parseInt(HL_STROKE)); +}; + +ClearCanvas = function(jg, size) +{ + jg.clear(); + jg.setColor(BG_COLOR); + jg.fillRect(parseInt(0), parseInt(0), parseInt(size), parseInt(size)); + jg.paint(); + jg.setColor(HL_COLOR); +}; + +Draw = function(jg, devtype, size, formname) +{ + //if (! DEV_TypeExists(devtype)) return; + var path = DEV_getImagePath (devtype, size); + + if (path == "#") return; + + // SPHM - 487 + if ((formname && formname != "-1") && devtype == "HmIP-WRCR") { + switch (parseInt(formname)) { + case 2 : + path = path.replace(".png", "_right.png"); + break; + case 3 : + path = path.replace(".png", "_left.png"); + break; + } + } + + jg.drawImage2(path, 0, 0, size, size); + if (formname && formname != "-1") DrawForm(jg, formname, devtype, size); + jg.paint(); +}; + +DrawForm = function(jg, formname, devtype, size, x_offset, y_offset) +{ + var form = DEV_getImageHighlight(devtype, formname); + + if (!form) return; + + if (!x_offset) x_offset = 0.032; // workaround css offsets + if (!y_offset) y_offset = -0.005; // workaround css offsets + + switch (form[gd_type]) + { + case GD_TYPE["CIRCLE"]: + jg.fillArc(Math.round( (form[gd_xx]+x_offset) * size), Math.round((form[gd_yy]+y_offset)*size), Math.round(form[gd_rr]*2*size), Math.round(form[gd_rr]*2*size), parseInt(0.0), parseInt(360.0)); + break; + case GD_TYPE["RECTANGLE"]: + jg.fillRect(Math.round((form[gd_xx]+x_offset)*size), Math.round((form[gd_yy]+y_offset)*size), Math.round(form[gd_dx]*size), Math.round(form[gd_dy]*size)); + break; + case GD_TYPE["STRING"]: + jg.setFont(form[gd_fontfamily], Math.round(form[gd_fontsize]*size)+"px", form[gd_fontstyle]); + jg.drawString(form[gd_string], Math.round((form[gd_xx]+x_offset)*size), Math.round((form[gd_yy]+y_offset)*size)); + break; + case GD_TYPE["ELLIPSE"]: + jg.fillArc(Math.round((form[gd_xx]+x_offset)*size), Math.round((form[gd_yy]+y_offset)*size), Math.round(form[gd_dx]*size), Math.round(form[gd_dy]*size), parseInt(0.0), parseInt(360.0)); + break; + case GD_TYPE["LINE"]: + jg.setStroke(Math.round(form[gd_stroke]*size)); + jg.drawLine(Math.round((form[gd_x1]+x_offset)*size), Math.round((form[gd_y1]+y_offset)*size), Math.round((form[gd_x2]+x_offset)*size), Math.round((form[gd_y2]+y_offset)*size)); + jg.setStroke(parseInt(HL_STROKE)); + break; + case GD_TYPE["FORMSET"]: + for (var i=gd_type+1; i winuy-30) y = winuy - 30 - size; + + $('picDiv').style.top = y + "px"; + //----- + + //x-Position----- + winrx = dim.width + off.xOffset; + x = pagePosition[0] + dim_div.width + 30; //etwas rechts + x_rechts = x + size; + + if (x_rechts > winrx) x = pagePosition[0] - size - 30; + + $('picDiv').style.left = x + "px"; + //----- + + ShowElement('picDiv'); + if (typeof previewPicTimer == "undefined") { + previewPicTimer = window.setTimeout(function () { + HideElement('picDiv'); + delete previewPicTimer; + }, 3000); + } +}; + +picDivHide = function(jg) +{ + if (typeof previewPicTimer != "undefined") { + window.clearTimeout(previewPicTimer); + delete previewPicTimer; + } + + if (! jg) return; + + HideElement('picDiv'); + jg.drawImage("/ise/img/loading.gif", 0, 0, 250, 250); +}; +/** + * ic_common.js + **/ + +poststr = ""; +UI_PATH = "/config/"; + +Get_UI_CONTENTBOX_ID = function() +{ + //Muss als Funktion abgefragt werden, weil zur Zeit des Ladens + //die Boxen noch nicht vollständig existieren. + return ( document.getElementById('infobox') ? 'infobox' : 'centerbox' ); +}; + +ResetPostString = function() +{ + poststr = ""; +}; + +AddProfileValues = function(prefix) +{ + var i = 1; + + while (document.getElementById(prefix + i)) + { + AddParam(document.getElementById(prefix + i)); + i++; + } +}; + +AddSeparateSettings = function(prefix, pnr) +{ + var i = 1; + + while (document.getElementById(prefix + pnr + '_' + i)) + { + AddParam(document.getElementById(prefix + pnr + '_' + i)); + i++; + } +}; + +SubmitProfile = function(pnr, pname) +{ + ShowLoadingBox('Bitte warten, das Profil \"' +pname+ '\" wird gespeichert...'); + ResetPostString(); + document.getElementById('profile').value = pnr; + AddParam(document.getElementById('profile')); + AddProfileValues('global_'); + AddSeparateSettings('separate_', pnr); + AddSeparateSettings('subset_', pnr); + SendRequest('ic_paramset.cgi'); +}; + +AddParam = function(elem) +{ + if (elem !== null) + { + if (elem.name !== "") + { + if (poststr !== "") poststr += "&"; + + if (elem.type == "checkbox") + { + if (elem.checked) { elem.value = "true"; } + else { elem.value = "false"; } + } + + var arrId = elem.id.split("_"); + var type = arrId[1]; + + // falls es sich um Kanalparameter handelt (die ID ist länger) + if (arrId.length == 6) { + type = arrId[1] + "_" + arrId[2] + "_" + arrId[3]; + } + + if (elem.value == "99999999" ) + { + var sec = document.getElementById("sec_" + prefix[elem.name + type]); + var min = document.getElementById("min_" + prefix[elem.name + type]); + var hour = document.getElementById("hour_" + prefix[elem.name + type]); + + free_options = (hour.value * 3600) + (min.value * 60) + (sec.value * 1); + // elem.name = "SHORT_ON_TIME|LONG_ON_TIME" usw + poststr += elem.name + "=" + parseFloat(free_options); + } + else if (elem.value == "99999998" ) + { + var percent = document.getElementById("percent_" + prefix[elem.name + type]); + + free_options = percent.value / 100 ; + poststr += elem.name + "=" + parseFloat(free_options); + } + else if (elem.value == "99999997" ) + { + var temp = document.getElementById("temp_" + prefix[elem.name + type]); + + // falls Fahrenheit eingestellt, dann Wert umrechnen + if ( temp.value >= 31 ) free_options = ((temp.value - 32) / 9 * 5); + else free_options = temp.value ; + + poststr += elem.name + "=" + parseFloat(free_options); + } + else if (elem.value == "99999996" ) // Expertenmodus HM-Sen-EP + { + // Kanal aus poststr herausfiltern + type = poststr.split("="); + ad = type[3]; + type = ad.split(":"); + ad = type[1]; + type = ad.split("&"); + ch = type[0]; + // Der Kanal steht jetzt in ch zur Verfuegung + poststr += "SEQUENCE_PULSE_1=" + $F('free_CHANNEL_' + ch + '_1') ; + poststr += "&SEQUENCE_PULSE_2=" + $F('free_CHANNEL_' + ch + '_2') ; + poststr += "&SEQUENCE_PULSE_3=" + $F('free_CHANNEL_' + ch + '_3') ; + poststr += "&SEQUENCE_PULSE_4=" + $F('free_CHANNEL_' + ch + '_4') ; + poststr += "&SEQUENCE_PULSE_5=" + $F('free_CHANNEL_' + ch + '_5') ; + poststr += "&SEQUENCE_TOLERANCE=" + $F('free_CHANNEL_' + ch + '_6') ; + } + else if (elem.value == "99999995" ) + { + poststr += "SEQUENCE_PULSE_1=0.496" ; + poststr += "&SEQUENCE_PULSE_2=0.496" ; + poststr += "&SEQUENCE_PULSE_3=0.496" ; + poststr += "&SEQUENCE_PULSE_4=0.496" ; + poststr += "&SEQUENCE_PULSE_5=0.496" ; + poststr += "&SEQUENCE_TOLERANCE=0.496" ; + } + else if (elem.value == "99999994" ) + { + poststr += "SEQUENCE_PULSE_1=0.496" ; + poststr += "&SEQUENCE_PULSE_2=0.496" ; + poststr += "&SEQUENCE_PULSE_3=0.496" ; + poststr += "&SEQUENCE_PULSE_4=0" ; + poststr += "&SEQUENCE_PULSE_5=0" ; + poststr += "&SEQUENCE_TOLERANCE=0.496" ; + } + else if (elem.value == "99999993" ) + { + poststr += "SEQUENCE_PULSE_1=0.496" ; + poststr += "&SEQUENCE_PULSE_2=0" ; + poststr += "&SEQUENCE_PULSE_3=0" ; + poststr += "&SEQUENCE_PULSE_4=0" ; + poststr += "&SEQUENCE_PULSE_5=0" ; + poststr += "&SEQUENCE_TOLERANCE=0.496" ; + } + else if (elem.value == "99999992" ) + { + poststr += "SEQUENCE_PULSE_1=0" ; + poststr += "&SEQUENCE_PULSE_2=0" ; + poststr += "&SEQUENCE_PULSE_3=0" ; + poststr += "&SEQUENCE_PULSE_4=0" ; + poststr += "&SEQUENCE_PULSE_5=0" ; + poststr += "&SEQUENCE_TOLERANCE=0.496" ; + } + else if (elem.value == "99999990" ) + { + var freeVal = document.getElementById("val_" + prefix[elem.name + type]); + free_options = freeVal.value; + poststr += elem.name + "=" + parseFloat(free_options); + } + + //else poststr += elem.name + "=" + elem.value; + else poststr += elem.name + "=" + encodeURIComponent(elem.value); + } + } +}; + +Get_ReGa_Path = function(path) +{ + //WebUI läuft von ise aus (Session-Parameter ist "sid") + //der Pfad fängt nicht mit dem vom ise WebUI aus nötigen Prefix an + if ( ($('global_sid').name == "sid") && (path.substr(0, UI_PATH.length ) != UI_PATH)) + { + //Prefix anfügen: + path = UI_PATH + path; + } + + return path; +}; + +SendRequest = function(scriptname, html_container_id, callback) +{ + scriptname = Get_ReGa_Path(scriptname); + var params = poststr; + + if ((html_container_id) && (html_container_id !== "")) { id = html_container_id; } + else { id = Get_UI_CONTENTBOX_ID(); } + + var _callback_ = callback; + + var opt = + { + method:'get', + parameters:params, + evalScripts:true, + onComplete: function() { if (_callback_) { _callback_(); } } + }; + + new Ajax.Updater(id, scriptname, opt); +}; + +SendPOSTRequest = function(scriptname, html_container_id, callback) +{ + scriptname = Get_ReGa_Path(scriptname); + var params = poststr; + + if ((html_container_id) && (html_container_id !== "")) { id = html_container_id; } + else { id = Get_UI_CONTENTBOX_ID(); } + + var _callback_ = callback; + + var opt = + { + method:'post', + parameters:params, + evalScripts:true, + onComplete: function() { if (_callback_) { _callback_(); } } + }; + + new Ajax.Updater(id, scriptname + '?sid=' + document.getElementById('global_sid').value, opt); +}; + +ShowLoadingBox = function(msg) +{ + + $(Get_UI_CONTENTBOX_ID()).innerHTML = "" + + "
"+msg.escapeHTML()+"
"; + + ShowElement(Get_UI_CONTENTBOX_ID()); +}; + +ShowLoadingBoxTimeout = function(msg, msec) +{ + ShowLoadingBox(msg); + window.setTimeout("HideLoadingBox()",msec); +}; + +ShowInfoMsgBox = function(msg) +{ + $(Get_UI_CONTENTBOX_ID()).innerHTML = "
" + msg + "
"; + ShowElement(Get_UI_CONTENTBOX_ID()); +}; + +ShowInfoMsgBoxTimeout = function(msg, msec) +{ + ShowInfoMsgBox(msg); + window.setTimeout("HideLoadingBox()",msec); +}; + +HideLoadingBox = function() +{ + HideElement(Get_UI_CONTENTBOX_ID()); +}; + +ShowElement = function(id) +{ + $(id).style.visibility = "visible"; + $(id).show(); +}; + +HideElement = function(id) +{ + $(id).style.visibility = "hidden"; + $(id).hide(); +}; + +ToggleVisibility = function(id) +{ + if ($(id).visible()) HideElement(id); + else ShowElement(id); +}; + +EnableComponent = function(id, b) +{ + $(id).enabled = b; +}; + +EnableAllSeparateComponents = function(pcount) +{ + var elem; + var i, j; + + for (i=0; i<=pcount; i++) + { + j = 1; + elem = document.getElementById('separate_' + i + '_' + j); + + while (elem) + { + elem.enabled = true; + ++j; + elem = document.getElementById('separate_' + i + '_' + j); + } + } +}; + +initComponents = function(pcount) +{ + var elem; + var i, j; + + for (i=0; i<=pcount; i++) + { + j = 1; + elem = document.getElementById('use_separate_' + i + '_' + j); + + while (elem) + { + elem.checked = elem.defaultChecked; + EnableComponent(elem.id.substr(4), elem.defaultChecked); + + ++j; + elem = document.getElementById('use_separate_' + i + '_' + j); + } + } +}; + +SwitchActiveProfile = function(pnr) +{ + var i = 0; + var elem = document.getElementById('caption_profile' + i); + + while (elem) + { + elem.innerHTML = elem.innerHTML.replace(/ \(aktiv\)/, ''); + elem.style.backgroundColor = WebUI.getColor("profile"); + + if (i == pnr) + { + elem.innerHTML += ' (aktiv)'; + elem.style.backgroundColor = WebUI.getColor("profileActive"); + } + + ++i; + elem = document.getElementById('caption_profile' + i); + } + + ShowElement('profile'+pnr); +}; + +ShowDeviceDetails = function() +{ + var select = $('linkabledevices'); + var otext = select.options[select.selectedIndex].text; + var len = select.length - 1; + var idx = otext.search(/\=\=/); + var devname = otext.substr(idx+2); + + if (idx == -1) return; + + var elemId = ""; + var i; + + //Opera + try { elemId = $('radio_channels_'+devname).id; } + catch (e) { elemId = ""; } + + for (i = 0; i<=len; i++) + { + HideElement('radio_channels_' + i); + + //Internet Explorer: + /* + try { + if (elemId == "" && document.getElementById) + { + var elem = document.getElementById('radio_channels_' + i); + if (elem.name && elem.name == 'radio_channels_' + devname) elemId = 'radio_channels_' + i; + } + } + catch (e) { elemId = ""; } + */ + } + + //Firefox: + try + { + if ((elemId === "") && (document.getElementsByName)) { elemId = document.getElementsByName('radio_channels_'+devname)[0].id; } + } + catch (e) { elemId = ""; } + + try + { + if ((elemId === "") && (document.getElementsByTagName)) + { + var divtags = document.getElementsByTagName("div"); + len = divtags.length - 1; + + for (i = 0; i <= len; i++) + { + var elem = divtags[i]; + if (((elem.name) && (elem.name == 'radio_channels_' + devname)) || ((elem.className) && (elem.className == 'radio_channels_' + devname))) + { + elemId = elem.id; + break; + } + } + } + } + catch (e) { elemId = ""; } + + ShowElement(elemId); + + /* Beim Firefox gibt es kein elem.name und beim Internet Explorer gibt es kein elem.id */ + /* Opera kann weder document.getElementsByName, noch document.getElementById. Stattdessen geht $(name). */ +}; + +AddPeer2Channel = function(iface, device, radioid) +{ + var elem = document.getElementsByName(radioid); + var inputelem = null; + + for (var i=0; i 255 )) { return false; } + } + + return true ; +}; + +SimulateShortKeyPress = function() +{ + SimulateKeyPress(false); +}; + +SimulateLongKeyPress = function() +{ + SimulateKeyPress(true); +}; + +SimulateKeyPress = function(longpress) +{ + ShowLoadingBox('Bitte warten, der Tastendruck wird ausgelöst...'); + ResetPostString(); + AddParam(document.getElementById('global_1'));//sid + AddParam(document.getElementById('global_2'));//peer + AddParam(document.getElementById('global_3'));//peer + AddParam(document.getElementById('global_5'));//iface + AddParam(document.getElementById('global_6'));//device + poststr += "&longpress" + "=" +longpress; + poststr += "&cmd" + "=" +"simulate"; + SendRequest('ic_paramset.cgi'); +}; + +SetExpertMode = function(b) +{ + ShowLoadingBox('Bitte warten, der Expertenmodus wird gesetzt...'); + ResetPostString(); + + AddParam(document.getElementById('global_sid')); + + if (b) document.getElementById('expert').value = 'true'; + else document.getElementById('expert').value = 'false'; + + AddParam(document.getElementById('expert')); + + SendRequest('ic_start.cgi'); +}; + +SetCurrentTime = function() +{ + var jetzt = new Date(); + + var hh = jetzt.getHours(); + var mm = jetzt.getMinutes(); + var DD = jetzt.getDate(); + var MM = jetzt.getMonth()+1; + var YY = jetzt.getFullYear(); + + if (hh < 10) hh = "0" + hh; + if (mm < 10) mm = "0" + mm; + if (DD < 10) DD = "0" + DD; + if (MM < 10) MM = "0" + MM; + if (YY < 10) YY = "0" + YY; + + document.getElementById('separate_3_1').value = hh; + document.getElementById('separate_3_2').value = mm; + document.getElementById('separate_3_3').value = DD; + document.getElementById('separate_3_4').value = MM; + document.getElementById('separate_3_5').value = YY; +}; + +RebootCentral = function() +{ + if (confirm("Möchten Sie die Zentrale wirklich neu starten?")) + { + ShowLoadingBox('Bitte warten, Zentrale startet neu...'); + ResetPostString(); + AddProfileValues('global_'); + poststr += "&cmd=reboot"; + SendRequest('ic_central.cgi'); + } +}; + +set_value = function(input_id, id, type) +{ + var elem = document.getElementById(input_id); + + ShowLoadingBox('Bitte warten, Wert \''+id+'\' wird gesetzt'); + ResetPostString(); + document.getElementById('profile').value = "9999"; + AddParam(document.getElementById('profile')); + AddProfileValues('global_');//sid + if (elem.type == "checkbox") + { + if (elem.checked) elem.value = "true"; + else elem.value = "false"; + } + poststr += "&CH_VAL_VALUE=" +elem.value+ "&CH_VAL_ID=" +id+ "&CH_VAL_TYPE=" +type; + SendRequest('ic_paramset.cgi'); +}; + +RemoveLink = function(iface, sender_address, receiver_address, sender_type, redirect_url) +{ + var questionRemoveLink = ((iface == "HmIP-RF") && (sender_type != "HmIP-SMI55") && (sender_type != "HmIP-SMI55-A") && (sender_address.split(":")[0] == receiver_address.split(":")[0])) ? translateKey('dialogQuestionRemoveInternalLink') : translateKey('dialogQuestionRemoveLink'); + + new YesNoDialog(translateKey('dialogSafetyCheck'), questionRemoveLink.replace('%s', sender_address+' - '+receiver_address), function(result) { + if (result == YesNoDialog.RESULT_YES) + { + ResetPostString(); + + AddParam(document.getElementById('global_sid')); + + poststr += "&cmd=removeLink"; + poststr += "&iface=" +iface; + poststr += "&sender_address=" +sender_address; + poststr += "&receiver_address=" +receiver_address; + + if ((redirect_url) && (redirect_url !== "")) { poststr += "&redirect_url=" + redirect_url; } + else { poststr += "&redirect_url=IC_LINKPEERLIST"; } + + SendPOSTRequest('ic_ifacecmd.cgi'); + } + }, "html"); +}; + +getInnerDimensions = function() +{ + var x, y; + + if (self.innerHeight) // all except Explorer + { + x = self.innerWidth; + y = self.innerHeight; + } + else if (document.documentElement && document.documentElement.clientHeight) + // Explorer 6 Strict Mode + { + x = document.documentElement.clientWidth; + y = document.documentElement.clientHeight; + } + else if (document.body) // other Explorers + { + x = document.body.clientWidth; + y = document.body.clientHeight; + } + + return {width: x, height: y}; +}; + +getPageOffsets = function() +{ + var x,y; + + if (self.pageYOffset) // all except Explorer + { + x = self.pageXOffset; + y = self.pageYOffset; + } + else if (document.documentElement && document.documentElement.scrollTop) + // Explorer 6 Strict + { + x = document.documentElement.scrollLeft; + y = document.documentElement.scrollTop; + } + else if (document.body) // all other Explorers + { + x = document.body.scrollLeft; + y = document.body.scrollTop; + } + + return {xOffset: x, yOffset: y}; +}; + +/* +Wenn nur ein Gerät angezeigt werden soll, kann man sender_address, oder receiver_address leer lassen ( '' ) +*/ +CheckConfigPending = function(iface, sender_address, receiver_address, redirect_url, goBack) +{ + ResetPostString(); + + AddParam($('global_sid')); + + poststr += "&go_back=" + goBack; + poststr += "&redirect_url=" +redirect_url; + poststr += "&iface=" +iface; + poststr += "&sender_address=" +sender_address; + poststr += "&receiver_address=" +receiver_address; + poststr += "&cmd=ShowConfigPendingMsg"; + + SendPOSTRequest('ic_ifacecmd.cgi'); +}; + + +OpenSetProfiles = function(iface, sender_address, receiver_address) +{ + exists_timearr = ""; + exists_percarr = ""; + exists_tmparr = ""; + time_tmp = ""; + perc_tmp = ""; + temp_tmp = ""; + + ResetPostString(); + + poststr += "&iface=" +iface; + poststr += "&sender_address=" +sender_address; + poststr += "&receiver_address=" +receiver_address; + + updateContent(UI_PATH + 'ic_setprofiles.cgi', poststr); +}; + + +IsDirty = function(inputelem) +{ + + var result; + + if (inputelem === null) return false; + + if (inputelem.type == "select-one") + { + result = inputelem.options[inputelem.selectedIndex].defaultSelected != inputelem.options[inputelem.selectedIndex].selected; + if (result) {conInfo("IsDirty - type: " + inputelem.type + " - " + inputelem.id + " - " + inputelem.name + " - isDirty: " + result);} + return result; + } + else if (inputelem.type == "checkbox" || inputelem.type == "radio") + { + result = inputelem.checked != inputelem.defaultChecked; + if (result) {conInfo("IsDirty - type: " + inputelem.type + " - " + inputelem.id + " - " + inputelem.name + " - isDirty: " + result);} + return result; + } + else if (inputelem.type == "text" || inputelem.type == "textarea" || inputelem.type == "password") + { + result = inputelem.defaultValue != inputelem.value; + if (result) {conInfo("IsDirty - type: " + inputelem.type + " - " + inputelem.id + " - " + inputelem.name + " - isDirty: " + result);} + return result; + } + else if (inputelem.type == "hidden") + { + return false; + } + else + { + conInfo("IsDirty - default" + " - " + inputelem.id + " - " + inputelem.name + " - isDirty: fix true"); + return true; + } +}; + +ConvTime = function(u_value) +{ + //wird in SetInputValue für User-Profilvorlagen benötigt + var Userwert = ""; + var hour = parseInt(u_value / 3600); + var min = parseInt((u_value % 3600) / 60); + var sec = parseInt((u_value % 3600) % 60); + var msec = u_value - parseInt(u_value); + + if (hour > 0) { + Userwert = hour + "h "; + if (min > 0) Userwert = Userwert.concat(min + "min "); + if (sec > 0) Userwert = Userwert.concat(sec + "s"); + } + else if (min > 0) { + Userwert = min + "min "; + if (sec > 0) Userwert = Userwert.concat(sec + "s"); + } + else if (sec > 0) { + Userwert = sec + "s "; + if (msec > 0) Userwert = sec + msec + "s"; + } + else if (msec > 0) { + Userwert = msec + "s"; + } + else Userwert = "0s"; + + + return Userwert ; +}; + +sort_num = function(a,b) { + return a - b; +}; + +sort_opt = function(elem) { + + arrVal = new Array(); + arrTexts = new Array(); + arrTexts[0] = new Object(); + + for(i = 0; i < elem.length; i++) { + arrVal[i] = parseFloat(elem.options[i].value); + arrTexts[0][arrVal[i].toString(10)] = elem.options[i].text; + } + + arrVal.sort(sort_num); + + for(i = 0; i < elem.length; i++) { + elem.options[i].value = arrVal[i]; + elem.options[i].text = arrTexts[0][arrVal[i].toString(10)]; + } +}; + +SetInputValue = function(html_inputelem_id, value) +{ + var inputelem = $(html_inputelem_id); + var Userwert; + var i; + + if (inputelem === null) return; + + if (inputelem.type == "select-one") + { + var selectelem = inputelem; + var no_entry = true; + + //AG + + for (i = 0; i < selectelem.options.length; i++) + { + if (selectelem.options[i].value == value) { + no_entry = false; + } + } + + // falls in der Profilvorlage kein entsprechender Wert vorhanden ist, + // weil eine beutzerdef. Wert eingegeben wurde, der nicht als Auswahl vorhanden ist, + // wird hier ein neuer Eintrag mit dem entsprechenden Wert erzeugt. + // Die Werte müssen entsprechend konvertiert werden, 90 Sek. werden z. B. zu 1min 30sec usw. + + if (no_entry === true) + { + perc = selectelem.options[1].text.search(/%/); + h = selectelem.options[1].text.search(/min/); + m = selectelem.options[1].text.search(/s/); + s = selectelem.options[1].text.search(/h/); + + if (h != -1 || m != -1 || s != -1) Userwert = ConvTime(value); //es handelt sich um einen Zeitwert + if (perc != -1) {Userwert = parseInt(value * 100) + "%";} //es handelt sich um einen Prozentwert + + new_option = new Option(Userwert,value,true,true); //Userwert = angezeigter Wert, value = zu übertragener Wert + selectelem.options[selectelem.length] = new_option; // hier wird der neue Eintrag hinzugefügt + + // Optionen neu sortieren , die beiden nächsten Zeilen sortieren jeweils wunderbar in Firefox. Im IE gehts mal wieder nicht + // $A(selectelem.options).sort(function(a,b) {return (parseFloat(a.value) < parseFloat(b.value)) ? -1 : 1;}).each(function(o,i){selectelem.options[i] = o}); + // Array.prototype.sort.call(selectelem.options,function(a,b){return parseFloat(a.value) < parseFloat(b.value) ? -1 : parseFloat(a.value) > parseFloat(b.value) ? 1 : 0;}); + + // Dieser Aufwand ist wegen IE noetig + sort_opt(selectelem); + } + //End AG + + for (i = 0; i < selectelem.options.length; i++) + { + + selectelem.options[i].selected = (value == selectelem.options[i].value); + selectelem.options[i].defaultSelected = (value == selectelem.options[i].value); + } + } + else if (inputelem.type == "checkbox" || inputelem.type == "radio") + { + inputelem.checked = value; + inputelem.defaultChecked = value; + } + else if (inputelem.type == "text" || inputelem.type == "textarea" || inputelem.type == "password" || inputelem.type == "hidden") + { + inputelem.value = value; + inputelem.defaultValue = value; + } +}; + +DetermineParameterValue = function(iface, address, ps_id, param_id, html_inputelem_id) +{ + ResetPostString(); + + AddParam(document.getElementById('global_sid')); + poststr += "&cmd=determineParameter"; + poststr += "&iface=" + iface; + poststr += "&address=" + address; + poststr += "&ps_id=" + ps_id; + poststr += "¶m_id=" + param_id; + poststr += "&html_inputelem_id=" + html_inputelem_id; + + SendPOSTRequest('ic_ifacecmd.cgi'); + + //ProgressBar = new ProgressBarMsgBox("Parameter wird festgesetzt...", 1); + ProgressBar = new ProgressBarMsgBox(translateKey("dialogDetermineParameterTitle"), 1); + ProgressBar.show(); + ProgressBar.StartKnightRiderLight(); +}; + +ProofAndSetValue = function(srcid, dstid, min, max, dstValueFactor, convInt2Float, event) +{ + var srcElm = $(srcid); + var dstElm = $(dstid); + + // Falls das Tasten-Event nicht mit übergeben wurde .... + /* + var keyCode = 0, + finalVal; + + if (event) { + keyCode = event.keyCode; + } + */ + + var ok = true; + + if (! min) min = 0; + if (! max) max = 100; + if (! dstValueFactor) dstValueFactor = 0.01;//dstValue = value/100 + + if (convInt2Float) {min = parseFloat(min).toFixed(2); max = parseFloat(max).toFixed(2);} + + var value = $F(srcid); + + //replace , by . + if (value.indexOf(',') >= 0) + { + var tokens = value.split(","); + + value = ""; + if (tokens[0]) value += tokens[0]; + value += '.'; + if (tokens[1]) value += tokens[1]; + srcElm.value = value; + } + + var parsedValue; + var parsedMin = parseFloat(min); + var parsedMax = parseFloat(max); + + var minSplit = min.toString().split("."); + var maxSplit = max.toString().split("."); + var digits = 0; + + if(minSplit.length === 2) { + digits = Math.max(digits, minSplit[1].length); + } + if(maxSplit.length === 2) { + digits = Math.max(digits, maxSplit[1].length); + } + + // Check if float is allowed + try { + if (min.toString().indexOf(".") == -1 && max.toString().indexOf(".") == -1) { + min = parseInt(min); + max = parseInt(max); + value = Math.round(parseFloat(value)); + } else { + min = parseFloat(parseFloat(min).toFixed(digits)); + max = parseFloat(parseFloat(max).toFixed(digits)); + var roundFactor = Math.pow(10, digits); + value = Math.round(parseFloat(value) * roundFactor) / roundFactor; + if (value < min || isNaN(min)) {value = min;} else if (value > max) {value = max;} + } + parsedValue = parseFloat(value); + } catch(e) {conInfo(e);} + + if (typeof value == "undefined") + { + finalVal = parsedMin; + ok = false; + } + else if (isNaN(value)) + { + finalVal = parsedMin; + ok = false; + } + else if (parsedValue < parsedMin) + { + finalVal = parsedMin; + ok = false; + } + else if (parsedValue > parsedMax) + { + finalVal = parsedMax; + ok = false; + } + + if (ok) + { + srcElm.style.backgroundColor = "#fffffe"; + dstElm.value = (parsedValue.toFixed(digits) * dstValueFactor); + if ((typeof _iface == "undefined") || (_iface != "BidCos-RF")) { + srcElm.value = parsedValue.toFixed(digits); + } + srcElm.setAttribute("valvalid", "true"); + } + else + { + srcElm.setAttribute("valvalid", "false"); + srcElm.style.backgroundColor = "red"; + dstElm.value = (finalVal.toFixed(digits) * dstValueFactor); + if ((typeof _iface == "undefined") || (_iface != "BidCos-RF")) { + srcElm.value = finalVal.toFixed(digits); + } + window.setTimeout(function(){srcElm.style.backgroundColor = "white";},1000); + } +}; + +elv_toQueryString = function(s) +{ + s = s.replace(/%/g, "%25"); + s = s.replace(/\+/g,"%2b"); + s = s.replace(/ /g, "%20"); + s = s.replace(/"/g, "%22"); + s = s.replace(/\?/g,"%3f"); + + //Weicht von der tcl 'cgi_quote_url'-Funktion (cgi.tcl) ab: + s = s.replace(/\&/g,"%26"); + + return s; +}; + +/** + * Convert a key string of HmIP devices with custom 32 digits to a Base16 string + * @param valueString + */ +convertHmIPKeyBase32ToBase16 = function(valueString) { + + var HMIP_KEY_CHARS = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', + 'B', 'C', 'E', 'F', 'G', 'H', 'J', 'K', 'L', 'M', 'N', 'P', 'Q', 'R', 'S', 'T', 'U', 'W', 'X', 'Y', 'Z' ]; + + var buffer = new ArrayBuffer(16), + keyValue = new Uint8Array(buffer), + value = 0, + counter = valueString.length - 1 , + bits = 0, + byteCounter = keyValue.length - 1, + keyString = ""; + + while (counter >= 0) { + for(var i= 0; i < HMIP_KEY_CHARS.length; i++) { + if(HMIP_KEY_CHARS[i] == valueString.charAt(counter)) { + value |= i << bits; + //console.log(value +" - break"); + break; + } + } + + bits += 5; + counter--; + while (bits > 8 && byteCounter >= 0) { + keyValue[byteCounter] = value & 0xff; + value >>= 8; + bits -= 8; + byteCounter--; + } + } + + for(var i = 0; i < keyValue.length; i++) + { + if (keyValue[i] < 16) { + keyString += "0"; + } + keyString += keyValue[i].toString(16); + } + + return keyString.toUpperCase(); +}; + +/** + * ic_msgbox.js + **/ + +MsgBox = Class.create(); + +MsgBox.prototype = +{ + initialize: function(width, height, container_id) + { + if (width && height) this.init(width, height, container_id); + }, + init: function(width, height, container_id) + { + if (width || height) + { + this.setWidth(width); + this.setHeight(height); + } + else + { + this.stretchToMax(); + } + + if (container_id && container_id !== "") { this.container_id = container_id; } + else { this.container_id = "centerbox"; } + + this.setTopMargin(6); + this.setLeftMargin(6); + + this.createMessagebox(); + }, + setWidth: function(width) + { + this.width = width; + }, + setHeight: function(height) + { + this.height = height; + }, + setLeftMargin: function(left) + { + this.LeftMargin = left; + }, + setTopMargin: function(top) + { + this.TopMargin = top; + }, + stretchToMax: function() { + var maxHeight = 0; + if (window.innerHeight) { + maxHeight = window.innerHeight; + } + else { + if (window.document.documentElement && window.document.documentElement.clientHeight) + maxHeight = window.document.documentElement.clientHeight; + else + maxHeight = window.document.body.offsetHeight; + + this.setHeight(maxHeight - 50); + } + var maxWidth = screen.availWidth; + this.setWidth(maxWidth - 50); + }, + createMessagebox: function() + { + if ( !$('messagebox') ) + { + var newDiv = document.createElement("div"); + var newDivId = document.createAttribute("id"); + newDivId.nodeValue = "messagebox"; + newDiv.setAttributeNode(newDivId); + var newDivStyle = document.createAttribute("style"); + newDivStyle.nodeValue = "width:"+this.width+"px;height:"+this.height+"px;padding: 0px;position:absolute;left: 50%;margin-left: -"+(this.width/2)+"px;margin-top: -"+(this.height/2)+"px;"; + if( typeof( newDiv.style.cssText ) == "string" ) + newDiv.style.cssText = newDivStyle.nodeValue; + else + newDiv.setAttributeNode(newDivStyle); + + $(this.container_id).appendChild(newDiv); + jQuery("#messagebox").draggable(); + } + }, + removeMessagebox: function() + { + if ( $('messagebox') ) + { + $('messagebox').remove(); + } + }, + setMessageText: function(text) + { + $(this.messagediv).innerHTML = text; + }, + readaptSize: function() + { + if ( $('messagebox') ) + { + /* + $('messagebox').style.marginLeft = ($('messagebox').style.width.replace(/px$/,"")/2)*(-1)+"px"; + $('messagebox').style.marginTop = ($('messagebox').style.height.replace(/px$/,"")/2)*(-1)+"px"; + */ + //var h = $("messagebox").getHeight(); + var h = parseInt(jQuery("#messagebox").css("height")); + $('messagebox').style.marginLeft = ($('messagebox').style.width.replace(/px$/,"")/2)*(-1)+"px"; + $('messagebox').style.marginTop = (h/4)*(-1)+"px"; + } + }, + + addMessage: function(id,message) + { + var newDiv; + var newDivId; + var newDivStyle; + + this.messagediv = id; + newDiv = document.createElement("div"); + newDivId = document.createAttribute("id"); + newDivId.nodeValue = id; + newDiv.setAttributeNode(newDivId); + newDiv.className = "CLASS10102"; + var newTextNode = document.createTextNode(message); + newDiv.appendChild(newTextNode); + $('messagebox').appendChild(newDiv); + newDiv = document.createElement("div"); + newDivId = document.createAttribute("id"); + newDivId.nodeValue = id+"_ctrls"; + newDiv.setAttributeNode(newDivId); + newDiv.className = "CLASS10103"; + $('messagebox').appendChild(newDiv); + }, + addButton: function(id,text,func) + { + var newInput = document.createElement("input"); + newInput.id = id; + newInput.type = "button"; + newInput.value= text; + newInput.onclick = func; + Element.addClassName(newInput, "CLASS10100"); +// var newBR = document.createElement("
"); +// $(this.messagediv).appendChild(newBR); + $(this.messagediv+"_ctrls").appendChild(newInput); + }, + show: function() + { + //$('messagebox').style.visibility = "visible"; + + this.readaptSize(); + $('trlayer').show(); + $(this.container_id).show(); + }, + hide: function(do_not_remove) + { + //$('messagebox').style.visibility = "hidden"; + //$('messagebox').hide(); + + $(this.container_id).hide(); + if (! do_not_remove) this.remove(); + $('trlayer').hide(); + }, + removeAndReload: function() + { + this.hide(); +// this.remove(); + reloadPage(); + //location.reload(); + }, + remove: function() + { + this.removeMessagebox(); + //this.removeModalbox(); + }, + LoadFromFile: function(url) + { + url = Get_ReGa_Path(url); +/* + new Ajax.Updater('messagebox',url,{method:'get', evalScripts: true, onFailure:function(){alert('LoadFromFile-Error');} }); + try { this.OnFileLoaded(); } catch (e) {} +*/ + + //var url = fn+'?sid='+SessionId; + //var t = this; + var opt = + { + method: 'get', + evalScripts: true, + onComplete: function(trans) { + centerMessageBox(); + }, + onFailure: function() { + alert('LoadFromFile-Error'); + } + }; + + new Ajax.Updater('messagebox', url, opt); + }, + + CreateButton: function(text) + { + var newInputDiv = document.createElement("span"); + Element.addClassName(newInputDiv, "CLASS10101 colorGradient borderRadius2px"); + + var newInputDivText = document.createTextNode(text); + newInputDiv.appendChild(newInputDivText); + + return newInputDiv; + }, + + AddDivWrapper: function(divid, parentnodeid) { + + var newDiv = document.createElement("div"); + newDiv.setAttribute("id", divid); + + if (parentnodeid) $(parentnodeid).appendChild(newDiv); + else $('messagebox').appendChild(newDiv); + } +}; +/** + * ic_infomsgbox.js + **/ + +ShowInfoMsg = function(msg) +{ + InfoMsg = new InfoMessageBox("INFO", msg); + InfoMsg.show(); +}; + +ShowWarningMsg = function(msg) +{ + InfoMsg = new InfoMessageBox("WARNING", msg); + InfoMsg.show(); +}; + +ShowErrorMsg = function(msg) +{ + InfoMsg = new InfoMessageBox("ERROR", msg); + InfoMsg.show(); +}; + +InfoMessageBox = Class.create(); + +InfoMessageBox.prototype = Object.extend(new MsgBox(), { + + initialize: function(type, msg) { + + this.init(320, 240); + + this.AddDivWrapper("id_messagebox"); + this.AddDivWrapper("id_messagebox_wrapper", "id_messagebox"); + this.AddDivWrapper("id_messagebox_head", "id_messagebox_wrapper"); + this.AddDivWrapper("id_messagebox_body", "id_messagebox_wrapper"); + this.AddDivWrapper("id_messagebox_foot", "id_messagebox_wrapper"); + + var img = document.createElement("img"); + img.style.margin = "4px"; + + if (type == "INFO") img.src = "/ise/img/dialog-information.png"; + else if (type == "WARNING") img.src = "/ise/img/dialog-warning.png"; + else img.src = "/ise/img/dialog-error.png"; + + $("id_messagebox_head").style.verticalAlign = "top"; + $("id_messagebox_head").appendChild(img); + + var textnode; + + //if (type == "INFO") textnode = document.createTextNode("HomeMatic Information"); + if (type == "INFO") textnode = document.createTextNode(translateKey("dialogTitleHomeMaticInfo")); + //else if (type == "WARNING") textnode = document.createTextNode("HomeMatic Warnung"); + else if (type == "WARNING") textnode = document.createTextNode(translateKey("dialogTitleHomeMaticWarn")); + //else textnode = document.createTextNode("HomeMatic Fehler"); + else textnode = document.createTextNode(translateKey("dialogTitleHomeMaticError")); + + $("id_messagebox_head").appendChild(textnode); + + div = document.createElement("div"); + Element.addClassName(div, "CLASS10300"); + + if (type == "ERROR") + { + Element.addClassName("CLASS10301"); + } + div.innerHTML = msg; + + $('id_messagebox_body').appendChild(div); + + //var newInputDiv = this.CreateButton("OK"); + var newInputDiv = this.CreateButton(translateKey("btnOk")); + newInputDiv.onclick = function() { InfoMsg.OnOK(); }; + newInputDiv.style.paddingRight = "20px"; + newInputDiv.style.paddingLeft = "20px"; + $('id_messagebox_foot').appendChild(newInputDiv); + $('id_messagebox_foot').style.textAlign = "center"; + + //$('id_messagebox_wrapper').style.marginBottom = "5px"; + $('id_messagebox_wrapper').addClassName("CLASS10302"); + }, + + OnOK: function () + { + //InfoMsg.remove(); + InfoMsg.hide(); + } +}); +/** + * ic_progressbar.js + **/ + +//Defines +PROGRESSBAR_HL_COLOR = WebUI.getColor("progressbarHighlight"); //Highlight +PROGRESSBAR_BG_COLOR = WebUI.getColor("progressbarBackground"); //Background +PROGRESSBAR_TX_COLOR = WebUI.getColor("progressbarText"); //Text-Color +PROGRESSBAR_HL_STROKE = 4;//Strichstärke +PROGRESSBAR_WIDTH = 300;//Breite des Balkens +PROGRESSBAR_HEIGHT = 20;//Höhe des Balkens +PROGRESSBAR_KNIGHTRIDER_WIDTH = parseInt(PROGRESSBAR_WIDTH/5); +PROGRESSBAR_KNIGHTRIDER_STEP = 61; +//----- + +ProgressBarMsgBox = Class.create(); + +ProgressBarMsgBox.prototype = Object.extend(new MsgBox(), { + + initialize: function(caption, endcounter) { + + this.init(335, 240, 'progressbox'); + this.index = 0; + this.endcounter = endcounter; + + this.knightrider_position = 0; + this.knightrider_running = false; + + if (!endcounter || endcounter < 0) + { + this.stepwidth = PROGRESSBAR_WIDTH; + this.steppercent = 100; + } + else + { + this.stepwidth = Math.round(PROGRESSBAR_WIDTH / endcounter); + this.steppercent = Math.round( 100 / endcounter ); + } + + this.AddDivWrapper("id_progressbar_wrapper"); + $('id_progressbar_wrapper').style.border = "3px solid " +PROGRESSBAR_HL_COLOR; + + this.AddDivWrapper("id_progressbar_head", "id_progressbar_wrapper"); + this.AddDivWrapper("id_progressbar_body", "id_progressbar_wrapper"); + this.AddDivWrapper("id_progressbar_foot", "id_progressbar_wrapper"); + + $('id_progressbar_foot').style.height = "50px"; + $('id_progressbar_foot').style.marginTop = "10px"; + $('id_progressbar_foot').style.textAlign = "center"; + $('id_progressbar_foot').style.fontSize = "smaller"; + + $('id_progressbar_head').classname = "popupTitle"; + $('id_progressbar_head').style.fontWeight = "bold"; + $('id_progressbar_head').style.padding = "4px"; + $('id_progressbar_head').style.textAlign = "center"; + var textnode = document.createTextNode(unescape(translateKey(caption))); + $('id_progressbar_head').appendChild(textnode); + + var newDiv = document.createElement("div"); + newDiv.id = "id_progressbar_bar"; + newDiv.style.width = PROGRESSBAR_WIDTH + "px"; + newDiv.style.height = PROGRESSBAR_HEIGHT + "px"; + newDiv.style.position = "relative"; + newDiv.style.margin = "10px 0 0 10px"; + $('id_progressbar_body').style.padding = "7px"; + $('id_progressbar_body').appendChild(newDiv); + + this.jg_progressbar = new jsGraphics("id_progressbar_bar"); + this.InitGD(); + this.ClearCanvas(); + + //this.SetMessage("Bitte warten..."); + this.SetMessage(translateKey("progressBarLblPleaseWait")); + }, + + StartKnightRiderLight: function () + { + this.knightrider_position = 0; + if (PROGRESSBAR_KNIGHTRIDER_STEP < 0) PROGRESSBAR_KNIGHTRIDER_STEP = -PROGRESSBAR_KNIGHTRIDER_STEP; //rechts lang! + + this.ClearCanvas(); + this.jg_progressbar.fillRect(parseInt(0), parseInt(0), parseInt(PROGRESSBAR_KNIGHTRIDER_WIDTH), parseInt(PROGRESSBAR_HEIGHT)); + this.jg_progressbar.paint(); + + this.knightrider_running = true; + window.setTimeout("ProgressBar.StepKnightRiderLight();", 250); + }, + + StopKnightRiderLight: function () + { + this.knightrider_running = false; + }, + + StepKnightRiderLight: function () + { + if (! this.knightrider_running) return; + + if (this.knightrider_position + PROGRESSBAR_KNIGHTRIDER_STEP + PROGRESSBAR_KNIGHTRIDER_WIDTH > PROGRESSBAR_WIDTH) + { + this.knightrider_position = PROGRESSBAR_WIDTH - PROGRESSBAR_KNIGHTRIDER_WIDTH; //Letzte mögliche Position + PROGRESSBAR_KNIGHTRIDER_STEP = -PROGRESSBAR_KNIGHTRIDER_STEP; //anders herum + } + else if (this.knightrider_position + PROGRESSBAR_KNIGHTRIDER_STEP < 0) + { + this.knightrider_position = 0; + PROGRESSBAR_KNIGHTRIDER_STEP = -PROGRESSBAR_KNIGHTRIDER_STEP; //anders herum + } + else + { + this.knightrider_position += PROGRESSBAR_KNIGHTRIDER_STEP; + } + + this.ClearCanvas(); + this.jg_progressbar.fillRect(parseInt(this.knightrider_position), parseInt(0), parseInt(PROGRESSBAR_KNIGHTRIDER_WIDTH), parseInt(PROGRESSBAR_HEIGHT)); + this.jg_progressbar.paint(); + + window.setTimeout("ProgressBar.StepKnightRiderLight();", 250); + }, + + ClearCanvas: function () + { + this.jg_progressbar.clear(); + this.jg_progressbar.setColor(PROGRESSBAR_BG_COLOR); + this.jg_progressbar.fillRect(parseInt(0), parseInt(0), parseInt(PROGRESSBAR_WIDTH), parseInt(PROGRESSBAR_HEIGHT)); + this.jg_progressbar.paint(); + this.jg_progressbar.setColor(PROGRESSBAR_HL_COLOR); + }, + + InitGD: function () { + this.jg_progressbar.setColor(PROGRESSBAR_HL_COLOR); + this.jg_progressbar.setStroke(parseInt(PROGRESSBAR_HL_STROKE)); + }, + + SetMessage: function(msg) { + + if (! $('id_progressbar_foot')) return; + + $('id_progressbar_foot').innerHTML = ""; + var textnode = document.createTextNode(msg); + $('id_progressbar_foot').appendChild(textnode); + }, + + OnFinish: function() { + return; + }, + + IncCounter: function(msg) { + + this.index++; + + this.SetMessage(msg); + + if (! this.knightrider_running) + { + //Prozentangabe anschreiben + + percent = this.steppercent * this.index; + + var w = this.index * this.stepwidth; + if (w > PROGRESSBAR_WIDTH) w = PROGRESSBAR_WIDTH; + + this.ClearCanvas(); + this.jg_progressbar.fillRect(parseInt(0), parseInt(0), w, parseInt(PROGRESSBAR_HEIGHT)); + + this.jg_progressbar.setColor(PROGRESSBAR_TX_COLOR); + this.jg_progressbar.drawString(percent + "%", parseInt(PROGRESSBAR_WIDTH/2), 2); + this.jg_progressbar.setColor(PROGRESSBAR_HL_COLOR); + + this.jg_progressbar.paint(); + } + + if (this.index == this.endcounter) + { + this.StopKnightRiderLight();//wenn vorhanden + this.OnFinish(); + this.hide(); + } + } +}); +/** + * ic_configpendingmsg.js + **/ + +ConfigPendingMsgBox = Class.create(); + +ConfigPendingMsgBox.prototype = Object.extend(new MsgBox(), { + + initialize: function(w, h, extraParam) + { + this.extraParm = extraParam; + this.init(w, h); + this.configpendingcount = 0; + this.iface = ""; + this.url = ""; //s. setReturnURL + this.sid = ""; //s. setReturnURL + this.sidname = ""; //s. setReturnURL + + this.returnurl = ""; + this.returnurl_params = ""; + this.go_back = false; + + this.addr = new Array(2); + this.addr.clear(); + + //defines + this.CONFIGPENDING_SENDER = 0; + this.CONFIGPENDING_RECEIVER = 1; + //--- + + this.AddDivWrapper("id_configpending_head"); + $("id_configpending_head").className = "popupTitle"; + $("id_configpending_head").style.fontWeight = "bold"; + //this.AddTextNode("id_configpending_head", "Verknüpfungs- und Programmstatus"); + this.AddTextNode("id_configpending_head", translateKey("dialogCreateLinkTitle")); + + this.AddDivWrapper("id_configpending_overflow"); + $("id_configpending_overflow").style.overflow = "auto"; + $("id_configpending_overflow").style.width = "100%"; + $("id_configpending_overflow").style.height = "100%"; + + this.AddDivWrapper("id_configpending_body", "id_configpending_overflow"); + this.AddDivWrapper("id_configpending_foot", "id_configpending_overflow"); + $("id_configpending_foot").addClassName("CLASS10200"); + + this.AddTableHead(); + this.ResetTable(); + }, + + m_return: function() + { + switch (this.url) + { + case "IC_LINKPEERLIST": + WebUI.enter(LinkListPage); + break; + case "IC_SETPROFILES": + WebUI.enter(LinkEditProfilePage, { + iface: this.iface, + sender: (this.addr)[this.CONFIGPENDING_SENDER], + receiver: (this.addr)[this.CONFIGPENDING_RECEIVER] + }); + break; + case "GO_BACK": + WebUI.goBack(); + break; + default: + break; + } + }, + + setReturnURL: function(sidname, sid, url, goBack) + { + this.go_back = goBack; + this.url = url; + this.sid = sid; + this.sidname = sidname; + + if (goBack === true) { this.url = "GO_BACK"; } + +/* + if (url == "IC_LINKPEERLIST") + { + this.returnurl = UI_PATH + "ic_linkpeerlist.cgi"; + if (LINKLISTSORTBY) this.returnurl_params = "&LINKLISTSORTBY=" + LINKLISTSORTBY; + } + else if (url == "IC_SETPROFILES" ) + { + this.returnurl = UI_PATH + "ic_setprofiles.cgi"; + this.returnurl_params = "&iface=" + this.iface + + "&sender_address=" + (this.addr)[this.CONFIGPENDING_SENDER] + + "&receiver_address=" + (this.addr)[this.CONFIGPENDING_RECEIVER]; + } + else if (url == "GO_BACK" ) + { + this.returnurl = sPreviousPage; + this.returnurl_params = sPreviousPageArgs; + } + else + { + this.returnurl = ""; + } +*/ + }, + + ClearTable: function() + { + if($('id_configpending_table_tbody')) $('id_configpending_table_tbody').innerHTML = ""; + }, + + AddTextNode: function (id, text) + { + var textnode = document.createTextNode(text); + $(id).appendChild(textnode); + }, + + SetNavigationBar: function () + { + + $('id_configpending_foot').innerHTML = ""; + + if (this.configpendingcount === 0) + { + var newInputDiv = this.CreateButton("OK"); + newInputDiv.onclick = function() + { + ConfigPendingFrm.hide(); + if (typeof goBack != "undefined" && goBack == true ) { + WebUI.reload(); + delete goBack; + } else { + ConfigPendingFrm.m_return(); + } + }; + $('id_configpending_foot').appendChild(newInputDiv); + } + else + { + //var newInputDiv1 = this.CreateButton("Erneut prüfen"); + var newInputDiv1 = this.CreateButton(translateKey("btnDirectDeviceLinkCheckAgain")); + newInputDiv1.onclick = function() + { + ConfigPendingFrm.hide(); + CheckConfigPending(ConfigPendingFrm.iface, (ConfigPendingFrm.addr)[ConfigPendingFrm.CONFIGPENDING_SENDER], (ConfigPendingFrm.addr)[ConfigPendingFrm.CONFIGPENDING_RECEIVER], ConfigPendingFrm.url, ConfigPendingFrm.go_back); + }; + $('id_configpending_foot').appendChild(newInputDiv1); + + //var newInputDiv2 = this.CreateButton("Ignorieren"); + var newInputDiv2 = this.CreateButton(translateKey("lblIgnore")); + newInputDiv2.onclick = function() + { + ConfigPendingFrm.hide(); + if (typeof goBack != "undefined" && goBack == true ) { + WebUI.reload(); + delete goBack; + } else { + ConfigPendingFrm.m_return(); + } + }; + $('id_configpending_foot').appendChild(newInputDiv2); + } + }, + + AddTableHead: function () + { + var table = document.createElement("table"); + table.id = 'id_configpending_table'; + table.className = "popupTable"; + table.border = "1"; + + var thead = document.createElement("thead"); + table.appendChild(thead); + + var tr = document.createElement("tr"); + tr.className = "popupTableHeaderRow"; + + var td = new Array(4); + + //var textnode = document.createTextNode("Name"); + var textnode = document.createTextNode(translateKey("thName")); + td[0] = document.createElement("th"); + td[0].appendChild(textnode); + tr.appendChild(td[0]); + + //textnode = document.createTextNode("Typenbezeichnung"); + textnode = document.createTextNode(translateKey("thTypeDescriptorWOLineBreak")); + td[1] = document.createElement("th"); + td[1].appendChild(textnode); + tr.appendChild(td[1]); + + //textnode = document.createTextNode("Bild"); + textnode = document.createTextNode(translateKey("thPicture")); + td[2] = document.createElement("th"); + td[2].appendChild(textnode); + tr.appendChild(td[2]); + + //textnode = document.createTextNode("Hinweis"); + textnode = document.createTextNode(translateKey("thHint")); + td[3] = document.createElement("th"); + td[3].appendChild(textnode); + tr.appendChild(td[3]); + + thead.appendChild(tr); + + $('id_configpending_body').appendChild(table); + }, + + ResetTable: function() + { + + this.configpendingcount = 0; + + try + { + Element.remove($('id_configpending_table_tbody')); + } + catch (e) {} + + var tbody = document.createElement("tbody"); + tbody.id = "id_configpending_table_tbody"; + $('id_configpending_table').appendChild(tbody); + + var tr = document.createElement("tr"); + tr.id = "id_configpending_tr_NODATA"; + tr.style.height = "50px"; + tr.className = "popupTableRowGray"; + + //var textnode = document.createTextNode("Die Übertragung ist erfolgreich verlaufen."); + var textnode = document.createTextNode(translateKey('dialogCreateLinkSuccessContent')); + var td = document.createElement("td"); + td.colSpan = 4; + td.appendChild(textnode); + tr.appendChild(td); + + tbody.appendChild(tr); + }, + + SetDevice: function(iface, address, direction) + { + if (direction == this.CONFIGPENDING_SENDER) (this.addr)[this.CONFIGPENDING_SENDER] = address; + else (this.addr)[this.CONFIGPENDING_RECEIVER] = address; + + this.iface = iface; + + this.SetNavigationBar(); + }, + + ShowConfigPending: function(iface, address, name, type, configpending, index, direction) + { + if (direction == this.CONFIGPENDING_SENDER) (this.addr)[this.CONFIGPENDING_SENDER] = address; + else (this.addr)[this.CONFIGPENDING_RECEIVER] = address; + + this.iface = iface; + + var tbody = $('id_configpending_table_tbody'); + var devicecount = tbody.getElementsByTagName('tr').length; + + var tr = document.createElement("tr"); + tr.id = "id_configpending_tr_" + this.configpendingcount; + tr.className = "popupTableRowGray"; + + var td = new Array(4); + +// var textnode = document.createTextNode(name.unescapeHTML()); + td[0] = document.createElement("td"); +// td[0].appendChild(textnode); + td[0].innerHTML = name; + tr.appendChild(td[0]); + + textnode = document.createTextNode(type); + td[1] = document.createElement("td"); + td[1].appendChild(textnode); + tr.appendChild(td[1]); + + var img = document.createElement("img"); + img.setAttribute("src", DEV_getImagePath(type, 50)); + img.setAttribute("title", name); + img.setAttribute("alt", address); + + var div = document.createElement("div"); + div.setAttribute('id', 'id_configpending_picDiv_' + this.configpendingcount); + div.onmouseover = function () { picDivShow(jg_250, type, 250, -1, this); }; + div.onmouseout = function () { picDivHide(jg_250); }; + div.style.position = "relative"; + div.appendChild(img); + + td[2] = document.createElement("td"); + td[2].style.backgroundColor = WebUI.getColor("white"); + td[2].appendChild(div); + tr.appendChild(td[2]); + + var linecount = $('id_configpending_table_tbody').getElementsByTagName("tr").length; + + if (((linecount > 1) && (this.configpendingcount === 1) && (configpending === 1)) || + ((linecount > 1) && (this.configpendingcount === 0) && (configpending === 0))) /*linecount > 1 weil die erste Zeile unsichtbar ist.*/ + { + //Die letzte Meldung soll für dieses Gerät mitgelten. Meldungen zusammenfassen: + + var msg_td = $('id_configpending_tr_0').getElementsByTagName("td")[3]; + var rs = msg_td.getAttribute("rowspan"); + + if ( !rs || rs === "") { msg_td.rowSpan = 2; } //Attribut neu anlegen + else { msg_td.rowSpan = parseInt(rs) + 1; } //Attributwert hochzählen + } + else if (configpending == 1) + { + td[3] = document.createElement("td"); + td[3].style.padding = "5px"; + + //textnode = document.createTextNode("Die Übertragung der Daten zum Gerät konnte nicht ordnungsgemäß durchgeführt werden. Wählen Sie:"); + textnode = document.createTextNode(translateKey("dialogCreateLinkErrorContent1")); + td[3].appendChild(textnode); + + var ul = document.createElement("ul"); + + var li_text = new Array(2); + //li_text[0] = document.createTextNode("\"Erneut prüfen\", wenn Sie die Übertragung zum Gerät jetzt abschließen möchten. Sorgen Sie dazu bitte dafür, dass sich"); + li_text[0] = document.createTextNode(translateKey("dialogCreateLinkErrorContent2")); + + var ul2 = document.createElement("ul"); + var li_text2 = new Array(2); + //li_text2[0] = document.createTextNode("das Gerät innerhalb der Funkreichweite befindet und aktiv ist,"); + li_text2[0] = document.createTextNode(translateKey("dialogCreateLinkErrorContent3")); + //li_text2[1] = document.createTextNode("das Gerät im Anlernmodus befindet."); + li_text2[1] = document.createTextNode(translateKey("dialogCreateLinkErrorContent4")); + var li2 = new Array(2); + li2[0] = document.createElement("li"); + li2[0].appendChild(li_text2[0]); + li2[1] = document.createElement("li"); + li2[1].appendChild(li_text2[1]); + ul2.appendChild(li2[0]); + ul2.appendChild(li2[1]); + + //li_text[1] = document.createTextNode("\"Ignorieren\", wenn die Zentrale die Übertragung zum Gerät bei nächster Gelegenheit selbstständig durchführen soll. Bis dahin ist dieser Konfigurationsvorgang als offene Servicemeldung sichtbar."); + li_text[1] = document.createTextNode(translateKey("dialogCreateLinkErrorContent5")); + + var li = new Array(2); + li[0] = document.createElement("li"); + li[0].appendChild(li_text[0]); + li[0].appendChild(ul2); + li[1] = document.createElement("li"); + li[1].appendChild(li_text[1]); + + ul.appendChild(li[0]); + ul.appendChild(li[1]); + + td[3].appendChild(ul); + + if (this.extraParm == "ADD_LINK") { + var hintAddLink = document.createElement("div"); + hintAddLink.innerHTML = translateKey("dialogCreateLinkErrorContent6"); + td[3].appendChild(hintAddLink); + } + + td[3].align = "left"; + td[3].style.color = WebUI.getColor("red"); + td[3].style.fontWeight = "bold"; + + tr.appendChild(td[3]); + + this.configpendingcount++; + } + else if (configpending === 0) + { + //textnode = document.createTextNode("Die Übertragung der Daten zum Gerät wurde erfolgreich abgeschlossen."); + textnode = document.createTextNode(translateKey("dialogCreateLinkSuccessContent")); + td[3] = document.createElement("td"); + td[3].appendChild(textnode); + td[3].align = "left"; + tr.appendChild(td[3]); + } + else + { + //textnode = document.createTextNode("Übertragung nicht erfolgt, weil das Gerät unbekannt ist."); + textnode = document.createTextNode(translateKey("dialogCreateLinkErrorUnknownDevice")); + td[3] = document.createElement("td"); + td[3].appendChild(textnode); + td[3].align = "left"; + td[3].style.color = WebUI.getColor("red"); + td[3].style.fontWeight = "bold"; + tr.appendChild(td[3]); + } + + tbody.appendChild(tr); + this.SetNavigationBar(); + + $("id_configpending_tr_NODATA").style.display = "none"; + $("id_configpending_tr_NODATA").style.visibility = "hidden"; + } +}); +/** + * ic_selchannel.js + **/ + +//====================================================================== +// Globale Variablen für diese Datei +SORT_DESC = false; +IGNORE_CASE = true; +SORTED_COL = -1; +SORT_ASC_SRC = "/ise/img/arrow_up.gif"; +SORT_DESC_SRC = "/ise/img/arrow_down.gif"; +//====================================================================== + +//------------------------------------------------------------------------ +//Klasse SelChannelBox für das PopUp Kanalauswahl: +/* +SelChannelBox = Class.create(); + +SelChannelBox.prototype = Object.extend(new MsgBox(), { + initialize: function(w, h) { + + this.init(w, h); + } +}); +*/ +//------------------------------------------------------------------------ + +CloseSelChannel = function() +{ + updateContent(UI_PATH + "ic_linkpeerlist.cgi"); +}; + +Sort = function(tableid, colNr) +{ + HideFilterControls(); + + if (($F('global_realchannels') === 0) && ($F('global_virtualchannels') === 0)) return; + + try + { + SORTED_COL = document.getElementsByClassName('sorted')[0].cellIndex; + } + catch (e) { + //alle unsorted: einen auf sorted stellen + $('tr_caption_colnames').getElementsByTagName("td")[colNr ].className = "sorted"; + } + + if (SORTED_COL != colNr && SORTED_COL != -1) + { + //Highlighting ändern + $('tr_caption_colnames').getElementsByTagName("td")[SORTED_COL].className = "unsorted"; + $('tr_caption_colnames').getElementsByTagName("td")[colNr ].className = "sorted"; + } + + SetSortingOrder(colNr); + + //Sortierungssymbol zuordnen: + var img = $('tr_caption_colnames').getElementsByTagName("td")[colNr].getElementsByTagName("img")[0]; + SORT_DESC ? img.src=SORT_DESC_SRC : img.src=SORT_ASC_SRC; + //----- + + SortTable(tableid, colNr); + + SORTED_COL = colNr; +}; + +//Wenn b_order_desc nicht gesetzt, dann wird die Sortierreihenfolge gewechselt, +//es sei denn, die Spalte wird zum ersten mal sortiert. Bei der ersten Sortierung +//wird standardmäßig aufsteigend sortiert. +SetSortingOrder = function(colNr, b_order_desc) +{ + if (b_order_desc) + { + SORT_DESC = b_order_desc; + } + else + { + if (SORTED_COL == -1 || SORTED_COL != colNr) SORT_DESC = false; //init und default bei Spaltenwechsel + else SORT_DESC = !SORT_DESC; //Wechsel der Sortierreihenfolge + } +}; + +SortTable = function(tableid, colNr) +{ + var tr_list = $('chnListBody').getElementsByTagName("tr"); + + var valueList = new Array(); + var valueMap = new Object(); + var value; + var i; + + for (i = 0; i < tr_list.length; i++) + { + value = tr_list[i].cells[colNr].innerHTML.replace(/<[^>]+>/g,""); + + if (typeof(valueMap[value]) == "undefined") + { + valueMap[value] = new Array(); //Liste nimmt Tabellenzeile gleichen values auf. + valueList.push(value); //In dieser Liste ist value nur einmal drin. + } + + valueMap[value].push(tr_list[i]); //Liste gleicher values nimmt Zeile auf + } + + // ColNr 4 = Sort by serial number + if (colNr == 4) { + valueList.sort(function (a, b) { + var ar1 = a.split(":"), + ar2 = b.split(":"); + if (ar1[0] == ar2[0]) { + return (!SORT_DESC) ? (parseInt(ar1[1]) - parseInt(ar2[1])) : (parseInt(ar2[1]) - parseInt(ar1[1])); + } + }); + } else { + valueList.sort(compareStrings_globalsettings); //Sort list + } + + var rowList; + var headerlen = tr_list[0].rowIndex; + var k = 0; + + for (i = 0; i yy) return higherindex; + else return equalindex; +}; + +swapRows = function(tableid, i, j) +{ + var table = document.getElementById(tableid); + var minNode = table.rows[Math.min(i, j)]; + var maxNode = table.rows[Math.max(i, j)]; + var parentNode = minNode.parentNode; + + if ((i - j) * (i - j) == 1) + { + parentNode.removeChild(maxNode); + parentNode.insertBefore(maxNode, minNode); + } + else + { + var nextNode = minNode.nextSibling; + + parentNode.removeChild(minNode); + parentNode.replaceChild(minNode, maxNode); + parentNode.insertBefore(maxNode, nextNode); + } +}; + +AddFilter = function(colNr) +{ + HideElement('id_filtercontrol_' + colNr); + + if (($F('global_realchannels') == 0) && ($F('global_virtualchannels') == 0)) { return; } + + var input = document.getElementsByName('input_filtercontrol_' +colNr); + var patternlist = ""; + var i; + + if ((input == null) || (input[0] == null)) { return; } + + if (input[0].type == "text") + { + patternlist = input[0].value; + } + else if (input[0].type == "checkbox") + { + for (i = 0; i < input.length; i++) + { + if (input[i].checked) patternlist += input[i].value + '|'; + } + + if (patternlist.length !== "") { patternlist = patternlist.substring(0, patternlist.length-1); } + } + else if (input[0].type== "radio") + { + for (i = 0; i < input.length; i++) + { + if (input[i].checked) + { + patternlist = input[i].value; + break; + } + } + } + + addFilterColumn($('chnListBody').getElementsByTagName("tr"), colNr, patternlist); + + if (patternlist !== "") { $('id_filtertd_'+ colNr).className = "filtered"; } + else { $('id_filtertd_'+ colNr).className = "unfiltered"; } +}; + +ResetFilter = function() +{ + //var table = document.getElementById('ChnListTbl'); + //var len = table.getElementsByTagName("tbody")[0].getElementsByTagName("tr")[0].getElementsByTagName("td").length; + var i=0; + + while ($('id_filtercontrol_'+i) !== null) + { + HideElement('id_filtercontrol_' + i); + + var input = document.getElementsByName('input_filtercontrol_' +i); + + if ((input !== null) && (input[0] !== null) && typeof (input[0]) != "undefined") + { + if (input[0].type == "text") + { + input[0].value = ""; + } + else if ((input[0].type == "checkbox") || (input[0].type == "radio")) + { + for (var j=0; j 1)) + { + tr_list[i].cells[2].childNodes[0].style.display = ''; //um die Bilder wieder einzublenden + } + } +}; + +ResetFilterAndTable = function() +{ + ResetFilter(); + ResetTable(); +}; + +HideFilterControls = function() +{ + var i=0; + + while ( $('id_filtercontrol_'+i) !== null) + { + HideElement('id_filtercontrol_' + i); + i++; + } +}; + +ShowFilterControl = function(colNr) +{ + var visible = $('id_filtercontrol_' +colNr).style.visibility == "visible"; + + HideFilterControls(); + + if (! visible) + { + ShowElement('id_filtercontrol_' + colNr); + jQuery('#id_filtercontrol_' +colNr).draggable(); + + var input = document.getElementsByName('input_filtercontrol_' +colNr)[0]; + if ((input !== null) && (input.type == "text")) + { + input.focus(); + input.select(); + } + } +}; + +filterTable = function() +{ + var i=0; + + ResetTable();//Zeige alle Zeilen + + while ( $('id_filtercontrol_'+i) != null) + { + AddFilter(i); //Filter setzen in Zeile i + jQuery('#id_filtercontrol_' + i).css({"left": 0, "top" : 0 }); + i++; + } + SizeTable(); + +}; + +filterCheckEnterEsc = function(keyCode, filterNr) +{ + switch (keyCode) { + case 13: + // Set the filter -- press ok + filterTable(); + break; + case 27: + jQuery("#inputTextFilter_" + filterNr).val(""); + filterTable(); + break; + } +}; + +//Filtert eine Tabelle und lässt nur die Zeilen sichtbar, +// die mit einem Muster (Liste) übereinstimmen. Die +// Tabelle muss ein
"; + msg += ""; + msg += ""; + //msg += ""; + msg += ""; + msg += ""; + msg += ""; + msg += ""; + msg += "
Temperaturprofil " +TOM_DAY[dayidx] +":" + translateKey('lblProgramTemperatureProfile') + " " + this.TOM_DAY[dayidx] + ": "; + if (dayidx == 0) msg += "
"; + //msg += "wie am Vortag"; + msg += "" + translateKey('lblProgramPreviousDay'); + if (dayidx == 0) msg += "
"; + msg += "
"; + + msg += ""; + msg += ""; + //msg += ""; + msg += ""; + msg += ""; + msg += ""; + + for (var i = 0; i < timeouts.length; i++) { + if (i == 0) endtime = tom_mintimeout; + else endtime = timeouts[i - 1][tom_endtime]; + + msg += ""; + msg += ""; + msg += ""; + msg += ""; + //msg += ""; + msg += ""; + msg += ""; + msg += ""; + // im naechsten Input-Feld stehen versteckt die zum Aktor zu uebertragenden Werte. Da der Aktor Werte im Grad Celsius erwartet, + // muss der im Kanalparameter evtl. in F angezeigte Wert immer in Celsius umgerechntet und zwischengespeichert werden. + msg += ""; + msg += ""; + } + msg += ""; + msg += "
   StartzeitEndzeitTemperatur
   " + translateKey('lblProgramTimeStart') + "" + translateKey('lblProgramTimeEnd') + "" + translateKey('lblProgramTemperature') + "
\"Zeitabschnitt\"Zeitabschnitt" + (i + 1) + ". " + translateKey('lblProgramPeriod') + "Uhr" + translateKey('lblProgramTimeExtension') + "" + translateKey('lblProgramTimeExtension') + " °C
"; + $(this.divname[dayidx]).innerHTML = msg; + + if (this.isOldDevGeneration) { + CC_setUnit(); + } + } + +}); + +TimeoutManagerHmIPOnOff = Class.create(); + +TimeoutManagerHmIPOnOff.prototype = Object.extend(new TimeoutManager(), { + + setMaxTimouts: function() { + this.maxTimeOuts = 11; + }, + + setValue: function (day, endtime, temperature) { + this.setTemp(day, endtime, temperature); + }, + + tom_setDirty: function (day, inputelem, timeoutIdx) { + + var tmp = inputelem.id.split("_"); + + if (this.prg) { + var id = this.prg + tmp[1] + "_" + tmp[2] + "_" + tmp[3]; + } + + var temperature = $F(id); + var dayidx = TOM_DAYIDX[day]; + var timeouts = this.week[dayidx]; + + inputelem.style.backgroundColor = WebUI.getColor("transparent"); + + if (this.tom_isTemperature(temperature) + && temperature >= 0 + && temperature <= 1) timeouts[timeoutIdx][tom_temperature] = parseFloat(temperature); + else inputelem.style.backgroundColor = WebUI.getColor("red"); + + this.weekdirty[dayidx] = true; + + }, + + tom_getPostStr: function () { + + var postStr = ""; + + for (var dayidx = 0; dayidx < 7; dayidx++) { + //Welcher Tag enthält die relevanten Daten: "wie am Vortag"-Funktion? + var prev_day = $(this.prg + 'prevday_' + dayidx); + var p = dayidx; + while (prev_day.checked) { + p--; + prev_day = $(this.prg+ 'prevday_' + p); + } + //----- + + if (this.weekdirty[dayidx] || this.weekdirty[p]) //Dieser Tag oder der Vortag "dirty"? + { + var timeouts = this.week[p]; + var hour, minute, level; + + if (timeouts && timeouts.length > 0) { + for (var i = 0; i < timeouts.length; i++) { + + hour = parseInt(timeouts[i][tom_endtime] / 60); + minute = parseInt(timeouts[i][tom_endtime] % 60); + + postStr += "&" + this.prg + "LEVEL_" + TOM_DAY_ENG[dayidx] + "_" + (i + 1) + "=" + timeouts[i][tom_level]; + postStr += "&" + this.prg + "HOUR_" + TOM_DAY_ENG[dayidx] + "_" + (i + 1) + "=" + hour; + postStr += "&" + this.prg + "MINUTE_" + TOM_DAY_ENG[dayidx] + "_" + (i + 1) + "=" + minute; + } + } + } + } + + return postStr; + }, + + tom_isTime: function (time) { + return time.match(/^[0-2]?[0-9]:[0-5][0-9]$/) != null; + }, + + tom_checkAndSetTime: function (day, inputel, timeoutIdx) { + var dayidx = TOM_DAYIDX[day]; + var timeouts = this.week[dayidx]; + var elem = inputel.id.split("_"); + var count = -1; + var inputelem; + var endtime; + var prev_endtime; + var next_endtime; + var time; + var appendix = '_temp'; + + while ($(this.prg + elem[1] + '_' + elem[2] + '_' + (count + 1) + appendix)) { + count++; + timeouts[count][tom_endtime] = this.tom_toTimeout($(this.prg + elem[1] + '_' + elem[2] + '_' + count + appendix).value); + } + + for (var loop = 0; loop <= (count - 1); loop++) { + timeoutIdx = loop; + + inputelem = this.prg + elem[1] + "_" + elem[2] + "_" + loop + appendix; + + var arTime = $(inputelem).value.split(":"), + hour = parseInt(arTime[0]), + min = parseInt(arTime[1]); + + if (min <= 9) {min = "0" + min;} + if (min == 60) {min = "00"; hour++;} + if (hour <= 9) {hour = "0" + hour;} + if (hour == 24) {hour = "23"; min = "55";} + + $(inputelem).value = time = hour + ":" + min; + + endtime = this.tom_toTimeout(time); + prev_endtime = -1; + next_endtime = -1; + + + if (timeoutIdx != 0) prev_endtime = timeouts[timeoutIdx - 1][tom_endtime]; + if (timeoutIdx != timeouts.length - 1) next_endtime = timeouts[timeoutIdx + 1][tom_endtime]; + + $(inputelem).style.backgroundColor = WebUI.getColor("transparent"); + + if (endtime > 0 + && endtime <= 1440 + && (prev_endtime < 0 || prev_endtime < endtime) + && (next_endtime < 0 || next_endtime > endtime)) timeouts[timeoutIdx][tom_endtime] = parseInt(endtime); + else $(inputelem).style.backgroundColor = WebUI.getColor("red"); + + this.weekdirty[dayidx] = true; + } + }, + + + setHmIPData: function(elmID, time) { + // elmID = e.g. P1_endtimeHr_0_0 - first value on Saturday + var prgNr = this.prg, + arId = elmID.split("_"), + arTime = time.split(":"), + dayIdx = arId[2], + index = arId[3], + hour = arTime[0], + minute = arTime[1]; + + // This is the visible time field + jQuery("#"+elmID).val(time); + + // This are the invisible time fields with the values to transmit + jQuery("#" + prgNr + "endtimeHr_"+dayIdx+"_"+ (parseInt(index) - 1)).val(hour); + jQuery("#" + prgNr + "endtimeMin_"+dayIdx+"_"+ (parseInt(index) - 1)).val(minute); + jQuery("#" + prgNr + "starttimeHr_"+dayIdx+"_"+ index).val(hour); + jQuery("#" + prgNr + "starttimeMin_"+dayIdx+"_"+ index).val(minute); + }, + + writeDayHmIPWeekProgramOnOff: function (day) { + var prgNr = this.prg; + var dayidx = TOM_DAYIDX[day]; + var timeouts = this.week[dayidx]; + var endtime; + var startTimeHour, startTimeMin, endTimeHour, endTimeMin; + + if (!timeouts) return; + + var equals_prevday = this.tom_equals_prevday(day); + + msg = "
"; + msg += ""; + msg += ""; + msg += ""; + msg += ""; + msg += ""; + msg += ""; + msg += ""; + msg += "
" + translateKey('lblProgramProfile') + " " + this.TOM_DAY[dayidx] + ": "; + if (dayidx == 0) msg += "
"; + msg += "" + translateKey('lblProgramPreviousDay'); + if (dayidx == 0) msg += "
"; + msg += "
"; + + msg += ""; + msg += ""; + //msg += ""; + msg += ""; + msg += ""; + msg += ""; + + for (var i = 0; i < timeouts.length; i++) { + if (i == 0) endtime = tom_mintimeout; + else endtime = timeouts[i - 1][tom_endtime]; + + startTimeHour = parseInt(endtime / 60); + startTimeMin = endtime % 60; + endTimeHour = parseInt(timeouts[i][tom_endtime] / 60); + endTimeMin = timeouts[i][tom_endtime] % 60; + + msg += ""; + msg += ""; + msg += ""; + msg += ""; + + msg += ""; + // msg += ""; + + + msg += ""; + +/* + msg += ""; + +*/ + // Todo Implement a option box with 2 entries: On Off + //msg += ""; + + var value = parseInt(timeouts[i][tom_level]); + var sel0 = "", sel1 = ""; + if (value == 0) { + sel0 = "selected"; + } else { + sel1 = "selected"; + } + + msg += ""; + + msg += ""; + } + msg += ""; + msg += "
   StartzeitEndzeitTemperatur
   " + translateKey('lblProgramTimeStart') + "" + translateKey('lblProgramTimeEnd') + "" + translateKey('lblProgramState') + "
\"Zeitabschnitt\"Zeitabschnitt" + (i + 1) + ". " + translateKey('lblProgramPeriod') + "" + translateKey('lblProgramTimeExtension') + "" + translateKey('lblProgramTimeExtension') + "" + translateKey('lblProgramTimeExtension') + ""; + // Start Hour + msg += ""; + // Start Min + msg += ""; + + // End Hour + msg += ""; + // End Min + msg += ""; + + msg+= "" + + "" + + "
"; + $(this.divname[dayidx]).innerHTML = msg; + + if (this.isOldDevGeneration) { + CC_setUnit(); + } + } +});/** + * ic_partyendtime.js + **/ + +//pet = Party End Time Module + +PartyEndTimeManager = Class.create(); + +PartyEndTimeManager.prototype = Object.extend(new MsgBox(), { + + initialize: function (iface, address, htmlcontainer, name, id) { + + this.iface = iface; + this.address = address; + this.htmlcont = htmlcontainer; + this.name = name; + this.id = id; + }, + + pet_Update: function () { + + var d = $F('pet_d'); + if (isNaN(d)) d = 0; + + var h = parseInt($F('pet_h')); + var m = parseFloat($F('pet_m')); + + var endtime = d * 24 + h + m; + + if (endtime >= 24) + { + $('pet_m').disabled = true; + $('pet_m').value = 0; + + $('pet_h').disabled = true; + $('pet_h').value = 0; + + endtime = d * 24; + } + else + { + $('pet_m').disabled = false; + $('pet_h').disabled = false; + } + + if (endtime > 3048) {endtime = 3048;} + + $(this.id).value = endtime; + }, + + writeControl: function (endtime) { + + var msg = ""; + var d, h, m; + + d = Math.floor(endtime / 24); + + tmp = endtime - (d * 24); + h = Math.floor(tmp); + + m = tmp-h; + + + msg += "d  "; + + msg += "h "; + + msg += "m
"; + //msg += "max. 127 Tage"; + msg += translateKey("partyMaxDays127"); + + //Sammelobjekt für richtigen Datenwert: + msg += ""; + + $(this.htmlcont).innerHTML = msg; + + this.pet_Update(); + } +}); +/** + * cp_functions.js + **/ + +showAddDeviceCP = function(activate_install_mode) +{ + var path = "/config/"; + if (PLATFORM != "Central") {path = "/configapp/";} + + if(activate_install_mode)CreateCPPopup(path + "cp_add_device.cgi", "call_js=rf_install_mode(true);"); + else CreateCPPopup(path + "cp_add_device.cgi"); + dlgPopup.setWidth("925"); +}; + +showDisplayCP = function() + { + CreateCPPopup("/config/cp_display.cgi"); +}; + +showSecurityCP = function() + { + CreateCPPopup("/config/cp_security.cgi"); +}; + +showNetworkSecurityCP = function() + { + CreateCPPopup("/config/cp_cert.cgi"); +}; + +showNetworkCP = function() + { + CreateCPPopup("/config/cp_network.cgi"); +}; +showGeneralSettingsCP = function() + { + CreateCPPopup("/pages/jpages/system/StorageSettings/show"); +}; + +showCouplingCP = function() +{ + CreateCPPopup("/pages/jpages/system/Coupling/show"); +}; + +showTimeCP = function() { + CreateCPPopup("/config/cp_time.cgi"); +}; + +showSoftwareCP = function() +{ + CreateCPPopup("/config/cp_software.cgi"); +}; + +showMaintenanceCP = function() +{ + CreateCPPopup("/config/cp_maintenance.cgi"); +}; + +showAdvancedSettingsCP = function() +{ + CreateCPPopup("/config/cp_advancedsettings.cgi"); +}; + +showNewFirmwareDownload = function() { + CreateCPPopup("/config/cp_maintenance.cgi", "downloadOnly=1"); +}; + +CreateCPPopup = function(src, pb, errorLbl) { + dlgPopup = new cpMessageBox(src, pb, errorLbl); + + PopupClose = function() { + dlgPopup.close(); + if (typeof addOnUninstall != "undefined") { + reloadPage(); + delete addOnUninstall; + } + }; + + PopupReload = function() { + dlgPopup.reload(); + dlgPopup.ShowPopup(); + }; + + dlgPopup.ShowPopup(); +}; + +CreateCPPopup2 = function(src, pb) { + dlgPopup2 = new cpMessageBox2(src, pb); + + Popup2Close = function() { + dlgPopup2.close(); + }; + + Popup2Reload = function() { + dlgPopup2.reload(); + dlgPopup2.ShowPopup(); + }; + + dlgPopup2.ShowPopup(); + //new Draggable("messagebox"); +}; + +cp_adddev_updater=null; + +cpMessageBox = Class.create(); + +cpMessageBox.prototype = +{ + initialize: function(src, pb, errorLbl) + { + if ( $('messagebox') ){ + $("messagebox").hide(); + } + + this.setTopMargin(6); + this.setLeftMargin(6); + + this.setWidth(800); + + this.createMessagebox(); + this.LoadFromFile(src, pb, errorLbl); + }, + + getViewPortDim : function() + { + var win = jQuery(window); + return {"height":win.height(), "width": win.width()}; + }, + + setWidth: function(width) + { + this.width = width; + if( $('messagebox') ){ + $('messagebox').style.width=this.width+"px"; + } + }, + + setHeight: function(height) + { + this.height = height; + }, + + setLeftMargin: function(left) + { + this.LeftMargin = left; + }, + + setTopMargin: function(top) + { + this.TopMargin = top; + }, + + createMessagebox: function() + { + if ( !$('messagebox') ) + { + var newDiv = document.createElement("div"); + var newDivId = document.createAttribute("id"); + newDivId.nodeValue = "messagebox"; + newDiv.setAttributeNode(newDivId); + var newDivStyle = document.createAttribute("style"); + //newDivStyle.nodeValue = "width:"+this.width+"px;height:"+this.height+"px;padding: 0px;position:absolute;left: 50%;margin-left: -"+(this.width/2)+"px;margin-top: -"+(this.height/2)+"px;"; + newDivStyle.nodeValue = "width:"+this.width+"px;height:"+this.height+"px;padding: 0px;position:absolute;left: 50%;margin-left: -"+(this.width/2)+"px;margin-top: -"+"0px;"; + if( typeof( newDiv.style.cssText ) == "string" ) { + newDiv.style.cssText = newDivStyle.nodeValue; + } else { + newDiv.setAttributeNode(newDivStyle); + } + $('centerbox').appendChild(newDiv); + jQuery("#messagebox").draggable(); + } else { + $('messagebox').style.width=this.width+"px"; + } + jQuery("#messagebox").addClass("j_translate"); + }, + + removeMessagebox: function() + { + if ( $('messagebox') ) + { + $('messagebox').remove(); + } + }, + + // TODO Es wird zur Zeit nur die Höhe ausgewertet und angepasst, die Breite ist noch nicht implementiert. + /** + * Adds a scrollbar and adjusts the position when the height of the message + * box is > than those of the viewport + * @param boxHeight + */ + setCSS: function(boxHeight) { + var centerBoxSel = jQuery("#centerbox"), + messageBoxSel = jQuery("#messagebox"), + oViewPortDim = this.getViewPortDim(); + + if (parseInt(oViewPortDim.height) < boxHeight ) + { + centerBoxSel.css({ + "overflow":"scroll", + "height":"95%", + "top":"-0px" + }); + messageBoxSel.css("margin-top", "-0px"); + } else { + centerBoxSel.css({"overflow":"", "top":"50%"}); + } + }, + + readaptSize: function() + { + var messageBox = $("messagebox"); + if ( messageBox ) + { + var h = messageBox.getHeight(); + messageBox.style.marginLeft = (messageBox.style.width.replace(/px$/,"")/2)*(-1)+"px"; + messageBox.style.marginTop = (h/2)*(-1)+"px"; + this.setCSS(h); + } + }, + + show: function() + { + this.readaptSize(); + $('trlayer').show(); + $('centerbox').show(); + }, + + close: function(o) + { + $('centerbox').hide(); + this.remove(); + $('trlayer').hide(); + }, + + hide: function(o) + { + $('messagebox').style.display="none"; + }, + + remove: function() + { + this.removeMessagebox(); + }, + + LoadFromFile: function(src, pb, errorLbl) { + var url = src; + if(url.indexOf('?sid=') === -1) + { + url = url+'?sid='+SessionId; + } + var t = this; + var opt = + { + method: 'post', + evalScripts: true, + postBody: pb, + sendXML: false, + onComplete: function(trans) { + centerMessageBox(); + $('messagebox').style.display=""; + }, + onFailure: function(response) { + $('centerbox').hide(); + $('trlayer').hide(); + if(typeof errorLbl != 'undefined') { + MessageBox.show(translateKey('lblError'), translateKey(errorLbl), '', 480,120); + } else { + Ajax_failure(url, response.statusText); + } + } + }; + new Ajax.Updater('messagebox',url,opt); + }, + + ShowPopup: function() { + this.show(); + setTimeout(function() { + eQ3.HomeMatic.Event.fire({type:'ContentLoaded'}); + }, 100); + } +}; + +cpMessageBox2 = Class.create(); + +cpMessageBox2.prototype = +{ + initialize: function(src, pb) + { + this.setTopMargin(6); + this.setLeftMargin(6); + + this.setWidth(400); + + this.createMessagebox(); + this.LoadFromFile(src, pb); + }, + + setWidth: function(width) + { + this.width = width; + if( $('messagebox2') ){ + $('messagebox2').style.width=this.width+"px"; + } + }, + + setHeight: function(height) + { + this.height = height; + }, + + setLeftMargin: function(left) + { + this.LeftMargin = left; + }, + + setTopMargin: function(top) + { + this.TopMargin = top; + }, + + createMessagebox: function() + { + if ( !$('messagebox2') ) + { + var newDiv = document.createElement("div"); + var newDivId = document.createAttribute("id"); + newDivId.nodeValue = "messagebox2"; + newDiv.setAttributeNode(newDivId); + var newDivStyle = document.createAttribute("style"); + newDivStyle.nodeValue = "width:"+this.width+"px;height:"+this.height+"px;padding: 0px;position:absolute;left: 50%;margin-left: -"+(this.width/2)+"px;margin-top: -"+(this.height/2)+"px;"; + + if( typeof( newDiv.style.cssText ) == "string" ) + newDiv.style.cssText = newDivStyle.nodeValue; + else + newDiv.setAttributeNode(newDivStyle); + + $('centerbox2').appendChild(newDiv); + jQuery("#messagebox2").draggable(); + } else { + $('messagebox2').style.width=this.width+"px"; + } + }, + + removeMessagebox: function() + { + if ( $('messagebox2') ) + { + $('messagebox2').remove(); + } + }, + + readaptSize: function() + { + if ( $('messagebox2') ) + { + var h = $("messagebox2").getHeight(); + $('messagebox2').style.marginLeft = ($('messagebox2').style.width.replace(/px$/,"")/2)*(-1)+"px"; + $('messagebox2').style.marginTop = (h/2)*(-1)+"px"; + } + }, + + show: function() + { + this.readaptSize(); + $('trlayer2').show(); + $('centerbox2').show(); + }, + + close: function(o) + { + $('centerbox2').hide(); + this.remove(); + $('trlayer2').hide(); + }, + + hide: function(o) + { + $('messagebox2').style.display="none"; + }, + + remove: function() + { + this.removeMessagebox(); + }, + + LoadFromFile: function(src, pb) + { + var url = src; + if(url.indexOf('?sid=') === -1) + { + url = url+'?sid='+SessionId; + } + var t = this; + var opt = + { + method: 'post', + evalScripts: true, + postBody: pb, + sendXML: false, + onComplete: function(trans) { + centerMessageBox(); + $('messagebox2').style.display=""; + } + }; + new Ajax.Updater('messagebox2',url,opt); + }, + + ShowPopup: function() + { + this.show(); + setTimeout(function() { + eQ3.HomeMatic.Event.fire({type:'ContentLoaded'}); + }, 100); + } +}; +/** + * ic_functions.js + **/ + +prefix = []; +switch_dir = 1; +switch_on_off = false; +free_time = 0; +free_perc = 0; +free_temp = 0; +exists_timearr = ""; +exists_percarr = ""; +exists_temparr = ""; +time_textcolor = 0; +perc_textcolor = 0; +temp_textcolor = 0; +_textcolor = 0; +time_tmp = ""; +perc_tmp = ""; +temp_tmp = ""; +exists_bib = [] ; +arChnHasLinks = []; + +getInternalKeySpecialInputId = function(arrId) +{ + var id = ""; + var arrIdLength = arrId.length - 1; + + for (var loop = 0; loop < arrIdLength; loop++) { + id += arrId[loop]; + + if ((loop + 1) < arrIdLength) { + id += "_"; + } + } + return id; +}; + +ActivateFreeTime4InternalKey = function(selectelem, pref) +{ + ActivateFreeTime(selectelem, pref, true); +}; + +ActivateFreeTime = function(selectelem, pref, internalKey) +{ + //alert($('selectelem').id + " pref= " + pref); + var pnr = selectelem.options[selectelem.selectedIndex].value; + var upnr = pnr.split(".")[1]; + var intkey = selectelem.id.split("_")[0].slice(8); + + if (isNaN(upnr) == true) { + var arrSpecialInputId = selectelem.id.split("_"); + var special_input_id = arrSpecialInputId[0]; + + if (internalKey) { + special_input_id = getInternalKeySpecialInputId(arrSpecialInputId); + } + + var selectedvalue = document.getElementById("separate_" + special_input_id + "_" + pnr + "_" + pref).value; //4 + var parameter = document.getElementById("separate_" + special_input_id + "_" + pnr + "_" + pref).name; //5 + var sec = document.getElementById("vis_sec_" + pnr + "_" + pref + "_" + special_input_id); + var min = document.getElementById("vis_min_" + pnr + "_" + pref + "_" + special_input_id); + var hour = document.getElementById("vis_hour_" + pnr + "_" + pref + "_" + special_input_id); + var x_max = selectelem.length + 1; + //6 + if (pnr > x_max) {x_max = parseInt(pnr) + 1;} + var y_max = 15; + + //7 + if (exists_timearr != "ok" || time_tmp != x_max) + { + //8 + time2d = []; + for (var i = 0; i < x_max; ++i) + time2d[i] = []; + exists_timearr = "ok"; + time_tmp = x_max; //9 + } + + time2d[pnr][pref] = 0; + prefix[parameter + special_input_id] = pnr + "_" + pref + "_" + special_input_id; + + if (selectedvalue == "99999999") + { + if (intkey == "" && !internalKey) { + document.getElementById("NewProfileTemplate_receiver").style.visibility = "hidden"; + document.getElementById(special_input_id + "_profiles").options[selectelem.selectedIndex].style.color = "gray"; + if (CheckGroup()) document.getElementById("NewProfileTemplate_receivergroup").style.visibility = "hidden"; + } + time2d[pnr][pref] = 1; //10 + hour.style.display = "inline"; + min.style.display = "inline"; + sec.style.display = "inline"; + } + else + { + if (free_time != 1 && free_perc != 1 && free_temp != 1) { + if (intkey == "" && !internalKey) { + document.getElementById("NewProfileTemplate_receiver").style.visibility = "visible"; + if (CheckGroup()) document.getElementById("NewProfileTemplate_receivergroup").style.visibility = "visible"; + } + } else document.getElementById(special_input_id + "_profiles").options[selectelem.selectedIndex].style.color = TextColor(_textcolor); + + time2d[pnr][pref] = 0; //11 + + hour.style.display = "none"; + min.style.display = "none"; + sec.style.display = "none"; + } + free_time = 0; //12 + for (var loopx = 0; loopx < x_max; loopx++){ + for (var loopy = 0; loopy < y_max; loopy++){ + if (time2d[loopx][loopy] == 1) {free_time = 1; break;} + } + } + + for (loopy = 0; loopy <= y_max; loopy++) { + if (time2d[pnr][loopy] == 1) {time_textcolor = 1; break;} + else time_textcolor = 0; + } + + if (time_textcolor == 0 && perc_textcolor == 0 && temp_textcolor == 0) _textcolor = 0; + else _textcolor = 1; + document.getElementById(special_input_id + "_profiles").options[selectelem.selectedIndex].style.color = TextColor(_textcolor); + + if (free_time == 0 && free_perc == 0 && free_temp == 0) { + if (intkey == "" && !internalKey) { + document.getElementById("NewProfileTemplate_receiver").style.visibility = "visible"; + if (CheckGroup()) document.getElementById("NewProfileTemplate_receivergroup").style.visibility = "visible"; + } + } + } +}; + +// Ausgelagert nach www_source/ise/js/function.js +// Kann hier entfernt werden. +_encodeString = function(elem) +{ + //wird nur für die Übersetzung der Parameter des HM-PB-4Dis-WM genutzt, + //da dort einige Zeichen an anderer Stelle liegen. + + var inString = $F("_" + elem); + var outString = inString.replace(/Ä/g, "["); + outString = outString.replace(/Ö/g, "#"); + outString = outString.replace(/Ü/g, "$"); + outString = outString.replace(/ä/g, "{"); + outString = outString.replace(/ö/g, "|"); + outString = outString.replace(/ü/g, "}"); + outString = outString.replace(/ß/g, "~"); + outString = outString.replace(/&/g, "]"); + outString = outString.replace(/=/g, "'"); + + $(elem).value = outString; +}; + + + +ActivateFreeValue = function(selectelem, pref, internalKey) +{ + var pnr = selectelem.options[selectelem.selectedIndex].value; //1 + var upnr = pnr.split(".")[1]; + var intkey = selectelem.id.split("_")[0].slice(8); + var val2d, val_tmp, exists_valarr, free_val; + + + //2 + if (isNaN(upnr) == true) { + // var special_input_id = selectelem.id.split("_")[0]; //3 + var arrSpecialInputId = selectelem.id.split("_"); + var special_input_id = arrSpecialInputId[0]; + + if (internalKey) { + special_input_id = getInternalKeySpecialInputId(arrSpecialInputId); + } + + var selectedvalue = document.getElementById("separate_" + special_input_id + "_" + pnr + "_" + pref).value; //4 + var parameter = document.getElementById("separate_" + special_input_id + "_" + pnr + "_" + pref).name; //5 + var val = document.getElementById("vis_val_" + pnr + "_" + pref + "_" + special_input_id); + var x_max = selectelem.length + 1; + //6 + if (pnr > x_max) {x_max = parseInt(pnr) + 1;} + var y_max = 15; + + //7 + if (exists_valarr != "ok" || val_tmp != x_max) + { + //8 + val2d = []; + for (i = 0; i < x_max; ++i) + val2d[i] = []; + exists_valarr = "ok"; + val_tmp = x_max; //9 + } + val2d[pnr][pref] = 0; + + prefix[parameter + special_input_id] = pnr + "_" + pref + "_" + special_input_id; + + if (selectedvalue == "99999990" ) + { + if (intkey == "" && !internalKey) { + document.getElementById("NewProfileTemplate_receiver").style.visibility = "hidden"; + document.getElementById(special_input_id + "_profiles").options[selectelem.selectedIndex].style.color = "gray"; + if (CheckGroup()) document.getElementById("NewProfileTemplate_receivergroup").style.visibility = "hidden"; + } + val2d[pnr][pref] = 1; //10 + val.style.display = "inline"; + + } else { + if (free_time != 1 && free_val != 1 && free_temp != 1) { + if (intkey == "" && !internalKey) { + document.getElementById("NewProfileTemplate_receiver").style.visibility = "visible"; + if (CheckGroup()) document.getElementById("NewProfileTemplate_receivergroup").style.visibility = "visible"; + } + } else document.getElementById(special_input_id + "_profiles").options[selectelem.selectedIndex].style.color = TextColor(_textcolor); + + val2d[pnr][pref] = 0; //11 + val.style.display = "none"; + } + + free_val = 0; //12 + for (var loopx = 0; loopx < x_max; loopx++){ + for (var loopy = 0; loopy < y_max; loopy++){ + if (val2d[loopx][loopy] == 1) {free_val = 1; break;} + } + } + for (loopy = 0; loopy <= y_max; loopy++) { + if (val2d[pnr][loopy] == 1) {perc_textcolor = 1; break;} + else perc_textcolor = 0; + } + + if (time_textcolor == 0 && perc_textcolor == 0 && temp_textcolor == 0) _textcolor = 0; + else _textcolor = 1; + document.getElementById(special_input_id + "_profiles").options[selectelem.selectedIndex].style.color = TextColor(_textcolor); + + if (free_time == 0 && free_val == 0 && free_temp == 0) { + if (intkey == "" && !internalKey) { + document.getElementById("NewProfileTemplate_receiver").style.visibility = "visible"; + if (CheckGroup()) document.getElementById("NewProfileTemplate_receivergroup").style.visibility = "visible"; + } + } + } +}; + + + + + + + + + + + + + + + + + + + + + + +ActivateFreePercent4InternalKey = function(selectelem, pref) +{ + ActivateFreePercent(selectelem, pref, true); +}; + +ActivateFreePercent = function(selectelem, pref, internalKey) +{ + var pnr = selectelem.options[selectelem.selectedIndex].value; //1 + var upnr = pnr.split(".")[1]; + var intkey = selectelem.id.split("_")[0].slice(8); + + //2 + if (isNaN(upnr) == true) { + // var special_input_id = selectelem.id.split("_")[0]; //3 + var arrSpecialInputId = selectelem.id.split("_"); + var special_input_id = arrSpecialInputId[0]; + + if (internalKey) { + special_input_id = getInternalKeySpecialInputId(arrSpecialInputId); + } + + var selectedvalue = document.getElementById("separate_" + special_input_id + "_" + pnr + "_" + pref).value; //4 + var parameter = document.getElementById("separate_" + special_input_id + "_" + pnr + "_" + pref).name; //5 + var percent = document.getElementById("vis_percent_" + pnr + "_" + pref + "_" + special_input_id); + var x_max = selectelem.length + 1; + //6 + if (pnr > x_max) {x_max = parseInt(pnr) + 1;} + var y_max = 15; + + //7 + if (exists_percarr != "ok" || perc_tmp != x_max) + { + //8 + perc2d = []; + for (i = 0; i < x_max; ++i) + perc2d[i] = []; + exists_percarr = "ok"; + perc_tmp = x_max; //9 + } + perc2d[pnr][pref] = 0; + + prefix[parameter + special_input_id] = pnr + "_" + pref + "_" + special_input_id; + + if (selectedvalue == "99999998" ) + { + if (intkey == "" && !internalKey) { + document.getElementById("NewProfileTemplate_receiver").style.visibility = "hidden"; + document.getElementById(special_input_id + "_profiles").options[selectelem.selectedIndex].style.color = "gray"; + if (CheckGroup()) document.getElementById("NewProfileTemplate_receivergroup").style.visibility = "hidden"; + } + perc2d[pnr][pref] = 1; //10 + percent.style.display = "inline"; + + } else { + if (free_time != 1 && free_perc != 1 && free_temp != 1) { + if (intkey == "" && !internalKey) { + document.getElementById("NewProfileTemplate_receiver").style.visibility = "visible"; + if (CheckGroup()) document.getElementById("NewProfileTemplate_receivergroup").style.visibility = "visible"; + } + } else document.getElementById(special_input_id + "_profiles").options[selectelem.selectedIndex].style.color = TextColor(_textcolor); + + perc2d[pnr][pref] = 0; //11 + percent.style.display = "none"; + } + + free_perc = 0; //12 + for (var loopx = 0; loopx < x_max; loopx++){ + for (var loopy = 0; loopy < y_max; loopy++){ + if (perc2d[loopx][loopy] == 1) {free_perc = 1; break;} + } + } + for (loopy = 0; loopy <= y_max; loopy++) { + if (perc2d[pnr][loopy] == 1) {perc_textcolor = 1; break;} + else perc_textcolor = 0; + } + + if (time_textcolor == 0 && perc_textcolor == 0 && temp_textcolor == 0) _textcolor = 0; + else _textcolor = 1; + document.getElementById(special_input_id + "_profiles").options[selectelem.selectedIndex].style.color = TextColor(_textcolor); + + if (free_time == 0 && free_perc == 0 && free_temp == 0) { + if (intkey == "" && !internalKey) { + document.getElementById("NewProfileTemplate_receiver").style.visibility = "visible"; + if (CheckGroup()) document.getElementById("NewProfileTemplate_receivergroup").style.visibility = "visible"; + } + } + } +}; + + + +ActivateFreeTemp = function(selectelem, pref) +{ + var pnr = selectelem.options[selectelem.selectedIndex].value; //1 + var upnr = pnr.split(".")[1]; + var intkey = selectelem.id.split("_")[0].slice(8); + + //2 + if (isNaN(upnr) == true) { + var special_input_id = selectelem.id.split("_")[0]; //3 + var selectedvalue = document.getElementById("separate_" + special_input_id + "_" + pnr + "_" + pref).value; //4 + var parameter = document.getElementById("separate_" + special_input_id + "_" + pnr + "_" + pref).name; //5 + var temperatur = document.getElementById("vis_temp_" + pnr + "_" + pref + "_" + special_input_id); + var x_max = selectelem.length + 1; + //6 + if (pnr > x_max) {x_max = parseInt(pnr) + 1;} + var y_max = 15; + //7 + if (exists_temparr != "ok" || temp_tmp != x_max) + { + //8 + temp2d = []; + for (var i = 0; i < x_max; ++i) + temp2d[i] = []; + exists_temparr = "ok"; + temp_tmp = x_max; //9 + } + temp2d[pnr][pref] = 0; + + prefix[parameter + special_input_id] = pnr + "_" + pref + "_" + special_input_id; + + if (selectedvalue == "99999997" ) + { + if (intkey == "") { + document.getElementById("NewProfileTemplate_receiver").style.visibility = "hidden"; + document.getElementById(special_input_id + "_profiles").options[selectelem.selectedIndex].style.color = "gray"; + if (CheckGroup()) document.getElementById("NewProfileTemplate_receivergroup").style.visibility = "hidden"; + } + temp2d[pnr][pref] = 1; //10 + temperatur.style.display = "inline"; + + } else { + if (free_time != 1 && free_perc != 1 && free_temp != 1) { + if (intkey == "") { + document.getElementById("NewProfileTemplate_receiver").style.visibility = "visible"; + if (CheckGroup()) document.getElementById("NewProfileTemplate_receivergroup").style.visibility = "visible"; + } + } else document.getElementById(special_input_id + "_profiles").options[selectelem.selectedIndex].style.color = TextColor(_textcolor); + + temp2d[pnr][pref] = 0; //11 + temperatur.style.display = "none"; + } + + free_temp = 0; //12 + for (var loopx = 0; loopx < x_max; loopx++){ + for (var loopy = 0; loopy < y_max; loopy++){ + if (temp2d[loopx][loopy] == 1) {free_temp = 1; break;} + } + } + + for (loopy = 0; loopy <= y_max; loopy++) { + if (temp2d[pnr][loopy] == 1) {temp_textcolor = 1; break;} + else temp_textcolor = 0; + } + + if ((time_textcolor == 0) && (perc_textcolor == 0) && (temp_textcolor == 0)) { _textcolor = 0; } + else _textcolor = 1; + document.getElementById(special_input_id + "_profiles").options[selectelem.selectedIndex].style.color = TextColor(_textcolor); + + if ((free_time == 0) && (free_perc == 0) && (free_temp == 0)) + { + if (intkey == "") { + document.getElementById("NewProfileTemplate_receiver").style.visibility = "visible"; + if (CheckGroup()) document.getElementById("NewProfileTemplate_receivergroup").style.visibility = "visible"; + } + } + } +}; + +BLIND_fetchType = function(id) { + var arrID = id.split("_"); + var type = ""; + + for (var loop = 1; loop < arrID.length; loop++) { + type += arrID[loop]; + + if ((loop + 1) < arrID.length) { + type += "_"; + } + } + return type; +}; + +BLIND_setPosition = function(id) +{ + var type = BLIND_fetchType(id); + var index = $(id).selectedIndex; + var v_up = "visible"; + var v_down = "hidden"; + var d_up = ""; + var d_down = "none"; + + if (index == 1) {v_up = "hidden"; v_down = "visible"; d_up = "none"; d_down = "";} + else if (index == 2) {v_up = "visible"; v_down = "visible"; d_up = ""; d_down = "";} + + + $("upLevel_" + type).style.visibility = v_up; + $("downLevel_" + type).style.visibility = v_down; + $("upTime_" + type).style.visibility = v_up; + $("downTime_" + type).style.visibility = v_down; + $("upDelayTime_" + type).style.visibility = v_up; + $("downDelayTime_" + type).style.visibility = v_down; + + $("upLevel_" + type).style.display = d_up; + $("downLevel_" + type).style.display = d_down; + $("upTime_" + type).style.display = d_up; + $("downTime_" + type).style.display = d_down; + $("upDelayTime_" + type).style.display = d_up; + $("downDelayTime_" + type).style.display = d_down; + +}; + +jalousieShowSlatInputElem = function(id, chn) { + var selValue = jQuery("#"+id).val(), + jalousieSlatPosOffElm = jQuery("#jalousieSlatPosOff_" + chn), + jalousieSlatPosOnElm = jQuery("#jalousieSlatPosOn_" + chn); + + switch (selValue) { + case "1": + jalousieSlatPosOffElm.hide(); + jalousieSlatPosOnElm.show(); + break; + case "2": + jalousieSlatPosOnElm.hide(); + jalousieSlatPosOffElm.show(); + break; + case "3": + jalousieSlatPosOnElm.show(); + jalousieSlatPosOffElm.show(); + break; + } +}; + +Disable_SimKey = function(ch, prn, specialInputId) +{ + var arrSpecialInputId = specialInputId.split("_"), + pref_dirty = false, + i = 1, + jBtnSim = $("SimKey_" + arrSpecialInputId[1] + "_" + arrSpecialInputId[2] + "_" + prn), + jBtnLongSim = $("SimLongKey_" + arrSpecialInputId[1] + "_" + arrSpecialInputId[2] + "_" + prn), + jHintSim = $("SimKeyHint_" + arrSpecialInputId[1] + "_" + arrSpecialInputId[2] + "_" + prn); + + if (jBtnSim) { + + while ($('separate_' + specialInputId + '_' + prn + '_' + i)) + { + if (IsDirty($('separate_' + specialInputId + '_' + prn + '_' + i))) + { + pref_dirty = true; + } + i++; + } + + if ( (pref_dirty == true ) || ( IsDirty($(specialInputId + '_profiles')) ) ) + { + jBtnSim.disabled = true; + if (jBtnLongSim) jBtnLongSim.disabled = true; + //jBtnSim.value = "Simulation nicht möglich!"; + jBtnSim.value = translateKey("simulateKeyPressBtnTxtNotPossible"); + if (jBtnLongSim) jBtnLongSim.value = translateKey("simulateKeyPressBtnTxtNotPossible"); + jHintSim.style.display = "inline"; + } + else + { + jBtnSim.disabled = false; + if (jBtnLongSim) jBtnLongSim.disabled = false; + //jBtnSim.value = "Simuliere Tastendruck"; + jBtnSim.value = translateKey("btnSimKeyPress"); + if (jBtnLongSim) jBtnLongSim.value = translateKey("btnSimLongKeyPress"); + jHintSim.style.display = "none"; + } + } +}; + + +MD_catchBrightness = function(url, sender_address, receiver_address, brightness, convertValue, paramType, set_value, id, commando, parameter) +{ + // knownBrightness is used to prevent unnecessary calls for the converting of the current brightness while building the page. + // Each profile of the easymode needs the brightness, so we store the value for 500 ms in the var knownBrightness + if (typeof knownBrightness == "undefined") { + var curBrightness = homematic("Interface.getValue", {"interface": "HmIP-RF", "address": sender_address, "valueKey": paramType}); + brightness = (curBrightness) ? parseFloat(curBrightness).toFixed(2) : parseFloat(brightness).toFixed(2); + + conInfo("sender_address: " + sender_address +" - paramType: " + paramType + " - current brightness via getValue: " + curBrightness + " - calculated brightness: " + brightness); + + arID = id.split("_"); + jQuery("#brightDescr_"+arID[2]).css("display", "inline"); + jQuery("#okButton_"+arID[2]).css("display", "inline"); + + if (! commando.includes("help_active_")) { + //jQuery("#usrDefBrightness_" + arID[2]).val(brightness); + jQuery("#usrDefBrightness_" + arID[2]+ "_" + arID[3]).val(brightness); + } + + if (convertValue == 1) { + var oSender = DeviceList.getDeviceByAddress(sender_address.split(":")[0]), + devDescr = homematic("Interface.getDeviceDescription", { + "interface": oSender.interfaceName, + "address": oSender.address + }); + + if ((oSender.typeName.indexOf("HmIPW-") != -1) || ((oSender.typeName.indexOf("HmIP-") != -1) && (devDescr.firmware.split(".")[0] >= 2))) { + brightness = MD_convertIlluminationToDecisionValue_V2(brightness); + } else { + // Old calculation method + brightness = MD_convertIlluminationToDecisionValue(brightness, oSender.typeName, devDescr.firmware); + } + } + knownBrightness = brightness; + window.setTimeout(function() {delete knownBrightness;}, 500); + } else { + brightness = knownBrightness; + } + + if (brightness < 0) {brightness = 0.0;} + + ResetPostString(); + poststr += "&url=" +url; + poststr += "&sender_address=" +sender_address; + poststr += "&receiver_address=" +receiver_address; + poststr += "&set_value=" +set_value; + poststr += "&id=" +id; + poststr += "&commando=" +commando; + poststr += "¶meter=" +parameter; + poststr += "&active_bright=" + $F(id); + poststr += "&brightness=" + brightness; + SendRequest('ic_md.cgi'); +}; + +MD_channel_help = function() +{ + var contentElm = jQuery("#content"), + helpContentElm = jQuery("#md_ch_help"), + helpBtnElm = jQuery("#md_help_button"); + + if (helpBtnElm.val() == translateKey("genericBtnTxtHelp")) + { + helpContentElm.css("display","inline"); + helpBtnElm.val(translateKey("genericBtnTxtHelpOff")); + contentElm.animate({scrollTop: contentElm.height()},1000); + } else { + contentElm.animate({scrollTop: parseInt(0)},1000, function() { + helpContentElm.fadeOut(800); + helpBtnElm.val(translateKey("genericBtnTxtHelp")); + }); + + } +}; + +MD_checkMaxValue = function(id_on_time, channel, id_on_time_mode) +{ + // mode 0 = absolut, mode 1 = minimal + var prn = id_on_time.split("_")[2]; + var pref = id_on_time.split("_")[3]; + var val = $F(id_on_time); + + // mode 0 = absolut, mode 1 = minimal + var mode = $F(id_on_time_mode); + + if (mode == 0) $('hint_'+ prn + '_' + pref).firstChild.data = " "; + + + if ((val > 120 || mode == 1 ) && channel == 1 ) + { + if (val > 120) { + $(id_on_time).options[$(id_on_time).length -1].style.color = WebUI.getColor('red'); + $(id_on_time).options[$(id_on_time).length -1].style.textDecoration = 'blink'; + $(id_on_time).options[$(id_on_time).length -1].style.fontStyle = 'italic'; + } + + switch (mode) { + + case("0"): $('hint_'+ prn + '_' + pref).style.color = WebUI.getColor('red'); + $('hint_'+ prn + '_' + pref).firstChild.data = unescape(localized[0]['hint_ontime_0']); + break; + + case("1"): $('hint_'+ prn + '_' + pref).style.color = WebUI.getColor('red'); + $('hint_'+ prn + '_' + pref).firstChild.data = unescape(localized[0]['hint_ontime_0']); + $('hint_'+ prn + '_' + pref).firstChild.data += unescape(localized[0]['hint_ontime_1']); + break; + } + } +}; + + + +MD_checkPNAME = function(id, param, id_on_time) +{ + if ($(id).selectedIndex == 0) {$(param).firstChild.data = unescape(localized[0]['md_on_time']);} + else {$(param).firstChild.data = unescape(localized[0]['md_min_on_time']);} + + var prn = id.split("_")[2]; + var pref = id.split("_")[3]; + var md_min_interval = "md_min_interval_" + prn + "_" + pref; + + var min_interval = $F(md_min_interval).split(",")[0]; // enthaelt den Wert des Kanalparameters 'Mindestsendeabstand'. Moegl. Werte 0, 1, 2, 3, 4 + $(md_min_interval).value = min_interval + "," + $(id).selectedIndex; + + + var min_value = [15, 30, 60, 120, 240]; + var h = "hour_" + id_on_time.split("_")[2] + "_" + id_on_time.split("_")[3] + "_" + id_on_time.split("_")[1]; + var m = h.replace('hour_', 'min_'); + var s = h.replace('hour_', 'sec_'); + + var t = (parseFloat($F(h)) * 3600) + (parseFloat($F(m)) * 60) + parseFloat($F(s)); + + if (t < min_value[min_interval] && $(id).selectedIndex !== 0 ) + { + $(s).value = min_value[min_interval]; + MD_set_h_m_s(h, m, s); + } + + + if ($F(id_on_time) < min_value[min_interval] && $(id).selectedIndex == 0) + { + jQuery('#'+id_on_time + '_hint0:first-child').html(unescape(localized[0]['hint0a']) + min_value[min_interval] + unescape(localized[0]['hint0b'])); + jQuery('#'+id_on_time + '_hint1:first-child').html(unescape(localized[0]['hint1a']) + min_value[min_interval] + unescape(localized[0]['hint1b'])); + } else { + $(id_on_time + '_hint0').firstChild.data = " "; + $(id_on_time + '_hint1').firstChild.data = " "; + } +}; + +MD_init = function(id, min, max) +{ + var input = document.getElementById(id); + var ausdr_int = /\d+/; + if (ausdr_int.test(input.value)) {var wert_int = ausdr_int.exec(input.value); wert_int = wert_int[0];} + var wert = min; + var channel = id.split("_")[2]; + var txtIndex = (parseInt(id.split("_")[3]) + 1); + + if (! wert_int) {wert = min;} //1 + if (! isNaN(wert_int)) {wert = wert_int;} + + if (wert < min) {wert = min;} + if (wert > max) {wert = max;} + + input.value = wert; + + if (input.name == "EVENT_FILTER_NUMBER") + { + var efn = document.getElementsByClassName('event_filter_number_' + channel); + if (wert == 1) + { + //input.options[0].text = "jedem"; + input.options[0].text = translateKey("motionDetectorEventFilterNumberA"); + //efn[0].firstChild.data = " Sensor-Impuls"; + efn[0].firstChild.data = translateKey("motionDetectorEventFilterNumberB"); + efn[1].firstChild.data = " "; + + $('separate_CHANNEL_' + channel + '_' + txtIndex).style.display = "none"; + } else + { + input.options[0].text = "1"; + //efn[0].firstChild.data = " Sensor-Impulsen innerhalb "; + efn[0].firstChild.data = translateKey("motionDetectorEventFilterNumberC"); + //efn[1].firstChild.data = " Sekunden"; + efn[1].firstChild.data = translateKey("motionDetectorEventFilterNumberD"); + $('separate_CHANNEL_' + channel + '_'+ txtIndex).style.display = "inline"; + } + } + + if (input.name == "BRIGHTNESS_FILTER") + { + // var brightness = document.getElementsByClassName('brightness')[0]; + var brightness = document.getElementsByClassName('brightness_' + channel)[0]; + //if (wert == 0) brightness.firstChild.data = "der zuletzt ermittelte Wert"; + if (wert == 0) brightness.firstChild.data = translateKey("motionDetectorMinumumOfLastValuesB0"); + //else brightness.firstChild.data = "das Minimum der letzten " + (parseInt(input.value) + 1) + " Werte"; + else brightness.firstChild.data = translateKey("motionDetectorMinumumOfLastValuesB1") + (parseInt(input.value) + 1) + translateKey("motionDetectorMinumumOfLastValuesC"); + } +}; + +MD_getHelp = function(min, max, brightness, activeBright, ready, isHmIP) +{ + // liest die Hilfedatei für den MotionSensor ein +// var language = $F('language') ; + var language = getLang(), + font_bold = "\"font-style:normal; font-weight:bold\"", + font_underline = "\"font-style:normal; text-decoration:underline\"", + active = localized[0]['active_' + ready], + fileName0 = (isHmIP) ? 'MOTION_DETECTOR_HMIP_0.txt' : 'MOTION_DETECTOR_0.txt', + fileName1 = (isHmIP) ? 'MOTION_DETECTOR_HMIP_1.txt' : 'MOTION_DETECTOR_1.txt'; + + //Je nachdem, ob die aktuelle Helligkeit zur Verfügung steht, oder nicht, werden verschiedene Hilfstexte generiert. + if (brightness != -1) { + var path = '/config/easymodes/etc/localization/' + language + '/' + fileName1; + } else { + var path = '/config/easymodes/etc/localization/' + language + '/' + fileName0; + } + + // die entsprechende Uebersetzungstabellen der Easymodes einlesen + new Ajax.Request(path , + { + method: 'get', + asynchronous: false, + onSuccess: function(success) { + help_txt = eval(success.responseText); + }, + + onFailure: function(failure) { + Ajax_failure(path, failure.statusText); + } + }); + return help_txt; +}; + +MD_link_help = function() +{ + // Hilfetext für die Art der Verweildauer des Motion-Detectors + var help_txt = MD_getHelp(); + + MessageBox.show(help_txt[0]['title_kind_of'], help_txt[0]['help_kind_of'] ,"" ,450 , 260); +}; + +MD_catchBright_help = function(min, max, brightness, activeBright, ready, condition, sensorAddress) { + var isHmIP = (sensorAddress.split(":")[0].length > 10) ? true : false; + //Hilfetext für die Helligkeitsschwelle des Motion-Detectors + var help_txt = MD_getHelp(min, max, brightness, activeBright, ready, isHmIP); + + if (condition == "LT_LO") { + MessageBox.show(help_txt[0]['title_brightness'], help_txt[0]['help_brightness_active_LT_LO'], "", 475, (isHmIP) ? 350 : 185); + } else { + MessageBox.show(help_txt[0]['title_brightness'], help_txt[0]['help_brightness_active_GE_LO'], "", 475, (isHmIP) ? 350 : 185); + } +}; + +MD_minInterval = function(id) +{ + var modus = $(id).selectedIndex; // 0 = klassisch, 1 = dynamisch + var min_interval_txt = $('min_interval'); + + var arId = id.split("_"); + var min_interval = $(arId[0] + "_" + arId[1] + "_" + arId[2] + "_" + (parseInt(arId[3]) + 1)); + + //var txt = "Mindestsendeabstand"; + var txt = translateKey("motionDetectorMinimumOnAirInterval"); + + if (modus == 0) + { + //txt = "Sendeabstand"; + txt = translateKey("motionDetectorOnAirInterval"); + var newEntry = new Option("240s", "4", false, true); + min_interval.options[min_interval.length] = newEntry ; + + min_interval.disabled = true; + } else + { + //txt = "Mindestsendeabstand"; + txt = translateKey("motionDetectorMinimumOnAirInterval"); + // Mehr als 5 Eintraege vorhanden? + // min_interval.options[0].selected = true; + if (min_interval.length == 6) + { + min_interval.options[min_interval.length -1] = null; + min_interval.options[min_interval.length -1] = null; + } + + if (min_interval.length == 5) + { + min_interval.options[min_interval.length -1] = null; + } + + min_interval.disabled = false; + } + + // folgende Zeile bewirkt einen Wechsel des Textes PROFILE_PNAME(C) + min_interval_txt.firstChild.data = txt; +}; + +MD_proofClassic = function(id) +{ + // die hardcodierten id's muessen noch dynamisiert werden + var arId = id.split("_"); + + var min_interval = $(arId[0] + "_" + arId[1] + "_" + arId[2] + "_" + (parseInt(arId[3]) + 1)); + + if (min_interval.value == min_interval.length - 1) + { + $(id).options[0].selected = true; + + } else + { + $(id).options[1].selected = true; + } + + MD_minInterval(id); +}; + +MD_set_h_m_s = function(id_h, id_m, id_s) +{ + var h, m, s; + switch ($F(id_s)) { + + case "15": + h = '00'; m = '00'; s = '15'; + break; + case "30": + h = '00'; m = '00'; s = '30'; + break; + case "60": + h = '00'; m = '01'; s = '00'; + break; + case "120": + h = '00'; m = '02'; s = '00'; + break; + case "240": + h = '00'; m = '05'; s = '00'; //klassich minimum 5 Minuten (4 Min + Toleranz) + break; + } + + $(id_h).value = h; + $(id_m).value = m; + $(id_s).value = s; +}; + +MD_setMode = function(id_on_time_mode, channel, id_on_time) +{ + MD_checkMaxValue(id_on_time, channel, (id_on_time_mode)); +}; + +// Converts the value of the parameter ILLUMINATION of e. g. a HmIP-MotionDetector (very high values possible) +// to a valid decision value (0 - 255) for the use of direct links (CONDITION_LO/HI) +MD_convertIlluminationToDecisionValue = function(value, typeTransmitter, devFwVersion) { + conInfo("Here we work with the brightness value calculated with the old method"); + var result = 0, + linearLimit = 80, + resultDivider = 20, + msb = "0x80000", + exp = 19, + val = parseInt(value); + + var arFw = devFwVersion.split("."), + fwMajor = parseInt(arFw[0]), + fwMinor = parseInt(arFw[1]), + fwPatch = parseInt(arFw[2]); + + var idHmIP = "HmIP-"; + + // TWIST-1746 + if ( + typeTransmitter == idHmIP + "SPI" + || typeTransmitter == idHmIP + "SMI55" + || ((typeTransmitter == idHmIP + "SMI") && (((fwMajor == 1) && (fwMinor >= 5)) || ((fwMajor == 1) && (fwMinor == 4) && (fwPatch >= 10)))) + || ((typeTransmitter == idHmIP + "SMO") && (((fwMajor == 1) && (fwMinor >= 3)) || ((fwMajor == 1) && (fwMinor == 2) && (fwPatch >= 10)))) + ) { + linearLimit = 75; + resultDivider = 21; + msb = "0x800000"; + exp = 23; + conInfo("Calculation lux -> condition value for SPI / SMI55 / SMI fw >= 1.4.10 / SMO fw >= 1.2.10"); + } else { + conInfo("Calculation lux -> condition value for SMI fw < 1.4.10 / SMO fw < 1.2.10"); + } + + val *= 10; + + if (val < linearLimit) {return val;} // Linear-Grenze + + while ((val & msb) == 0) { + msb >>= 1; + exp--; + } + + var result = (((val^msb) << 8) / msb) | (exp << 8); + result /= resultDivider; + + if (result > 255) { + result = 255; + } + + return parseInt(result); +}; + +// SPHM-301 +MD_convertIlluminationToDecisionValue_V2 = function(value) { + conInfo("Here we work with the brightness value calculated with the new method"); + var brightness = (isNaN(value)) ? 0 : parseInt(Math.abs(value) * 100), + convBrightness, + offset_x, + value_a0, + value_a1, + valueValid = true; + + switch (true) { + case (brightness <= Math.pow(10,1)): + offset_x = 0; + value_a0 = 0; + value_a1 = 1; + break; + case (brightness <= Math.pow(10,2)): + offset_x = 10; + value_a0 = 10; + value_a1 = 0.2; + break; + case (brightness <= Math.pow(10,3)): + offset_x = 100; + value_a0 = 28; + value_a1 = 0.05; + break; + case (brightness <= Math.pow(10,4)): + offset_x = 1000; + value_a0 = 73; + value_a1 = 0.005; + break; + case (brightness <= Math.pow(10,5)): + offset_x = 10000; + value_a0 = 118; + value_a1 = 0.0005; + break; + case (brightness <= Math.pow(10,6)): + offset_x = 100000; + value_a0 = 163; + value_a1 = 0.00005; + break; + case (brightness <= Math.pow(10,7)): + offset_x = 1000000; + value_a0 = 208; + value_a1 = 0.000005; + break; + default: valueValid = false; + + } + if (valueValid) { + convBrightness = brightness - offset_x; + convBrightness = convBrightness * value_a1; + convBrightness = convBrightness + value_a0; + convBrightness = convBrightness + 0.5; + return parseInt(convBrightness); + } + return 253; +}; + +SetSensitivityOfMotionDetection = function(sensElmID) { + var sensElm = jQuery("#" + sensElmID ), + sensElmFirstOption = jQuery("#" + sensElmID + " > option:first-child"), + lblSensorImpulsElm = jQuery("#lblSensorImpuls"), + extendedOptions = jQuery("#extendedOptions"); + + if (parseInt(sensElm.val()) > 1) { + sensElmFirstOption.text("1"); + lblSensorImpulsElm.text(translateKey("motionDetectorEventFilterNumberC")); // Sensor-Impulsen innerhalb + extendedOptions.show(); + } else { + sensElmFirstOption.text("jedem"); + lblSensorImpulsElm.text(translateKey("motionDetectorEventFilterNumberB")); // Sensor-Impuls + extendedOptions.hide(); + } +}; + +ProofFreeTime = function(id, min, max) +{ + var input = $(id); + input.value = input.value.replace(/,/g,"."); + //1 + var ausdr_float = /\d+.\d+/; + var ausdr_int = /\d+/; + if (ausdr_float.test(input.value)) {var wert_float = ausdr_float.exec(input.value); wert_float = wert_float[0];} + if (ausdr_int.test(input.value)) {var wert_int = ausdr_int.exec(input.value); wert_int = wert_int[0];} +// if (min == 0) {min = '00'}; + var wert = '00'; + + if (! wert_int) {wert = '00';} //2 + if (! isNaN(wert_int)) {wert = wert_int;} + if (! isNaN(wert_float)) {wert = wert_float;} + + + if (id.indexOf('hour_') != -1) + { + + if (wert < min) {wert = min;} + if ((wert * 3600) > max) + { + input.value = (max / 3600); + + min_id = id.replace('hour_', 'min_'); + input = $(min_id); + input.value = '00'; + + sec_id = id.replace ('hour_', 'sec_'); + input = $(sec_id); + input.value = '00'; + } else {input.value = wert;} + + } + else + { + if (id.indexOf('min_') != -1) + { + if (wert < min) {wert = min;} + hour_id = id.replace('min_', 'hour_'); + hour_input = $(hour_id); + if (hour_input.value >= (max / 3600)) {input.value = '00';} else {input.value = wert;} + } + else + { + if(id.indexOf('sec_') != -1) + { + if (wert < min) {wert = min;} + hour_id = id.replace('sec_', 'hour_'); + hour_input = $(hour_id); + if (hour_input.value >= (max / 3600)) { input.value = '00';} else {input.value = wert;} + } + } + } + + //3 + var prn = id.split("_")[1]; + var pref = 1; + + try + { + x = $F("md_min_interval_" + prn + "_" + pref); + if (x) throw "true"; + else throw "false"; + } + catch (ergebniss) + { + if (ergebniss == "true") + { + var hit = 1; + } else hit = 0; + } + + if ($F('dev_descr_sender_tmp').split("-")[0] == "MOTION_DETECTOR" && hit == 1) + { + var prn = id.split("_")[1]; + var pref = 1; + var md_verweild = "md_verweildauer_" + prn + "_" + pref; + var md_min_interval = "md_min_interval_" + prn + "_" + pref; + + // enthaelt den Wert des Geraeteparameters 'SHORT_ON_TIME_MODE'. Moegl. Werte 0 und 1 + var absolute_minimal = $F(md_min_interval).split(",")[1]; + + try + { + if ($(md_verweild).data) throw true; + else throw false; + } + catch (ergebniss) + { + if (ergebniss == true) md_verweildauer = true; + else md_verweildauer = false; + } + + //if (md_verweildauer == true) {$('md_verweildauer').data = "Verweildauer";} + if (md_verweildauer == true) {$('md_verweildauer').data = translateKey("motionDetectorRetentionTime");} + + if (absolute_minimal == 1) //wenn Modus 'minimal' + { + var profile = $(id).name.split("_"); + //4 + var param_tmp = $('separate_receiver_' + profile[1] + "_" + profile[2]).name.split("|"); + param_tmp = param_tmp[0].split("_"); + var param = param_tmp[1] + "_" + param_tmp[2]; + + if (param == "ON_TIME" || param == "OFF_TIME") + { + var min_interval = $F(md_min_interval).split(",")[0]; // enthaelt den Wert des Kanalparameters 'Mindestsendeabstand'. Moegl. Werte 0, 1, 2, 3, 4 + var min_value = [15, 30, 60, 120, 240]; + var h = "hour_" + id.split("_")[1] + "_" + id.split("_")[2] + "_" + id.split("_")[3]; + var m = h.replace('hour_', 'min_'); + var s = h.replace('hour_', 'sec_'); + var t = (parseFloat($F(h)) * 3600) + (parseFloat($F(m)) * 60) + parseFloat($F(s)); + + if (t < (min_value[min_interval] + 1) && $(id).selectedIndex !== 0 ) + { + $(s).value = min_value[min_interval]; + MD_set_h_m_s(h, m, s); + } + } + //if (md_verweildauer == true) {$('md_verweildauer').data = "Mindestverweildauer";} + if (md_verweildauer == true) {$('md_verweildauer').data = translateKey("motionDetectorMinimumRetentionTime");} + } + } +}; + +ProofFreePercent = function(id, min, max) +{ + var input = document.getElementById(id); + + var ausdr_float = /\d+.\d+/; + var ausdr_int = /\d+/; + if (ausdr_float.test(input.value)) + { + var wert_float = ausdr_float.exec(input.value); + wert_float = wert_float[0]; + } + if (ausdr_int.test(input.value)) + { + var wert_int = ausdr_int.exec(input.value); + wert_int = wert_int[0]; + } + if (min == 0) { min = '00'; } + var wert = '00'; + + if (!(wert_int)) { wert = '00'; } //1 + if (!(isNaN(wert_int))) { wert = wert_int; } + if (!(isNaN(wert_float))) { wert = wert_float; } + + if (wert < (min * 100)) { wert = (min * 100); } + if (wert > (max * 100)) { wert = (max * 100); } + + input.value = wert; +}; + +ProofFreeTemp = function(id, min, max, unit) +{ + var input = document.getElementById(id); + var ausdr_float = /\d+.\d+/; + var ausdr_int = /\d+/; + if (ausdr_float.test(input.value)) + { + var wert_float = ausdr_float.exec(input.value); + wert_float = wert_float[0]; + } + if (ausdr_int.test(input.value)) + { + var wert_int = ausdr_int.exec(input.value); + wert_int = wert_int[0]; + } + var wert = min; + + if (unit) //1 + { + min = ((min * 9) / 5) + 32 ; + max = ((max * 9) / 5) + 32 ; + } + + if (!(wert_int)) {wert = min; } //2 + if (!(isNaN(wert_int))) {wert = wert_int; } + if (!(isNaN(wert_float))) {wert = wert_float; } + + if (wert < min) { wert = min; } + if (wert > max) { wert = max; } + + input.value = wert; +}; + +ProofFreeValue = function(id, min, max) +{ + var input = document.getElementById(id); + var ausdr_float = /\d+.\d+/; + var ausdr_int = /\d+/; + if (ausdr_float.test(input.value)) + { + var wert_float = ausdr_float.exec(input.value); + wert_float = wert_float[0]; + } + if (ausdr_int.test(input.value)) + { + var wert_int = ausdr_int.exec(input.value); + wert_int = wert_int[0]; + } + var wert = min; + + if (!(wert_int)) { wert = min; } //1 + if (!(isNaN(wert_int))) { wert = wert_int; } + if (!(isNaN(wert_float))) { wert = wert_float; } + + + if (wert < min) {wert = min; } + if (wert > max) {wert = max; } + + input.value = wert; +}; + +proofMinMax4Voltage_X = function(param) { + var voltage0 = "VOLTAGE_0", + voltage100= "VOLTAGE_100", + voltage0Elm = jQuery("[name='"+voltage0+"']")[0], + voltage100Elm = jQuery("[name='"+voltage100+"']")[0], + val0 = roundValue05(parseFloat(jQuery(voltage0Elm).val())), + val100 = roundValue05(parseFloat(jQuery(voltage100Elm).val())); + + if (param == voltage0) { + jQuery(voltage0Elm).val((val0 >= val100) ? val100 - 0.5 : val0); + } + if (param == voltage100) { + jQuery(voltage100Elm).val((val100 <= val0) ? val0 +0.5 : val100); + } +}; + +add_HMW_onchange_ = function(ch_type) +{ + switch (ch_type) { + + case "INPUT_OUTPUT": + + var inputType = document.getElementsByName("INPUT_TYPE"); + var behaviour = document.getElementsByName("BEHAVIOUR"); + + for (var loop=0;loop < inputType.length;loop++) + { + var onchange = document.createAttribute("onchange"); + onchange.nodeValue= "alert('A')"; + inputType[loop].setAttributeNode(onchange); + } + + for (loop=0;loop < behaviour.length;loop++) + { + var onchange = document.createAttribute("onchange"); + onchange.nodeValue= "alert('B')"; + behaviour[loop].setAttributeNode(onchange); + } + break; + + case "KEY" : + + var inputType = document.getElementsByName("INPUT_TYPE"); + + for (var loop=0;loop < inputType.length;loop++) + { + var onchange = document.createAttribute("onchange"); + onchange.nodeValue= "alert('C')"; + inputType[loop].setAttributeNode(onchange); + } + break; + + default: + break; + } + +}; + +HMW_setIOType = function(elem) +{ + // Zeigt die einstellbaren Parameter des Kanals entsprechend der gewählten Einstellung an. + // Es wird zwischen Schalter und Taster unterschieden. + + // gewählte Einstellung + var sel = elem.selectedIndex; + + // Schalter (0) oder Taster (1) + var type = elem.options[sel].value; + + var tr = elem.parentNode.parentNode.nextSibling.nextSibling; + + switch (type) { + + case "0": + tr.style.visibility = "hidden"; + tr.style.display = "none"; + break; + + case "1": + tr.style.visibility = "visible"; + tr.style.display = ""; + break; + + default: + break; + } +}; + +HMW_setBehaviour = function(id) +{ + // Zeigt die einstellbaren Parameter des Kanals entsprechend der gewählten Einstellung an. + // Es wird zwischen Ein- und Ausgang unterschieden. + + // wird von tcl erledigt, da bei Ein- u. Ausgang verschiedene Parameter verwendet werden, + // muß die Änderung zuerst an den Aktor gesendet werden. +}; + +HMW_WebUIsetChannel = function(id, ch_type) +{ + id = id.split("=")[1]; + id = id.substring(1, id.length -1); + + var elem = document.getElementById(id); + + switch (ch_type) { + + case "INPUT_OUTPUT": + + switch (elem.name) { + case "INPUT_TYPE": + HMW_setIOType(elem); + $(id).observe('change', function(event) {HMW_setIOType(elem);}); + break; + case "BEHAVIOUR": + $(id).observe('change', function(event) {HMW_setBehaviour(elem);}); + break; + default: + break; + } + + break; + + case "KEY": + + switch (elem.name) { + case "INPUT_TYPE": + HMW_setIOType(elem); + $(id).observe('change', function(event) {HMW_setIOType(elem);}); + break; + default: + break; + } + + break; + } +}; + + +showHintPrgLink = function(channel, prgExists) { + var channel = parseInt(channel), + classMultiMode = jQuery(".j_multiMode_" + channel)[0], + tableElm = jQuery(".ProfileTbl tbody").parent().parent()[channel], + elm = jQuery(".j_multiMode_" + channel). find("[name='CHANNEL_OPERATION_MODE']")[0]; + + jQuery(elm).prop("disabled", true); + + if (typeof classMultiMode == "object") { + if (prgExists) { + jQuery(classMultiMode).after("
" + translateKey("hintPrgExists") + "
"); + } else { + arChnHasLinks[channel] = true; + jQuery(classMultiMode).after("
" + translateKey("hintLinkExists") + "
"); + } + } else { + if (prgExists) { + jQuery(tableElm).append("
" + translateKey("hintPrgExists") + "
"); + } else { + arChnHasLinks[channel] = true; + jQuery(tableElm).append("
" + translateKey("hintLinkExists") + "
"); + } + } +}; + +showHintInternalLink = function(channel) { + var channel = parseInt(channel), + classMultiMode = jQuery(".j_multiMode_" + channel)[0], + txtHint = "
" + translateKey("hintInternalLinkExists") + "
"; + + if (typeof classMultiMode == "object") { + jQuery(classMultiMode).after(txtHint); + } else { + var tableElm = jQuery(".ProfileTbl tbody").parent().parent()[channel]; + jQuery(tableElm).append(txtHint); + } +}; + +ShowHintIfProgramExists = function(id, ch) { + homematic("Channel.hasProgramIds", {id: id}, function(result, error) { + if (result) { + showHintPrgLink(ch, true); + } else { + if(arChnHasLinks[parseInt(ch)] != true) { + var elm = jQuery(".j_multiMode_" + ch). find("[name='CHANNEL_OPERATION_MODE']")[0]; + jQuery(elm).prop("disabled", false); + } + } + }); +}; + +RF_existsLink = function(deviceType, ch, ch_type, internalLinkOnly) { + var arDevMultiModeException = []; + + // The ch_type of a HM-MOD-EM-8 is KEY which is very generic. Therefore, for this device we have to check the device type. + switch(deviceType) { + case "HM-MOD-EM-8": + showHintPrgLink(ch, false); + break; + default: + break; + } + + switch(ch_type) { + case "MULTI_MODE_INPUT_TRANSMITTER": + arDevMultiModeException = ["HmIP-FSI16", "HmIP-DRDI3", "HmIP-BDT-I"]; + if ((arDevMultiModeException.indexOf(deviceType) == -1) || (internalLinkOnly == 0)) { + showHintPrgLink(ch, false); + } else { + showHintInternalLink(ch); + } + break; + default: + break; + } +}; + +HMW_existsLink = function(channel, ch_type) +{ + //var hint = document.createTextNode("Es besteht mindestens eine Verknüpfung. Daher sind einige Funktionen gesperrt."); + var hint = document.createTextNode(translateKey("hintLinkExists")); + var new_tr = document.createElement("tr"); + var new_td = document.createElement("td"); + var colspan = document.createAttribute("colspan"); + var class_attention = document.createAttribute("class"); + colspan.nodeValue = "5"; + class_attention.nodeValue = "attention ch_" + channel; + + if ($$('.ch_' + channel).length == 0) + { + switch (ch_type) { + + case "INPUT_OUTPUT": + var elem1 = $('separate_CHANNEL_' + channel + '_3'); // Eingangsbeschaltung + var elem2 = $('separate_CHANNEL_' + channel + '_6'); // Funktion Eingang + var elem3 = $('separate_CHANNEL_' + channel + '_4'); // Funktion Ausgang + + if (elem1.name == 'INPUT_TYPE') + { + elem1.disabled = true; + elem2.disabled = true; + + var td = elem1.parentNode.parentNode.parentNode.appendChild(new_tr).appendChild(new_td); + td.setAttributeNode(colspan); + td.setAttributeNode(class_attention); + td.appendChild(hint); + } + else + { + elem3.disabled = "true"; + + var td = elem3.parentNode.parentNode.parentNode.appendChild(new_tr).appendChild(new_td); + td.setAttributeNode(colspan); + td.setAttributeNode(class_attention); + td.appendChild(hint); + } + break; + + case "KEY": + var elem1 = $('separate_CHANNEL_' + channel + '_3'); // Eingangsbeschaltung + elem1.disabled = true; + + var td = elem1.parentNode.parentNode.parentNode.appendChild(new_tr).appendChild(new_td); + td.setAttributeNode(colspan); + td.setAttributeNode(class_attention); + td.appendChild(hint); + break; + + default: + break; + } + } +}; + + + +TextColor = function(c) +{ + if (!c) { return WebUI.getColor("windowText"); } + else { return WebUI.getColor("gray"); } +}; + +VirtualChannel_help = function(ch, lc) +{ + var virtualChHelpElm = jQuery("#virtual_ch_help_" + ch), + virtualChHelpElm2 = jQuery("#virtual_ch_help2_" + ch), + virtualHelpButtonElm = jQuery("#virtual_help_button_" + ch), + virtualHelpButtonElm2 = jQuery("#virtual_help_button2_" + ch); + + if (lc != "lc2") { + if (virtualHelpButtonElm.val() == translateKey("genericBtnTxtHelp")) { + virtualChHelpElm2.hide(); + virtualChHelpElm.show(); + virtualHelpButtonElm.val(translateKey("genericBtnTxtHelpOff")); + virtualHelpButtonElm2.val(translateKey("genericBtnTxtHelp")); + } else { + virtualChHelpElm.hide(); + virtualHelpButtonElm.val(translateKey("genericBtnTxtHelp")); + } + } else { + if (virtualHelpButtonElm2.val() == translateKey("genericBtnTxtHelp")) { + virtualChHelpElm.hide(); + virtualChHelpElm2.show(); + virtualHelpButtonElm.val(translateKey("genericBtnTxtHelp")); + virtualHelpButtonElm2.val(translateKey("genericBtnTxtHelpOff")); + } else { + virtualChHelpElm2.hide(); + virtualHelpButtonElm2.val(translateKey("genericBtnTxtHelp")); + } + } +}; + + +WDS_DisableOnTime = function(selectelem) +{ + // Schaltet beim WATERDETECTIONSENSOR die Einschaltdauer + // im Profil Änderungsignal / Subset Aus bei .... + // unsichtbar + + if (selectelem.selectedIndex >= 5) + { + $('on_time').style.visibility = 'hidden'; + } + else + { + $('on_time').style.visibility = 'visible'; + } +}; + +WEATHER_change_thres = function(id) +{ + //1 + switch_dir = $('separate_receiver_' + id).selectedIndex; //2 + WEATHER_check_dir(); +}; + +WEATHER_check_dir = function() +{ + var newSensor = "HM-WDS100-C6-O-2"; + var sensorTypeDesc = jQuery("#weatherSensor").val(); + var selectedWindDirection = jQuery("[name=\"subset_1_1\"]").prop("selectedIndex"); + + var ein; + var aus; + //1 + + if (sensorTypeDesc != newSensor) { + if (switch_dir) { + //ein = document.createTextNode("Einschaltschwelle"); + ein = document.createTextNode(translateKey("upperStormThreshold")); + //aus = document.createTextNode("Ausschaltschwelle"); + aus = document.createTextNode(translateKey("lowerStormThreshold")); + } + else { + //ein = document.createTextNode("Ausschaltschwelle"); + ein = document.createTextNode(translateKey("lowerStormThreshold")); + //aus = document.createTextNode("Einschaltschwelle"); + aus = document.createTextNode(translateKey("upperStormThreshold")); + } + } else { + // new Sensor + var ctON = jQuery("[name=\"SHORT_CT_ON\"]").prop("selectedIndex"); + var ctOFF = jQuery("[name=\"SHORT_CT_OFF\"]").prop("selectedIndex"); + + if (switch_dir == 1) { + //ein = document.createTextNode("Einschaltschwelle"); + ein = document.createTextNode(translateKey("upperStormThreshold")); + //aus = document.createTextNode("Ausschaltschwelle"); + aus = document.createTextNode(translateKey("lowerStormThreshold")); + $('ein').replaceChild(ein, $('ein').firstChild); + $('aus').replaceChild(aus, $('aus').firstChild); + return; + } + else if (switch_dir == 0) { + //ein = document.createTextNode("Ausschaltschwelle"); + ein = document.createTextNode(translateKey("lowerStormThreshold")); + //aus = document.createTextNode("Einschaltschwelle"); + aus = document.createTextNode(translateKey("upperStormThreshold")); + $('ein').replaceChild(ein, $('ein').firstChild); + $('aus').replaceChild(aus, $('aus').firstChild); + return; + } + + // X GE LO = 0 + // X GE HI = 1 + // X LT LO = 2 + // X LT HI = 3 + // Starker Wind EIN, schwacher Wind AUS / oder EIN nur bei starkem Wind, nicht aus (2. Profil) + if ((ctON == 2 && ctOFF == 1) || (ctON == 1 && ctOFF == 1)) { + //ein = document.createTextNode("Einschaltschwelle"); + ein = document.createTextNode(translateKey("upperStormThreshold")); + //aus = document.createTextNode("Ausschaltschwelle"); + aus = document.createTextNode(translateKey("lowerStormThreshold")); + } + // Starker Wind AUS, schwacher Wind EIN + if (ctON == 1 && ctOFF == 2) { + //ein = document.createTextNode("Ausschaltschwelle"); + ein = document.createTextNode(translateKey("lowerStormThreshold")); + //aus = document.createTextNode("Einschaltschwelle"); + aus = document.createTextNode(translateKey("upperStormThreshold")); + } + + + + } + try { + $('ein').replaceChild(ein, $('ein').firstChild); + $('aus').replaceChild(aus, $('aus').firstChild); + } catch (e) {} +}; + +WEATHER_check_expert = function() +{ + //1 + + try //2 + { + high = $F('separate_sender_0_3'); + if (high) { throw "true"; } + else { throw "false"; } + } + catch (ergebniss) + { + if (ergebniss == "true") + { + high = $F('separate_sender_0_3'); + low = $F('separate_sender_0_4'); + if (parseInt(low) > parseInt(high)) return true; //3 + else return false; + } else return "noExpert"; + } +}; + +WEATHER_check_profile_switch = function(selectelem) +{ + var actor = $F('dev_descr_receiver_tmp'); + + if (actor != "SWITCH") {switch_on_off = false; return 0;} + + if ((((selectelem.options[selectelem.selectedIndex].value) == "1") && ($('sender_profiles').options[$('sender_profiles').selectedIndex].value == "1")) || + (((selectelem.options[selectelem.selectedIndex].value) == "1") && ($('receiver_profiles').options[$('receiver_profiles').selectedIndex].value == "1")) || + (((selectelem.options[selectelem.selectedIndex].value) == "0") && ($('sender_profiles').options[$('sender_profiles').selectedIndex].value == "1") && ($('receiver_profiles').options[1].value == "1")) || + (((selectelem.options[selectelem.selectedIndex].value) == "1") && ($('receiver_profiles').options[$('receiver_profiles').selectedIndex].value == "0") && ($('receiver_profiles').options[1].value == "1"))) + { + switch_on_off = true; //1 + return 1; + } + else + { + switch_on_off = false; //2 + return 0; + } +}; + +WEATHER_check_weather = function() +{ + //1 + var link = "", linkPeer = ""; + try { + link = $('dev_descr_sender_tmp').value.split("-"); + linkPeer = $('dev_descr_receiver_tmp').value.split("-"); + if (link) { throw true; } + } catch (e) { + if ( e == true) { + if (((link[0] == "WEATHER") || (link[0] == "WEATHER_2")) && (linkPeer[0] != "WEATHER_RECEIVER")) return true; + else return false; + } else return false; + } +}; + +WEATHER_put_desc = function(id,x) +{ + //1 + + if ((WEATHER_check_expert()) && (x == 0)) //2 + { +// $('sender_profiles').options[0].selected = true; +// $('separate_sender_1_1').options[4].selected = true; +// $('separate_sender_1_2').options[2].selected = true; + } + else if (WEATHER_check_expert() != "noExpert" && x == 1) //3 + { + $('separate_sender_0_3_temp').value = $('separate_sender_1_1').options[$('separate_sender_1_1').selectedIndex].value; + $('separate_sender_0_4_temp').value = $('separate_sender_1_2').options[$('separate_sender_1_2').selectedIndex].value; + } + + var upper_index = $('separate_sender_1_1').selectedIndex; //4 + var lower_index = $('separate_sender_1_2').selectedIndex; //5 + + var desc = []; + var upper_desc = document.getElementById('upper_desc'); + var lower_desc = document.getElementById('lower_desc'); + var elem = id.split("_"); + + //6 + $('separate_sender_1_1').options[0].disabled = true; + $('separate_sender_1_1').options[0].style.color = WebUI.getColor("grayText"); + if ($('separate_sender_1_1').selectedIndex == 0) { $('separate_sender_1_1').options[1].selected = true; } + + for (var loop = 1; loop <= 12; loop++) + { + $('separate_sender_1_1').options[loop].style.color = WebUI.getColor("windowText"); //7 + $('separate_sender_1_1').options[loop].disabled = false; + } + + if ($('lower_tab').style.display == "block") + { + for (loop = 1; loop <= lower_index; loop++) + { + $('separate_sender_1_1').options[loop].style.color = WebUI.getColor("grayText"); //8 + $('separate_sender_1_1').options[loop].disabled = true; + } + } + + if ((lower_index >= upper_index) && ($('lower_tab').style.display == "block") && (switch_on_off == true)) + { + if (lower_index <= 11) + { + $('separate_sender_1_1').selectedIndex = lower_index + 1; + if (WEATHER_check_expert() != "noExpert") + $('separate_sender_0_3_temp').value = $('separate_sender_1_1').options[$('separate_sender_1_1').selectedIndex].value; + } + else $('separate_sender_1_1').selectedIndex = 12; + } + + for (loop = 0; loop <= 12; loop++) { + desc[loop] = document.createTextNode(unescape(translateKey("windDesc"+loop))); + } + + switch (elem[3]) { + case ("1"): + upper_desc.replaceChild(desc[$(id).selectedIndex], upper_desc.firstChild); + break; + case ("2"): + lower_desc.replaceChild(desc[$(id).selectedIndex], lower_desc.firstChild); + break; + default: + break; + } + + window.setTimeout("WEATHER_translate();",500) ; +}; + +WEATHER_translate= function() { + jQuery('#upper_desc').text(translateKey(jQuery('#upper_desc').text())); + jQuery('#lower_desc').text(translateKey(jQuery('#lower_desc').text())); + jQuery('#ein').text(translateKey(jQuery('#ein').text())); + jQuery('#aus').text(translateKey(jQuery('#aus').text())); +}; + +WEATHER = function(selectelem) +{ + var loop; + + if (WEATHER_check_weather()) //1 + { + if ((((selectelem.options[selectelem.selectedIndex].value) == "2") && ($('sender_profiles').options[$('sender_profiles').selectedIndex].value == "1")) || + (((selectelem.options[selectelem.selectedIndex].value) == "1") && ($('receiver_profiles').options[$('receiver_profiles').selectedIndex].value == "2"))) + + { + //2 + switch_on_off = false; + + if ($('lower_tab')) { + $('lower_tab').style.display = "none"; + } + $('separate_sender_1_2').options[0].selected = true; // Ausschaltschwelle auf 0 setzten + + //var ein = document.createTextNode("Einschaltschwelle"); + var ein = document.createTextNode(translateKey("upperStormThreshold")); + $('ein').replaceChild(ein, $('ein').firstChild); //3 + + $('separate_sender_1_1').options[0].disabled = true; //4 + $('separate_sender_1_1').options[0].style.color = WebUI.getColor("grayText"); //5 + + for (loop = 1; loop <= 12; loop++) + { + $('separate_sender_1_1').options[loop].style.color = WebUI.getColor("windowText"); //6 + $('separate_sender_1_1').options[loop].disabled = false; //7 + } + } + else + { + try + { + + if (WEATHER_check_profile_switch(selectelem) == 1) //8 + { + throw "block"; + } else throw "none"; + } + catch (ergebniss) + { + if (ergebniss == "none") //9 + { + switch_on_off = false; + $('lower_tab').style.display = "none"; + $('separate_sender_1_2').options[0].selected = true; // Ausschaltschwelle auf 0 setzten + + $('separate_sender_1_1').options[0].disabled = true; //10 + $('separate_sender_1_1').options[0].style.color = WebUI.getColor("grayText") ; //11 + + for (loop = 1; loop <= 12; loop++) + { + $('separate_sender_1_1').options[loop].disabled = false; + $('separate_sender_1_1').options[loop].style.color = WebUI.getColor("windowText"); //12 + } + WEATHER_check_dir(); //13 + } + else if (ergebniss == "block") //14 + { + + $('lower_tab').style.display = "block"; //15 + + var selected_high = $('separate_sender_1_1').selectedIndex; + var selected_low = $('separate_sender_1_2').selectedIndex; + + if (selected_low >= selected_high) //16 + { + $('separate_sender_1_2').options[0].selected = true; + + $('separate_sender_1_1').options[0].style.color = WebUI.getColor("grayText") ; //17 + $('separate_sender_1_1').options[0].disabled = true; + + //var desc = document.createTextNode(unescape("Keine Luftbewegung, Rauch steigt senkrecht empor.")); + //var desc = document.createTextNode(unescape(translateKey("hintNoAirFlow"))); + var desc = document.createTextNode(unescape(translateKey("windDesc0"))); + lower_desc.replaceChild(desc, lower_desc.firstChild); + } + else //18 + { + for (loop = 0; loop <= $('separate_sender_1_2').selectedIndex; loop++) + { + $('separate_sender_1_1').options[loop].disabled = true; + $('separate_sender_1_1').options[loop].style.color = WebUI.getColor("grayText"); //19 + } + } + + prn = selectelem.options[selectelem.selectedIndex].value; //20 + + switch_dir = $('separate_receiver_' + prn + '_1').selectedIndex; //21 + WEATHER_check_dir(); //22 + } + } + } + } +}; + +isJSFunc_active = function(fbib) { + //prueft, ob die Funktionsbibl. schon geladen ist + if (exists_bib[fbib] == true) return true; //schon aktiv + else return false; // nicht aktiv +}; + +load_JSFunc = function(fbib) { + //fbib gibt die gewuenschte Funktionsbibliothek incl. Pfad an + + if (isJSFunc_active(fbib) == false) // falls die Bibliothek noch nicht geladen wurde + { +// alert('Bib wird geladen'); + new Ajax.Request(fbib, + { + method: 'get', + + asynchronous: false, + + onSuccess: function(success) { + eval(success.responseText); + exists_bib[fbib] = true; //Bibliothek geladen + }, + + onFailure: function(failure) { + alert(fbib + ': ' + failure.statusText); + } + } + ); + } +}; + +showParamHelp = function(topic, x , y) { + var width = (! isNaN(x)) ? x : 450; + var height = (! isNaN(y)) ? y : 260; + MessageBox.show(translateKey("HelpTitle"), translateKey(topic), "", width, height); +}; + +selectWGDIcon = function(chn, elmId, activeIcon) { + var dlg = new WGDSelectIconDialog(translateKey("lblBaseImage"), "
", function(btnPress) { + if (btnPress == this.RESULT_YES) { + jQuery("#" + elmId).val(this.getSelectedIconNo()); + jQuery("#image_" + chn ).attr("src", this.getSelectedIcon()); + } + }, "html"); + dlg.btnTextNo(translateKey("btnCancel")); + dlg.btnTextYes(translateKey("btnOk")); + dlg.chn = chn; + dlg.activeIcon = parseInt(activeIcon); +}; + + +// Test +rfd_test = function() { + homematic('Interface.isPresent', {"interface": "BidCos-RF"}, function(result, error) { + if (result === true) + { + alert("rfd läuft"); + } + else + { + alert(Object.toJSON(error) + " Achtung: rfd läuft nicht!"); + } + }); +}; + +preventOnOffNonActive= function(elm) { + var receiverType = jQuery("#receiver_paramid").val(); + + if (receiverType && (receiverType != "linkHmIP_HEATING_KEY_RECEIVER")) { + var arFooterElems = jQuery(".FooterButton"), + arOnOffElems = jQuery("[name='" + elm.name + "']"), + onOffNotActive = 0, + chn = elm.name.split("_")[1], + counter; + + if (arOnOffElems.length == 2) { + counter = 1; + jQuery.each(arOnOffElems, function (index, elem) { + if (jQuery(elem).val() == 0) { + onOffNotActive++; + } + }); + } else if (arOnOffElems.length == 4) { + counter = 0; + if ( + ((jQuery(arOnOffElems[0]).val() == 0) && (jQuery(arOnOffElems[1]).val() == 0)) || + ((jQuery(arOnOffElems[2]).val() == 0) && (jQuery(arOnOffElems[3]).val() == 0)) + ) { + onOffNotActive++; + } + } + + if (onOffNotActive > counter) { + arFooterElems[1].hide(); + arFooterElems[2].hide(); + jQuery(".j_hint").remove(); + jQuery("#receiver_param_" + chn).append("

" + translateKey('hintLinkParamOnOffNotActive') + "

"); + + } else { + jQuery(".j_hint").remove(); + arFooterElems[1].show(); + arFooterElems[2].show(); + } + } +}; + +addAbortEventSendingChannels = function(chn, prn, devAddress, value) { + var hookElm_1 = jQuery("#hookAbortEventSendingChannels_1_"+ chn), + hookElm_2 = jQuery("#hookAbortEventSendingChannels_2_"+ chn), + device = DeviceList.getDeviceByAddress(devAddress), + counter = 0, + html, html_1, html_2; + + setAbortEventSendingChannels = function(chn, prn) { + var valElm = jQuery("#separate_CHANNEL_" + chn+ "_" + prn), + arChkBoxes = jQuery("[name='abortEventSendingCh_"+chn+"']"), + val = 0; + + jQuery.each(arChkBoxes, function(index, chkBox) { + if(chkBox.checked) { + val += parseInt(chkBox.value); + } + }); + + valElm.val(val); + }; + if (typeof device != "undefined") { + jQuery.each(device.channels, function (index, channel) { + + if ( + channel.channelType == "KEY_TRANSCEIVER" + || channel.channelType == "MULTI_MODE_INPUT_TRANSMITTER" + || channel.channelType == "ACCESS_TRANSCEIVER" + ) { + + html = (counter == 0 || counter == 16) ? "" : html; + + html += "
"; + html += ""; + if (isBitSet(value, counter)) { + html += ""; + } else { + html += ""; + } + html += ""; + html += ""; + if (isBitSet(value, counter)) { + html += ""; + } else { + html += ""; + } + html += "