Hauptmenü

DOIF - Zeit über Dummy

Begonnen von gloob, 26 Januar 2017, 11:04:19

Vorheriges Thema - Nächstes Thema

Ellert

#15
Ich habe die Schaltuhr heute morgen getestet.

Sie schaltet zur Einschaltzeit ein, aber nicht zur Ausschaltzeit aus.

Das kann ich nicht erklären, eigentlich sollte es funktionieren.

Hier das Einschalt-Listing:

2017-01-27_07:30:00.087 DOIFtoolsLog [11] +++++ Listing time_switch_Labor:cmd: 1 +++++
jump to: prev  next Listing
DOIF-Version: 98_DOIF.pm 12961 2017-01-04 22:23:57Z Damian
Internals:
   DEF        (["$SELF:P_mybutton: on","0"] or [[$SELF:P_mybegin,"00:00"]])
   (set lamp_Labor000 on)
DOELSEIF (["$SELF:P_mybutton: off","0"] or [[$SELF:P_myend,"00:01"]])
   (set lamp_Labor000 off)
   INTRIGGER  1
   NAME       time_switch_Labor
   NR         39
   NTFY_ORDER 50-time_switch_Labor
   NTFY_TRIGGERTIME 2017-01-27 07:30:00
   STATE      on
   TYPE       DOIF
   CHANGED:
     cmd_nr: 1
     cmd: 1
     cmd_event: timer_1
     on
   CHANGEDWITHSTATE:
     cmd_nr: 1
     cmd: 1
     cmd_event: timer_1
     state: on
   Readings:
     2017-01-27 07:28:44   Device          time_switch_Labor
     2017-01-27 07:28:26   P_mybegin       07:30
     2017-01-27 07:28:44   P_mybutton      off
     2017-01-27 07:28:28   P_myend         07:35
     2017-01-27 07:30:00   cmd             1
     2017-01-27 07:30:00   cmd_event       timer_1
     2017-01-27 07:30:00   cmd_nr          1
     2017-01-27 07:28:43   matched_event_c1_1 P_mybutton: on
     2017-01-27 07:28:44   matched_event_c2_1 P_mybutton: off
     2017-01-27 07:30:00   state           on
     2017-01-27 07:28:44   timer_01_c01    27.01.2017 07:30:00
     2017-01-27 07:28:44   timer_02_c02    27.01.2017 07:35:00
   Condition:
     0          EventDoIf('time_switch_Labor',$hash,'P_mybutton: on',0,'[^\:]*: (.*)','','0') or DOIF_time_once($hash,0,$wday)
     1          EventDoIf('time_switch_Labor',$hash,'P_mybutton: off',0,'[^\:]*: (.*)','','0') or DOIF_time_once($hash,1,$wday)
   Days:
   Devices:
   Do:
     0:
       0          set lamp_Labor000 on
     1:
       0          set lamp_Labor000 off
   Helper:
     cur_cmd_nr timer 1485498600
     event      timer_1
     globalinit 1
     last_timer 2
     sleeptimer -1
     timerdev   
     timerevent timer_1
     triggerDev
     timerevents:
       timer_1
     timereventsState:
       P_mybutton: off
       timer_01_c01: 27.01.2017 07:30:00
       timer_02_c02: 27.01.2017 07:35:00
       Device: time_switch_Labor
       matched_event_c2_1: P_mybutton: off
       cmd_nr: 2
       cmd: 2
       cmd_event: time_switch_Labor
       off
     triggerEvents:
       timer_1
     triggerEventsState:
       P_mybutton: off
       timer_01_c01: 27.01.2017 07:30:00
       timer_02_c02: 27.01.2017 07:35:00
       Device: time_switch_Labor
       matched_event_c2_1: P_mybutton: off
       cmd_nr: 2
       cmd: 2
       cmd_event: time_switch_Labor
       off
   Internals:
   Interval:
   Itimer:
     all         time_switch_Labor
   Localtime:
     0          1485498600
     1          1485498900
   Readings:
   Realtime:
     0          07:30:00
     1          07:35:00
   Regexp:
     0:
       0          time_switch_Labor:P_mybutton: on
     1:
       0          time_switch_Labor:P_mybutton: off
     All:
       0          time_switch_Labor:P_mybutton: on
       1          time_switch_Labor:P_mybutton: off
   State:
   Time:
     0          [time_switch_Labor:P_mybegin,"00:00"]
     1          [time_switch_Labor:P_myend,"00:01"]
   Timecond:
     0          0
     1          1
   Timer:
     0          1
     1          0
   Timers:
     0           0
     1           1
   Trigger:
   Triggertime:
     1485498900:
       localtime  1485498900
       Hash:
Attributes:
   alias      Schaltuhr
   cmdState   on|off
   group      Labor: Zeitsteuerung mit manuell Ein/Aus
   readingList P_mybutton P_mybegin P_myend
   room       DOIF_Labor
   setList    P_mybutton:uzsuSelectRadio,on,off P_mybegin:time P_myend:time
   webCmd     P_mybutton:P_mybegin:P_myend

2017-01-27_07:30:00.118 time_switch_Labor cmd_nr: 1
2017-01-27_07:30:00.118 time_switch_Labor cmd: 1
2017-01-27_07:30:00.118 time_switch_Labor cmd_event: timer_1
2017-01-27_07:30:00.118 time_switch_Labor on


Da der zweite Timer nicht getriggert hat hier das manuell erzeugte Listing nach dem Ausschaltzeitpunkt

Internals:
   DEF        (["$SELF:P_mybutton: on","0"] or [[$SELF:P_mybegin,"00:00"]])
   (set lamp_Labor000 on)
DOELSEIF (["$SELF:P_mybutton: off","0"] or [[$SELF:P_myend,"00:01"]])
   (set lamp_Labor000 off)
   NAME       time_switch_Labor
   NR         39
   NTFY_ORDER 50-time_switch_Labor
   STATE      on
   TYPE       DOIF
   Readings:
     2017-01-27 07:28:44   Device          time_switch_Labor
     2017-01-27 07:28:26   P_mybegin       07:30
     2017-01-27 07:28:44   P_mybutton      off
     2017-01-27 07:28:28   P_myend         07:35
     2017-01-27 07:30:00   cmd             1
     2017-01-27 07:30:00   cmd_event       timer_1
     2017-01-27 07:30:00   cmd_nr          1
     2017-01-27 07:28:43   matched_event_c1_1 P_mybutton: on
     2017-01-27 07:28:44   matched_event_c2_1 P_mybutton: off
     2017-01-27 07:30:00   state           on
     2017-01-27 07:30:00   timer_01_c01    28.01.2017 07:30:00
     2017-01-27 07:35:00   timer_02_c02    28.01.2017 07:35:00
   Condition:
     0          EventDoIf('time_switch_Labor',$hash,'P_mybutton: on',0,'[^\:]*: (.*)','','0') or DOIF_time_once($hash,0,$wday)
     1          EventDoIf('time_switch_Labor',$hash,'P_mybutton: off',0,'[^\:]*: (.*)','','0') or DOIF_time_once($hash,1,$wday)
   Days:
   Devices:
   Do:
     0:
       0          set lamp_Labor000 on
     1:
       0          set lamp_Labor000 off
   Helper:
     event      timer_1
     globalinit 1
     last_timer 2
     sleeptimer -1
     timerdev
     timerevent timer_1
     triggerDev
     timerevents:
       timer_1
     timereventsState:
       P_mybutton: off
       timer_01_c01: 27.01.2017 07:30:00
       timer_02_c02: 27.01.2017 07:35:00
       Device: time_switch_Labor
       matched_event_c2_1: P_mybutton: off
       cmd_nr: 2
       cmd: 2
       cmd_event: time_switch_Labor
       off
     triggerEvents:
       timer_1
     triggerEventsState:
       P_mybutton: off
       timer_01_c01: 27.01.2017 07:30:00
       timer_02_c02: 27.01.2017 07:35:00
       Device: time_switch_Labor
       matched_event_c2_1: P_mybutton: off
       cmd_nr: 2
       cmd: 2
       cmd_event: time_switch_Labor
       off
   Internals:
   Interval:
   Itimer:
     all         time_switch_Labor
   Localtime:
     0          1485585000
     1          1485585300
   Readings:
   Realtime:
     0          07:30:00
     1          07:35:00
   Regexp:
     0:
       0          time_switch_Labor:P_mybutton: on
     1:
       0          time_switch_Labor:P_mybutton: off
     All:
       0          time_switch_Labor:P_mybutton: on
       1          time_switch_Labor:P_mybutton: off
   State:
   Time:
     0          [time_switch_Labor:P_mybegin,"00:00"]
     1          [time_switch_Labor:P_myend,"00:01"]
   Timecond:
     0          0
     1          1
   Timer:
     0          1
     1          0
   Timers:
     0           0
     1           1
   Trigger:
   Triggertime:
     1485585000:
       localtime  1485585000
       Hash:
     1485585300:
       localtime  1485585300
       Hash:
Attributes:
   alias      Schaltuhr
   cmdState   on|off
   group      Labor: Zeitsteuerung mit manuell Ein/Aus
   readingList P_mybutton P_mybegin P_myend
   room       DOIF_Labor
   setList    P_mybutton:uzsuSelectRadio,on,off P_mybegin:time P_myend:time
   webCmd     P_mybutton:P_mybegin:P_myend


Bemerkenswert ist allerdings, dass der Ausschalttimer aktualisiert wurde 2017-01-27 07:35:00   timer_02_c02    28.01.2017 07:35:00

gloob

Wie muss man denn die Uhrzeitangabe "00:01" verstehen?

[[$SELF:P_myend,"00:01"]]
Raspberry Pi 3 | miniCUL 433MHz | nanoCUL 868 MHz | nanoCUL 433 MHz | MySensors WLAN Gateway | LaCrosse WLAN Gateway | SignalESP 433 MHz | SignalESP 868 MHz | HM-MOD-UART WLAN Gateway | IR - 360 Grad WLAN Gateway

Ellert


gloob

Ich habe auch nochmal ein List gemacht von der Schaltuhr nach dem "Einschalten" und nach dem "Ausschalten"
Es wird zu beiden Zeiten etwas ausgeführt, jedoch nicht der richtige CMD

Trigger 1:


Internals:
   DEF        (["$SELF:P_mybutton: on"] or [[$SELF:P_mybegin,"06:00"]])(set lamp_Labor000 on;set teleBot message "Pflanzenlampe Test on") DOELSEIF (["$SELF:P_mybutton: off"] or [[$SELF:P_myend,"18:00"]])(set lamp_Labor000 off;set teleBot message "Pflanzenlampe Test off")
   NAME       time_switch_Labor
   NR         582
   NTFY_ORDER 50-time_switch_Labor
   STATE      on
   TYPE       DOIF
   Readings:
     2017-01-27 08:06:19   Device          time_switch_Labor
     2017-01-27 08:07:08   P_mybegin       08:08
     2017-01-27 08:06:19   P_mybutton      off
     2017-01-27 08:07:14   P_myend         08:09
     2017-01-27 08:08:00   cmd             1
     2017-01-27 08:08:00   cmd_event       timer_1
     2017-01-27 08:08:00   cmd_nr          1
     2017-01-27 08:06:17   matched_event_c1_1 P_mybutton: on
     2017-01-27 08:06:19   matched_event_c2_1 P_mybutton: off
     2017-01-27 08:08:00   state           on
     2017-01-27 08:08:00   timer_01_c01    28.01.2017 08:08:00
     2017-01-27 08:08:00   timer_02_c02    27.01.2017 08:09:00
   Condition:
     0          EventDoIf('time_switch_Labor',$hash,'P_mybutton: on',0) or DOIF_time_once($hash,0,$wday)
     1          EventDoIf('time_switch_Labor',$hash,'P_mybutton: off',0) or DOIF_time_once($hash,1,$wday)
   Days:
   Devices:
   Do:
     0:
       0          set lamp_Labor000 on;set teleBot message "Pflanzenlampe Test on"
     1:
       0          set lamp_Labor000 off;set teleBot message "Pflanzenlampe Test off"
   Helper:
     event      timer_1
     globalinit 1
     last_timer 2
     sleeptimer -1
     timerdev
     timerevent timer_1
     triggerDev
     timerevents:
       timer_1
     timereventsState:
       P_mybutton: off
       timer_01_c01: 27.01.2017 14:11:00
       timer_02_c02: 27.01.2017 14:12:00
       Device: time_switch_Labor
       matched_event_c2_1: P_mybutton: off
       cmd_nr: 2
       cmd: 2
       cmd_event: time_switch_Labor
       off
     triggerEvents:
       timer_1
     triggerEventsState:
       P_mybutton: off
       timer_01_c01: 27.01.2017 14:11:00
       timer_02_c02: 27.01.2017 14:12:00
       Device: time_switch_Labor
       matched_event_c2_1: P_mybutton: off
       cmd_nr: 2
       cmd: 2
       cmd_event: time_switch_Labor
       off
   Internals:
   Interval:
   Itimer:
     all         time_switch_Labor
   Localtime:
     0          1485587280
     1          1485500940
   Readings:
   Realtime:
     0          08:08:00
     1          08:09:00
   Regexp:
     0:
       0          time_switch_Labor:P_mybutton: on
     1:
       0          time_switch_Labor:P_mybutton: off
     All:
       0          time_switch_Labor:P_mybutton: on
       1          time_switch_Labor:P_mybutton: off
   State:
   Time:
     0          [time_switch_Labor:P_mybegin,"06:00"]
     1          [time_switch_Labor:P_myend,"18:00"]
   Timecond:
     0          0
     1          1
   Timer:
     0          1
     1          0
   Timers:
     0           0
     1           1
   Trigger:
   Triggertime:
     1485500940:
       localtime  1485500940
       Hash:
     1485587280:
       localtime  1485587280
       Hash:
Attributes:
   alias      Schaltuhr
   cmdState   on|off
   group      Labor: Zeitsteuerung mit manuell Ein/Aus
   readingList P_mybutton P_mybegin P_myend
   room       DOIF_Labor
   setList    P_mybutton:uzsuSelectRadio,on,off P_mybegin:time P_myend:time
   verbose    5
   webCmd     P_mybutton:P_mybegin:P_myend


Trigger 2:

Internals:
   DEF        (["$SELF:P_mybutton: on"] or [[$SELF:P_mybegin,"06:00"]])(set lamp_Labor000 on;set teleBot message "Pflanzenlampe Test on") DOELSEIF (["$SELF:P_mybutton: off"] or [[$SELF:P_myend,"18:00"]])(set lamp_Labor000 off;set teleBot message "Pflanzenlampe Test off")
   NAME       time_switch_Labor
   NR         582
   NTFY_ORDER 50-time_switch_Labor
   STATE      on
   TYPE       DOIF
   Readings:
     2017-01-27 08:06:19   Device          time_switch_Labor
     2017-01-27 08:07:08   P_mybegin       08:08
     2017-01-27 08:06:19   P_mybutton      off
     2017-01-27 08:07:14   P_myend         08:09
     2017-01-27 08:08:00   cmd             1
     2017-01-27 08:08:00   cmd_event       timer_1
     2017-01-27 08:08:00   cmd_nr          1
     2017-01-27 08:06:17   matched_event_c1_1 P_mybutton: on
     2017-01-27 08:06:19   matched_event_c2_1 P_mybutton: off
     2017-01-27 08:08:00   state           on
     2017-01-27 08:08:00   timer_01_c01    28.01.2017 08:08:00
     2017-01-27 08:09:00   timer_02_c02    28.01.2017 08:09:00
   Condition:
     0          EventDoIf('time_switch_Labor',$hash,'P_mybutton: on',0) or DOIF_time_once($hash,0,$wday)
     1          EventDoIf('time_switch_Labor',$hash,'P_mybutton: off',0) or DOIF_time_once($hash,1,$wday)
   Days:
   Devices:
   Do:
     0:
       0          set lamp_Labor000 on;set teleBot message "Pflanzenlampe Test on"
     1:
       0          set lamp_Labor000 off;set teleBot message "Pflanzenlampe Test off"
   Helper:
     event      timer_1
     globalinit 1
     last_timer 2
     sleeptimer -1
     timerdev
     timerevent timer_1
     triggerDev
     timerevents:
       timer_1
     timereventsState:
       P_mybutton: off
       timer_01_c01: 27.01.2017 14:11:00
       timer_02_c02: 27.01.2017 14:12:00
       Device: time_switch_Labor
       matched_event_c2_1: P_mybutton: off
       cmd_nr: 2
       cmd: 2
       cmd_event: time_switch_Labor
       off
     triggerEvents:
       timer_1
     triggerEventsState:
       P_mybutton: off
       timer_01_c01: 27.01.2017 14:11:00
       timer_02_c02: 27.01.2017 14:12:00
       Device: time_switch_Labor
       matched_event_c2_1: P_mybutton: off
       cmd_nr: 2
       cmd: 2
       cmd_event: time_switch_Labor
       off
   Internals:
   Interval:
   Itimer:
     all         time_switch_Labor
   Localtime:
     0          1485587280
     1          1485587340
   Readings:
   Realtime:
     0          08:08:00
     1          08:09:00
   Regexp:
     0:
       0          time_switch_Labor:P_mybutton: on
     1:
       0          time_switch_Labor:P_mybutton: off
     All:
       0          time_switch_Labor:P_mybutton: on
       1          time_switch_Labor:P_mybutton: off
   State:
   Time:
     0          [time_switch_Labor:P_mybegin,"06:00"]
     1          [time_switch_Labor:P_myend,"18:00"]
   Timecond:
     0          0
     1          1
   Timer:
     0          1
     1          0
   Timers:
     0           0
     1           1
   Trigger:
   Triggertime:
     1485587280:
       localtime  1485587280
       Hash:
     1485587340:
       localtime  1485587340
       Hash:
Attributes:
   alias      Schaltuhr
   cmdState   on|off
   group      Labor: Zeitsteuerung mit manuell Ein/Aus
   readingList P_mybutton P_mybegin P_myend
   room       DOIF_Labor
   setList    P_mybutton:uzsuSelectRadio,on,off P_mybegin:time P_myend:time
   verbose    5
   webCmd     P_mybutton:P_mybegin:P_myend
Raspberry Pi 3 | miniCUL 433MHz | nanoCUL 868 MHz | nanoCUL 433 MHz | MySensors WLAN Gateway | LaCrosse WLAN Gateway | SignalESP 433 MHz | SignalESP 868 MHz | HM-MOD-UART WLAN Gateway | IR - 360 Grad WLAN Gateway

Ellert

Nur am Rande, Befehlstrenner ist das Komma nicht das Semikolon.

gloob

Okay, wobei es mit Semikolon auch funktioniert hat  :)  Zumindest das Schalten über den "Button"
Raspberry Pi 3 | miniCUL 433MHz | nanoCUL 868 MHz | nanoCUL 433 MHz | MySensors WLAN Gateway | LaCrosse WLAN Gateway | SignalESP 433 MHz | SignalESP 868 MHz | HM-MOD-UART WLAN Gateway | IR - 360 Grad WLAN Gateway

Ellert

Zitatjedoch nicht der richtige CMD

Wie has Du das festgestellt?
Welches wird ausgeführt, gib es dazu einen Logeinrag?

gloob

#22
Zum einen hatte ich Verbose auf 5 gesetzt und zum anderen bekomme ich die gleiche Fehlermeldung im Log oder über meinen Telegram Bot:


2017.01.26 13:52:00 2: TestDoif: set lamp_Labor000 on: Please define lamp_Labor000 first
2017.01.26 13:53:00 2: TestDoif: set lamp_Labor000 on: Please define lamp_Labor000 first


Der zweite Eintrag im Log sollte im korrekten Fall lauten.

set lamp_Labor000 off

Es ist ja egal ob das Device vorhanden ist was geschaltet wird oder nicht.
Raspberry Pi 3 | miniCUL 433MHz | nanoCUL 868 MHz | nanoCUL 433 MHz | MySensors WLAN Gateway | LaCrosse WLAN Gateway | SignalESP 433 MHz | SignalESP 868 MHz | HM-MOD-UART WLAN Gateway | IR - 360 Grad WLAN Gateway

Ellert


Damian

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