diff --git a/src/ConfigTransfer.script.js b/src/ConfigTransfer.script.js
index 06d0048..062bd5a 100644
--- a/src/ConfigTransfer.script.js
+++ b/src/ConfigTransfer.script.js
@@ -49,11 +49,19 @@ function uctParseRangesString(channelsString) {
function uctBtnExport(device, online, progress, context) {
Log.info("OpenKNX ConfigTransfer: Handle Channel Export ...")
var module = uctModuleOrder[device.getParameterByName(context.p_moduleSelection).value];
+ var moduleChannelCount = uctChannelParams[module].channels;
+
var channelSource = device.getParameterByName(context.p_channelSource).value;
var channels = [channelSource];
if (channelSource == 253) {
channels = uctParseRangesString(device.getParameterByName(context.p_channelSourcesString).value);
}
+ if (channels.length == 0) {
+ throw new Error("Kein Kanal definiert!");
+ }
+ if (/* channels.length > 0 */ channels[channels.length - 1] > moduleChannelCount) {
+ throw new Error("Kanal außerhalb von Modul-Bereich!");
+ }
if (channels.length > 1) {
Log.info("OpenKNX ConfigTransfer: Multi-Channel " + channels.join(","));
}
diff --git a/src/ConfigTransfer.share.xml b/src/ConfigTransfer.share.xml
index 019a5c7..fd38428 100644
--- a/src/ConfigTransfer.share.xml
+++ b/src/ConfigTransfer.share.xml
@@ -411,6 +411,7 @@
+
@@ -561,7 +562,18 @@
-
+
+
+
+
+
+
+
+
+
+
+
+