-
-
Notifications
You must be signed in to change notification settings - Fork 34
/
debmatic.patch
1388 lines (1331 loc) · 52.6 KB
/
debmatic.patch
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
diff -ruN --no-dereference fw.3.79.6.orig/bin/hm_autoconf fw.3.79.6.debmatic/bin/hm_autoconf
--- fw.3.79.6.orig/bin/hm_autoconf
+++ fw.3.79.6.debmatic/bin/hm_autoconf
@@ -41,9 +41,9 @@
load tclrega.so
load tclrpc.so
-
+
# List of default functions (german "Gewerke") that will be automatically generated
- set FUNCTIONLIST {
+ array set FUNCTIONLIST {
LIGHT funcLight
HEATING funcHeating
CLIMATECONTROL funcClimateControl
@@ -55,22 +55,7 @@
CENTRAL funcCentral
ENERGY funcEnergy
}
-
- # List of default rooms that will be automatically generated
- set ROOMLIST {
- "roomLivingRoom"
- "roomKitchen"
- "roomBedroom"
- "roomChildrensRoom1"
- "roomChildrensRoom2"
- "roomOffice"
- "roomBathroom"
- "roomGarage"
- "roomHWR"
- "roomGarden"
- "roomTerrace"
- }
-
+
# Mapping of channel type to default function for the channel
array set CHANNEL_FUNCTIONS {
BLIND LIGHT
@@ -128,6 +113,11 @@
rega "dom.GetObject($dev_id).ReadyConfig(true);"
puts "ReadyConfig($dev_id)"
}
+
+ proc conf_device_HmIP-RFUSB { url dev_id desc_var } {
+ rega "dom.GetObject($dev_id).ReadyConfig(true);"
+ puts "ReadyConfig($dev_id)"
+ }
proc conf_device_HmIP-CCU3 { url dev_id desc_var } {
rega "dom.GetObject($dev_id).ReadyConfig(true);"
@@ -151,7 +141,6 @@
proc conf_value_WEATHER.RAIN_COUNTER { url ch_id ch_desc_var value_desc_var} {
create_rain_calculation $ch_id
-
}
proc conf_value_DISPLAY.SERVICE_COUNT { url ch_id ch_desc_var value_desc_var} {
@@ -162,90 +151,6 @@
create_sysvar_to_value_prg $ch_id ALARM_COUNT 40 "Alarmmeldungen anzeigen"
}
- proc create_objects {collection enum_type names} {
- set ids [rega "dom.GetObject($collection).EnumIDs()"]
- set i 0
- foreach name $names {
- set id [lindex $ids $i]
- if { "$id" == "" } {
- #create object first
- set script "\
- var new_id = -1;\n\
- object o = dom.CreateObject( OT_ENUM, \"new object\" );\n\
- if( o ) \{\n\
- o.EnumType( $enum_type );\n\
- boolean res = dom.GetObject( $collection ).Add( o );\n\
- if( res ) \{\n\
- new_id = o.ID();\n\
- \} else \{\n\
- dom.DeleteObject( o.ID() );\n\
- \}\n\
- \}\
- "
- #puts "Executing $script"
- array set r [rega_script $script]
- set id $r(new_id)
- if { $id < 0 } {
- puts "Error creating object"
- }
- }
- rega "dom.GetObject($id).Name(\"[lindex $names $i]\")"
- rega "dom.GetObject($id).Enabled(true)"
- incr i
- }
- return [lsort [rega "dom.GetObject($collection).EnumUsedIDs()"]]
- }
-
- proc create_functions {} {
- global FUNCTIONLIST
- for { set i 1 } { $i < [llength $FUNCTIONLIST] } { incr i 2 } {
- lappend names [lindex $FUNCTIONLIST $i]
- }
- return [create_objects ID_FUNCTIONS etFunction $names]
- }
-
- proc create_rooms {} {
- global ROOMLIST
- return [create_objects ID_ROOMS etRoom $ROOMLIST]
- }
-
- proc create_sysvars {} {
- rega_script {
- object sv=dom.CreateObject(OT_ALARMDP, "${sysVarAlarmZone1}");
- dom.GetObject(ID_SYSTEM_VARIABLES).Add(sv.ID());
- sv.DPInfo("${sysVarAlarmZone1Msg}");
- sv.ValueUnit("");
- sv.ValueType( ivtBinary );
- sv.ValueSubType( istAlarm );
- sv.ValueName1("${sysVarAlarmZone1Triggered}");
- sv.ValueName0("${sysVarAlarmZone1NotTriggered}");
- sv.AlType(atSystem);
- sv.AlArm(true);
-
- sv=dom.GetObject(ID_PRESENT);
- dom.GetObject(ID_SYSTEM_VARIABLES).Add(sv.ID());
- sv.Name("${sysVarPresence}");
- sv.DPInfo("${sysVarPresenceMsg}");
- sv.ValueUnit("");
- sv.ValueName1("${sysVarPresencePresent}");
- sv.ValueName0("${sysVarPresenceNotPresent}");
-
- sv=dom.GetObject(40);
- dom.GetObject(ID_SYSTEM_VARIABLES).Add(sv.ID());
- sv.Name("${sysVarAlarmMessages}");
- sv.DPInfo("${sysVarAlarmMessagesCount}");
- sv.Internal(0);
-
- sv=dom.GetObject(41);
- dom.GetObject(ID_SYSTEM_VARIABLES).Add(sv.ID());
- sv.Name("${sysVarServiceMessages}");
- sv.DPInfo("${sysVarServiceMessagesCount}");
- sv.Internal(0);
-
- }
- }
-
-
proc create_sysvar_to_value_prg {ch_id value sv_id prg_name} {
set script "string ch_id=\"$ch_id\";\nstring value_name=\"$value\";\nstring sv_id=$sv_id;\nstring prg_name=\"$prg_name\";\n"
append script {
@@ -514,7 +419,9 @@
string ifaces;
foreach(if_id, dom.GetObject(ID_INTERFACES).EnumUsedIDs()){
object o=dom.GetObject(if_id);
- ifaces = ifaces # if_id # " {" # o.InterfaceUrl() # " " # o.Name() # "} ";
+ if(o.InterfaceUrl() != "") {
+ ifaces = ifaces # if_id # " {" # o.InterfaceUrl() # " " # o.Name() # "} ";
+ }
}
string dev_id;
string devs;
@@ -531,35 +438,22 @@
}
}
}
- string functions=dom.GetObject(ID_FUNCTIONS).EnumUsedIDs();
- string rooms=dom.GetObject(ID_ROOMS).EnumUsedIDs();
- string sysvars=dom.GetObject(ID_SYSTEM_VARIABLES).EnumUsedIDs();
+ string func_id;
+ string functions;
+ foreach (func_id, dom.GetObject(ID_FUNCTIONS).EnumUsedIDs()){
+ functions = functions # " {" # dom.GetObject(func_id).Name() # "} " # func_id;
+ }
}]
array set ifmap $result(ifaces)
array set devmap $result(devs)
-
- set ise_functions [lsort $result(functions)]
- if { [llength $ise_functions] == 0 } {
- puts "No functions defined, creating default functions"
- set ise_functions [create_functions]
- }
-
- if { [llength $result(rooms)] == 0 } {
- puts "No rooms defined, creating default rooms"
- create_rooms
- }
-
- if { [llength $result(sysvars)] == 0 } {
- puts "No system variables defined, creating default system variables"
- create_sysvars
- }
-
- set i 0
- foreach function_id $ise_functions {
- if { $i >= [llength $FUNCTIONLIST] } break;
- set FUNCTIONMAP([lindex $FUNCTIONLIST $i]) $function_id
- incr i 2
+
+ array set ise_functions $result(functions)
+
+ foreach func [array names FUNCTIONLIST] {
+ if {[info exists ise_functions($FUNCTIONLIST($func))]} {
+ set FUNCTIONMAP($func) $ise_functions($FUNCTIONLIST($func))
+ }
}
# We need a catch because OSRAM Lightify causes an error (/tmp/hm_autoconf_xxx.log) because a list must have an even number of elements.
@@ -592,20 +486,26 @@
array_clear ch_descr
array set ch_descr [xmlrpc $url getDeviceDescription $ch_address]
if [info exist DEVICE_FUNCTIONS($dev_descr(TYPE))] {
- catch {
- rega "dom.GetObject($FUNCTIONMAP($DEVICE_FUNCTIONS($dev_descr(TYPE)))).Add($ise_ch_id)"
+ if [info exist FUNCTIONMAP($DEVICE_FUNCTIONS($dev_descr(TYPE)))] {
+ catch {
+ rega "dom.GetObject($FUNCTIONMAP($DEVICE_FUNCTIONS($dev_descr(TYPE)))).Add($ise_ch_id)"
+ }
}
}
if [info exist CHANNEL_FUNCTIONS($ch_descr(TYPE))] {
- catch {
- rega "dom.GetObject($FUNCTIONMAP($CHANNEL_FUNCTIONS($ch_descr(TYPE)))).Add($ise_ch_id)"
+ if [info exist FUNCTIONMAP($CHANNEL_FUNCTIONS($ch_descr(TYPE)))] {
+ catch {
+ rega "dom.GetObject($FUNCTIONMAP($CHANNEL_FUNCTIONS($ch_descr(TYPE)))).Add($ise_ch_id)"
+ }
+ }
+ }
+ if { [string equal $ch_descr(PARENT_TYPE) "HmIP-RCV-50"] == 1 } {
+ if [info exist FUNCTIONMAP(CENTRAL)] {
+ catch {
+ rega "dom.GetObject($FUNCTIONMAP(CENTRAL)).Add($ise_ch_id)"
+ }
}
}
- if { [string equal $ch_descr(PARENT_TYPE) "HmIP-RCV-50"] == 1 } {
- catch {
- rega "dom.GetObject($FUNCTIONMAP(CENTRAL)).Add($ise_ch_id)"
- }
- }
set procname "conf_channel_$ch_descr(TYPE)"
if {[llength [info procs $procname]]} {
if [catch { $procname $url $ise_ch_id ch_descr } errMsg] {
diff -ruN --no-dereference fw.3.79.6.orig/bin/hm_startup fw.3.79.6.debmatic/bin/hm_startup
--- fw.3.79.6.orig/bin/hm_startup
+++ fw.3.79.6.debmatic/bin/hm_startup
@@ -1,27 +1,7 @@
#!/bin/tclsh
-#*******************************************************************************
-#* hm_startup
-#* Wird beim Starten von ise ReGa ausgeführt.
-#*
-#* Aufgaben:
-#* - sucht fertig konfigurierte Geräte und setzt deren Kanäle ebenfalls auf
-#* "fertig konfiguriert"
-#*
-#* Autor : Falk Werner
-#* Erstellt am: 23.07.2008
-#*******************************************************************************
-
-################################################################################
-# Module #
-################################################################################
-
load tclrega.so
-################################################################################
-# Prozeduren #
-################################################################################
-
#*******************************************************************************
#* Sucht fertig konfigurierte Geräte und setzt deren Kanäle auf "fertig
#* konfiguriert".
@@ -37,8 +17,145 @@
}
}
+# List of default functions (german "Gewerke") that will be automatically generated
+set FUNCTIONLIST {
+ "funcLight"
+ "funcHeating"
+ "funcClimateControl"
+ "funcWeather"
+ "funcEnvironment"
+ "funcSecurity"
+ "funcLock"
+ "funcButton"
+ "funcCentral"
+ "funcEnergy"
+}
+
+# List of default rooms that will be automatically generated
+set ROOMLIST {
+ "roomLivingRoom"
+ "roomKitchen"
+ "roomBedroom"
+ "roomChildrensRoom1"
+ "roomChildrensRoom2"
+ "roomOffice"
+ "roomBathroom"
+ "roomGarage"
+ "roomHWR"
+ "roomGarden"
+ "roomTerrace"
+}
+
+proc create_objects {collection enum_type names} {
+ set ids [rega "dom.GetObject($collection).EnumIDs()"]
+ set i 0
+
+ foreach name $names {
+ set id [lindex $ids $i]
+ if { "$id" == "" } {
+ #create object first
+ set script "\
+ var new_id = -1;\n\
+ object o = dom.CreateObject( OT_ENUM, \"new object\" );\n\
+ if( o ) \{\n\
+ o.EnumType( $enum_type );\n\
+ boolean res = dom.GetObject( $collection ).Add( o );\n\
+ if( res ) \{\n\
+ new_id = o.ID();\n\
+ \} else \{\n\
+ dom.DeleteObject( o.ID() );\n\
+ \}\n\
+ \}\
+ "
+ #puts "Executing $script"
+ array set r [rega_script $script]
+ set id $r(new_id)
+ if { $id < 0 } {
+ puts "Error creating object"
+ }
+ }
+
+ rega "dom.GetObject($id).Name(\"[lindex $names $i]\")"
+ rega "dom.GetObject($id).Enabled(true)"
+ incr i
+ }
+
+ return [lsort [rega "dom.GetObject($collection).EnumUsedIDs()"]]
+}
+
+proc create_default_functions {} {
+ global FUNCTIONLIST
+ return [create_objects ID_FUNCTIONS etFunction $FUNCTIONLIST]
+}
+
+proc create_default_rooms {} {
+ global ROOMLIST
+ return [create_objects ID_ROOMS etRoom $ROOMLIST]
+}
+
+proc create_default_sysvars {} {
+ rega_script {
+ object sv=dom.CreateObject(OT_ALARMDP, "${sysVarAlarmZone1}");
+ dom.GetObject(ID_SYSTEM_VARIABLES).Add(sv.ID());
+ sv.DPInfo("${sysVarAlarmZone1Msg}");
+ sv.ValueUnit("");
+ sv.ValueType( ivtBinary );
+ sv.ValueSubType( istAlarm );
+ sv.ValueName1("${sysVarAlarmZone1Triggered}");
+ sv.ValueName0("${sysVarAlarmZone1NotTriggered}");
+ sv.AlType(atSystem);
+ sv.AlArm(true);
+
+ sv=dom.GetObject(ID_PRESENT);
+ dom.GetObject(ID_SYSTEM_VARIABLES).Add(sv.ID());
+ sv.Name("${sysVarPresence}");
+ sv.DPInfo("${sysVarPresenceMsg}");
+ sv.ValueUnit("");
+ sv.ValueName1("${sysVarPresencePresent}");
+ sv.ValueName0("${sysVarPresenceNotPresent}");
+
+ sv=dom.GetObject(40);
+ dom.GetObject(ID_SYSTEM_VARIABLES).Add(sv.ID());
+ sv.Name("${sysVarAlarmMessages}");
+ sv.DPInfo("${sysVarAlarmMessagesCount}");
+ sv.Internal(0);
+
+ sv=dom.GetObject(41);
+ dom.GetObject(ID_SYSTEM_VARIABLES).Add(sv.ID());
+ sv.Name("${sysVarServiceMessages}");
+ sv.DPInfo("${sysVarServiceMessagesCount}");
+ sv.Internal(0);
+ }
+}
+
+proc create_default_objects {} {
+ array set result [rega_script {
+ string functions=dom.GetObject(ID_FUNCTIONS).EnumUsedIDs();
+ string rooms=dom.GetObject(ID_ROOMS).EnumUsedIDs();
+ string sysvars=dom.GetObject(ID_SYSTEM_VARIABLES).EnumUsedIDs();
+ }]
+
+ set ise_functions [lsort $result(functions)]
+ if { [llength $ise_functions] == 0 } {
+ puts "No functions defined, creating default functions"
+ create_default_functions
+ }
+
+ if { [llength $result(rooms)] == 0 } {
+ puts "No rooms defined, creating default rooms"
+ create_default_rooms
+ }
+
+ if { [llength $result(sysvars)] == 0 } {
+ puts "No system variables defined, creating default system variables"
+ create_default_sysvars
+ }
+}
+
################################################################################
# Einsprungpunkt #
################################################################################
checkDevices
+create_default_objects
+
diff -ruN --no-dereference fw.3.79.6.orig/www/api/methods/ccu/restartReGa.tcl fw.3.79.6.debmatic/www/api/methods/ccu/restartReGa.tcl
--- fw.3.79.6.orig/www/api/methods/ccu/restartReGa.tcl
+++ fw.3.79.6.debmatic/www/api/methods/ccu/restartReGa.tcl
@@ -7,4 +7,4 @@
# Rückgabewert: kein
##
-catch {exec /etc/init.d/S70ReGaHss restart}
\ No newline at end of file
+catch {exec systemctl restart debmatic-rega.service}
diff -ruN --no-dereference fw.3.79.6.orig/www/api/methods/session/create.tcl fw.3.79.6.debmatic/www/api/methods/session/create.tcl
--- fw.3.79.6.orig/www/api/methods/session/create.tcl
+++ fw.3.79.6.debmatic/www/api/methods/session/create.tcl
@@ -11,7 +11,7 @@
package require http
-set LOGIN_URL {127.0.0.1/login.htm}
+set LOGIN_URL {127.0.0.1:8181/login.htm}
##
# getHttpHeader
diff -ruN --no-dereference fw.3.79.6.orig/www/api/methods/session/login.tcl fw.3.79.6.debmatic/www/api/methods/session/login.tcl
--- fw.3.79.6.orig/www/api/methods/session/login.tcl
+++ fw.3.79.6.debmatic/www/api/methods/session/login.tcl
@@ -12,7 +12,7 @@
package require http
-set LOGIN_URL 127.0.0.1/login.htm
+set LOGIN_URL 127.0.0.1:8181/login.htm
##
# getHttpHeader
diff -ruN --no-dereference fw.3.79.6.orig/www/api/methods/session/renew.tcl fw.3.79.6.debmatic/www/api/methods/session/renew.tcl
--- fw.3.79.6.orig/www/api/methods/session/renew.tcl
+++ fw.3.79.6.debmatic/www/api/methods/session/renew.tcl
@@ -12,7 +12,7 @@
package require http
set sid $args(_session_id_)
-set url "127.0.0.1/pages/index.htm?sid=@$sid@"
+set url "127.0.0.1:8181/pages/index.htm?sid=@$sid@"
::http::cleanup [::http::geturl $url]
diff -ruN --no-dereference fw.3.79.6.orig/www/api/methods/user/restarthmipserver.tcl fw.3.79.6.debmatic/www/api/methods/user/restarthmipserver.tcl
--- fw.3.79.6.orig/www/api/methods/user/restarthmipserver.tcl
+++ fw.3.79.6.debmatic/www/api/methods/user/restarthmipserver.tcl
@@ -7,6 +7,5 @@
#
# Rückgabewert: true
-#exec /etc/init.d/S62HMServer start &
-exec -- /usr/bin/nohup /etc/init.d/S62HMServer restart >/dev/null &
+exec systemctl restart debmatic-hmserver.service
jsonrpc_response true
diff -ruN --no-dereference fw.3.79.6.orig/www/api/methods/user/restartlighttpd.tcl fw.3.79.6.debmatic/www/api/methods/user/restartlighttpd.tcl
--- fw.3.79.6.orig/www/api/methods/user/restartlighttpd.tcl
+++ fw.3.79.6.debmatic/www/api/methods/user/restartlighttpd.tcl
@@ -7,8 +7,7 @@
#
# Rückgabewert: true
-exec echo "restart-lighttpd" | socat - UNIX-CONNECT:/tmp/eq3-services.uds >/dev/null
-#exec -- /usr/bin/nohup /etc/init.d/S50lighttpd restart >/dev/null
-#exec /etc/init.d/S50lighttpd restart
+exec systemctl restart lighttpd.service
+exec systemctl restart debmatic-lighttpd.service
jsonrpc_response true
diff -ruN --no-dereference fw.3.79.6.orig/www/config/backup.tcl fw.3.79.6.debmatic/www/config/backup.tcl
--- fw.3.79.6.orig/www/config/backup.tcl
+++ fw.3.79.6.debmatic/www/config/backup.tcl
@@ -8,14 +8,14 @@
proc create_backup {} {
set HOSTNAME [exec hostname]
set iso8601_date [exec date -Iseconds]
- regexp {^(\d+)-(\d+)-(\d+)T(\d+):(\d+):(\d+)([+-]\d+)$} $iso8601_date dummy year month day hour minute second zone
+ regexp {^(\d+)-(\d+)-(\d+)T(\d+):(\d+):(\d+)([+-]\d+:?\d*)$} $iso8601_date dummy year month day hour minute second zone
#save DOM
rega system.Save()
cd /
if {[getProduct] < 3 } {
catch { exec tar czf /tmp/usr_local.tar.gz usr/local }
} else {
- catch { exec tar --owner=root --group=root --exclude=usr/local/tmp --exclude=/usr/local/.firmwareUpdate --exclude=usr/local/lost+found --exclude=usr/local/eQ-3-Backup --exclude-tag=.nobackup --one-file-system --ignore-failed-read -czf /tmp/usr_local.tar.gz usr/local }
+ catch { exec tar --owner=root --group=root --exclude=usr/local/tmp --exclude=/usr/local/.firmwareUpdate --exclude=usr/local/lost+found --exclude=usr/local/eQ-3-Backup --exclude-tag=.nobackup --one-file-system --ignore-failed-read -czf /tmp/usr_local.tar.gz etc/config --transform "s/^/usr\\/local\\//g" }
}
cd /tmp/
@@ -36,4 +36,4 @@
}
close $fd
file delete -force /tmp/usr_local.tar.gz /tmp/firmware_version /tmp/signature
-}
\ No newline at end of file
+}
diff -ruN --no-dereference fw.3.79.6.orig/www/config/control_panel.cgi fw.3.79.6.debmatic/www/config/control_panel.cgi
--- fw.3.79.6.orig/www/config/control_panel.cgi
+++ fw.3.79.6.debmatic/www/config/control_panel.cgi
@@ -102,16 +102,6 @@
}
}
-puts {
- <!-- Netzwerkeinstellungen -->
- <td>
- <div class="cpButton">
- <div class="StdTableBtn CLASS21701" onclick="showNetworkCP()">${btnSysConfNetworkConfig}</div>
- <div class="StdTableBtnHelp"><img id="showNetworkCPHelp" src="/ise/img/help.png"></div>
- </div>
- </td>
-}
-
if {![isOldCCU]} {
puts {
</tr>
@@ -119,27 +109,6 @@
}
}
-
-if {[getProduct] >= 3} {
- puts {
- <td>
- <div class="cpButton">
- <div class="StdTableBtn CLASS21701" onclick="new FirewallConfigDialog();">${btnSysConfFirewallConfig}</div>
- <div class="StdTableBtnHelp"><img id="newFirewallConfigDialogHelp" src="/ise/img/help.png"></div>
- </div>
- </td>
- }
-} else {
- puts {
- <td>
- <div class="cpButton">
- <div class="StdTableBtn CLASS21701" onclick="new FirewallConfigDialog_CCU2();">${btnSysConfFirewallConfig}</div>
- <div class="StdTableBtnHelp"><img id="newFirewallConfigDialogHelp" src="/ise/img/help.png"></div>
- </div>
- </td>
- }
-}
-
if {[isOldCCU]} {
puts {
<td>
@@ -162,14 +131,6 @@
</div>
</td>
- <!-- Zusatzsoftware -->
- <td>
- <div class="cpButton">
- <div class="StdTableBtn CLASS21701" onclick="showSoftwareCP();">${btnSysConfAdditionalSoft}</div>
- <div class="StdTableBtnHelp"><img id="showSoftwareCPHelp" src="/ise/img/help.png"></div>
- </div>
- </td>
-
<!-- Storage Settings -->
<td>
<div class="cpButton">
@@ -183,17 +144,6 @@
<tr>
}
- if {[getProduct] >= 3} {
- puts {
- <!-- Button Security Wizard - slimmed down InstallWizard without the admin password dialog -->
-
- <td>
- <div class="StdTableBtn CLASS21701" onclick="new DialogChooseSecuritySettings();">${btnSecuritySettings}</div>
- <div class="StdTableBtnHelp"><img id="showSecuritySettingsCPHelp" src="/ise/img/help.png"></div>
- </td>
- }
- }
-
puts {
<!-- Kopplungen -->
<td>
diff -ruN --no-dereference fw.3.79.6.orig/www/config/cp_maintenance.cgi fw.3.79.6.debmatic/www/config/cp_maintenance.cgi
--- fw.3.79.6.orig/www/config/cp_maintenance.cgi
+++ fw.3.79.6.debmatic/www/config/cp_maintenance.cgi
@@ -379,171 +379,10 @@
# The available version will be set further down with "jQuery('#availableSWVersion').html(homematic.com.getLatestVersion());"
}
}
- table_row {
- table_data {align="left"} {colspan="3"} {
- #puts "[bold "Software-Update durchf�hren"]"
- puts "<b>\${dialogSettingsCMLblPerformSoftwareUpdate}</b>"
- }
- }
- table_row {
- table_data {align="left"} {colspan="3"} {
- division {class="popupControls CLASS20905"} {
- table {
- table_row {
- table_data {
- division {class="CLASS20905" style="display: none"} {id="btnFwDirectDownload"} {} "onClick=\"performDirectDownload();\"" {}
- division {class="CLASS20905"} "onClick=\"showCCULicense(true);\"" {puts "\${btnDirectFwUpload}"}
- }
- }
- }
- }
- }
- }
- table_row {
- table_data {align="left"} {colspan="3"} {
- #puts "[bold "i18n: Alternative Vorgehensweise:"]"
- puts "<b>\${dialogSettingsCMLblAlternateSoftwareUpdate}</b>"
- }
- }
- table_row {
- td {width="20"} {}
- table_data {align="left"} {
- puts "\${dialogSettingsCMLblPerformSoftwareUpdateStep1}"
- }
- table_data {
- division {class="popupControls CLASS20905"} {
- table {
- table_row {
- table_data {
- division {class="CLASS20908" style="display: none"} {id="btnFwDownload"} {} "onClick=\"window.location.href='$REMOTE_FIRMWARE_SCRIPT?cmd=download&version=$cur_version&serial=$serial&lang=de&product=HM-CCU[getProduct]';\"" {}
- division {class="CLASS20908"} "onClick=\"showCCULicense(false);\"" {puts "\${dialogSettingsCMBtnPerformSoftwareUpdateDownload}"}
- }
- }
- }
- }
- }
- }
- table_row {
- td {width="20"} {}
- table_data {align="left"} {colspan="2"} {
- puts "\${dialogSettingsCMLblPerformSoftwareUpdateStep2}"
- }
- }
- table_row {
- td {width="20"} {}
- table_data {colspan="2"} {
- form "$env(SCRIPT_NAME)?sid=$sid" name=firmware_form {target=firmware_upload_iframe} enctype=multipart/form-data method=post {
- export action=firmware_upload
- export downloadOnly=$downloadOnly
- file_button firmware_file size=30 maxlength=1000000
- }
- puts {<iframe name="firmware_upload_iframe" style="display: none;"></iframe>}
- }
- }
- table_row {
- td {width="20"} {}
- table_data {align="left"} {
- puts "\${dialogSettingsCMLblPerformSoftwareUpdateStep3}"
- }
- table_data {
- division {class="popupControls CLASS20905"} {
- table {
- table_row {
- table_data {
- division {class="CLASS20919"} {onClick="stopHmIPServer();document.firmware_form.submit();showUserHint();"} {
- puts "\${dialogSettingsCMBtnPerformSoftwareUpdateUpload}"
- }
- }
- }
- }
- }
- }
- }
- table_row {
- td {width="20"} {}
- table_data {align="left"} {colspan="2"} {class="CLASS20920"} {
- puts "\${dialogSettingsCMLblPerformSoftwareUpdateStep4}"
- }
- }
- }
- }
- table_data {align="left"} {class="CLASS20921"} {
- puts "\${dialogSettingsCMHintSoftwareUpdate1}"
- number_list {class="j_noForcedUpdate"} {
- li {
- ${dialogSettingsCMHintSoftwareUpdate2} }
- li {
- ${dialogSettingsCMHintSoftwareUpdate3}
- }
- li {
- ${dialogSettingsCMHintSoftwareUpdate3a}
- }
- set bat_level [get_bat_level]
- if {$bat_level < 50} {
- set msg " \${dialogSettingsCMHintSoftwareUpdate4a} $bat_level%. "
- append msg \${dialogSettingsCMHintSoftwareUpdate4b}
- li $msg
- }
- }
-
- division {class="j_forcedUpdate" style="padding:10px;"} {
- puts "<br/>\${dialogSettingsCMHintSoftwareUpdate2}"
- }
- }
- }
- table_row {class="CLASS20902 j_noForcedUpdate j_fwUpdateOnly"} {
- table_data {class="CLASS20903"} $styleMaxWidth {
- #puts "Zentralen-<br>"
- #puts "Neustart"
- puts "\${dialogSettingsCMTDCCURestart}"
-
- }
- table_data {class="CLASS20904"} {
- division {class="popupControls CLASS20905"} {
- division {class="CLASS20910"} {onClick="OnReboot();"} {
- puts "\${dialogSettingsCMBtnCCURestart}"
- }
- }
- }
- table_data {align="left"} {class="CLASS20904"} {
- puts "\${dialogSettingsCMHintRestart}"
- }
- }
-
- if {[getProduct] >= 3} {
- table_row {class="CLASS20902 j_noForcedUpdate j_fwUpdateOnly"} {
- table_data {class="CLASS20903"} $styleMaxWidth {
- puts "\${dialogSettingsCMTDCCUShutdown}"
- }
- table_data {class="CLASS20904"} {
- division {class="popupControls CLASS20905"} {
- division {class="CLASS20910"} {onClick="OnShutdown();"} {
- puts "\${dialogSettingsCMBtnCCUShutdown}"
- }
- }
- }
- table_data {align="left"} {class="CLASS20904"} {
- puts "\${dialogSettingsCMHintShutdown}"
- }
- }
- }
-
- # Abgesicherter Modus
- table_row {class="CLASS20902 j_noForcedUpdate j_fwUpdateOnly"} {
- table_data {class="CLASS20903"} $styleMaxWidth {
- #puts "Abgesicherter<br>"
- #puts "Modus"
- puts "\${dialogSettingsCMTDCCUSafeMode}"
- }
- table_data {class="CLASS20904"} {
- division {class="popupControls CLASS20905"} {
- division {class="CLASS20910 colorGradient50px"} {onClick="OnEnterSafeMode();"} {
- puts "\${dialogSettingsCMBtnCCURestartSafe}"
- }
}
}
table_data {align="left"} {class="CLASS20904"} {
- puts "\${dialogSettingsCMHintRestartSafeMode}"
+ puts "\${dialogSettingsDebmaticDonateHint}"
}
}
@@ -698,14 +537,6 @@
}
}
table_row {
- table_data {align="left"} {
- puts "\${dialogSettingsCMLblLogSysLogServerAddress}"
- }
- table_data {align="right"} {
- catch {cgi_text log_server=[get_logserver] {size="25"} {id="text_log_server"}}
- }
- }
- table_row {
table_data {
}
table_data {align="left"} {
@@ -764,7 +595,7 @@
pb += "&level_hs485d="+document.getElementById("select_log_hs485d").value;
//pb += "&level_pfmd="+document.getElementById("select_log_pfmd").value;
pb += "&level_rega="+document.getElementById("select_log_rega").value;
- pb += "&log_server="+document.getElementById("text_log_server").value;
+ pb += "&log_server=";
var opts = {
postBody: pb,
@@ -1363,16 +1194,13 @@
puts "Failure"
return
}
- catch {exec killall syslogd}
- catch {exec killall klogd}
- exec /etc/init.d/S07logging start
puts "Success -confirm"
}
proc action_download_logfile {} {
set HOSTNAME [exec hostname]
set iso8601_date [exec date -Iseconds]
- regexp {^(\d+)-(\d+)-(\d+)T(\d+):(\d+):(\d+)([+-]\d+)$} $iso8601_date dummy year month day hour minute second zone
+ regexp {^(\d+)-(\d+)-(\d+)T(\d+):(\d+):(\d+)([+-]\d+:?\d*)$} $iso8601_date dummy year month day hour minute second zone
puts "Content-Type:application/x-download"
puts "Content-Disposition:attachment;filename=[set HOSTNAME]-$year-$month-$day.log\n"
diff -ruN --no-dereference fw.3.79.6.orig/www/config/cp_security.cgi fw.3.79.6.debmatic/www/config/cp_security.cgi
--- fw.3.79.6.orig/www/config/cp_security.cgi
+++ fw.3.79.6.debmatic/www/config/cp_security.cgi
@@ -297,7 +297,6 @@
} else {
exec touch /usr/local/.doFactoryReset
}
- exec kill -SIGQUIT 1
}]} {
# TWIST-22
@@ -801,25 +800,9 @@
set source_minor [lindex $source_version 1]
set source_patch [lindex $source_version 2]
- # Check if a backup with HmIP support can be used without problems - A CCU with a version < 2.17.14 had no HmIP support. Therefore we don't check such backups
- # (For CCU2_CCU2 this check has been executed above)
- if { "CCU2_CCU2" != $migration_mode } {
- if {($source_major >= 3) || (($source_major == 2) && ($source_minor > 17)) || (($source_major == 2) && ($source_minor == 17) && ($source_patch >= 14))} {
- set checkBackupState [checkUserBackupValidility $migration_mode]
- if {$checkBackupState != 10} {
- # It's not possible to use the backup
- set backuperror true
- # Start /etc/init.d/S62HMServer start
- cgi_javascript {puts "homematic('User.restartHmIPServer');"}
- put_message "\${dialogSettingsSecurityMessageSysBackupErrorTitle}" "\${dialogSettingsSecurityMessageSysBackupErrorContent} [getBackupErrorMessage $checkBackupState $migration_mode]"
- }
- }
- }
cgi_javascript {puts "MessageBox.close();"}
if { "false" == $backuperror } {
- exec mount -o remount,ro /usr/local
- exec mount -o remount,rw /usr/local
division {class="popupTitle"} {
puts "\${dialogSettingsSecurityMessageSysBackupRestartSystemTitle}"
}
@@ -1132,61 +1115,6 @@
puts "\${dialogSettingsSecurityHintSessionTimeout2}"
}
}
-
- # activate ssh
- table_row {class="CLASS20806"} {
- table_data {class="CLASS20807"} {
- puts "\${dialogSettingsSecurityTDSSH}"
- }
-
- table_data {class="CLASS20808"} {
- table {class="CLASS20817"} {width="100%"} {
- table_row {
- table_data {align="left"} {
- puts "\${dialogSettingsSecurityLblActivateSSH}"
- }
- set checked ""
- #set checked "checked=true"
- table_data {class="CLASS21112"} {align="left"} {
- cgi_checkbox ssh=unknown {id="sshActive"} $checked
- }
- }
-
- table_row {
- table_data {align="left"} {
- puts "\${dialogSettingsSecurityLblPassword}"
- }
-
- table_data {align="left"} {
- cgi_text key1= {size="16"} {id="sshPasswd0"} {type="password"}
- }
-
- }
- table_row {
- table_data {align="left"} {
- puts "\${dialogSettingsSecurityLblPasswordRepeat}"
- }
- table_data {align="left"} {
- cgi_text key1= {size="16"} {id="sshPasswd1"} {type="password"}
- }
- }
-
- table_row {
- table_data {align="right"} {class="CLASS20812"} {colspan="3"} {
- division {class="popupControls CLASS20811"} {
- division {class="CLASS20813"} {onClick="saveSSHConfig()"} {
- puts "\${dialogSettingsSecuritySSHSaveConfig}"
- }
- }
- }
- }
- }
- }
-
- table_data {align="left"} {class="CLASS20808"} {
- puts "\${dialogSettingsSecuritySSHDescription}"
- }
- }
# auth
if { [getProduct] >= 3 } {
table_row {class="CLASS20806"} {
@@ -1214,95 +1142,6 @@
}
}
}
- # automatic redirect to https
- if { [getProduct] >= 3 } {
- table_row {class="CLASS20806"} {
- table_data {class="CLASS20807"} {
- puts "\${cpSecurityHttpsRedirectTitle}"
- }
- table_data {class="CLASS20808"} {
- division {} {
- table {
- table_row {
- table_data {align="left"} {
- puts "\${cpSecurityHttpsRedirectLabel}"
- }
- set checked ""
- #set checked "checked=true"
- table_data {class="CLASS21112"} {align="left"} {
- cgi_checkbox httpsRedirectState=unknown {id="httpsRedirectActive"} {onClick=setHttpsRedirect();} $checked
- }
- }
- }
- }
- }
- table_data {class="CLASS20808"} {
- puts "\${cpSecurityHttpsRedirectDescription}"
- }
- }
- }
- # SNMP <-- may if getProduct check if needed for ccu2 too
- if { [getProduct] >= 3 } {
- table_row {class="CLASS20806"} {
- table_data {class="CLASS20807"} {
- puts "\${dialogSettingsSecurityTDSNMP}"
- }
- table_data {class="CLASS20808"} {
- division {} {
- table {
- table_row {
- table_data {align="left"} {
- puts "\${dialogSettingsSecurityLblActivateSNMP}"
- }
- set checked ""
- #set checked "checked=true"
- table_data {class="CLASS21112"} {align="left"} {
- cgi_checkbox snmpState=unknown {id="snmpEnabled"} $checked
- }
- }
- table_row {
- table_data {align="left"} {
- puts "\${lblUserName}"
- }
-
- table_data {align="left"} {
- cgi_text key1= {size="16"} {id="snmpUser"} {type="text"}
- }
- }
- table_row {
- table_data {align="left"} {
- puts "\${dialogSettingsSecurityLblPassword}"
- }
-
- table_data {align="left"} {
- cgi_text key1= {size="16"} {id="snmpPasswd0"} {type="password"}
- }
- }
- table_row {
- table_data {align="left"} {
- puts "\${dialogSettingsSecurityLblPasswordRepeat}"
- }
- table_data {align="left"} {
- cgi_text key1= {size="16"} {id="snmpPasswd1"} {type="password"}
- }
- }
- table_row {
- table_data {align="right"} {class="CLASS20812"} {colspan="3"} {
- division {class="popupControls CLASS20811"} {
- division {class="CLASS20813"} {onClick="onSNMPSaveBtn()"} {
- puts "\${dialogSettingsSecuritySSHSaveConfig}"
- }