
my $eFun = sub { my ($s) = @_; $s =~ s/\\/\\\\/g; $s =~ s/\\\\x3a//g; $s =~ s/"/\\"/g; $s; };
my $grpStr = join "|", map { $eFun->($_->{re}) } grep { defined $_->{re} } @d;
$ifh->close() if($ifh);
open($ifh, "grep -E \"" . $grpStr . "\" " . $inf . " |");
binmode($ifh, ":encoding(UTF-8)") if($ifh && $unicodeEncoding);
$hash->{LASTACCESS} = time();Zitat von: Damian am 27 Mai 2026, 10:32:12Zeitpunkte werden normalerweise auch nicht verzögert.das war ja nur beispiel. bei diesem hier ist es mir aufgefallen, nachdem ich Ergänzung hinzugefügt hatte
siehe: https://fhem.de/commandref_DE.html#DOIF_timerWithWait
DEF (([Bewohner] eq "present" and ([08:00-21:00] or [20:00])) or (([Quadbox] eq "on" or [VSX1131:stateAV] eq "on") and [19:00-08:00]) or [FS20_7010f0] eq "on") (set tuya_smartlife_bffee61d5656c19f0e6zas on)
DOELSE (({anwesend_off}) , (set tuya_smartlife_bfb727311ed41a0cc8ycsq off))
FUUID 65cf39e1-f33f-3579-8889-597fdac1da3b48f3
FVERSION 98_DOIF.pm:0.277400/2023-07-10
MODEL FHEM
NAME Anwesend
NOTIFYDEV global,Bewohner,Quadbox,FS20_7010f0,VSX1131
NR 489
NTFY_ORDER 50-Anwesend
STATE cmd_1
TYPE DOIF
VERSION 27740 2023-07-10 09:31:11
eventCount 86
READINGS:
2026-05-27 11:25:06 Device Bewohner
2026-05-27 10:45:04 cmd 1
2026-05-27 10:45:04 cmd_event Bewohner
2026-05-27 10:45:04 cmd_nr 1
2026-05-27 11:25:06 e_Bewohner_STATE present
2026-05-27 11:25:06 e_Quadbox_STATE off
2026-05-27 10:44:48 mode enabled
2026-05-27 10:45:04 state cmd_1
2026-05-27 10:44:48 timer_01_c01 28.05.2026 08:00:00
2026-05-27 10:44:48 timer_02_c01 27.05.2026 21:00:00
2026-05-27 10:44:48 timer_03_c01 27.05.2026 20:00:00
2026-05-27 10:44:48 timer_04_c01 27.05.2026 19:00:00
2026-05-27 10:44:48 timer_05_c01 28.05.2026 08:00:00
Regex:
accu:
bar:
barAvg:
collect:
cond:
Bewohner:
0:
&STATE ^Bewohner$
FS20_7010f0:
0:
&STATE ^FS20_7010f0$
Quadbox:
0:
&STATE ^Quadbox$
VSX1131:
0:
stateAV ^VSX1131$:^stateAV:
attr:
cmdState:
wait:
0:
0
1:
5
300
waitdel:
condition:
0 (::InternalDoIf($hash,'Bewohner','STATE') eq "present" and (::DOIF_time($hash,0,1,$wday,$hms) or ::DOIF_time_once($hash,2,$wday))) or ((::InternalDoIf($hash,'Quadbox','STATE') eq "on" or ::ReadingValDoIf($hash,'VSX1131','stateAV') eq "on") and ::DOIF_time($hash,3,4,$wday,$hms)) or ::InternalDoIf($hash,'FS20_7010f0','STATE') eq "on"
days:
devices:
do:
0:
0 set tuya_smartlife_bffee61d5656c19f0e6zas on
1:
0 ({anwesend_off}) , (set tuya_smartlife_bfb727311ed41a0cc8ycsq countdown_usb1 300)
helper:
NOTIFYDEV global,Bewohner,Quadbox,FS20_7010f0,VSX1131
event present
globalinit 1
last_timer 5
sleeptimer -1
timerdev Bewohner
timerevent present
triggerDev Bewohner
timerevents:
present
timereventsState:
state: present
triggerEvents:
present
triggerEventsState:
state: present
internals:
all Bewohner:STATE Quadbox:STATE FS20_7010f0:STATE
interval:
0 -1
1 0
3 -1
4 3
intervalfunc:
localtime:
0 1779948000
1 1779908400
2 1779904800
3 1779901200
4 1779948000
readings:
all VSX1131:stateAV
realtime:
0 08:00:00
1 21:00:00
2 20:00:00
3 19:00:00
4 08:00:00
time:
0 08:00:00
1 21:00:00
2 20:00:00
3 19:00:00
4 08:00:00
timeCond:
0 0
1 0
2 0
3 0
4 0
timer:
0 0
1 0
2 0
3 0
4 0
timers:
0 0 1 2 3 4
trigger:
triggertime:
1779901200:
localtime 1779901200
hash:
1779904800:
localtime 1779904800
hash:
1779908400:
localtime 1779908400
hash:
1779948000:
localtime 1779948000
hash:
uiState:
uiTable:
Attributes:
group Beleuchtung
room DOIF
wait 0:5,300CFGFN
DEF ([08:00]) (set MQTT2_DVES_8AF3E9 on)
DOELSEIF ([09:33]) (set MQTT2_DVES_8AF3E9 off)
FUUID 6a169543-f33f-3579-c9d9-f42b692f544c391a
MODEL FHEM
NAME Licht_test
NOTIFYDEV global
NR 1012
NTFY_ORDER 50-Licht_test
STATE cmd_1
TYPE DOIF
VERSION 27740 2023-07-10 09:31:11
eventCount 25
READINGS:
2026-05-27 09:33:30 cmd 1
2026-05-27 09:33:30 cmd_event set_cmd_1
2026-05-27 09:33:30 cmd_nr 1
2026-05-27 09:32:25 mode enabled
2026-05-27 09:33:30 state cmd_1
2026-05-27 09:32:25 timer_01_c01 28.05.2026 08:00:00
2026-05-27 09:33:00 timer_02_c02 28.05.2026 09:33:00
VERSION 27740 2023-07-10 09:31:11
eventCount 25
READINGS:
2026-05-27 09:33:30 cmd 1
2026-05-27 09:33:30 cmd_event set_cmd_1
2026-05-27 09:33:30 cmd_nr 1
2026-05-27 09:32:25 mode enabled
2026-05-27 09:33:30 state cmd_1
2026-05-27 09:32:25 timer_01_c01 28.05.2026 08:00:00
2026-05-27 09:33:00 timer_02_c02 28.05.2026 09:33:00
Regex:
accu:
bar:
barAvg:
collect:
attr:
cmdState:
wait:
0:
10
1:
60
waitdel:
condition:
0 ::DOIF_time_once($hash,0,$wday)
1 ::DOIF_time_once($hash,1,$wday)
days:
do:
0:
0 set MQTT2_DVES_8AF3E9 on
1:
0 set MQTT2_DVES_8AF3E9 off
2:
helper:
NOTIFYDEV global
event timer_2
globalinit 1
last_timer 2
sleeptimer -1
timerdev
timerevent timer_2
triggerDev
DOIF_eventa:
cmd_nr: 1
cmd: 1
cmd_event: set_cmd_1
cmd_1
DOIF_eventas:
cmd_nr: 1
cmd: 1
cmd_event: set_cmd_1
state: cmd_1
timerevents:
timer_2
timereventsState:
timer_2
triggerEvents:
timer_2
triggerEventsState:
timer_2
interval:
intervalfunc:
localtime:
0 1779948000
1 1779953580
realtime:
0 08:00:00
1 09:33:00
time:
0 08:00:00
1 09:33:00
timeCond:
0 0
1 1
timer:
0 0
1 0
timers:
0 0
1 1
triggertime:
1779948000:
localtime 1779948000
hash:
1779953580:
localtime 1779953580
hash:
uiState:
uiTable:
Attributes:
room test
wait 10:60