[ Gelöst ] DOIF Schaltet verkehrt

Begonnen von Michael, 09 Januar 2016, 08:53:44

Vorheriges Thema - Nächstes Thema

Michael

Moin

Habe mit dem DOIF Modul seit ca. 2 Wochen ein Problem.

Es schaltet wenn es nicht soll.
Habe es so versucht :
([05:12|12345] and [Urlaub:state] eq "nein" and $month > 7 or $month < 5) (set HG_Licht on) DOELSE (set HG_Licht off)
Das  [Urlaub:state] eq "nein"  ist ein dummy, den ich per Hand umstelle.
([05:12|12345]and $month > 7 or $month < 5) (set HG_Licht on) DOELSE (set HG_Licht off)
([05:12|12345]and $month > 7 or $month < 5) (set HG_Licht on)

ZitatInternals:
   CFGFN      /opt/fhem/cfg/HG_Licht_M.cfg
   DEF        ([05:12|12345] and [Urlaub:state] eq "nein" and $month > 7 or $month < 5) (set HG_Licht on) DOELSE (set HG_Licht off)
   NAME       check_HG_Licht_Morgens
   NR         371
   NTFY_ORDER 50-check_HG_Licht_Morgens
   STATE      cmd_1
   TYPE       DOIF
   Readings:
     2016-01-09 05:12:00   cmd_event       timer_1
     2016-01-09 05:12:00   cmd_nr          1
     2016-01-09 05:12:00   state           cmd_1
     2016-01-09 05:12:00   timer_1_c1      10.01.2016 05:12:00|12345
   Condition:
     0          DOIF_time_once($hash,$hash->{timer}{0},$wday,"12345") and ReadingValDoIf('Urlaub','state','') eq "nein" and $month > 7 or $month < 5
   Days:
     0          12345
   Devices:
     0           Urlaub
     all         Urlaub
   Do:
     0:
       0          set HG_Licht on
     1:
       0          set HG_Licht off
   Helper:
     globalinit 1
     last_timer 1
     sleeptimer -1
   Internals:
   Itimer:
   Readings:
     0           Urlaub:state
     all         Urlaub:state
   Realtime:
     0          05:12:00
   State:
   Time:
     0          05:12:00
   Timecond:
     0          0
   Timer:
     0          0
   Timerfunc:
   Timers:
     0           0

Wo seh ich den Wald vor Bäumen nicht.  :-[
Gruß, Michael

FHEM 6.0 auf RPi 3
CUL V3 868 Mhz | JeeLink LaCrosse & PCA301 | CCU3
BMP085(180) | 14x TX29DTH-IT | 5x PCA 301 | SMA Peripheries | MobileAlerts MA-10(100,120PRO,200,251,410,650,660,800) | HM IP

Ellert

#1
Zitatseit ca. 2 Wochen ein Problem
Hat es vor 2 Wochen funktioniert?

Klammer den Vergleich mit der Perlvariable mal ein. ($month > 7) und ggf. ein Leerzeichen zwischen "]and".


Ellert

Ich muss mich korrigieren, Du hast wahrscheinlich die Klammern falsch gesetzt, nicht
Zitat[05:12|12345] and [Urlaub:state] eq "nein" and $month > 7 or $month < 5)
das ignoriert wegen "or $month < 5" den Teil "[05:12|12345] and [Urlaub:state] eq "nein" and $month > 7", sondern
Zitat[05:12|12345] and [Urlaub:state] eq "nein" and ($month > 7 or $month < 5))

Michael

@Ellert

Dank dir,
Zitat($month > 7 or $month < 5)
das war richtig.
Jetzt sehe ich den Wald auch wieder.  ;)
Gruß, Michael

FHEM 6.0 auf RPi 3
CUL V3 868 Mhz | JeeLink LaCrosse & PCA301 | CCU3
BMP085(180) | 14x TX29DTH-IT | 5x PCA 301 | SMA Peripheries | MobileAlerts MA-10(100,120PRO,200,251,410,650,660,800) | HM IP