Das Skript macht genau, was es soll.
Eine Frage und eine Anmerkung meinerseits.
1. Was ist die Bedeutung der Log-Einträge in den geschweiften Klammern? Es sind nicht nur Zeilen mit Power >=Level1 und <=Level2 und sie tauchen sowohl in laufenden Timern als auch außerhalb laufender Timer auf. Sie tauchen nur nie auf, wenn Power aus ist..
2. Das Skript schaltet den Eingang X nach Ablauf der Duration 1 immer aus, auch wenn er nicht an ist. Ist auf der einen Seite eine Sicherheitsabschaltung, auf der anderen Seite könnte man zB nur ausschalten, wenn switch 1 an ist. So wie es jetzt ist, passt es auch sehr zum Anwendungsfall. Der Log-Eintrag "ausschalten" obwohl schon aus könnte halt zum Beispiel dann auch sowas wie "Nichts gemacht, war schon aus" sagen. Aber das ist auch eigentlich nicht nötig. Es liest ja keiner ständig live die Logs mit
Nochmals vielen, vielen Dank für die Arbeit und die Unterstützung!
Hier ein Log vom ersten Test.
1 : CurrentPower= 0
21:01:27
2 : CurrentPower= 0
21:01:28
3 : CurrentPower= 0
21:01:29
4 : CurrentPower= 0
21:01:30
5 : CurrentPower= 0
21:01:31
6 : CurrentPower= 0
21:01:32
7 : CurrentPower= 0
21:01:33
8 : CurrentPower= 0
21:01:34
9 : CurrentPower= 0
21:01:35
10 : CurrentPower= 0
21:01:36
11 : CurrentPower= 0
21:01:37
12 : CurrentPower= 0
21:01:38
13 : CurrentPower= 0
21:01:39
14 : CurrentPower= 0
21:01:40
15 : CurrentPower= 0
21:01:41
16 : CurrentPower= 0
21:01:42
17 : CurrentPower= 0
21:01:43
18 : CurrentPower= 0
21:01:44
19 : CurrentPower= 0
21:01:45
20 : CurrentPower= 0
21:01:46
21 : CurrentPower= 0
21:01:47
22 : CurrentPower= 0
21:01:48
23 : CurrentPower= 0
21:01:49
24 : CurrentPower= 0
21:01:50
25 : CurrentPower= 0
21:01:51
26 : CurrentPower= 0
21:01:52
27 : CurrentPower= 0
21:01:53
28 : CurrentPower= 0
21:01:54
29 : CurrentPower= 0
21:01:55
30 : CurrentPower= 0
21:01:57
Ausgang 1 ausschalten
21:01:57
{"component":"switch:0","name":"switch","id":0,"delta":{"id":0,"apower":9.7}}
21:02:25
{"component":"switch:0","name":"switch","id":0,"delta":{"id":0,"apower":93.1}}
21:02:28
{"component":"switch:0","name":"switch","id":0,"delta":{"id":0,"apower":80.6}}
21:02:29
{"component":"switch:0","name":"switch","id":0,"delta":{"id":0,"apower":177.9}}
21:02:30
{"component":"switch:0","name":"switch","id":0,"delta":{"id":0,"apower":270.4}}
21:02:31
1 : CurrentPower= 270.4
21:02:31
2 : CurrentPower= 266.3
21:02:32
3 : CurrentPower= 262
21:02:33
4 : CurrentPower= 258.4
21:02:34
{"component":"switch:0","name":"switch","id":0,"delta":{"id":0,"apower":256.7}}
21:02:35
5 : CurrentPower= 256.7
21:02:35
6 : CurrentPower= 257.6
21:02:36
7 : CurrentPower= 253.6
21:02:37
8 : CurrentPower= 253.3
21:02:38
9 : CurrentPower= 252
21:02:39
10 : CurrentPower= 251.7
21:02:40
11 : CurrentPower= 249.2
21:02:41
12 : CurrentPower= 248.5
21:02:42
13 : CurrentPower= 248.5
21:02:43
14 : CurrentPower= 247.3
21:02:44
15 : CurrentPower= 247.2
21:02:45
16 : CurrentPower= 246.5
21:02:46
17 : CurrentPower= 257.2
21:02:47
18 : CurrentPower= 257
21:02:48
19 : CurrentPower= 257.6
21:02:49
20 : CurrentPower= 259
21:02:50
21 : CurrentPower= 258.8
21:02:51
22 : CurrentPower= 258.6
21:02:52
{"component":"switch:0","name":"switch","id":0,"delta":{"id":0,"apower":168.6}}
21:02:53
23 : CurrentPower= 168.6
21:02:53
24 : CurrentPower= 168.7
21:02:54
25 : CurrentPower= 168.7
21:02:55
26 : CurrentPower= 169
21:02:56
27 : CurrentPower= 169.6
21:02:57
28 : CurrentPower= 169.3
21:02:58
29 : CurrentPower= 169.9
21:02:59
30 : CurrentPower= 170.3
21:03:00
Ausgang 1 einschalten
21:03:00
{"component":"switch:0","name":"switch","id":0,"delta":{"id":0,"apower":0,"current":0,"output":false,"pf":0,"source":"switch"}}
21:03:26
1 : CurrentPower= 0
21:03:27
2 : CurrentPower= 0
21:03:28
3 : CurrentPower= 0
21:03:29
4 : CurrentPower= 0
21:03:30
5 : CurrentPower= 0
21:03:31
6 : CurrentPower= 0
21:03:32
7 : CurrentPower= 0
21:03:33
8 : CurrentPower= 0
21:03:34
9 : CurrentPower= 0
21:03:35
10 : CurrentPower= 0
21:03:36
11 : CurrentPower= 0
21:03:37
12 : CurrentPower= 0
21:03:38
13 : CurrentPower= 0
21:03:39
14 : CurrentPower= 0
21:03:40
15 : CurrentPower= 0
21:03:41
16 : CurrentPower= 0
21:03:42
17 : CurrentPower= 0
21:03:43
18 : CurrentPower= 0
21:03:44
19 : CurrentPower= 0
21:03:45
20 : CurrentPower= 0
21:03:46
21 : CurrentPower= 0
21:03:47
22 : CurrentPower= 0
21:03:48
23 : CurrentPower= 0
21:03:49
24 : CurrentPower= 0
21:03:50
25 : CurrentPower= 0
21:03:51
26 : CurrentPower= 0
21:03:52
27 : CurrentPower= 0
21:03:53
28 : CurrentPower= 0
21:03:54
29 : CurrentPower= 0
21:03:55
30 : CurrentPower= 0
21:03:56
Ausgang 1 ausschalten
21:03:56
1 : CurrentPower= 0
21:04:17
2 : CurrentPower= 0
21:04:18
3 : CurrentPower= 0
21:04:19
4 : CurrentPower= 0
21:04:20
5 : CurrentPower= 0
21:04:21
6 : CurrentPower= 0
21:04:22
7 : CurrentPower= 0
21:04:23
8 : CurrentPower= 0
21:04:24
9 : CurrentPower= 0
21:04:25
10 : CurrentPower= 0
21:04:26
11 : CurrentPower= 0
21:04:27
12 : CurrentPower= 0
21:04:28
13 : CurrentPower= 0
21:04:29
14 : CurrentPower= 0
21:04:30
15 : CurrentPower= 0
21:04:31
16 : CurrentPower= 0
21:04:32
17 : CurrentPower= 0
21:04:33
18 : CurrentPower= 0
21:04:34
19 : CurrentPower= 0
21:04:35
20 : CurrentPower= 0
21:04:36
21 : CurrentPower= 0
21:04:37
22 : CurrentPower= 0
21:04:38
23 : CurrentPower= 0
21:04:39
24 : CurrentPower= 0
21:04:40
25 : CurrentPower= 0
21:04:41
26 : CurrentPower= 0
21:04:42
27 : CurrentPower= 0
21:04:43
28 : CurrentPower= 0
21:04:44
29 : CurrentPower= 0
21:04:45
30 : CurrentPower= 0
21:04:46
31 : CurrentPower= 0
21:04:47
32 : CurrentPower= 0
21:04:48
33 : CurrentPower= 0
21:04:49
34 : CurrentPower= 0
21:04:50
35 : CurrentPower= 0
21:04:51
36 : CurrentPower= 0
21:04:52
37 : CurrentPower= 0
21:04:53
38 : CurrentPower= 0
21:04:54
39 : CurrentPower= 0
21:04:55
40 : CurrentPower= 0
21:04:56
41 : CurrentPower= 0
21:04:57
42 : CurrentPower= 0
21:04:58
43 : CurrentPower= 0
21:04:59
44 : CurrentPower= 0
21:05:00
45 : CurrentPower= 0
21:05:01
Ausgang 1 ausschalten
21:05:01
{"component":"switch:0","name":"switch","id":0,"delta":{"id":0,"apower":11.5}}
21:05:49
{"component":"switch:0","name":"switch","id":0,"delta":{"id":0,"apower":9.6}}
21:05:50
{"component":"switch:0","name":"switch","id":0,"delta":{"id":0,"apower":101.3}}
21:05:53
{"component":"switch:0","name":"switch","id":0,"delta":{"id":0,"apower":84.4}}
21:05:54
1 : CurrentPower= 84.4
21:05:54
{"component":"switch:0","name":"switch","id":0,"delta":{"id":0,"apower":186.3}}
21:05:55
{"component":"switch:0","name":"switch","id":0,"delta":{"id":0,"apower":273.5}}
21:05:56
1 : CurrentPower= 273.5
21:05:56
2 : CurrentPower= 268.2
21:05:57
3 : CurrentPower= 264.7
21:05:58
4 : CurrentPower= 262
21:05:59
{"component":"switch:0","name":"switch","id":0,"delta":{"id":0,"apower":258}}
21:06:00
5 : CurrentPower= 258
21:06:00
6 : CurrentPower= 257.4
21:06:01
7 : CurrentPower= 255.4
21:06:02
8 : CurrentPower= 254.1
21:06:03
9 : CurrentPower= 252.7
21:06:04
10 : CurrentPower= 252.1
21:06:05
11 : CurrentPower= 250.3
21:06:06
12 : CurrentPower= 249.3
21:06:07
13 : CurrentPower= 249.8
21:06:08
14 : CurrentPower= 248.2
21:06:09
15 : CurrentPower= 248.2
21:06:10
16 : CurrentPower= 247.8
21:06:11
17 : CurrentPower= 259.3
21:06:12
18 : CurrentPower= 260
21:06:13
19 : CurrentPower= 259.9
21:06:14
20 : CurrentPower= 259.7
21:06:15
21 : CurrentPower= 259.7
21:06:16
22 : CurrentPower= 259.5
21:06:17
{"component":"switch:0","name":"switch","id":0,"delta":{"id":0,"apower":208.7}}
21:06:18
23 : CurrentPower= 208.7
21:06:18
{"component":"switch:0","name":"switch","id":0,"delta":{"id":0,"apower":169.5}}
21:06:19
24 : CurrentPower= 169.5
21:06:19
25 : CurrentPower= 169.9
21:06:20
26 : CurrentPower= 170.5
21:06:21
27 : CurrentPower= 170.4
21:06:22
28 : CurrentPower= 170.7
21:06:23
29 : CurrentPower= 171.2
21:06:24
30 : CurrentPower= 171.4
21:06:25
Ausgang 1 einschalten
21:06:25
{"component":"switch:0","name":"switch","id":0,"delta":{"id":0,"apower":0,"current":0,"output":false,"pf":0,"source":"switch"}}
21:07:03
1 : CurrentPower= 0
21:07:05
2 : CurrentPower= 0
21:07:06
3 : CurrentPower= 0
21:07:07
4 : CurrentPower= 0
21:07:08
5 : CurrentPower= 0
21:07:09
6 : CurrentPower= 0
21:07:10
7 : CurrentPower= 0
21:07:11
8 : CurrentPower= 0
21:07:12
9 : CurrentPower= 0
21:07:13
10 : CurrentPower= 0
21:07:14
11 : CurrentPower= 0
21:07:15
12 : CurrentPower= 0
21:07:16
13 : CurrentPower= 0
21:07:17
14 : CurrentPower= 0
21:07:18
15 : CurrentPower= 0
21:07:19
16 : CurrentPower= 0
21:07:20
17 : CurrentPower= 0
21:07:21
18 : CurrentPower= 0
21:07:22
19 : CurrentPower= 0
21:07:23
20 : CurrentPower= 0
21:07:24
21 : CurrentPower= 0
21:07:25
22 : CurrentPower= 0
21:07:26
23 : CurrentPower= 0
21:07:27
24 : CurrentPower= 0
21:07:28
25 : CurrentPower= 0
21:07:29
26 : CurrentPower= 0
21:07:30
27 : CurrentPower= 0
21:07:31
28 : CurrentPower= 0
21:07:32
29 : CurrentPower= 0
21:07:33
30 : CurrentPower= 0
21:07:34
31 : CurrentPower= 0
21:07:35
32 : CurrentPower= 0
21:07:36
33 : CurrentPower= 0
21:07:37
34 : CurrentPower= 0
21:07:38
35 : CurrentPower= 0
21:07:39
36 : CurrentPower= 0
21:07:40
37 : CurrentPower= 0
21:07:41
38 : CurrentPower= 0
21:07:42
39 : CurrentPower= 0
21:07:43
40 : CurrentPower= 0
21:07:44
41 : CurrentPower= 0
21:07:45
42 : CurrentPower= 0
21:07:46
43 : CurrentPower= 0
21:07:47
44 : CurrentPower= 0
21:07:48
45 : CurrentPower= 0
21:07:49
Ausgang 1 ausschalten
21:07:49
Alles anzeigen