Zeitgesteuertes DOIF löst nicht mehr aus

Begonnen von Martin Fischer, 30 Mai 2022, 13:32:28

Vorheriges Thema - Nächstes Thema

Martin Fischer

Hallo Zusammen,

seit einem der letzten Updates verhält sich ein DOIF nicht mehr wie es soll.

Es sind 4 dummy Devices definiert, die entsprechende Zeitangaben (für Mo-Fr: 07:00 und 22:30 Uhr, für Wochenende: 08:00 und 22:30 Uhr) haben, die im DOIF verwendet werden. Konkret sind das Start und Stop Zeiten für Wochentage und für Wochenenden.

Ein Beispiel (Auszug):
Internals:
   NAME       acu.timer.weekdaystart.01.dum
   STATE      22:30
   ...
   TYPE       dummy
   READINGS:
     2022-05-07 00:31:26   state           22:30
   helper:
     bm:
       dummy_Set:
         cnt        6
         dmx        -1000
         dtot       0
         dtotcnt    0
         mTS        30.05. 13:14:06
         max        7.00950622558594e-05
         tot        0.000159263610839844
         mAr:
           HASH(0x56058bd8b658)
           acu.timer.weekdaystart.01.dum
           ?
Attributes:
   ...
   setList    state:time
   webCmd     state


Es soll also zu 4 verschiedenen Zeitpunkten, ein Event ausgelöst werden. Das DOIF und die Dummy Devices sind seit Jahren unverändert. Nur neuerdings wird das Event am Montag morgen nicht mehr ausgelöst. Was wurde geändert bzw. was könnte die Ursache sein, für dieses abweichende Verhalten. Ich sehen es nicht oder bin blind. ;)

Hier das DOIF, dass je nach Tageszeit und Wochentag / Wochenende (morgens oder Abends) ein Event auslösen soll.
Internals:
   DEF        (
  ## Zeitschaltung an
  ## cmdstate:timerOn
  ###############################################
  [[acu.timer.weekdaystart.01.dum:state]-[acu.timer.weekdaystop.01.dum:state]|8] or
  [[acu.timer.weekendstart.01.dum:state]-[acu.timer.weekendstop.01.dum:state]|7]
)
( {acuNew("acu.state.01.dum","trigger:timer,event:timerOn")} )

DOELSEIF
(
  ## Zeitschaltung aus
  ## cmdstate:timerOff
  ###############################################
  [[acu.timer.weekdaystop.01.dum:state]-[acu.timer.weekdaystart.01.dum:state]|8] or
  [[acu.timer.weekendstop.01.dum:state]-[acu.timer.weekendstart.01.dum:state]|7]
)
( {acuNew("acu.state.01.dum","trigger:timer,event:timerOff")} )

   FUUID      5ee9e8f1-f33f-d12d-6352-ebb65b936109001a
   MODEL      FHEM
   NAME       acu.timer.doif.01
   NOTIFYDEV  global,acu.timer.weekdaystart.01.dum,acu.timer.weekdaystop.01.dum,acu.timer.weekendstop.01.dum,acu.timer.weekendstart.01.dum
   NR         155
   NTFY_ORDER 50-acu.timer.doif.01
   STATE      timerOn
   TYPE       DOIF
   VERSION    26020 2022-05-03 16:28:02
   READINGS:
     2022-05-30 07:00:00   cmd             1
     2022-05-30 07:00:00   cmd_event       timer_2
     2022-05-30 07:00:00   cmd_nr          1
     2022-04-21 22:18:50   mode            enabled
     2022-05-30 07:00:00   state           timerOn
     2022-05-30 12:05:48   timer_01_c01    30.05.2022 22:30:00|8
     2022-05-30 12:05:48   timer_02_c01    31.05.2022 07:00:00|8
     2022-05-30 12:05:48   timer_03_c01    30.05.2022 22:30:00|7
     2022-05-30 12:05:48   timer_04_c01    31.05.2022 08:00:00|7
     2022-05-30 12:05:48   timer_05_c02    31.05.2022 07:00:00|8
     2022-05-30 12:05:48   timer_06_c02    30.05.2022 22:30:00|8
     2022-05-30 12:05:48   timer_07_c02    31.05.2022 08:00:00|7
     2022-05-30 12:05:48   timer_08_c02    30.05.2022 22:30:00|7
   Regex:
     accu:
     collect:
     itimer:
       acu.timer.weekdaystart.01.dum:
         itimer:
           state      ^acu.timer.weekdaystart.01.dum$:^state:
       acu.timer.weekdaystop.01.dum:
         itimer:
           state      ^acu.timer.weekdaystop.01.dum$:^state:
       acu.timer.weekendstart.01.dum:
         itimer:
           state      ^acu.timer.weekendstart.01.dum$:^state:
       acu.timer.weekendstop.01.dum:
         itimer:
           state      ^acu.timer.weekendstop.01.dum$:^state:
   attr:
     cmdState:
       0:
         timerOn
       1:
         timerOff
   condition:
     0                      ::DOIF_time($hash,0,1,$wday,$hms,"8") or   ::DOIF_time($hash,2,3,$wday,$hms,"7")
     1                      ::DOIF_time($hash,4,5,$wday,$hms,"8") or   ::DOIF_time($hash,6,7,$wday,$hms,"7")
   days:
     0          8
     1          8
     2          7
     3          7
     4          8
     5          8
     6          7
     7          7
   do:
     0:
       0           {acuNew("acu.state.01.dum","trigger:timer,event:timerOn")}
     1:
       0           {acuNew("acu.state.01.dum","trigger:timer,event:timerOff")}
     2:
   helper:
     NOTIFYDEV  global,acu.timer.weekdaystart.01.dum,acu.timer.weekdaystop.01.dum,acu.timer.weekendstop.01.dum,acu.timer.weekendstart.01.dum
     globalinit 1
     last_timer 8
     sleeptimer -1
     bm:
       DOIF_Get:
         cnt        3
         dmx        -1000
         dtot       0
         dtotcnt    0
         mTS        30.05. 13:10:37
         max        2.69412994384766e-05
         tot        5.88893890380859e-05
         mAr:
           HASH(0x56058bd8c258)
           acu.timer.doif.01
           ?
       DOIF_Notify:
         cnt        11
         dmx        -1000
         dtot       0
         dtotcnt    0
         mTS        30.05. 12:17:28
         max        8.29696655273438e-05
         tot        0.000803947448730469
         mAr:
           HASH(0x56058bd8c258)
           HASH(0x5605842b51f8)
       DOIF_Set:
         cnt        9
         dmx        -1000
         dtot       0
         dtotcnt    0
         mTS        30.05. 13:30:10
         max        0.000103950500488281
         tot        0.000377893447875977
         mAr:
           HASH(0x56058bd8c258)
           acu.timer.doif.01
           ?
   interval:
     0          -1
     1          0
     2          -1
     3          2
     4          -1
     5          4
     6          -1
     7          6
   intervalfunc:
   localtime:
     0          1653942600
     1          1653973200
     2          1653942600
     3          1653976800
     4          1653973200
     5          1653942600
     6          1653976800
     7          1653942600
   perlblock:
   realtime:
     0          22:30:00
     1          07:00:00
     2          22:30:00
     3          08:00:00
     4          07:00:00
     5          22:30:00
     6          08:00:00
     7          22:30:00
   time:
     0          [acu.timer.weekdaystart.01.dum:state]
     1          [acu.timer.weekdaystop.01.dum:state]
     2          [acu.timer.weekendstart.01.dum:state]
     3          [acu.timer.weekendstop.01.dum:state]
     4          [acu.timer.weekdaystop.01.dum:state]
     5          [acu.timer.weekdaystart.01.dum:state]
     6          [acu.timer.weekendstop.01.dum:state]
     7          [acu.timer.weekendstart.01.dum:state]
   timeCond:
     0          0
     1          0
     2          0
     3          0
     4          1
     5          1
     6          1
     7          1
   timer:
     0          0
     1          0
     2          0
     3          0
     4          0
     5          0
     6          0
     7          0
   timers:
     0           0  1  2  3
     1           4  5  6  7
   triggertime:
     1653942600:
       localtime  1653942600
       hash:
     1653973200:
       localtime  1653973200
       hash:
     1653976800:
       localtime  1653976800
       hash:
   uiState:
   uiTable:
Attributes:
   ...
   cmdState   timerOn|timerOff
   do         always


Viele Grüße
Martin
--
Admin, Developer, Gründungsmitglied des FHEM e.V.

Damian

An dieser Stelle hat sich im DOIF schon lange nichts geändert. Dafür bräuchte man ein list vom vermeintlich falschen Zustand.

Allerdings brauchst du für deine Definition keine Zeitintervalle -  es reichen einfach die vier Zeitpunkte.

Programmierte FHEM-Module: DOIF-FHEM, DOIF-Perl, DOIF-uiTable, THRESHOLD, FHEM-Befehl: IF