-
Notifications
You must be signed in to change notification settings - Fork 57
/
hmipChannelConfigDialogs.tcl
executable file
·6596 lines (5392 loc) · 251 KB
/
hmipChannelConfigDialogs.tcl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
source [file join $env(DOCUMENT_ROOT) config/easymodes/etc/uiElements.tcl]
source [file join $env(DOCUMENT_ROOT) config/easymodes/etc/hmip_helper.tcl]
source [file join $env(DOCUMENT_ROOT) config/easymodes/etc/options.tcl]
source [file join $env(DOCUMENT_ROOT) config/easymodes/etc/hmipDRAP_HAPMaintenance.tcl]
source [file join $env(DOCUMENT_ROOT) config/easymodes/etc/hmipHeatingClimateControlTransceiverEffect.tcl]
# source [file join $env(DOCUMENT_ROOT) config/easymodes/etc/hmipAlarmPanel.tcl]
proc getMaintenance {chn p descr address} {
global dev_descr env iface
upvar $p ps
upvar $descr psDescr
upvar prn prn
upvar special_input_id special_input_id
set devType $dev_descr(TYPE)
set devIsHmIPWired [isDevHmIPW $devType]
set cyclicInfo false
set specialID "[getSpecialID $special_input_id]"
set html ""
set CHANNEL $special_input_id
puts "<script type=\"text/javascript\">load_JSFunc('/config/easymodes/MASTER_LANG/HmIP-ParamHelp.js');</script>"
if {([string equal $devType "HmIP-CCU3"] == 1) || ([string equal $devType "RPI-RF-MOD"] == 1)} {
append html "[getNoParametersToSet]"
return $html
}
if {[string equal $devType "HmIP-DRG-DALI"] == 1} {
append html "<tr>"
append html "<td>\${lblRefreshDaliDevices}</td>"
append html "<td><input id=\"btnDaliRefreshDevices\" type=\"button\" name=\"btnSearchDaliDevices\" onclick=\"daliRefreshDevices('$dev_descr(ADDRESS)');\"></td>"
append html "</tr>"
append html "[getHorizontalLine]"
append html "<script type=\"text/javascript\">translateButtons(\"btnSearchDaliDevices\");</script>"
}
set param CYCLIC_INFO_MSG
if { [info exists ps($param)] == 1 } {
set cyclicInfo true
append html "<tr>"
append html "<td>\${stringTableCyclicInfoMsg}</td>"
append html "<td>[getCheckBoxCyclicInfoMsg $param $ps($param) $chn $prn]</td>"
append html "</tr>"
}
set param CYCLIC_INFO_MSG_DIS
if { [info exists ps($param)] == 1 } {
set cyclicInfo true
incr prn
append html "<tr>"
append html "<td>\${stringTableCyclicInfoMsgDis}</td>"
append html "<td>[getTextField $param $ps($param) $chn $prn] [getMinMaxValueDescr $param]</td>"
append html "</tr>"
}
set param CYCLIC_INFO_MSG_DIS_UNCHANGED
if { [info exists ps($param)] == 1 } {
set cyclicInfo true
incr prn
append html "<tr>"
append html "<td>\${stringTableCyclicInfoMsgDisUnChanged}</td>"
append html "<td>[getTextField $param $ps($param) $chn $prn] [getMinMaxValueDescr $param]</td>"
append html "</tr>"
}
if {$cyclicInfo == "true"} {
append html "[getHorizontalLine]"
}
if {[string equal $devType "HmIP-RGBW"] != 1} {
set param OVERTEMP_LEVEL
if { [info exists ps($param)] == 1 } {
incr prn
append html "<tr name=\"expertParam\" class=\"hidden\">"
append html "<td>\${stringTableDimmerOverTempLevel}</td>"
append html "<td>[getTextField $param $ps($param) $chn $prn] [getUnit $param] [getMinMaxValueDescr $param]</td>"
append html "</tr>"
}
}
set param DEVICE_OPERATION_MODE
if {[info exists ps($param)] == 1} {
if {[string equal $devType "HmIP-RGBW"] == 1} {
incr prn
append html "<tr>"
append html "<td>\${lblMode}</td>"
array_clear options
set options(0) "\${optionRGBW}"
set options(1) "\${optionRGB}"
set options(2) "\${option2xTunableWhite}"
set options(3) "\${option4xPWM}"
append html "<td>[getOptionBox '$param' options $ps($param) $chn $prn] [getHelpIcon $param\_RGBW]</td>"
append html "</tr>"
# Check if links or programs exist
set linksAvailable 0
set parentAddress $dev_descr(ADDRESS)
for {set loop 1} {$loop <= 4} {incr loop} {
set chnAddress "$parentAddress:[expr $chn + $loop]"
if {[getLinkCountByAddress $iface $chnAddress] > 0} {
set linksAvailable 1
break;
}
}
append html "<tr><td colspan='3'>"
append html "<span id='hintLinksPrograms' class='attention hidden'></span>"
append html "</td></tr>"
append html "<script type=\"text/javascript\">"
append html "var hint = '';"
append html "var hasLinks = ($linksAvailable == 1) ? true : false;"
append html "var oDevice = DeviceList.getDeviceByAddress('$parentAddress');"
append html "var hasPrograms = homematic('Device.hasPrograms', {'id': oDevice.id});"
append html "if (hasPrograms || hasLinks) \{"
append html "jQuery('\[name=\"DEVICE_OPERATION_MODE\"\]').first().prop('disabled', true);"
append html "hint = (hasPrograms && hasLinks) ? translateKey('hintWiredBlindLinksAndProgramsAvailable') : (hasPrograms) ? translateKey('hintWiredBlindProgramsAvailable') : (hasLinks) ? translateKey('hintWiredBlindLinksAvailable') : '';"
append html "jQuery('#hintLinksPrograms').html(hint).show();"
append html "\}"
append html "</script>"
append html "<script type=\"text/javascript\">"
append html " oChn = DeviceList.getChannelByAddress('$address'); "
append html "storeRGBWDeviceMode = function() {"
append html "var mode = jQuery('\[name=\"DEVICE_OPERATION_MODE\"\]').first().val();"
append html " homematic('Interface.setMetadata', {'objectId': oChn.id, 'dataId': 'deviceMode', 'value': mode}); "
append html "};"
# Extend the footer buttons
append html " window.setTimeout(function() { "
append html " var elm = jQuery('#footerButtonOK, #footerButtonTake'); "
append html " elm.off('click').click(function() {storeRGBWDeviceMode();}); "
append html " },10); "
append html "</script>"
append html "[getHorizontalLine]"
}
}
set param LOW_BAT_LIMIT
if { [info exists ps($param)] == 1 } {
# SPHM-875
if {([string equal $devType "HmIP-SWO-PL"] != 1) && ([string equal $devType "HmIP-SWO-PR"] != 1) && ([string equal $devType "HmIP-SWO-B"] != 1)} {
incr prn
append html "<tr>"
append html "<td>\${stringTableBatteryLowBatLimit}</td>"
append html "<td>[getTextField $param $ps($param) $chn $prn] [getUnit $param] [getMinMaxValueDescr $param]</td>"
append html "</tr>"
}
}
set param LOCAL_RESET_DISABLED
if { [info exists ps($param)] == 1 } {
incr prn
append html "<tr name=\"expertParam\" class=\"hidden\">"
append html "<td>\${stringTableLocalResetDisable}</td>"
append html "<td>[getCheckBox '$param' $ps($param) $chn $prn] [getHelpIcon $param]</td>"
append html "</tr>"
}
set param GLOBAL_BUTTON_LOCK
if { [info exists ps($param)] == 1 } {
incr prn
append html "<tr>"
append html "<td>\${stringTableGlobalButtonLock}</td>"
append html "<td>[getCheckBox '$param' $ps($param) $chn $prn]</td>"
append html "</tr>"
}
if {([string equal $devType "HmIPW-DRAP"] != 1) && ([string equal $devType "HmIP-HAP"] != 1) && ([string equal $devType "HmIP-HAP-A"] != 1) && ([string equal $devType "HmIP-HAP-B1"] != 1) && ([string equal $devType "HmIP-HAP JS1"] != 1)} {
set param ROUTER_MODULE_ENABLED
if { [info exists ps($param)] == 1 } {
incr prn
append html "<tr>"
append html "<td>\${stringTableRouterModuleEnabled}</td>"
append html "<td>[getCheckBox '$param' $ps($param) $chn $prn] [getHelpIcon $param]</td>"
append html "</tr>"
}
}
set param MULTICAST_ROUTER_MODULE_ENABLED
if { [info exists ps($param)] == 1} {
incr prn
append html "<tr>"
append html "<td>\${stringTableMulticastRouterModuleEnabled}</td>"
append html "<td>[getCheckBox '$param' $ps($param) $chn $prn] [getHelpIcon $param 600 300]</td>"
append html "</tr>"
}
set param ENABLE_ROUTING
if { [info exists ps($param)] == 1} {
if {$devIsHmIPWired == "false"} {
incr prn
append html "<tr>"
append html "<td>\${stringTableEnableRouting}</td>"
append html "<td>[getCheckBox '$param' $ps($param) $chn $prn] [getHelpIcon $param]</td>"
append html "</tr>"
}
}
# INPUT_1_COPRO_ENABLED - INPUT_X_COPRO_ENABLED
if {[string equal $devType "ELV-SH-BM-S"] == 1} {
for {set loop 1} {$loop <= 4} {incr loop} {
if {[info exists ps(INPUT_$loop\_COPRO_ENABLED)] == 1} {
if {$loop == 1} {append html "[getHorizontalLine]"}
incr prn
append html "<tr>"
append html "<td>\${stringTableInputCoProEnabled_$loop}</td>"
append html "<td>[getCheckBox 'INPUT_$loop\_COPRO_ENABLED' $ps(INPUT_$loop\_COPRO_ENABLED) $chn $prn] [getHelpIcon INPUT_COPRO_ENABLED]</td>"
append html "</tr>"
if {$loop == 4} {append html "[getHorizontalLine]"}
}
}
}
set param DISABLE_DEVICE_ALIVE_SIGNAL
if { [info exists ps($param)] == 1} {
if {$devIsHmIPWired == "false"} {
incr prn
append html "<tr>"
append html "<td>\${stringTableDisableDeviceAliveSignal}</td>"
append html "<td>[getCheckBox '$param' $ps($param) $chn $prn] [getHelpIcon $param]</td>"
append html "</tr>"
}
}
set comment {
# This parameter shouldn't be visible in the WebUI. This was once clarified with the PM
set param DISABLE_MSG_TO_AC
if { [info exists ps($param)] == 1} {
if {$devIsHmIPWired == "false"} {
incr prn
append html "<tr>"
append html "<td>\${stringTableDisableMsgToAC}</td>"
append html "<td>[getCheckBox '$param' $ps($param) $chn $prn] [getHelpIcon $param]</td>"
append html "</tr>"
}
}
}
set param DEVICE_SENSOR_SENSITIVITY
if { [info exists ps($param)] == 1} {
incr prn
if {[string equal $devType "HmIP-STI"] != 1} {
option RAW_0_100Percent
} else {
# HmIP-STI = 0 - 4
for {set val 0} {$val <= 4} {incr val} {
set options($val) "[expr $val + 1]"
}
}
append html "<tr>"
if {([string first "HmIP-SMO230" $devType] != -1) || ([string first "HmIPW-SMO230" $devType] != -1)} {
append html "<td>\${stringTableDeviceSensorSensibilitySabotage}</td>"
} else {
append html "<td>\${stringTableDeviceSensorSensibility}</td>"
}
if {[string equal $devType "HmIP-STI"] != 1} {
append html "<td>[get_ComboBox options $param separate_$CHANNEL\_$prn ps $param]</td>"
} else {
# HmIP-STI
append html "<td>[get_ComboBox options $param separate_$CHANNEL\_$prn ps $param] [getHelpIcon $param]</td>"
}
append html "</tr>"
}
set param DISPLAY_CONTRAST
if { [info exists ps($param)] == 1 } {
incr prn
array_clear options
if {([string equal $devType "HmIP-eTRV-3"] == 1) || ([string equal $devType "HmIP-eTRV-E"] == 1) || ([string equal $devType "HmIP-eTRV-E-S"] == 1) || ([string equal $devType "HmIP-eTRV-E-A"] == 1) } {
set optVal 0
for {set val 1} {$val <= 16} {incr val} {
if {$val < 7} {incr optVal 5} elseif {$val < 14} {incr optVal 10} else {incr optVal 20}
set options($optVal) "$val"
}
} else {
# This is currently in use for the HmIPW-DRAP
for {set val 0} {$val <= 31} {incr val} {
set options($val) "$val"
}
}
append html "<tr>"
append html "<td>\${stringTableDisplayContrast}</td>"
append html "<td>[get_ComboBox options $param separate_$CHANNEL\_$prn ps $param]</td>"
append html "</tr>"
}
set param BACKLIGHT_ON_TIME
if { [info exists ps($param)] == 1 } {
incr prn
append html "<tr>"
append html "<td>\${stringTableDisplayLightingDuration}</td>"
append html "<td>[getTextField $param $ps($param) $chn $prn] [getUnit $param] [getMinMaxValueDescr $param]</td>"
append html "</tr>"
}
set param SIGNAL_BRIGHTNESS
if { [info exists ps($param)] == 1 } {
incr prn
append html "<tr>"
append html "<td>\${stringTableBrightnessVisKey}</td>"
option RAW_0_100Percent_1
append html "<td>[getOptionBox '$param' options $ps($param) $chn $prn]</td>"
append html "</tr>"
}
set param MOUNTING_ORIENTATION
if { [info exists ps($param)] == 1 } {
incr prn
if {
([string first "HmIP-BBL" $devType] == -1)
&& ([string first "HmIP-BROLL" $devType] == -1)
&& ([string first "HmIP-BDT" $devType] == -1)
&& ([string first "HmIP-eTRV-F" $devType] == -1)
} {
append html "<tr>"
append html "<td>\${lblMountingOrientation}</td>"
array_clear options
set options(0) "\${stringTableWinMaticMountSideLeft}"
set options(1) "\${stringTableWinMaticMountSideRight}"
append html "<td>[getOptionBox '$param' options $ps($param) $chn $prn] [getHelpIcon $param]</td>"
append html "</tr>"
} else {
append html "<tr>"
append html "<td>\${lblMountingOrientationA}</td>"
array_clear options
set options(0) "\${option0Degree}"
set options(1) "\${option90Degree}"
set options(2) "\${option180Degree}"
set options(3) "\${option270Degree}"
append html "<td>[getOptionBox '$param' options $ps($param) $chn $prn] [getHelpIcon $param\_A]</td>"
append html "</tr>"
}
}
set param DISPLAY_MODE
if { [info exists ps($param)] == 1 } {
incr prn
append html "<tr>"
append html "<td>\${lblDisplayModeETRV}</td>"
array_clear options
set options(0) "\${optionReducedMode}"
set options(1) "\${optionFunctionalMode}"
append html "<td>[getOptionBox '$param' options $ps($param) $chn $prn] [getHelpIcon $param]</td>"
append html "</tr>"
}
set param DISPLAY_INVERTED_COLORS
if { [info exists ps($param)] == 1 } {
incr prn
append html "<tr>"
append html "<td>\${lblDisplayColor}</td>"
array_clear options
set options(0) "\${optionNormalColors}"
set options(1) "\${optionInvertedColors}"
append html "<td>[getOptionBox '$param' options $ps($param) $chn $prn] [getHelpIcon $param]</td>"
append html "</tr>"
}
set param PERMANENT_FULL_RX
if { [info exists ps($param)] == 1 } {
append html "[getHorizontalLine]"
incr prn
array_clear options
set options(0) "\${operationModeBattery}"
set options(1) "\${operationModeMains}"
append html "<tr>"
append html "<td>\${powerSupply}</td>"
if {([string equal $devType "HmIP-SMI55"] == 1) || ([string equal $devType "HmIP-SMI55-A"] == 1) || ([string equal $devType "HmIP-SMI55-2"] == 1)} {
append html "<td>[get_ComboBox options $param separate_$CHANNEL\_$prn ps $param onchange=paramPermanentFullRXChanged(this.id\,this.value)] [getHelpIcon $param]</td><td id='placeHolder' style='width:55%'></td>"
} else {
append html "<td>[get_ComboBox options $param separate_$CHANNEL\_$prn ps $param onchange=showParameterHint(this.id\,this.value)]</td>"
}
append html "</tr>"
if {([string equal $devType "HmIP-SMI55"] == 1) || ([string equal $devType "HmIP-SMI55-A"] == 1) || ([string equal $devType "HmIP-SMI55-2"] == 1)} {
append html "<tr id=\"hint_separate_$CHANNEL\_$prn\">"
append html "<td colspan='3'>\${hintPERMANENT_FULL_RX}</td>"
append html "</tr>"
} else {
append html "[getHorizontalLine]"
}
append html "<script type='text/javascript'>"
append html "var setMetaPermanentFullRx = false;"
append html "paramPermanentFullRXChanged = function(elmID, value) {"
append html "showParameterHint(elmID, value);"
append html "setMetaPermanentFullRx = true;"
append html ""
append html "};"
append html " showParameterHint = function(elmID, value) { "
append html " var elm = jQuery(\"#hint_\"+elmID), "
append html " placeHolder = jQuery(\"#placeHolder\"); "
append html " if (parseInt(value) == 0) { "
append html " elm.show(); "
append html " placeHolder.show(); "
append html "} else {"
append html " elm.hide(); "
append html " placeHolder.hide(); "
append html " } "
append html " }; "
append html " var elm = jQuery('#separate_$CHANNEL\_$prn');"
append html " showParameterHint('separate_$CHANNEL\_$prn', elm.val());"
append html " storeModePermanentFullRx = function() { "
append html " var dev = DeviceList.getDeviceByAddress('$dev_descr(ADDRESS)'); "
append html " if (setMetaPermanentFullRx) { "
append html " var elm = jQuery('\[name=\"PERMANENT_FULL_RX\"\]')\[0\];"
append html " if (typeof elm != 'undefined') \{ "
append html " homematic('Interface.setMetadata', {'objectId': dev.id, 'dataId': 'permanentFullRX', 'value': jQuery(elm).val()}); "
append html " \} "
append html " } else { "
# Check if the meta data permanentFullRX is available (it's not with new devices)
append html " var permanentFullRXAvailable = homematic('Interface.getMetadata', {'objectId': 12604, 'dataId': 'permanentFullRX'});"
append html " if (permanentFullRXAvailable != 0 && permanentFullRXAvailable != 1) { "
# Setting the meta data to the default value which is 0
append html " homematic('Interface.setMetadata', {'objectId': dev.id, 'dataId': 'permanentFullRX', 'value': 0}); "
append html " } "
append html " } "
append html " }; "
# Extend the footer buttons
append html " window.setTimeout(function() { "
append html " var elm = jQuery('#footerButtonOK, #footerButtonTake'); "
append html " elm.off('click').click(function() {storeModePermanentFullRx();}); "
append html " },1200); "
append html "</script>"
}
# DRAP/HAP Integration #
if {([string equal $devType "HmIPW-DRAP"] == 1) || ([string equal $devType "HmIP-HAP"] == 1) || ([string equal $devType "HmIP-HAP-A"] == 1) || ([string equal $devType "HmIP-HAP-B1"] == 1) || ([string equal $devType "HmIP-HAP JS1"] == 1)} {
append html "[getDRAP_HAPMaintenance $chn ps psDescr]"
}
# End DRAP/HAP Integration #
if {([string equal $devType "HmIP-DLD"] != 1) && ([string equal $devType "HmIP-DLD-A"] != 1) && ([string equal $devType "HmIP-DLD-S"] != 1) && ([string equal $devType "HmIP-SMO230"] != 1) && ([string equal $devType "HmIP-SMO230-A"] != 1) && ([string equal $devType "HmIPW-SMO230"] != 1) && ([string equal $devType "HmIPW-SMO230-A"] != 1)} {
set param LONGITUDE
if { [info exists ps($param)] == 1 } {
incr prn
append html "<tr name='positionFixing'>"
append html "<td>\${lblLocation} - \${dialogSettingsTimePositionLblLongtitude}</td>"
append html "<td>[getTextField $param $ps($param) $chn $prn] [getMinMaxValueDescr $param]</td>"
append html "</tr>"
set param LATITUDE
incr prn
append html "<tr name='positionFixing'>"
append html "<td>\${lblLocation} - \${dialogSettingsTimePositionLblLatitude}</td>"
append html "<td>[getTextField $param $ps($param) $chn $prn] [getMinMaxValueDescr $param]</td>"
append html "</tr>"
}
}
### Blocking ###
set param BLOCKING_ON_SABOTAGE
if { [info exists ps($param)] == 1 } {
incr prn
append html "[getHorizontalLine]"
append html "<tr>"
append html "<td>\${stringTableBlockingOnSabotage}</td>"
if {[string equal $devType "HmIP-FWI"] == 1} {
append html "<td>[getCheckBox '$param' $ps($param) $chn $prn] [getHelpIcon $param\_FWI]</td>"
} else {
append html "<td>[getCheckBox '$param' $ps($param) $chn $prn] [getHelpIcon $param]</td>"
}
append html "</tr>"
}
set param SABOTAGE_CONTACT_TYPE
if { [info exists ps($param)] == 1 } {
incr prn
append html "<tr>"
append html "<td>\${stringTableSabotageContactType}</td>"
option NORMALLY_CLOSE_OPEN
append html "<td>[getOptionBox $param options $ps($param) $chn $prn]</td>"
append html "</tr>"
}
set param BLOCKING_TEMPORARY
if { [info exists ps($param)] == 1 } {
set min [expr {[expr int([getMinValue $param]) + 1]}]
set max [expr {[expr int([getMaxValue $param])]}]
array_clear options
set options(0) \${optionNotActive}
for {set val $min} {$val <= $max} {incr val} {
set options($val) "$val"
}
incr prn
append html "<tr>"
append html "<td>\${stringTableBlockingTemporary}</td>"
if {[string equal $devType "HmIP-FWI"] == 1} {
append html "<td>[get_ComboBox options $param separate_$CHANNEL\_$prn ps $param] [getHelpIcon $param\_FWI]</td>"
} else {
append html "<td>[get_ComboBox options $param separate_$CHANNEL\_$prn ps $param] [getHelpIcon $param]</td>"
}
append html "</tr>"
}
set param BLOCKING_PERMANENT
if { [info exists ps($param)] == 1 } {
set min [expr {[expr int([getMinValue $param]) + 1]}]
set max [expr {[expr int([getMaxValue $param])]}]
array_clear options
set options(0) \${optionNotActive}
for {set val $min} {$val <= $max} {incr val} {
set options($val) "$val"
}
incr prn
append html "<tr>"
append html "<td>\${stringTableBlockingPermanent}</td>"
if {[string equal $devType "HmIP-FWI"] == 1} {
append html "<td>[get_ComboBox options $param separate_$CHANNEL\_$prn ps $param] [getHelpIcon $param\_FWI]</td>"
} elseif {[string equal $devType "HmIP-WKP"] == 1} {
append html "<td>[get_ComboBox options $param separate_$CHANNEL\_$prn ps $param] [getHelpIcon $param\_WKP]</td>"
} else {
append html "<td>[get_ComboBox options $param separate_$CHANNEL\_$prn ps $param] [getHelpIcon $param]</td>"
}
append html "</tr>"
append html "[getHorizontalLine]"
}
### End Blocking ###
if {[session_is_expert]} {
append html "<script type=\"text/javascript\">"
append html "jQuery(\"\[name='expertParam'\]\").show();"
append html "</script>"
}
return $html
}
proc getKeyTransceiver {chn p descr} {
global env dev_descr
# source [file join $env(DOCUMENT_ROOT) config/easymodes/etc/hmipAlarmPanel.tcl]
upvar $p ps
upvar $descr psDescr
upvar special_input_id special_input_id
set specialID "[getSpecialID $special_input_id]"
set html ""
set specialParam 0
set prn 1
set param CHANNEL_OPERATION_MODE
if { [info exists ps($param)] == 1 } {
append html "<tr>"
append html "<td>\${lblChannelActivInactiv}</td>"
array_clear options
set options(0) "\${optionInactiv}"
set options(1) "\${optionActiv}"
append html "<td>[getOptionBox '$param' options $ps($param) $chn $prn]</td>"
append html "</tr>"
incr prn
}
set comment {
# Intruduced with the DBB but currently not supported
set param DISABLE_ACOUSTIC_CHANNELSTATE
if { [info exists ps($param)] == 1 } {
append html "<tr>"
append html "<td>\${stringTableDisableAcousticChannelState}</td>"
append html "<td>[getCheckBox '$param' $ps($param) $chn $prn]</td>"
append html "</tr>"
set specialParam 1
incr prn
}
}
set param DISABLE_ACOUSTIC_SENDSTATE
if { [info exists ps($param)] == 1 } {
append html "<tr>"
append html "<td>\${stringTableDisableAcousticSendState}</td>"
append html "<td>[getCheckBox '$param' $ps($param) $chn $prn]</td>"
append html "</tr>"
set specialParam 1
incr prn
}
set param LED_DISABLE_CHANNELSTATE
if { [info exists ps($param)] == 1 } {
append html "<tr>"
append html "<td>\${stringTableLEDDisableChannelState}</td>"
append html "<td>[getCheckBox '$param' $ps($param) $chn $prn]</td>"
append html "</tr>"
set specialParam 1
incr prn
}
set param LED_DISABLE_SENDSTATE
if { [info exists ps($param)] == 1 } {
append html "<tr>"
append html "<td>\${stringTableLEDDisableSendState}</td>"
append html "<td>[getCheckBox '$param' $ps($param) $chn $prn]</td>"
append html "</tr>"
set specialParam 1
incr prn
}
# This is for the display configuration for the keys of a ACOUSTIC_DISPLAY_RECEIVER (e. g. HmIP-WRCD)
set paramText TEXT
set paramIcon TEXT_ICON
if {(! [catch {set tmp $ps($paramText)}]) && (! [catch {set tmp $ps($paramIcon)}])} {
set psText $ps(TEXT)
set psAlignment $ps(TEXT_ALIGNMENT)
set psBgColor $ps(TEXT_BACKGROUND_COLOR)
set psTextColor $ps(TEXT_COLOR)
set psIcon $ps(TEXT_ICON)
append html [getAcousticdDisplayReceiverConfig $special_input_id $chn $psText $psAlignment $psBgColor $psTextColor $psIcon]
set specialParam 1
}
if {$specialParam == 1} {
append html "[getHorizontalLine]"
}
set param DBL_PRESS_TIME
if { [info exists ps($param)] == 1 } {
append html "<tr>"
append html "<td>\${stringTableKeyDblPressTime}</td>"
append html "<td>[getTextField $param $ps($param) $chn $prn] [getUnit $param] [getMinMaxValueDescr $param]</td>"
append html "</tr>"
incr prn
}
set param LONG_PRESS_TIME
if { [info exists ps($param)] == 1 } {
append html "<tr>"
append html "<td>\${stringTableKeyLongPressTimeA}</td>"
append html "<td>[getTextField $param $ps($param) $chn $prn] [getUnit $param] [getMinMaxValueDescr $param] []</td>"
append html "</tr>"
incr prn
}
set param REPEATED_LONG_PRESS_TIMEOUT_UNIT
if { [info exists ps($param)] == 1 } {
if {[string equal $dev_descr(TYPE) "HmIP-STI"] == 0} {
append html "<tr>"
append html "<td>\${stringTableKeyLongPressTimeOut}</td>"
append html [getComboBox $chn $prn "$specialID" "timeOnOffShort"]
append html "</tr>"
append html [getTimeUnitComboBoxShort $param $ps($param) $chn $prn $special_input_id]
incr prn
set param REPEATED_LONG_PRESS_TIMEOUT_VALUE
append html "<tr id=\"timeFactor_$chn\_$prn\" class=\"hidden\">"
append html "<td>\${stringTableKeyLongPressTimeOutValue}</td>"
append html "<td>[getTextField $param $ps($param) $chn $prn] [getMinMaxValueDescr $param]</td>"
append html "</tr>"
append html "<tr id=\"space_$chn\_$prn\" class=\"hidden\"><td><br/></td></tr>"
append html "<script type=\"text/javascript\">setTimeout(function() {setCurrentTimeShortOption($chn, [expr $prn - 1], '$specialID');}, 100)</script>"
} else {
append html "<tr>"
append html "<td>\${stringTableKeyLongPressTimeOut}</td>"
set param REPEATED_LONG_PRESS_TIMEOUT_VALUE
# append html "<td>[getTextField $param $ps($param) $chn $prn] [getUnit $param] [getMinMaxValueDescr $param]</td>"
append html "<td>"
append html "<input id='$param\_$chn\_$prn' type='text' size='5' value=[expr [format {%1.1f} $ps($param)] / 10] onblur=\"ProofAndSetValue(this.id, this.id, '0.0', '6.0', 1); setVal(this.value, $chn, $prn);\"> [getUnit $param]"
append html "<input id='separate_CHANNEL_$chn\_$prn' name='$param' type='text' class='hidden'>"
append html "</td>"
append html "</tr>"
append html "<script type=\"text/javascript\">"
append html "var chn=$chn,prn=$prn;"
append html "setVal = function (val, chn, prn) \{"
append html "jQuery('#\separate_CHANNEL_'+chn+'_'+prn).val(parseInt(val * 10));"
append html "\};"
append html "setTimeout(function() {setVal(jQuery('#'+'$param\_$chn\_$prn').val(), chn, prn);},50);"
append html "</script>"
}
}
# append html "[getAlarmPanel ps]"
set param ABORT_EVENT_SENDING_CHANNELS
if { [info exists ps($param)] == 1 } {
incr prn
append html "[getHorizontalLine]"
append html "<tr>"
append html "<td colspan='2' style='text-align:center;'>\${stringTableAbortEventSendingChannels} [getHelpIcon $param]</td>"
append html "</tr>"
append html "<tr>"
append html "<td>\${lblStopRunningLink}</td>"
append html "<td colspan='2'><table>"
append html "<tr id='hookAbortEventSendingChannels_1_$chn'/>"
append html "<tr id='hookAbortEventSendingChannels_2_$chn'/>"
append html "</table></td>"
append html "</tr>"
append html "<script type='text/javascript'>"
append html "addAbortEventSendingChannels('$chn','$prn', '$dev_descr(ADDRESS)', $ps($param));"
append html "</script>"
}
return $html
}
proc getGenericInputTransmitter {chn p descr} {
upvar $p ps
upvar $descr psDescr
upvar prn prn
upvar special_input_id special_input_id
set specialID "[getSpecialID $special_input_id]"
set html ""
puts "<script type=\"text/javascript\">load_JSFunc('/config/easymodes/MASTER_LANG/HmIP-FAL_MIOB.js');</script>"
set param MIOB_DIN_CONFIG
if { [info exists ps($param)] == 1 } {
incr prn
append html "<tr>"
append html "<td>\${stringTableMiobDinConfig}</td>"
option MIOB_DIN_CONFIG
append html "<td>[getOptionBox '$param' options $ps($param) $chn $prn "onchange=\"showHideKeyParams($chn);\""]</td>"
append html "</tr>"
}
set param MIOB_DIN_MODE
if { [info exists ps($param)] == 1 } {
incr prn
append html "<tr>"
append html "<td>\${stringTableMiobDinMode}</td>"
option NORMALLY_OPEN_CLOSE
append html "<td>[getOptionBox $param options $ps($param) $chn $prn]</td>"
append html "</tr>"
}
set param EVENT_DELAY_UNIT
if { [info exists ps($param)] == 1 } {
incr prn
append html "<tr>"
append html "<td>\${stringTableEventDelay}</td>"
append html [getComboBox $chn $prn "$specialID" "eventDelay"]
append html "</tr>"
append html [getTimeUnitComboBoxShortwoHour $param $ps($param) $chn $prn $special_input_id]
incr prn
set param EVENT_DELAY_VALUE
append html "<tr id=\"timeFactor_$chn\_$prn\" class=\"hidden\">"
append html "<td>\${stringTableEventDelayValue}</td>"
append html "<td>[getTextField $param $ps($param) $chn $prn] [getMinMaxValueDescr $param]</td>"
append html "</tr>"
append html "<tr id=\"space_$chn\_$prn\" class=\"hidden\"><td><br/></td></tr>"
append html "<script type=\"text/javascript\">setTimeout(function() {setCurrentDelayShortOptionPanelB($chn, [expr $prn - 1], '$specialID');}, 100)</script>"
}
set param DBL_PRESS_TIME
if { [info exists ps($param)] == 1 } {
incr prn
append html "<tr class=\"hidden\" name=\"paramKey_$chn\">"
append html "<td>\${stringTableKeyDblPressTime}</td>"
append html "<td>[getTextField $param $ps($param) $chn $prn] [getUnit $param] [getMinMaxValueDescr $param]</td>"
append html "</tr>"
incr prn
set param LONG_PRESS_TIME
append html "<tr class=\"hidden\" name=\"paramKey_$chn\">"
append html "<td>\${stringTableKeyLongPressTimeA}</td>"
append html "<td>[getTextField $param $ps($param) $chn $prn] [getUnit $param] [getMinMaxValueDescr $param] []</td>"
append html "</tr>"
}
set param REPEATED_LONG_PRESS_TIMEOUT_UNIT
if { [info exists ps($param)] == 1 } {
incr prn
append html "<tr class=\"hidden\" name=\"paramKey_$chn\">"
append html "<td>\${stringTableKeyLongPressTimeOut}</td>"
append html [getComboBox $chn $prn "$specialID" "delayShort"]
append html "</tr>"
append html [getTimeUnitComboBoxShort $param $ps($param) $chn $prn $special_input_id]
}
set param REPEATED_LONG_PRESS_TIMEOUT_VALUE
if { [info exists ps($param)] == 1 } {
incr prn
append html "<tr id=\"timeFactor_$chn\_$prn\" class=\"hidden\">"
append html "<td>\${stringTableKeyLongPressTimeOutValue}</td>"
append html "<td>[getTextField $param $ps($param) $chn $prn] [getMinMaxValueDescr $param]</td>"
append html "</tr>"
append html "<tr id=\"space_$chn\_$prn\" class=\"hidden\"><td><br/></td></tr>"
append html "<script type=\"text/javascript\">setTimeout(function() {setCurrentDelayShortOption($chn, [expr $prn - 1], '$specialID');}, 100)</script>"
}
append html "<script type=\"text/javascript\">"
# This is necessary for the parameters of keys.
# When the last value of the time select box is chosen (Enter value) then show additional elements to allow
# the user to enter a time.
append html "initKeyParams = function(chn) \{"
append html "var timeSelectElm = jQuery(\"#timeDelay_\"+chn+\"_6\");"
append html "var timeDelayVal = timeSelectElm.val();"
append html "var valueForEnterUserVal = parseInt(jQuery(\"#\" +timeSelectElm.attr(\"id\") + \" option:last-child\").val());"
append html "if (parseInt(timeDelayVal) == valueForEnterUserVal) \{"
append html "jQuery(\"#timeBase_\"+chn+\"_6\").attr(\"name\",\"paramKey_\" + chn);"
append html "jQuery(\"#timeFactor_\"+chn+\"_7\").attr(\"name\",\"paramKey_\" + chn);"
append html "jQuery(\"#space_\"+chn+\"_7\").attr(\"name\",\"paramKey_\" + chn);"
append html "\}"
append html "\};"
# Show the parameters for the configuration of the keys only when the mode TACTILE_SWITCH_INPUT is chosen
append html "showHideKeyParams = function(chn) \{"
append html "var arKeyParams = jQuery(\"\[name='paramKey_\" + chn +\"'\]\");"
# append html "var selectedMode = parseInt(jQuery(\"#separate_CHANNEL_\" + chn + \"_1\").val());"
# append html "if (selectedMode == 4) \{arKeyParams.show();\} else \{arKeyParams.hide();\}"
append html "var optionClass = jQuery(\"#separate_CHANNEL_\" + chn + \"_1\ option:selected\").attr(\"class\");"
append html "if (optionClass == \"TACTILE_SWITCH_INPUT\") \{arKeyParams.show();\} else \{arKeyParams.hide();\}"
append html "\};"
append html "setTimeout(function() {initKeyParams($chn);showHideKeyParams($chn);},200);"
append html "</script>"
return $html
}
proc getMultiModeInputTransmitter {chn p descr address} {
global dev_descr
upvar $p ps
upvar $descr psDescr
upvar prn prn
upvar special_input_id special_input_id
set hlpBoxWidth 450
set hlpBoxHeight 80
set eventDelayPrn 0
set specialID "[getSpecialID $special_input_id]"
set CHANNEL $special_input_id
set param LED_DISABLE_CHANNELSTATE
if { [info exists ps($param)] == 1 } {
incr prn
append html "<tr>"
append html "<td>\${stringTableLEDDisableChannelState}</td>"
append html "<td>[getCheckBox '$param' $ps($param) $chn $prn]</td>"
append html "</tr>"
}
set param LED_DISABLE_SENDSTATE
if { [info exists ps($param)] == 1 } {
incr prn
append html "<tr>"
append html "<td>\${stringTableLEDDisableSendState}</td>"
append html "<td>[getCheckBox '$param' $ps($param) $chn $prn]</td>"
append html "</tr>"
}
set param CHANNEL_OPERATION_MODE
if { [info exists ps($param)] == 1 } {
set valueListIndex [expr [lsearch $psDescr($param) VALUE_LIST] +1]
set valueList "[lindex $psDescr($param) $valueListIndex]"
incr prn
append html "<tr>"
append html "<td>\${stringTableKeyTransceiverChannelOperationMode}</td>"
array_clear options
set options(0) "\${lblNotActiv}"
set options(1) "\${stringTableKeyTransceiverChannelOperationModeKeyBehavior}"
set options(2) "\${stringTableKeyTransceiverChannelOperationModeSwitchBehavior}"
if {[lsearch $valueList BINARY_BEHAVIOR] != -1} {
set options(3) "\${stringTableKeyTransceiverChannelOperationModeBinaryBehavior}"
}
if {[lsearch $valueList LEVEL_KEY_BEHAVIOR ] != -1} {
set options(4) "\${stringTableKeyTransceiverChannelOperationModeLevelKeyBehavior}"
}
if {[lsearch $valueList CONDITIONAL_BEHAVIOR ] != -1} {
set options(5) "\${stringTableKeyTransceiverChannelOperationModeConditionalBehavior}"
}
append html "<td>[getOptionBox '$param' options $ps($param) $chn $prn onchange=\"channelOperationModeChange(this.value,'$address')\"]</td>"
append html "</tr>"
}
set param EVENT_DELAY_UNIT
if { [info exists ps($param)] == 1 } {
incr prn
set eventDelayPrn $prn
append html "<tr name=\"multiModeInputTransceiverEventDelay_$chn\">"
append html "<td>\${stringTableEventDelay}</td>"
append html [getComboBox $chn $prn "$specialID" "eventDelay"]
append html "</tr>"
append html [getTimeUnitComboBoxShortwoHour $param $ps($param) $chn $prn $special_input_id]
incr prn
set param EVENT_DELAY_VALUE
append html "<tr id=\"timeFactor_$chn\_$prn\" class=\"hidden\">"
append html "<td>\${stringTableEventDelayValue}</td>"
append html "<td>[getTextField $param $ps($param) $chn $prn] [getMinMaxValueDescr $param]</td>"
append html "</tr>"
append html "<tr id=\"space_$chn\_$prn\" class=\"hidden\"><td><br/></td></tr>"
append html "<script type=\"text/javascript\">setTimeout(function() {setCurrentDelayShortOptionPanelB($chn, [expr $prn - 1], '$specialID');}, 100)</script>"
}
# ** KEY **
set param DBL_PRESS_TIME
if { [info exists ps($param)] == 1 } {
incr prn
append html "<tr name=\"multiModeInputTransceiverKey_$chn\">"
append html "<td>\${stringTableKeyDblPressTime}</td>"
append html "<td>[getTextField $param $ps($param) $chn $prn] [getUnit $param] [getMinMaxValueDescr $param]</td>"
append html "</tr>"
}
set param LONG_PRESS_TIME
if { [info exists ps($param)] == 1 } {
incr prn
append html "<tr name=\"multiModeInputTransceiverKey_$chn\">"
append html "<td>\${stringTableKeyLongPressTimeA}</td>"
append html "<td>[getTextField $param $ps($param) $chn $prn] [getUnit $param] [getMinMaxValueDescr $param] []</td>"
append html "</tr>"
}
set param REPEATED_LONG_PRESS_TIMEOUT_UNIT
if { [info exists ps($param)] == 1 } {
incr prn
append html "<tr name=\"multiModeInputTransceiverKey_$chn\">"
append html "<td>\${stringTableKeyLongPressTimeOut}</td>"
append html [getComboBox $chn $prn "$specialID" "timeOnOffShort"]
append html "</tr>"
append html [getTimeUnitComboBoxShort $param $ps($param) $chn $prn $special_input_id]
incr prn
set param REPEATED_LONG_PRESS_TIMEOUT_VALUE
append html "<tr id=\"timeFactor_$chn\_$prn\" class=\"hidden\">"
append html "<td>\${stringTableKeyLongPressTimeOutValue}</td>"
append html "<td>[getTextField $param $ps($param) $chn $prn] [getMinMaxValueDescr $param]</td>"
append html "</tr>"
append html "<tr id=\"space_$chn\_$prn\" class=\"hidden\"><td><br/></td></tr>"
append html "<script type=\"text/javascript\">setTimeout(function() {setCurrentTimeShortOption($chn, [expr $prn - 1], '$specialID');}, 100)</script>"
}
# ** END KEY **
set param MSG_FOR_POS_A
if { [info exists ps($param)] == 1 } {
incr prn
append html "<tr name=\"multiModeInputTransceiverBinary_$chn\">"