FHEM Forum

FHEM => Automatisierung => DOIF => Thema gestartet von: tagedieb am 17 Juli 2019, 10:28:05

Titel: Doif mit Datums - Zeitspanne
Beitrag von: tagedieb am 17 Juli 2019, 10:28:05
hallo zusammen

ich komme hier irgendwie nicht weiter und würde mich über Hilfe freuen
ich habe mir ein Doif erstellt, das zu bestimmten Terminen (Datum) reagieren soll - ich bin nach dem WikiEintrag
ZitatDOIF/Zeitspanne zwischen zwei Terminen schalten
vorgegangen
jetzt kann ich die Termine eingeben, aber der Timer ist anders als die Eingabe, was habe ich übersehen oder falsch gestalten?

hier mal mein Devicelist

DEF        ([[$Dank:P_bhm,"00:00"]] and [?$Dank:P_byear] == $year and [?$Dank:P_bmon] == $month and [?$Dank:P_bday] == $mday)({Log 1, "Alarmstart"})DOELSEIF ([[$Dank:P_ehm,"00:00"]] and [?$Dank:P_eyear] == $year and [?$Dank:P_emon] == $month and [?$Dank:P_eday] == $mday) ({Log 1, "Alarmstop"})
   FUUID      5d2ecfec-f33f-e3e5-6e58-6d0977f889b3c1e9
   MODEL      FHEM
   NAME       Spanne
   NR         2836
   NTFY_ORDER 50-Spanne
   STATE      1
   TYPE       DOIF
   VERSION    19786 2019-07-05 21:47:08
   READINGS:
     2019-07-17 10:19:57   P_bday          15
     2019-07-17 10:08:14   P_bhm           08:00
     2019-07-17 10:06:11   P_bmon          7
     2019-07-17 10:06:22   P_byear         2019
     2019-07-17 10:20:16   P_eday          19
     2019-07-17 10:08:35   P_ehm           21:00
     2019-07-17 10:07:44   P_emon          7
     2019-07-17 10:07:56   P_eyear         2019
     2019-07-17 10:12:58   cmd             1
     2019-07-17 10:12:58   cmd_event       set_cmd_1
     2019-07-17 10:12:58   cmd_nr          1
     2019-07-17 10:18:50   mode            enabled
     2019-07-17 10:18:50   state           1
     2019-07-17 10:12:34   timer_01_c01    18.07.2019 00:00:00
     2019-07-17 10:12:34   timer_02_c02    18.07.2019 00:00:00
   Regex:
     accu:
   attr:
     cmdState:
       0:
         1
       1:
         0
   condition:
     0          ::DOIF_time_once($hash,0,$wday) and ::ReadingValDoIf($hash,'$Dank','P_byear') == $year and ::ReadingValDoIf($hash,'$Dank','P_bmon') == $month and ::ReadingValDoIf($hash,'$Dank','P_bday') == $mday
     1          ::DOIF_time_once($hash,1,$wday) and ::ReadingValDoIf($hash,'$Dank','P_eyear') == $year and ::ReadingValDoIf($hash,'$Dank','P_emon') == $month and ::ReadingValDoIf($hash,'$Dank','P_eday') == $mday
   days:
   devices:
   do:
     0:
       0          {Log 1, "Alarmstart"}
     1:
       0          {Log 1, "Alarmstop"}
     2:
   helper:
     globalinit 1
     last_timer 2
     sleeptimer -1
     triggerDev
     DOIF_eventas:
       cmd_nr: 1
       cmd: 1
       cmd_event: set_cmd_1
       state: 1
   internals:
   intervalfunc:
   itimer:
     all         $Dank $Dank
   localtime:
     0          1563400800
     1          1563400800
   readings:
   realtime:
     0          00:00:00
     1          00:00:00
   time:
     0          [$Dank:P_bhm,"00:00"]
     1          [$Dank:P_ehm,"00:00"]
   timeCond:
     0          0
     1          1
   timer:
     0          0
     1          0
   timers:
     0           0
     1           1
   triggertime:
     1563400800:
       localtime  1563400800
       hash:
   uiState:
   uiTable:
Attributes:
   cmdState   1|0
   do         always
   readingList P_bhm P_bday P_bmon P_byear P_ehm P_eday P_emon P_eyear
   room       DOIF,Test
   setList    P_bhm:time P_bday:1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31 P_bmon:1,2,3,4,5,6,7,8,9,10,11,12 P_byear:2016,2017,2018,2019,2020,2021,2022,2023,2024,2025,2026 P_ehm:time P_eday:1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31 P_emon:1,2,3,4,5,6,7,8,9,10,11,12 P_eyear:2016,2017,2018,2019,2020,2021,2022,2023,2024,2025,2026


über einen Hinweis würde ich mich freuen

vg
Titel: Antw:Doif mit Datums - Zeitspanne
Beitrag von: Damian am 17 Juli 2019, 22:47:44
Heißt dein Device $Dank?

Probiere es mal mit einem Device ohne $ im Namen.

Titel: Antw:Doif mit Datums - Zeitspanne
Beitrag von: tagedieb am 21 Juli 2019, 11:56:31
Hallo Damian

Danke für den Hinweis, es waren nicht die $ es lag an meinem device Dank - doch dein Rat hat mich darauf gebracht  ;D


vg