node-red-contrib-knx-ultimate 4.0.5 → 4.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -6,7 +6,14 @@
6
6
 
7
7
  # CHANGELOG
8
8
 
9
- **Version 4.0.4** - September 2025<br/>
9
+ **Version 4.0.7** - September 2025<br/>
10
+ - Fixed an issue where some secure fields were missing when creating a new config-node.<br/>
11
+ - HUE Light: enhanced the Homeassistant export yaml.<br/>
12
+
13
+ **Version 4.0.6** - September 2025<br/>
14
+ - Fixed regression in automatic datapoint selection, based on group address DPT.<br/>
15
+
16
+ **Version 4.0.5** - September 2025<br/>
10
17
  - NEW: You have now the choide to select multiple modes to authenticate to a KNX Gateway.<br/>
11
18
 
12
19
  **Version 4.0.4** - September 2025<br/>
@@ -214,7 +214,8 @@
214
214
  $("#rowTunnelIASelection").hide();
215
215
  $("#divTunnelIA").hide();
216
216
  }
217
- const showManualTunnelFields = isSecure && !isMulticast && manualMode;
217
+ // Allow manual/combined credentials to surface even before the user selects a unicast IP.
218
+ const showManualTunnelFields = isSecure && manualMode;
218
219
  $("#rowTunnelInterfaceIndividualAddress").toggle(showManualTunnelFields);
219
220
  $("#rowTunnelUserPassword").toggle(showManualTunnelFields);
220
221
  $("#rowTunnelUserId").toggle(showManualTunnelFields);
@@ -758,31 +759,77 @@
758
759
  border-bottom: 1px solid#377e00;
759
760
  outline: none;
760
761
  }
762
+
763
+ #knxUltimate-config-template .form-row {
764
+ display: flex;
765
+ align-items: center;
766
+ gap: 10px;
767
+ margin-bottom: 6px;
768
+ }
769
+
770
+ #knxUltimate-config-template .form-row > label {
771
+ flex: 0 0 230px;
772
+ display: flex;
773
+ align-items: center;
774
+ gap: 6px;
775
+ margin: 0;
776
+ }
777
+
778
+ #knxUltimate-config-template .form-row > label + input,
779
+ #knxUltimate-config-template .form-row > label + select,
780
+ #knxUltimate-config-template .form-row > label + textarea {
781
+ flex: 1 1 auto;
782
+ }
783
+
784
+ #knxUltimate-config-template .form-row.form-row-offset {
785
+ display: block;
786
+ margin-left: 230px;
787
+ }
788
+
789
+ #knxUltimate-config-template .form-row.form-row-checkbox {
790
+ align-items: flex-start;
791
+ }
792
+
793
+ #knxUltimate-config-template .form-row.form-row-checkbox input[type="checkbox"] {
794
+ margin-top: 4px;
795
+ }
796
+
797
+ #knxUltimate-config-template .form-row.form-row-checkbox label {
798
+ flex: 1 1 auto;
799
+ }
800
+
801
+ #knxUltimate-config-template #hintSecureMulticast,
802
+ #knxUltimate-config-template .form-row .form-tips {
803
+ margin-left: 230px;
804
+ }
805
+
806
+ #knxUltimate-config-template .form-section-heading {
807
+ margin-bottom: 12px;
808
+ }
761
809
  </style>
762
810
 
763
811
 
764
812
  <script type="text/html" data-template-name="knxUltimate-config">
765
- <div class="form-row">
766
- <b><span data-i18n="knxUltimate-config.properties.title"></span></b>
767
- <br/><br/>
768
- </div>
813
+ <div id="knxUltimate-config-template">
814
+ <div class="form-section-heading">
815
+ <b><span data-i18n="knxUltimate-config.properties.title"></span></b>
816
+ </div>
769
817
 
770
818
  <div class="form-row">
771
- <label for="node-config-input-name" style="width: 200px" >
819
+ <label for="node-config-input-name">
772
820
  <i class="fa fa-tag"></i> <span data-i18n="knxUltimate-config.properties.node-config-input-name"></span></label>
773
821
  <input type="text" id="node-config-input-name" style="width: 200px">
774
822
  </div>
775
823
  <div class="form-row">
776
- <label for="node-config-input-host" style="width: 200px"><i class="fa fa-server"></i> <span data-i18n="knxUltimate-config.properties.host"></span></label>
777
- <input type="text" id="node-config-input-host" style="width: 200px">
778
- <i id="refresh-interfaces" class="fa fa-refresh" style="cursor:pointer; color:#377e00; margin-left:6px;" data-i18n="[title]knxUltimate-config.properties.refresh_interfaces"></i>
824
+ <label for="node-config-input-host"><i class="fa fa-server"></i> <span data-i18n="knxUltimate-config.properties.host"></span></label>
825
+ <input type="text" id="node-config-input-host" style="width: 200px">
826
+ <i id="refresh-interfaces" class="fa fa-refresh" style="cursor:pointer; color:#377e00; margin-left:6px;" data-i18n="[title]knxUltimate-config.properties.refresh_interfaces"></i>
779
827
  </div>
780
- <div class="form-row">
781
- <label style="width: 200px"></label>
828
+ <div class="form-row form-row-offset">
782
829
  <span id="interfaces-count" style="font-size: 12px; color:#377e00; margin-top: 2px;"></span>
783
830
  </div>
784
831
  <div class="form-row" id="rowPhysAddr">
785
- <label for="node-config-input-physAddr" style="width: 200px">
832
+ <label for="node-config-input-physAddr">
786
833
  <i class="fa fa-microchip"></i>
787
834
  <span data-i18n="knxUltimate-config.advanced.knx_phy_addr"></span>
788
835
  </label>
@@ -873,13 +920,13 @@
873
920
  <p>
874
921
 
875
922
  <div class="form-row">
876
- <label for="node-config-input-port" style="width: 200px">
923
+ <label for="node-config-input-port">
877
924
  <span data-i18n="knxUltimate-config.properties.ip_port"></span>
878
925
  </label>
879
926
  <input type="text" id="node-config-input-port" style="width: 100px">
880
927
  </div>
881
928
  <div class="form-row">
882
- <label for="node-config-input-hostProtocol" style="width: 200px">
929
+ <label for="node-config-input-hostProtocol">
883
930
  <span data-i18n="knxUltimate-config.properties.ip_protocol"></span>
884
931
  </label>
885
932
  <select id="node-config-input-hostProtocol" >
@@ -892,7 +939,7 @@
892
939
 
893
940
 
894
941
  <div class="form-row">
895
- <label for="node-config-input-KNXEthInterface" style="width: 200px">
942
+ <label for="node-config-input-KNXEthInterface">
896
943
  <i class="fa fa-wifi"></i>
897
944
  <span data-i18n="knxUltimate-config.properties.bind_local_int"></span>
898
945
  </label>
@@ -904,7 +951,7 @@
904
951
  data-i18n="[placeholder]knxUltimate-config.properties.iface_name_placeholder">
905
952
  </div>
906
953
  <div class="form-row">
907
- <label for="node-config-input-autoReconnect" style="width: 200px">
954
+ <label for="node-config-input-autoReconnect">
908
955
  <i class="fa fa-plug"></i>
909
956
  <span data-i18n="knxUltimate-config.properties.autoReconnect"></span>
910
957
  </label>
@@ -918,26 +965,26 @@
918
965
  <div id="tabs-2">
919
966
  <p>
920
967
 
921
- <div class="form-row">
968
+ <div class="form-row form-row-checkbox">
922
969
  <input type="checkbox" id="node-config-input-ignoreTelegramsWithRepeatedFlag"
923
970
  style="display:inline-block; width:auto; vertical-align:top;">
924
- <label style="width:85%" for="node-config-input-ignoreTelegramsWithRepeatedFlag">
971
+ <label for="node-config-input-ignoreTelegramsWithRepeatedFlag">
925
972
  <i class="fa fa-ban"></i>
926
973
  <span data-i18n="knxUltimate-config.advanced.ignoreTelegramsWithRepeatedFlag"></span>
927
974
  </label>
928
975
  </div>
929
976
 
930
- <div class="form-row">
977
+ <div class="form-row form-row-checkbox">
931
978
  <input type="checkbox" id="node-config-input-suppressACKRequest"
932
979
  style="display:inline-block; width:auto; vertical-align:top;">
933
- <label style="width:85%" for="node-config-input-suppressACKRequest">
980
+ <label for="node-config-input-suppressACKRequest">
934
981
  <i class="fa fa-ban"></i>
935
982
  <span data-i18n="knxUltimate-config.advanced.suppress_ack"></span>
936
983
  </label>
937
984
  </div>
938
985
 
939
986
  <div class="form-row">
940
- <label for="node-config-input-delaybetweentelegrams" style="width:auto">
987
+ <label for="node-config-input-delaybetweentelegrams">
941
988
  <i class="fa fa-hourglass-start"></i>
942
989
  <span data-i18n="knxUltimate-config.advanced.delaybetweentelegrams"></span>
943
990
  </label>
@@ -976,7 +1023,7 @@
976
1023
  <span style="color:red" data-i18n="[html]knxUltimate-config.ets.youtube"></span>
977
1024
  </div>
978
1025
  <div class="form-row">
979
- <label for="node-config-input-stopETSImportIfNoDatapoint" style="width:250px">
1026
+ <label for="node-config-input-stopETSImportIfNoDatapoint">
980
1027
  <i class="fa fa-question-circle"></i>
981
1028
  <span data-i18n="knxUltimate-config.ets.help_ga"></span>
982
1029
  </label>
@@ -987,7 +1034,7 @@
987
1034
  </select>
988
1035
  </div>
989
1036
  <div class="form-row">
990
- <label style="width:auto" for="node-config-input-csv">
1037
+ <label for="node-config-input-csv">
991
1038
  <i class="fa fa-th-list"></i> <span data-i18n="knxUltimate-config.ets.ga_list_label"></span>
992
1039
  </label>
993
1040
  </div>
@@ -1003,12 +1050,12 @@
1003
1050
  <div id="tabs-4">
1004
1051
  <p>
1005
1052
  <div class="form-row">
1006
- <label style="width:300px"><i class="fa fa-sign-in"></i> <span data-i18n="knxUltimate-config.utility.gather_debug"></span></label>
1053
+ <label><i class="fa fa-sign-in"></i> <span data-i18n="knxUltimate-config.utility.gather_debug"></span></label>
1007
1054
  <input type="button" id="getinfocam" class="ui-button ui-corner-all ui-widget"
1008
1055
  style="background-color:#AEE1FF;width:150px" data-i18n="[value]knxUltimate-config.utility.read_button">
1009
1056
  </div>
1010
1057
  <div class="form-row">
1011
- <label style="width:300px"><i class="fa fa-sign-in"></i> <span data-i18n="knxUltimate-config.utility.get_all_used_ga"></span></label>
1058
+ <label><i class="fa fa-sign-in"></i> <span data-i18n="knxUltimate-config.utility.get_all_used_ga"></span></label>
1012
1059
  <input type="button" id="getallgaused" class="ui-button ui-corner-all ui-widget"
1013
1060
  style="background-color:#AEE1FF;width:150px" data-i18n="[value]knxUltimate-config.utility.read_button">
1014
1061
  </div>
@@ -1018,6 +1065,8 @@
1018
1065
  </div>
1019
1066
  </p>
1020
1067
  </div>
1021
- </div>
1068
+ </div>
1069
+
1070
+ </div>
1022
1071
 
1023
1072
  </script>
@@ -1532,7 +1532,7 @@ module.exports = (RED) => {
1532
1532
  try {
1533
1533
  jsValue = dptlib.fromBuffer(_Rawvalue, dpt);
1534
1534
  if (jsValue === null) {
1535
- node.sysLogger?.error(
1535
+ node.sysLogger?.warn(
1536
1536
  "buildInputMessage: received a wrong datagram form KNX BUS, from device " +
1537
1537
  _srcGA +
1538
1538
  " Destination " +
@@ -417,9 +417,12 @@
417
417
  try { sDevName = sDevName.substr(sDevName.indexOf(")") + 1).trim(); } catch (error) { }
418
418
  $('#node-input-name').val(sDevName);
419
419
  var optVal = $("#node-input-dpt option:contains('" + (ui.item.dpt || '').trim() + "')").attr('value');
420
- // Select the option value
421
- $("#node-input-dpt").val(optVal);
422
- $("#node-input-dpt").trigger("change");
420
+ var $dptSelect = $("#node-input-dpt");
421
+ if (optVal !== undefined && optVal !== null) {
422
+ $dptSelect.val(optVal).trigger('change');
423
+ } else {
424
+ $dptSelect.trigger('change');
425
+ }
423
426
  // Persist secure flag for dynamic icon
424
427
  try {
425
428
  $("#node-input-gaSecure").val(ui.item.isSecure ? 'true' : 'false');
@@ -946,4 +949,4 @@
946
949
  </div>
947
950
  </div>
948
951
  <br /><br />
949
- </script>
952
+ </script>
@@ -106,8 +106,12 @@
106
106
  }
107
107
  $('#node-input-namebatterysensor').val(sDevName);
108
108
  var optVal = $("#node-input-dptbatterysensor option:contains('" + ui.item.label.split("#")[2].trim() + "')").attr('value');
109
- // Select the option value
110
- $("#node-input-dptbatterysensor").val(optVal);
109
+ var $dptSelect = $("#node-input-dptbatterysensor");
110
+ if (optVal !== undefined && optVal !== null) {
111
+ $dptSelect.val(optVal).trigger('change');
112
+ } else {
113
+ $dptSelect.trigger('change');
114
+ }
111
115
  }
112
116
  }).focus(function () {
113
117
  $(this).autocomplete('search', $(this).val() + 'exactmatch');
@@ -243,4 +247,3 @@
243
247
 
244
248
  </script>
245
249
 
246
-
@@ -144,8 +144,12 @@
144
144
  }
145
145
  $('#node-input-nameDim').val(sDevName);
146
146
  var optVal = $("#node-input-dptrepeat option:contains('" + ui.item.label.split("#")[2].trim() + "')").attr('value');
147
- // Select the option value
148
- $("#node-input-dptrepeat").val(optVal);
147
+ var $dptSelect = $("#node-input-dptrepeat");
148
+ if (optVal !== undefined && optVal !== null) {
149
+ $dptSelect.val(optVal).trigger('change');
150
+ } else {
151
+ $dptSelect.trigger('change');
152
+ }
149
153
  }
150
154
  }).focus(function () {
151
155
  $(this).autocomplete('search', $(this).val() + 'exactmatch');
@@ -194,8 +198,12 @@
194
198
  }
195
199
  $('#node-input-nameshort_release').val(sDevName);
196
200
  var optVal = $("#node-input-dptshort_release option:contains('" + ui.item.label.split("#")[2].trim() + "')").attr('value');
197
- // Select the option value
198
- $("#node-input-dptshort_release").val(optVal);
201
+ var $dptSelect = $("#node-input-dptshort_release");
202
+ if (optVal !== undefined && optVal !== null) {
203
+ $dptSelect.val(optVal).trigger('change');
204
+ } else {
205
+ $dptSelect.trigger('change');
206
+ }
199
207
  }
200
208
  }).focus(function () {
201
209
  $(this).autocomplete('search', $(this).val() + 'exactmatch');
@@ -227,8 +235,12 @@
227
235
  }
228
236
  $('#node-input-nameshort_releaseStatus').val(sDevName);
229
237
  var optVal = $("#node-input-dptshort_releaseStatus option:contains('" + ui.item.label.split("#")[2].trim() + "')").attr('value');
230
- // Select the option value
231
- $("#node-input-dptshort_releaseStatus").val(optVal);
238
+ var $dptSelect = $("#node-input-dptshort_releaseStatus");
239
+ if (optVal !== undefined && optVal !== null) {
240
+ $dptSelect.val(optVal).trigger('change');
241
+ } else {
242
+ $dptSelect.trigger('change');
243
+ }
232
244
  }
233
245
  }).focus(function () {
234
246
  $(this).autocomplete('search', $(this).val() + 'exactmatch');
@@ -261,8 +273,12 @@
261
273
  }
262
274
  $('#node-input-namedouble_short_release').val(sDevName);
263
275
  var optVal = $("#node-input-dptdouble_short_release option:contains('" + ui.item.label.split("#")[2].trim() + "')").attr('value');
264
- // Select the option value
265
- $("#node-input-dptdouble_short_release").val(optVal);
276
+ var $dptSelect = $("#node-input-dptdouble_short_release");
277
+ if (optVal !== undefined && optVal !== null) {
278
+ $dptSelect.val(optVal).trigger('change');
279
+ } else {
280
+ $dptSelect.trigger('change');
281
+ }
266
282
  }
267
283
  }).focus(function () {
268
284
  $(this).autocomplete('search', $(this).val() + 'exactmatch');
@@ -294,8 +310,12 @@
294
310
  }
295
311
  $('#node-input-namedouble_short_releaseStatus').val(sDevName);
296
312
  var optVal = $("#node-input-dptdouble_short_releaseStatus option:contains('" + ui.item.label.split("#")[2].trim() + "')").attr('value');
297
- // Select the option value
298
- $("#node-input-dptdouble_short_releaseStatus").val(optVal);
313
+ var $dptSelect = $("#node-input-dptdouble_short_releaseStatus");
314
+ if (optVal !== undefined && optVal !== null) {
315
+ $dptSelect.val(optVal).trigger('change');
316
+ } else {
317
+ $dptSelect.trigger('change');
318
+ }
299
319
  }
300
320
  }).focus(function () {
301
321
  $(this).autocomplete('search', $(this).val() + 'exactmatch');
@@ -460,5 +480,3 @@
460
480
 
461
481
 
462
482
  </script>
463
-
464
-
@@ -115,8 +115,12 @@
115
115
  }
116
116
  $('#node-input-namecontact').val(sDevName)
117
117
  var optVal = $('#node-input-dptcontact option:contains(\'' + ui.item.label.split('#')[2].trim() + '\')').attr('value')
118
- // Select the option value
119
- $('#node-input-dptcontact').val(optVal)
118
+ var $dptSelect = $('#node-input-dptcontact')
119
+ if (optVal !== undefined && optVal !== null) {
120
+ $dptSelect.val(optVal).trigger('change')
121
+ } else {
122
+ $dptSelect.trigger('change')
123
+ }
120
124
  },
121
125
  }).focus(function () {
122
126
  $(this).autocomplete('search', $(this).val() + 'exactmatch');
@@ -241,4 +245,3 @@
241
245
  <br />
242
246
  </script>
243
247
 
244
-
@@ -233,8 +233,13 @@
233
233
  } catch (error) { }
234
234
  $(_destinationWidgetName).val(sDevName);
235
235
  var optVal = $(_destinationWidgetDPT + " option:contains('" + ui.item.label.split("#")[2].trim() + "')").attr("value");
236
- // Select the option value
237
- $(_destinationWidgetDPT).val(optVal);
236
+ const $dptSelect = $(_destinationWidgetDPT);
237
+ if (optVal !== undefined && optVal !== null) {
238
+ $dptSelect.val(optVal).trigger('change');
239
+ } else {
240
+ // Ensure downstream widgets refresh even when the DPT is missing
241
+ $dptSelect.trigger('change');
242
+ }
238
243
  },
239
244
  }).focus(function () {
240
245
  $(this).autocomplete('search', $(this).val() + 'exactmatch');
@@ -892,56 +897,69 @@
892
897
  }
893
898
  function yamelize() {
894
899
  try {
895
- // Get the HUE Node properties and transform it into yaml
896
- let sYaml = '- name: "' + $("#node-input-name").val() + '"' + "\n";
897
- sYaml += $("#node-input-GALightSwitch").val() != '' ? ' address: "' + $("#node-input-GALightSwitch").val() + '"' + "\n" : '';
898
- sYaml += $("#node-input-GALightState").val() != '' ? ' state_address: "' + $("#node-input-GALightState").val() + '"' + "\n" : '';
899
- sYaml += $("#node-input-GALightBrightness").val() != '' ? ' brightness_address: "' + $("#node-input-GALightBrightness").val() + '"' + "\n" : '';
900
- sYaml += $("#node-input-GALightBrightnessState").val() != '' ? ' brightness_state_address: "' + $("#node-input-GALightBrightnessState").val() + '"' + "\n" : '';
901
-
902
- //#region color_temperature_mode
903
- // ----------------------------
904
- if ($("#node-input-GALightKelvinPercentage").val !== '') {
905
-
906
- // color_temperature_mode: relative
907
- sYaml += ' color_temperature_mode: relative' + '\n';
908
- sYaml += ' color_temperature_address: "' + $("#node-input-GALightKelvinPercentage").val() + '"\n';
909
- sYaml += $("#node-input-GALightKelvinPercentageState").val() != '' ? ' color_temperature_state_address: "' + $("#node-input-GALightKelvinPercentageState").val() + '"' + "\n" : '';
910
- sYaml += ' min_kelvin: 2200' + '\n';
911
- sYaml += ' max_kelvin: 6500' + '\n';
912
-
913
- } else if ($("#node-input-GALightKelvin").val() !== '') {
914
-
915
- if ($("#node-input-dptLightKelvin").val() === '7.600') {
916
- sYaml += ' color_temperature_mode: absolute' + '\n';
917
- sYaml += ' color_temperature_address: "' + $("#node-input-GALightKelvin").val() + '"\n';
918
- if ($("#node-input-dptLightKelvinState").val() === '7.600') {
919
- // Add the status only if also 7.600
920
- sYaml += $("#node-input-GALightKelvinState").val() != '' ? ' color_temperature_state_address: "' + $("#node-input-GALightKelvinState").val() + '"' + "\n" : '';
921
- }
922
- sYaml += ' min_kelvin: 2200' + '\n';
923
- sYaml += ' max_kelvin: 6500' + '\n';
924
-
925
- } else if ($("#node-input-dptLightKelvin").val() === '9.002') {
900
+ const getVal = (selector) => {
901
+ const $el = $(selector);
902
+ if (!$el || !$el.length) return '';
903
+ const raw = $el.val();
904
+ if (raw === undefined || raw === null) return '';
905
+ return typeof raw === 'string' ? raw.trim() : String(raw);
906
+ };
907
+ const appendLine = (label, value) => {
908
+ if (value) {
909
+ sYaml += ` ${label}: "${value}"\n`;
910
+ }
911
+ };
926
912
 
927
- sYaml += ' color_temperature_mode: absolute_float' + '\n';
928
- sYaml += ' color_temperature_address: "' + $("#node-input-GALightKelvin").val() + '"\n';
929
- if ($("#node-input-dptLightKelvinState").val() === '9.002') {
930
- // Add the status only if also 7.600
931
- sYaml += $("#node-input-GALightKelvinState").val() != '' ? ' color_temperature_state_address: "' + $("#node-input-GALightKelvinState").val() + '"' + "\n" : '';
913
+ const name = getVal('#node-input-name').replace(/"/g, '\\"');
914
+ let sYaml = `- name: "${name}"\n`;
915
+
916
+ appendLine('address', getVal('#node-input-GALightSwitch'));
917
+ appendLine('state_address', getVal('#node-input-GALightState'));
918
+ appendLine('brightness_address', getVal('#node-input-GALightBrightness'));
919
+ appendLine('brightness_state_address', getVal('#node-input-GALightBrightnessState'));
920
+
921
+ // Color temperature handling -----------------------------------
922
+ let colorTemperatureConfigured = false;
923
+ const kelvinPercent = getVal('#node-input-GALightKelvinPercentage');
924
+ if (kelvinPercent) {
925
+ sYaml += ' color_temperature_mode: relative\n';
926
+ appendLine('color_temperature_address', kelvinPercent);
927
+ appendLine('color_temperature_state_address', getVal('#node-input-GALightKelvinPercentageState'));
928
+ colorTemperatureConfigured = true;
929
+ } else {
930
+ const kelvinAddress = getVal('#node-input-GALightKelvin');
931
+ if (kelvinAddress) {
932
+ const kelvinDpt = getVal('#node-input-dptLightKelvin');
933
+ if (kelvinDpt === '7.600') {
934
+ sYaml += ' color_temperature_mode: absolute\n';
935
+ appendLine('color_temperature_address', kelvinAddress);
936
+ if (getVal('#node-input-dptLightKelvinState') === '7.600') {
937
+ appendLine('color_temperature_state_address', getVal('#node-input-GALightKelvinState'));
938
+ }
939
+ colorTemperatureConfigured = true;
940
+ } else if (kelvinDpt === '9.002') {
941
+ sYaml += ' color_temperature_mode: absolute_float\n';
942
+ appendLine('color_temperature_address', kelvinAddress);
943
+ if (getVal('#node-input-dptLightKelvinState') === '9.002') {
944
+ appendLine('color_temperature_state_address', getVal('#node-input-GALightKelvinState'));
945
+ }
946
+ colorTemperatureConfigured = true;
932
947
  }
933
- sYaml += ' min_kelvin: 2200' + '\n';
934
- sYaml += ' max_kelvin: 6500' + '\n';
935
-
936
948
  }
937
949
  }
938
- // ----------------------------
939
- //#endregion
950
+ if (colorTemperatureConfigured) {
951
+ sYaml += ' min_kelvin: 2200\n';
952
+ sYaml += ' max_kelvin: 6500\n';
953
+ }
940
954
 
941
- sYaml += $("#node-input-GALightColor").val() != '' ? ' color_address: "' + $("#node-input-GALightColor").val() + '"' + "\n" : '';
942
- sYaml += $("#node-input-GALightColorState").val() != '' ? ' color_state_address: "' + $("#node-input-GALightColorState").val() + '"' + "\n" : '';
955
+ appendLine('color_address', getVal('#node-input-GALightColor'));
956
+ appendLine('color_state_address', getVal('#node-input-GALightColorState'));
957
+ appendLine('hue_address', getVal('#node-input-GALightHSV_H_DIM'));
958
+ appendLine('hue_state_address', getVal('#node-input-GALightHSV_H_State'));
959
+ appendLine('saturation_address', getVal('#node-input-GALightHSV_S_DIM'));
960
+ appendLine('saturation_state_address', getVal('#node-input-GALightHSV_S_State'));
943
961
 
944
- return (sYaml);
962
+ return sYaml;
945
963
  } catch (error) { }
946
964
  }
947
965
 
@@ -1484,5 +1502,3 @@
1484
1502
  <br />
1485
1503
  </script>
1486
1504
 
1487
-
1488
-
@@ -105,8 +105,12 @@
105
105
  }
106
106
  $('#node-input-namelightsensor').val(sDevName);
107
107
  var optVal = $("#node-input-dptlightsensor option:contains('" + ui.item.label.split("#")[2].trim() + "')").attr('value');
108
- // Select the option value
109
- $("#node-input-dptlightsensor").val(optVal);
108
+ var $dptSelect = $("#node-input-dptlightsensor");
109
+ if (optVal !== undefined && optVal !== null) {
110
+ $dptSelect.val(optVal).trigger('change');
111
+ } else {
112
+ $dptSelect.trigger('change');
113
+ }
110
114
  }
111
115
  }).focus(function () {
112
116
  $(this).autocomplete('search', $(this).val() + 'exactmatch');
@@ -245,4 +249,3 @@
245
249
  </script>
246
250
 
247
251
 
248
-
@@ -104,8 +104,12 @@
104
104
  }
105
105
  $('#node-input-namemotion').val(sDevName);
106
106
  var optVal = $("#node-input-dptmotion option:contains('" + ui.item.label.split("#")[2].trim() + "')").attr('value');
107
- // Select the option value
108
- $("#node-input-dptmotion").val(optVal);
107
+ var $dptSelect = $("#node-input-dptmotion");
108
+ if (optVal !== undefined && optVal !== null) {
109
+ $dptSelect.val(optVal).trigger('change');
110
+ } else {
111
+ $dptSelect.trigger('change');
112
+ }
109
113
  }
110
114
  }).focus(function () {
111
115
  $(this).autocomplete('search', $(this).val() + 'exactmatch');
@@ -233,4 +237,3 @@
233
237
 
234
238
  </script>
235
239
 
236
-
@@ -147,8 +147,12 @@
147
147
  }
148
148
  $('#node-input-namescene').val(sDevName);
149
149
  var optVal = $("#node-input-dptscene option:contains('" + ui.item.label.split("#")[2].trim() + "')").attr('value');
150
- // Select the option value
151
- $("#node-input-dptscene").val(optVal);
150
+ var $dptSelect = $("#node-input-dptscene");
151
+ if (optVal !== undefined && optVal !== null) {
152
+ $dptSelect.val(optVal).trigger('change');
153
+ } else {
154
+ $dptSelect.trigger('change');
155
+ }
152
156
  ShowHideValScene();
153
157
  }
154
158
  }).focus(function () {
@@ -184,8 +188,12 @@
184
188
  }
185
189
  $('#node-input-namesceneStatus').val(sDevName);
186
190
  var optVal = $("#node-input-dptsceneStatus option:contains('" + ui.item.label.split("#")[2].trim() + "')").attr('value');
187
- // Select the option value
188
- $("#node-input-dptsceneStatus").val(optVal);
191
+ var $dptSelect = $("#node-input-dptsceneStatus");
192
+ if (optVal !== undefined && optVal !== null) {
193
+ $dptSelect.val(optVal).trigger('change');
194
+ } else {
195
+ $dptSelect.trigger('change');
196
+ }
189
197
  ShowHideValScene();
190
198
  }
191
199
  }).focus(function () {
@@ -221,8 +229,12 @@
221
229
  }
222
230
  $('#node-input-namesceneMulti').val(sDevName);
223
231
  var optVal = $("#node-input-dptsceneMulti option:contains('" + ui.item.label.split("#")[2].trim() + "')").attr('value');
224
- // Select the option value
225
- $("#node-input-dptsceneMulti").val(optVal);
232
+ var $dptSelect = $("#node-input-dptsceneMulti");
233
+ if (optVal !== undefined && optVal !== null) {
234
+ $dptSelect.val(optVal).trigger('change');
235
+ } else {
236
+ $dptSelect.trigger('change');
237
+ }
226
238
  ShowHideValScene();
227
239
  }
228
240
  }).focus(function () {
@@ -589,5 +601,3 @@
589
601
  </div> <!-- // End TABS -->
590
602
 
591
603
  </script>
592
-
593
-
@@ -107,8 +107,12 @@
107
107
  }
108
108
  $('#node-input-namerepeat').val(sDevName);
109
109
  var optVal = $("#node-input-dptrepeat option:contains('" + ui.item.label.split("#")[2].trim() + "')").attr('value');
110
- // Select the option value
111
- $("#node-input-dptrepeat").val(optVal);
110
+ var $dptSelect = $("#node-input-dptrepeat");
111
+ if (optVal !== undefined && optVal !== null) {
112
+ $dptSelect.val(optVal).trigger('change');
113
+ } else {
114
+ $dptSelect.trigger('change');
115
+ }
112
116
  }
113
117
  }).focus(function () {
114
118
  $(this).autocomplete('search', $(this).val() + 'exactmatch');
@@ -235,4 +239,3 @@
235
239
 
236
240
  </script>
237
241
 
238
-
@@ -105,8 +105,12 @@
105
105
  }
106
106
  $('#node-input-nametemperaturesensor').val(sDevName);
107
107
  var optVal = $("#node-input-dpttemperaturesensor option:contains('" + ui.item.label.split("#")[2].trim() + "')").attr('value');
108
- // Select the option value
109
- $("#node-input-dpttemperaturesensor").val(optVal);
108
+ var $dptSelect = $("#node-input-dpttemperaturesensor");
109
+ if (optVal !== undefined && optVal !== null) {
110
+ $dptSelect.val(optVal).trigger('change');
111
+ } else {
112
+ $dptSelect.trigger('change');
113
+ }
110
114
  }
111
115
  }).focus(function () {
112
116
  $(this).autocomplete('search', $(this).val() + 'exactmatch');
@@ -243,4 +247,3 @@
243
247
 
244
248
  </script>
245
249
 
246
-
@@ -106,8 +106,12 @@
106
106
  }
107
107
  $('#node-input-namezigbeeconnectivity').val(sDevName);
108
108
  var optVal = $("#node-input-dptzigbeeconnectivity option:contains('" + ui.item.label.split("#")[2].trim() + "')").attr('value');
109
- // Select the option value
110
- $("#node-input-dptzigbeeconnectivity").val(optVal);
109
+ var $dptSelect = $("#node-input-dptzigbeeconnectivity");
110
+ if (optVal !== undefined && optVal !== null) {
111
+ $dptSelect.val(optVal).trigger('change');
112
+ } else {
113
+ $dptSelect.trigger('change');
114
+ }
111
115
  }
112
116
  }).focus(function () {
113
117
  $(this).autocomplete('search', $(this).val() + 'exactmatch');
@@ -243,4 +247,3 @@
243
247
 
244
248
  </script>
245
249
 
246
-
@@ -106,8 +106,12 @@
106
106
  }
107
107
  $('#node-input-namedevice_software_update').val(sDevName);
108
108
  var optVal = $("#node-input-dptdevice_software_update option:contains('" + ui.item.label.split("#")[2].trim() + "')").attr('value');
109
- // Select the option value
110
- $("#node-input-dptdevice_software_update").val(optVal);
109
+ var $dptSelect = $("#node-input-dptdevice_software_update");
110
+ if (optVal !== undefined && optVal !== null) {
111
+ $dptSelect.val(optVal).trigger('change');
112
+ } else {
113
+ $dptSelect.trigger('change');
114
+ }
111
115
  }
112
116
  }).focus(function () {
113
117
  $(this).autocomplete('search', $(this).val() + 'exactmatch');
@@ -243,4 +247,3 @@
243
247
 
244
248
  </script>
245
249
 
246
-
@@ -141,9 +141,12 @@
141
141
  }
142
142
 
143
143
  var optVal = $("#node-input-dpt option:contains('" + ui.item.label.split("#")[2].trim() + "')").attr('value');
144
- // Select the option value
145
- $("#node-input-" + _DPT).val(optVal);
146
- $("#node-input-" + _DPT).trigger("change");
144
+ var $dptSelect = $("#node-input-" + _DPT);
145
+ if (optVal !== undefined && optVal !== null) {
146
+ $dptSelect.val(optVal).trigger('change');
147
+ } else {
148
+ $dptSelect.trigger('change');
149
+ }
147
150
  }
148
151
  };
149
152
  return paramAutoComplete;
@@ -358,4 +361,3 @@
358
361
  </br>
359
362
  </script>
360
363
 
361
-
@@ -97,9 +97,12 @@
97
97
  }
98
98
  $('#node-input-name').val("Recall: " + sDevName + "/" + $('#node-input-name').val().split("/")[1]);
99
99
  var optVal = $("#node-input-dpt option:contains('" + ui.item.label.split("#")[2].trim() + "')").attr('value');
100
- // Select the option value
101
- $("#node-input-dpt").val(optVal);
102
- $("#node-input-dpt").trigger("change");
100
+ var $dptSelect = $("#node-input-dpt");
101
+ if (optVal !== undefined && optVal !== null) {
102
+ $dptSelect.val(optVal).trigger('change');
103
+ } else {
104
+ $dptSelect.trigger('change');
105
+ }
103
106
  }
104
107
  }).focus(function () {
105
108
  $(this).autocomplete('search', $(this).val() + 'exactmatch');
@@ -222,9 +225,12 @@
222
225
  }
223
226
  $('#node-input-name').val($('#node-input-name').val().split("/")[0] + "/Save: " + sDevName);
224
227
  var optVal = $("#node-input-dptSave option:contains('" + ui.item.label.split("#")[2].trim() + "')").attr('value');
225
- // Select the option value
226
- $("#node-input-dptSave").val(optVal);
227
- $("#node-input-dptSave").trigger("change");
228
+ var $dptSelect = $("#node-input-dptSave");
229
+ if (optVal !== undefined && optVal !== null) {
230
+ $dptSelect.val(optVal).trigger('change');
231
+ } else {
232
+ $dptSelect.trigger('change');
233
+ }
228
234
  }
229
235
  }).focus(function () {
230
236
  $(this).autocomplete('search', $(this).val() + 'exactmatch');
@@ -363,7 +369,12 @@
363
369
  } catch (error) {
364
370
  }
365
371
  var optVal = $(".rowRuleDPT option:contains('" + ui.item.label.split("#")[2].trim() + "')").attr('value');
366
- oDPTField.val(optVal);
372
+ var $dptSelect = oDPTField;
373
+ if (optVal !== undefined && optVal !== null) {
374
+ $dptSelect.val(optVal).trigger('change');
375
+ } else {
376
+ $dptSelect.trigger('change');
377
+ }
367
378
  }
368
379
  }).focus(function () {
369
380
  $(this).autocomplete('search', $(this).val() + 'exactmatch');
@@ -493,5 +504,3 @@
493
504
  </div>
494
505
 
495
506
  </script>
496
-
497
-
package/package.json CHANGED
@@ -3,14 +3,14 @@
3
3
  "engines": {
4
4
  "node": ">=20.18.1"
5
5
  },
6
- "version": "4.0.5",
6
+ "version": "4.0.7",
7
7
  "description": "Control your KNX and KNX Secure intallation via Node-Red! A bunch of KNX nodes, with integrated Philips HUE control and ETS group address importer. Easy to use and highly configurable.",
8
8
  "dependencies": {
9
9
  "binary-parser": "2.2.1",
10
10
  "crypto-js": "4.2.0",
11
11
  "dns-sync": "0.2.1",
12
12
  "js-yaml": "4.1.0",
13
- "knxultimate": "5.1.1",
13
+ "knxultimate": "5.1.2",
14
14
  "lodash": "4.17.21",
15
15
  "mkdirp": "3.0.1",
16
16
  "node-color-log": "12.0.1",