Hallo,
ich habe ein Problemchen und komme einfach nicht weiter.
Ich habe ein Zeitschaltung mit DOIF erstellt. Jetzt ist es aber so, dass ich zusätzlich noch eine Anwesenheitserkennung nutze.
([Anwesenheit] eq "1" and [ledStripe04] eq "off" and [5:30-8:30|Mo Di Mi Do Fr]) (set ledStripe04 RGB 30E0FF, set ledStripe04 dim 25)
DOELSEIF([Anwesenheit] eq "1" and [ledStripe04] eq "off" and [16:00-20:00|Mo Di Mi Do]) (set ledStripe04 RGB 30E0FF, set ledStripe04 dim 100)
DOELSEIF([Anwesenheit] eq "1" and [ledStripe04] eq "off" and [20:00-23:59|Mo Di Mi Do Fr]) (set ledStripe04 RGB 30E0FF, set ledStripe04 dim 7)
DOELSEIF([Anwesenheit] eq "1" and [ledStripe04] eq "off" and [7:00-8:30|Sa So]) (set ledStripe04 RGB 30E0FF, set ledStripe04 dim 25)
DOELSEIF([Anwesenheit] eq "1" and [ledStripe04] eq "off" and [8:30-11:30|Fr Sa So]) (set ledStripe04 RGB 30E0FF, set ledStripe04 dim 100)
DOELSEIF([Anwesenheit] eq "1" and [ledStripe04] eq "off" and [16:00-22:00|Fr Sa So]) (set ledStripe04 RGB 30E0FF, set ledStripe04 dim 100)
DOELSEIF([Anwesenheit] eq "1" and [ledStripe04] eq "off" and [22:00-03:00|Sa So]) (set ledStripe04 RGB 30E0FF, set ledStripe04 dim 7)
DOELSE(set ledStripe04 off)
Folgendes Szenario:
Gerade jetzt um 21:30 sollte die Beleuchtung auf cmd 6 sein
DOELSEIF([Anwesenheit] eq "1" and [ledStripe04] eq "off" and [16:00-22:00|Fr Sa So]) (set ledStripe04 RGB 30E0FF, set ledStripe04 dim 100)
ist sie aber nicht, da ich erst um 18:00 Nachhause gekommen bin und somit Anwesenheit = 1 nicht erfüllt war.
Aktuell geht die Beleuchtung erst wieder mit cmd 7 ab 22:00 Uhr an.
Kann ich die Abfragen auch öfters durchlaufen lassen? alle 5-10 min ob eine Bedinung zutrifft?
Habe es auch schon mit "repeatcmd 300" versucht aber bringt leider auch keinen erfolg :(
Hier nochmal des ganze DOIF
Internals:
DEF ([Anwesenheit] eq "1" and [ledStripe04] eq "off" and [5:30-8:30|Mo Di Mi Do Fr]) (set ledStripe04 RGB 30E0FF, set ledStripe04 dim 25)
DOELSEIF([Anwesenheit] eq "1" and [ledStripe04] eq "off" and [16:00-20:00|Mo Di Mi Do]) (set ledStripe04 RGB 30E0FF, set ledStripe04 dim 100)
DOELSEIF([Anwesenheit] eq "1" and [ledStripe04] eq "off" and [20:00-23:59|Mo Di Mi Do Fr]) (set ledStripe04 RGB 30E0FF, set ledStripe04 dim 7)
DOELSEIF([Anwesenheit] eq "1" and [ledStripe04] eq "off" and [7:00-8:30|Sa So]) (set ledStripe04 RGB 30E0FF, set ledStripe04 dim 25)
DOELSEIF([Anwesenheit] eq "1" and [ledStripe04] eq "off" and [8:30-11:30|Fr Sa So]) (set ledStripe04 RGB 30E0FF, set ledStripe04 dim 100)
DOELSEIF([Anwesenheit] eq "1" and [ledStripe04] eq "off" and [16:00-22:00|Fr Sa So]) (set ledStripe04 RGB 30E0FF, set ledStripe04 dim 100)
DOELSEIF([Anwesenheit] eq "1" and [ledStripe04] eq "off" and [22:00-03:00|Sa So]) (set ledStripe04 RGB 30E0FF, set ledStripe04 dim 7)
DOELSE(set ledStripe04 off)
NAME Zeitschaltung_Nachttischbeleuchtung
NR 161
NTFY_ORDER 50-Zeitschaltung_Nachttischbeleuchtung
STATE cmd_8
TYPE DOIF
READINGS:
2018-02-02 19:59:30 Device ledStripe04
2018-02-02 20:00:00 cmd 8
2018-02-02 20:00:00 cmd_event timer_5
2018-02-02 20:00:00 cmd_nr 8
2018-02-02 19:58:28 e_Anwesenheit_STATE 1
2018-02-02 19:59:30 e_ledStripe04_STATE off
2017-12-25 00:44:42 mode enable
2018-02-02 20:00:00 state cmd_8
2018-02-02 08:30:00 timer_01_c01 03.02.2018 05:30:00|MoDiMiDoFr
2018-02-02 08:30:00 timer_02_c01 03.02.2018 08:30:00|MoDiMiDoFr
2018-02-02 20:00:00 timer_03_c02 03.02.2018 16:00:00|MoDiMiDo
2018-02-02 20:00:00 timer_04_c02 03.02.2018 20:00:00|MoDiMiDo
2018-02-01 23:59:00 timer_05_c03 02.02.2018 20:00:00|MoDiMiDoFr
2018-02-01 23:59:00 timer_06_c03 02.02.2018 23:59:00|MoDiMiDoFr
2018-02-02 08:30:00 timer_07_c04 03.02.2018 07:00:00|SaSo
2018-02-02 08:30:00 timer_08_c04 03.02.2018 08:30:00|SaSo
2018-02-02 11:30:00 timer_09_c05 03.02.2018 08:30:00|FrSaSo
2018-02-02 11:30:00 timer_10_c05 03.02.2018 11:30:00|FrSaSo
2018-02-01 23:50:37 timer_11_c06 02.02.2018 16:00:00|FrSaSo
2018-02-01 23:50:37 timer_12_c06 02.02.2018 22:00:00|FrSaSo
2018-02-02 03:00:00 timer_13_c07 02.02.2018 22:00:00|SaSo
2018-02-02 03:00:00 timer_14_c07 03.02.2018 03:00:00|SaSo
Regex:
condition:
0 InternalDoIf($hash,'Anwesenheit','STATE') eq "1" and InternalDoIf($hash,'ledStripe04','STATE') eq "off" and DOIF_time($hash,0,1,$wday,$hms,"MoDiMiDoFr")
1 InternalDoIf($hash,'Anwesenheit','STATE') eq "1" and InternalDoIf($hash,'ledStripe04','STATE') eq "off" and DOIF_time($hash,2,3,$wday,$hms,"MoDiMiDo")
2 InternalDoIf($hash,'Anwesenheit','STATE') eq "1" and InternalDoIf($hash,'ledStripe04','STATE') eq "off" and DOIF_time($hash,4,5,$wday,$hms,"MoDiMiDoFr")
3 InternalDoIf($hash,'Anwesenheit','STATE') eq "1" and InternalDoIf($hash,'ledStripe04','STATE') eq "off" and DOIF_time($hash,6,7,$wday,$hms,"SaSo")
4 InternalDoIf($hash,'Anwesenheit','STATE') eq "1" and InternalDoIf($hash,'ledStripe04','STATE') eq "off" and DOIF_time($hash,8,9,$wday,$hms,"FrSaSo")
5 InternalDoIf($hash,'Anwesenheit','STATE') eq "1" and InternalDoIf($hash,'ledStripe04','STATE') eq "off" and DOIF_time($hash,10,11,$wday,$hms,"FrSaSo")
6 InternalDoIf($hash,'Anwesenheit','STATE') eq "1" and InternalDoIf($hash,'ledStripe04','STATE') eq "off" and DOIF_time($hash,12,13,$wday,$hms,"SaSo")
days:
0 MoDiMiDoFr
1 MoDiMiDoFr
10 FrSaSo
11 FrSaSo
12 SaSo
13 SaSo
2 MoDiMiDo
3 MoDiMiDo
4 MoDiMiDoFr
5 MoDiMiDoFr
6 SaSo
7 SaSo
8 FrSaSo
9 FrSaSo
devices:
0 Anwesenheit ledStripe04
1 Anwesenheit ledStripe04
2 Anwesenheit ledStripe04
3 Anwesenheit ledStripe04
4 Anwesenheit ledStripe04
5 Anwesenheit ledStripe04
6 Anwesenheit ledStripe04
all Anwesenheit ledStripe04
do:
0:
0 set ledStripe04 RGB 30E0FF, set ledStripe04 dim 25
1:
0 set ledStripe04 RGB 30E0FF, set ledStripe04 dim 100
2:
0 set ledStripe04 RGB 30E0FF, set ledStripe04 dim 7
3:
0 set ledStripe04 RGB 30E0FF, set ledStripe04 dim 25
4:
0 set ledStripe04 RGB 30E0FF, set ledStripe04 dim 100
5:
0 set ledStripe04 RGB 30E0FF, set ledStripe04 dim 100
6:
0 set ledStripe04 RGB 30E0FF, set ledStripe04 dim 7
7:
0 set ledStripe04 off
helper:
DOIF_Readings_events
DOIF_eventas
event timer_5
globalinit 1
last_timer 14
sleeptimer -1
timerdev
timerevent timer_5
triggerDev
timerevents:
timer_5
timereventsState:
hue: 189
saturation: 81
brightness: 0
RGB: 000000
state: off
triggerEvents:
timer_5
triggerEventsState:
hue: 189
saturation: 81
brightness: 0
RGB: 000000
state: off
internals:
0 Anwesenheit:STATE ledStripe04:STATE
1 Anwesenheit:STATE ledStripe04:STATE
2 Anwesenheit:STATE ledStripe04:STATE
3 Anwesenheit:STATE ledStripe04:STATE
4 Anwesenheit:STATE ledStripe04:STATE
5 Anwesenheit:STATE ledStripe04:STATE
6 Anwesenheit:STATE ledStripe04:STATE
all Anwesenheit:STATE ledStripe04:STATE
interval:
0 -1
1 0
10 -1
11 10
12 -1
13 12
2 -1
3 2
4 -1
5 4
6 -1
7 6
8 -1
9 8
itimer:
localtime:
0 1517632200
1 1517643000
10 1517583600
11 1517605200
12 1517605200
13 1517623200
2 1517670000
3 1517684400
4 1517598000
5 1517612340
6 1517637600
7 1517643000
8 1517643000
9 1517653800
readings:
realtime:
0 05:30:00
1 08:30:00
10 16:00:00
11 22:00:00
12 22:00:00
13 03:00:00
2 16:00:00
3 20:00:00
4 20:00:00
5 23:59:00
6 07:00:00
7 08:30:00
8 08:30:00
9 11:30:00
time:
0 5:30
1 8:30
10 16:00:00
11 22:00:00
12 22:00:00
13 03:00:00
2 16:00:00
3 20:00:00
4 20:00:00
5 23:59:00
6 7:00
7 8:30
8 8:30
9 11:30:00
timeCond:
0 0
1 0
10 5
11 5
12 6
13 6
2 1
3 1
4 2
5 2
6 3
7 3
8 4
9 4
timer:
0 0
1 0
10 0
11 0
12 0
13 0
2 0
3 0
4 0
5 0
6 0
7 0
8 0
9 0
timers:
0 0 1
1 2 3
2 4 5
3 6 7
4 8 9
5 10 11
6 12 13
trigger:
triggertime:
1517605200:
localtime 1517605200
hash:
1517612340:
localtime 1517612340
hash:
1517623200:
localtime 1517623200
hash:
1517632200:
localtime 1517632200
hash:
1517637600:
localtime 1517637600
hash:
1517643000:
localtime 1517643000
hash:
1517653800:
localtime 1517653800
hash:
1517670000:
localtime 1517670000
hash:
1517684400:
localtime 1517684400
hash:
uiState:
uiTable:
Attributes:
do always
group Wohnzimmer Logik
repeatcmd 30
room 1.4.0 Schlafzimmer,9.1.0 LOGIKCENTER
Zitat von: stoniii am 02 Februar 2018, 21:36:27
Hallo,
ich habe ein Problemchen und komme einfach nicht weiter.
Ich habe ein Zeitschaltung mit DOIF erstellt. Jetzt ist es aber so, dass ich zusätzlich noch eine Anwesenheitserkennung nutze.
([Anwesenheit] eq "1" and [ledStripe04] eq "off" and [5:30-8:30|Mo Di Mi Do Fr]) (set ledStripe04 RGB 30E0FF, set ledStripe04 dim 25)
DOELSEIF([Anwesenheit] eq "1" and [ledStripe04] eq "off" and [16:00-20:00|Mo Di Mi Do]) (set ledStripe04 RGB 30E0FF, set ledStripe04 dim 100)
DOELSEIF([Anwesenheit] eq "1" and [ledStripe04] eq "off" and [20:00-23:59|Mo Di Mi Do Fr]) (set ledStripe04 RGB 30E0FF, set ledStripe04 dim 7)
DOELSEIF([Anwesenheit] eq "1" and [ledStripe04] eq "off" and [7:00-8:30|Sa So]) (set ledStripe04 RGB 30E0FF, set ledStripe04 dim 25)
DOELSEIF([Anwesenheit] eq "1" and [ledStripe04] eq "off" and [8:30-11:30|Fr Sa So]) (set ledStripe04 RGB 30E0FF, set ledStripe04 dim 100)
DOELSEIF([Anwesenheit] eq "1" and [ledStripe04] eq "off" and [16:00-22:00|Fr Sa So]) (set ledStripe04 RGB 30E0FF, set ledStripe04 dim 100)
DOELSEIF([Anwesenheit] eq "1" and [ledStripe04] eq "off" and [22:00-03:00|Sa So]) (set ledStripe04 RGB 30E0FF, set ledStripe04 dim 7)
DOELSE(set ledStripe04 off)
Folgendes Szenario:
Gerade jetzt um 21:30 sollte die Beleuchtung auf cmd 6 sein
DOELSEIF([Anwesenheit] eq "1" and [ledStripe04] eq "off" and [16:00-22:00|Fr Sa So]) (set ledStripe04 RGB 30E0FF, set ledStripe04 dim 100)
ist sie aber nicht, da ich erst um 18:00 Nachhause gekommen bin und somit Anwesenheit = 1 nicht erfüllt war.
Aktuell geht die Beleuchtung erst wieder mit cmd 7 ab 22:00 Uhr an.
Kann ich die Abfragen auch öfters durchlaufen lassen? alle 5-10 min ob eine Bedinung zutrifft?
Habe es auch schon mit "repeatcmd 300" versucht aber bringt leider auch keinen erfolg :(
Hier nochmal des ganze DOIF
Internals:
DEF ([Anwesenheit] eq "1" and [ledStripe04] eq "off" and [5:30-8:30|Mo Di Mi Do Fr]) (set ledStripe04 RGB 30E0FF, set ledStripe04 dim 25)
DOELSEIF([Anwesenheit] eq "1" and [ledStripe04] eq "off" and [16:00-20:00|Mo Di Mi Do]) (set ledStripe04 RGB 30E0FF, set ledStripe04 dim 100)
DOELSEIF([Anwesenheit] eq "1" and [ledStripe04] eq "off" and [20:00-23:59|Mo Di Mi Do Fr]) (set ledStripe04 RGB 30E0FF, set ledStripe04 dim 7)
DOELSEIF([Anwesenheit] eq "1" and [ledStripe04] eq "off" and [7:00-8:30|Sa So]) (set ledStripe04 RGB 30E0FF, set ledStripe04 dim 25)
DOELSEIF([Anwesenheit] eq "1" and [ledStripe04] eq "off" and [8:30-11:30|Fr Sa So]) (set ledStripe04 RGB 30E0FF, set ledStripe04 dim 100)
DOELSEIF([Anwesenheit] eq "1" and [ledStripe04] eq "off" and [16:00-22:00|Fr Sa So]) (set ledStripe04 RGB 30E0FF, set ledStripe04 dim 100)
DOELSEIF([Anwesenheit] eq "1" and [ledStripe04] eq "off" and [22:00-03:00|Sa So]) (set ledStripe04 RGB 30E0FF, set ledStripe04 dim 7)
DOELSE(set ledStripe04 off)
NAME Zeitschaltung_Nachttischbeleuchtung
NR 161
NTFY_ORDER 50-Zeitschaltung_Nachttischbeleuchtung
STATE cmd_8
TYPE DOIF
READINGS:
2018-02-02 19:59:30 Device ledStripe04
2018-02-02 20:00:00 cmd 8
2018-02-02 20:00:00 cmd_event timer_5
2018-02-02 20:00:00 cmd_nr 8
2018-02-02 19:58:28 e_Anwesenheit_STATE 1
2018-02-02 19:59:30 e_ledStripe04_STATE off
2017-12-25 00:44:42 mode enable
2018-02-02 20:00:00 state cmd_8
2018-02-02 08:30:00 timer_01_c01 03.02.2018 05:30:00|MoDiMiDoFr
2018-02-02 08:30:00 timer_02_c01 03.02.2018 08:30:00|MoDiMiDoFr
2018-02-02 20:00:00 timer_03_c02 03.02.2018 16:00:00|MoDiMiDo
2018-02-02 20:00:00 timer_04_c02 03.02.2018 20:00:00|MoDiMiDo
2018-02-01 23:59:00 timer_05_c03 02.02.2018 20:00:00|MoDiMiDoFr
2018-02-01 23:59:00 timer_06_c03 02.02.2018 23:59:00|MoDiMiDoFr
2018-02-02 08:30:00 timer_07_c04 03.02.2018 07:00:00|SaSo
2018-02-02 08:30:00 timer_08_c04 03.02.2018 08:30:00|SaSo
2018-02-02 11:30:00 timer_09_c05 03.02.2018 08:30:00|FrSaSo
2018-02-02 11:30:00 timer_10_c05 03.02.2018 11:30:00|FrSaSo
2018-02-01 23:50:37 timer_11_c06 02.02.2018 16:00:00|FrSaSo
2018-02-01 23:50:37 timer_12_c06 02.02.2018 22:00:00|FrSaSo
2018-02-02 03:00:00 timer_13_c07 02.02.2018 22:00:00|SaSo
2018-02-02 03:00:00 timer_14_c07 03.02.2018 03:00:00|SaSo
Regex:
condition:
0 InternalDoIf($hash,'Anwesenheit','STATE') eq "1" and InternalDoIf($hash,'ledStripe04','STATE') eq "off" and DOIF_time($hash,0,1,$wday,$hms,"MoDiMiDoFr")
1 InternalDoIf($hash,'Anwesenheit','STATE') eq "1" and InternalDoIf($hash,'ledStripe04','STATE') eq "off" and DOIF_time($hash,2,3,$wday,$hms,"MoDiMiDo")
2 InternalDoIf($hash,'Anwesenheit','STATE') eq "1" and InternalDoIf($hash,'ledStripe04','STATE') eq "off" and DOIF_time($hash,4,5,$wday,$hms,"MoDiMiDoFr")
3 InternalDoIf($hash,'Anwesenheit','STATE') eq "1" and InternalDoIf($hash,'ledStripe04','STATE') eq "off" and DOIF_time($hash,6,7,$wday,$hms,"SaSo")
4 InternalDoIf($hash,'Anwesenheit','STATE') eq "1" and InternalDoIf($hash,'ledStripe04','STATE') eq "off" and DOIF_time($hash,8,9,$wday,$hms,"FrSaSo")
5 InternalDoIf($hash,'Anwesenheit','STATE') eq "1" and InternalDoIf($hash,'ledStripe04','STATE') eq "off" and DOIF_time($hash,10,11,$wday,$hms,"FrSaSo")
6 InternalDoIf($hash,'Anwesenheit','STATE') eq "1" and InternalDoIf($hash,'ledStripe04','STATE') eq "off" and DOIF_time($hash,12,13,$wday,$hms,"SaSo")
days:
0 MoDiMiDoFr
1 MoDiMiDoFr
10 FrSaSo
11 FrSaSo
12 SaSo
13 SaSo
2 MoDiMiDo
3 MoDiMiDo
4 MoDiMiDoFr
5 MoDiMiDoFr
6 SaSo
7 SaSo
8 FrSaSo
9 FrSaSo
devices:
0 Anwesenheit ledStripe04
1 Anwesenheit ledStripe04
2 Anwesenheit ledStripe04
3 Anwesenheit ledStripe04
4 Anwesenheit ledStripe04
5 Anwesenheit ledStripe04
6 Anwesenheit ledStripe04
all Anwesenheit ledStripe04
do:
0:
0 set ledStripe04 RGB 30E0FF, set ledStripe04 dim 25
1:
0 set ledStripe04 RGB 30E0FF, set ledStripe04 dim 100
2:
0 set ledStripe04 RGB 30E0FF, set ledStripe04 dim 7
3:
0 set ledStripe04 RGB 30E0FF, set ledStripe04 dim 25
4:
0 set ledStripe04 RGB 30E0FF, set ledStripe04 dim 100
5:
0 set ledStripe04 RGB 30E0FF, set ledStripe04 dim 100
6:
0 set ledStripe04 RGB 30E0FF, set ledStripe04 dim 7
7:
0 set ledStripe04 off
helper:
DOIF_Readings_events
DOIF_eventas
event timer_5
globalinit 1
last_timer 14
sleeptimer -1
timerdev
timerevent timer_5
triggerDev
timerevents:
timer_5
timereventsState:
hue: 189
saturation: 81
brightness: 0
RGB: 000000
state: off
triggerEvents:
timer_5
triggerEventsState:
hue: 189
saturation: 81
brightness: 0
RGB: 000000
state: off
internals:
0 Anwesenheit:STATE ledStripe04:STATE
1 Anwesenheit:STATE ledStripe04:STATE
2 Anwesenheit:STATE ledStripe04:STATE
3 Anwesenheit:STATE ledStripe04:STATE
4 Anwesenheit:STATE ledStripe04:STATE
5 Anwesenheit:STATE ledStripe04:STATE
6 Anwesenheit:STATE ledStripe04:STATE
all Anwesenheit:STATE ledStripe04:STATE
interval:
0 -1
1 0
10 -1
11 10
12 -1
13 12
2 -1
3 2
4 -1
5 4
6 -1
7 6
8 -1
9 8
itimer:
localtime:
0 1517632200
1 1517643000
10 1517583600
11 1517605200
12 1517605200
13 1517623200
2 1517670000
3 1517684400
4 1517598000
5 1517612340
6 1517637600
7 1517643000
8 1517643000
9 1517653800
readings:
realtime:
0 05:30:00
1 08:30:00
10 16:00:00
11 22:00:00
12 22:00:00
13 03:00:00
2 16:00:00
3 20:00:00
4 20:00:00
5 23:59:00
6 07:00:00
7 08:30:00
8 08:30:00
9 11:30:00
time:
0 5:30
1 8:30
10 16:00:00
11 22:00:00
12 22:00:00
13 03:00:00
2 16:00:00
3 20:00:00
4 20:00:00
5 23:59:00
6 7:00
7 8:30
8 8:30
9 11:30:00
timeCond:
0 0
1 0
10 5
11 5
12 6
13 6
2 1
3 1
4 2
5 2
6 3
7 3
8 4
9 4
timer:
0 0
1 0
10 0
11 0
12 0
13 0
2 0
3 0
4 0
5 0
6 0
7 0
8 0
9 0
timers:
0 0 1
1 2 3
2 4 5
3 6 7
4 8 9
5 10 11
6 12 13
trigger:
triggertime:
1517605200:
localtime 1517605200
hash:
1517612340:
localtime 1517612340
hash:
1517623200:
localtime 1517623200
hash:
1517632200:
localtime 1517632200
hash:
1517637600:
localtime 1517637600
hash:
1517643000:
localtime 1517643000
hash:
1517653800:
localtime 1517653800
hash:
1517670000:
localtime 1517670000
hash:
1517684400:
localtime 1517684400
hash:
uiState:
uiTable:
Attributes:
do always
group Wohnzimmer Logik
repeatcmd 30
room 1.4.0 Schlafzimmer,9.1.0 LOGIKCENTER
eigentlich sollte jede änderung zwischen den definierten zeiten auslösen. aber ich hatte ähnliches problem mit eq"1", versuche mal >0 und <1
Gesendet mit Tapatalk
Kann es einfach damit zusammen hängen, dass heute Freitag ist ;-)
Kurz, weil mobil...
Zitat von: KernSani am 02 Februar 2018, 22:31:01
Kann es einfach damit zusammen hängen, dass heute Freitag ist ;-)
Kurz, weil mobil...
aber is doch ned der 13te :)
Es triggern nicht nur die Zeitangaben, sondern auch deine Anwesenheit. Wenn du also nach 16:00 kommst und Anwesenheit auf 1 springt reagiert das Modul und geht alle Zweige der Reihe nach durch, wo Anwesenheit vorkommt und führt den ersten wahren Zweig aus.
cmd_8 im list ist dein ELSE-Fall. Um 20:00 Uhr wurde das Modul getriggert, die dazugehörige Bedingung (cmd_3) war nicht wahr, daher hat cmd_8 zugeschlagen, andere Bedingung wurden nicht geprüft, da der Trigger vom 20:00 Uhr-Timer kam.
Zitat von: Damian am 02 Februar 2018, 22:56:42
cmd_8 im list ist dein ELSE-Fall. Um 20:00 Uhr wurde das Modul getriggert, die dazugehörige Bedingung (cmd_3) war nicht wahr, daher hat cmd_8 zugeschlagen, andere Bedingung wurden nicht geprüft, da der Trigger vom 20:00 Uhr-Timer kam.
und da muss ich doch dann was ändern oder?
Ich will ja dass zu bestimmten Zeiten die Helligkeit verändert wird, jedoch wenn keiner zuhause ist eben auf aus.
Wenn jetzt CMD8 also aus ist, sollte er doch meinetwegen um 21:36 trozdem nochmal prüfen ob wer zuhause ist und dann entsprechend handeln.
Du solltest die Abfrage [ledStripe04] eq "off" rausnehmen, denn die macht dir alles zunichte, auch den Fall im list um 20:00 Uhr ;)
repeatcmd kannst du ebenfalls rausnehmen.
ok habe es mal nach euren Vorschlägen geändert.
Internals:
DEF ([Anwesenheit] >0 and [5:30-8:30|Mo Di Mi Do Fr Sa So]) (set ledStripe04 RGB 30E0FF, set ledStripe04 dim 25)
DOELSEIF([Anwesenheit] >0 and [16:00-20:00|Mo Di Mi Do Fr]) (set ledStripe04 RGB 30E0FF, set ledStripe04 dim 100)
DOELSEIF([Anwesenheit] >0 and [20:00-23:59|Mo Di Mi Do]) (set ledStripe04 RGB 30E0FF, set ledStripe04 dim 7)
DOELSEIF([Anwesenheit] >0 and [20:00-22:00|Fr]) (set ledStripe04 RGB 30E0FF, set ledStripe04 dim 25)
DOELSEIF([Anwesenheit] >0 and [22:00-23:59|Fr]) (set ledStripe04 RGB 30E0FF, set ledStripe04 dim 7)
DOELSEIF([Anwesenheit] >0 and [8:30-11:30|Sa So]) (set ledStripe04 RGB 30E0FF, set ledStripe04 dim 100)
DOELSEIF([Anwesenheit] >0 and [16:00-22:00|Sa So]) (set ledStripe04 RGB 30E0FF, set ledStripe04 dim 100)
DOELSEIF([Anwesenheit] >0 and [22:00-03:00|Sa So]) (set ledStripe04 RGB 30E0FF, set ledStripe04 dim 7)
DOELSE(set ledStripe04 off)
NAME Zeitschaltung_Nachttischbeleuchtung
NR 161
NTFY_ORDER 50-Zeitschaltung_Nachttischbeleuchtung
STATE initialized
TYPE DOIF
READINGS:
2018-02-02 23:26:29 cmd 0
2018-02-02 23:26:29 mode enabled
2018-02-02 23:26:29 state initialized
2018-02-02 23:26:29 timer_01_c01 03.02.2018 05:30:00|MoDiMiDoFrSaSo
2018-02-02 23:26:29 timer_02_c01 03.02.2018 08:30:00|MoDiMiDoFrSaSo
2018-02-02 23:26:29 timer_03_c02 03.02.2018 16:00:00|MoDiMiDoFr
2018-02-02 23:26:29 timer_04_c02 03.02.2018 20:00:00|MoDiMiDoFr
2018-02-02 23:26:29 timer_05_c03 03.02.2018 20:00:00|MoDiMiDo
2018-02-02 23:26:29 timer_06_c03 02.02.2018 23:59:00|MoDiMiDo
2018-02-02 23:26:29 timer_07_c04 03.02.2018 20:00:00|Fr
2018-02-02 23:26:29 timer_08_c04 03.02.2018 22:00:00|Fr
2018-02-02 23:26:29 timer_09_c05 03.02.2018 22:00:00|Fr
2018-02-02 23:26:29 timer_10_c05 02.02.2018 23:59:00|Fr
2018-02-02 23:26:29 timer_11_c06 03.02.2018 08:30:00|SaSo
2018-02-02 23:26:29 timer_12_c06 03.02.2018 11:30:00|SaSo
2018-02-02 23:26:29 timer_13_c07 03.02.2018 16:00:00|SaSo
2018-02-02 23:26:29 timer_14_c07 03.02.2018 22:00:00|SaSo
2018-02-02 23:26:29 timer_15_c08 03.02.2018 22:00:00|SaSo
2018-02-02 23:26:29 timer_16_c08 03.02.2018 03:00:00|SaSo
Regex:
condition:
0 InternalDoIf($hash,'Anwesenheit','STATE') >0 and DOIF_time($hash,0,1,$wday,$hms,"MoDiMiDoFrSaSo")
1 InternalDoIf($hash,'Anwesenheit','STATE') >0 and DOIF_time($hash,2,3,$wday,$hms,"MoDiMiDoFr")
2 InternalDoIf($hash,'Anwesenheit','STATE') >0 and DOIF_time($hash,4,5,$wday,$hms,"MoDiMiDo")
3 InternalDoIf($hash,'Anwesenheit','STATE') >0 and DOIF_time($hash,6,7,$wday,$hms,"Fr")
4 InternalDoIf($hash,'Anwesenheit','STATE') >0 and DOIF_time($hash,8,9,$wday,$hms,"Fr")
5 InternalDoIf($hash,'Anwesenheit','STATE') >0 and DOIF_time($hash,10,11,$wday,$hms,"SaSo")
6 InternalDoIf($hash,'Anwesenheit','STATE') >0 and DOIF_time($hash,12,13,$wday,$hms,"SaSo")
7 InternalDoIf($hash,'Anwesenheit','STATE') >0 and DOIF_time($hash,14,15,$wday,$hms,"SaSo")
days:
0 MoDiMiDoFrSaSo
1 MoDiMiDoFrSaSo
10 SaSo
11 SaSo
12 SaSo
13 SaSo
14 SaSo
15 SaSo
2 MoDiMiDoFr
3 MoDiMiDoFr
4 MoDiMiDo
5 MoDiMiDo
6 Fr
7 Fr
8 Fr
9 Fr
devices:
0 Anwesenheit
1 Anwesenheit
2 Anwesenheit
3 Anwesenheit
4 Anwesenheit
5 Anwesenheit
6 Anwesenheit
7 Anwesenheit
all Anwesenheit
do:
0:
0 set ledStripe04 RGB 30E0FF, set ledStripe04 dim 25
1:
0 set ledStripe04 RGB 30E0FF, set ledStripe04 dim 100
2:
0 set ledStripe04 RGB 30E0FF, set ledStripe04 dim 7
3:
0 set ledStripe04 RGB 30E0FF, set ledStripe04 dim 25
4:
0 set ledStripe04 RGB 30E0FF, set ledStripe04 dim 7
5:
0 set ledStripe04 RGB 30E0FF, set ledStripe04 dim 100
6:
0 set ledStripe04 RGB 30E0FF, set ledStripe04 dim 100
7:
0 set ledStripe04 RGB 30E0FF, set ledStripe04 dim 7
8:
0 set ledStripe04 off
helper:
DOIF_Readings_events
DOIF_eventas
globalinit 1
last_timer 16
sleeptimer -1
internals:
0 Anwesenheit:STATE
1 Anwesenheit:STATE
2 Anwesenheit:STATE
3 Anwesenheit:STATE
4 Anwesenheit:STATE
5 Anwesenheit:STATE
6 Anwesenheit:STATE
7 Anwesenheit:STATE
all Anwesenheit:STATE
interval:
0 -1
1 0
10 -1
11 10
12 -1
13 12
14 -1
15 14
2 -1
3 2
4 -1
5 4
6 -1
7 6
8 -1
9 8
itimer:
localtime:
0 1517632200
1 1517643000
10 1517643000
11 1517653800
12 1517670000
13 1517691600
14 1517691600
15 1517623200
2 1517670000
3 1517684400
4 1517684400
5 1517612340
6 1517684400
7 1517691600
8 1517691600
9 1517612340
realtime:
0 05:30:00
1 08:30:00
10 08:30:00
11 11:30:00
12 16:00:00
13 22:00:00
14 22:00:00
15 03:00:00
2 16:00:00
3 20:00:00
4 20:00:00
5 23:59:00
6 20:00:00
7 22:00:00
8 22:00:00
9 23:59:00
time:
0 5:30
1 8:30
10 8:30
11 11:30:00
12 16:00:00
13 22:00:00
14 22:00:00
15 03:00:00
2 16:00:00
3 20:00:00
4 20:00:00
5 23:59:00
6 20:00:00
7 22:00:00
8 22:00:00
9 23:59:00
timeCond:
0 0
1 0
10 5
11 5
12 6
13 6
14 7
15 7
2 1
3 1
4 2
5 2
6 3
7 3
8 4
9 4
timer:
0 0
1 0
10 0
11 0
12 0
13 0
14 0
15 0
2 0
3 0
4 0
5 0
6 0
7 0
8 0
9 0
timers:
0 0 1
1 2 3
2 4 5
3 6 7
4 8 9
5 10 11
6 12 13
7 14 15
triggertime:
1517612340:
localtime 1517612340
hash:
1517623200:
localtime 1517623200
hash:
1517632200:
localtime 1517632200
hash:
1517643000:
localtime 1517643000
hash:
1517653800:
localtime 1517653800
hash:
1517670000:
localtime 1517670000
hash:
1517684400:
localtime 1517684400
hash:
1517691600:
localtime 1517691600
hash:
uiState:
uiTable:
Attributes:
do always
group Wohnzimmer Logik
room 1.4.0 Schlafzimmer,9.1.0 LOGIKCENTER
EDIT: nochmal die Zeiten angepasst