Hauptmenü

DOIF will nicht

Begonnen von FHEM-User22, 11 November 2022, 07:55:18

Vorheriges Thema - Nächstes Thema

FHEM-User22

#30
Hallo,

ich habs so verstanden:

([Tageslicht] eq "dunkel" and ([05:30-06:05|12345] or [06:30-12:00|6] or [06:59-11:30|So])) (set Hut_Fest on) DOELSE (set Hut_Fest off) DOELSEIF ([Tageslicht] eq "dunkel" and ([12:00-21:30|12345] or [12:00-21:30|6] or [11:00-22:30|So])) (set Hut_Fest on) DOELSE (set Hut_Fest off) (set Hut_Fest on) ELSE (set Hut_Fest off)

ändert aber leider nichts. Habe ich einen Denkfehler?


Jetzt nochmal:

([Tageslicht] eq "dunkel" and ([05:30-06:05|12345] or [06:30-12:00|6] or [06:59-11:30|So])) (set Hut_Fest on) DOELSEIF ([Tageslicht] eq "dunkel" and ([12:00-21:30|12345] or [12:00-21:30|6] or [11:00-22:30|So])) (set Hut_Fest on) (set Hut_Fest on) DOELSE (set Hut_Fest off)

so scheint es zu gehen.

Hier das List: Wo kommt cmd_3 her? das wird nicht mit der Lampe angezeigt. on ist dunkle Lampe und off wird als cmd_3 angezeigt.

define Fest2 DOIF ([Tageslicht] eq "dunkel" and ([05:30-06:05|12345] or [06:30-12:00|6] or [06:59-11:30|So])) (set Hut_Fest on)  DOELSEIF ([Tageslicht] eq "dunkel" and ([12:00-21:30|12345] or [12:00-21:30|6] or [11:00-22:30|So])) (set Hut_Fest on) (set Hut_Fest on)  DOELSE (set Hut_Fest off)
attr Fest2 cmdState on|off
attr Fest2 do always
attr Fest2 event-on-change-reading state
attr Fest2 group Astro
attr Fest2 room Bedienung,y-Devices
#   CFGFN     
#   DEF        ([Tageslicht] eq "dunkel" and ([05:30-06:05|12345] or [06:30-12:00|6] or [06:59-11:30|So])) (set Hut_Fest on)  DOELSEIF ([Tageslicht] eq "dunkel" and ([12:00-21:30|12345] or [12:00-21:30|6] or [11:00-22:30|So])) (set Hut_Fest on) (set Hut_Fest on)  DOELSE (set Hut_Fest off)
#   FUUID      63763c47-f33f-bd9c-2fa0-7ae9cfeb5b611701
#   MODEL      FHEM
#   NAME       Fest2
#   NOTIFYDEV  Tageslicht,global
#   NR         60730
#   NTFY_ORDER 50-Fest2
#   STATE      cmd_3
#   TYPE       DOIF
#   VERSION    26655 2022-11-05 18:33:59
#   eventCount 13
#   READINGS:
#     2022-11-17 15:04:04   Device          Tageslicht
#     2022-11-17 15:04:04   cmd             3
#     2022-11-17 15:04:04   cmd_event       Tageslicht
#     2022-11-17 15:04:04   cmd_nr          3
#     2022-11-17 15:04:04   e_Tageslicht_STATE hell
#     2022-11-17 14:58:57   mode            enabled
#     2022-11-17 15:04:04   state           cmd_3
#     2022-11-17 14:58:57   timer_01_c01    18.11.2022 05:30:00|12345
#     2022-11-17 14:58:57   timer_02_c01    18.11.2022 06:05:00|12345
#     2022-11-17 14:58:57   timer_03_c01    18.11.2022 06:30:00|6
#     2022-11-17 14:58:57   timer_04_c01    18.11.2022 12:00:00|6
#     2022-11-17 14:58:57   timer_05_c01    18.11.2022 06:59:00|So
#     2022-11-17 14:58:57   timer_06_c01    18.11.2022 11:30:00|So
#     2022-11-17 14:58:57   timer_07_c02    18.11.2022 12:00:00|12345
#     2022-11-17 14:58:57   timer_08_c02    17.11.2022 21:30:00|12345
#     2022-11-17 14:58:57   timer_09_c02    18.11.2022 12:00:00|6
#     2022-11-17 14:58:57   timer_10_c02    17.11.2022 21:30:00|6
#     2022-11-17 14:58:57   timer_11_c02    18.11.2022 11:00:00|So
#     2022-11-17 14:58:57   timer_12_c02    17.11.2022 22:30:00|So
#   Regex:
#     accu:
#     collect:
#     cond:
#       Tageslicht:
#         0:
#           &STATE     ^Tageslicht$
#         1:
#           &STATE     ^Tageslicht$
#   attr:
#     cmdState:
#       0:
#         on
#       1:
#         off
#     wait:
#     waitdel:
#   condition:
#     0          ::InternalDoIf($hash,'Tageslicht','STATE') eq "dunkel" and (::DOIF_time($hash,0,1,$wday,$hms,"12345") or ::DOIF_time($hash,2,3,$wday,$hms,"6") or ::DOIF_time($hash,4,5,$wday,$hms,"So"))
#     1          ::InternalDoIf($hash,'Tageslicht','STATE') eq "dunkel" and (::DOIF_time($hash,6,7,$wday,$hms,"12345") or ::DOIF_time($hash,8,9,$wday,$hms,"6") or ::DOIF_time($hash,10,11,$wday,$hms,"So"))
#   days:
#     0          12345
#     1          12345
#     10         So
#     11         So
#     2          6
#     3          6
#     4          So
#     5          So
#     6          12345
#     7          12345
#     8          6
#     9          6
#   do:
#     0:
#       0          set Hut_Fest on
#     1:
#       0          set Hut_Fest on
#       1          set Hut_Fest on
#     2:
#       0          set Hut_Fest off
#   helper:
#     NOTIFYDEV  Tageslicht,global
#     event      hell
#     globalinit 1
#     last_timer 12
#     sleeptimer -1
#     timerdev   Tageslicht
#     timerevent hell
#     triggerDev Tageslicht
#     DOIF_eventa:
#       cmd_nr: 3
#       cmd: 3
#       cmd_event: Tageslicht
#       cmd_3
#     DOIF_eventas:
#       cmd_nr: 3
#       cmd: 3
#       cmd_event: Tageslicht
#       state: cmd_3
#     timerevents:
#       hell
#     timereventsState:
#       state: hell
#     triggerEvents:
#       hell
#     triggerEventsState:
#       state: hell
#   internals:
#     all         Tageslicht:STATE
#   interval:
#     0          -1
#     1          0
#     10         -1
#     11         10
#     2          -1
#     3          2
#     4          -1
#     5          4
#     6          -1
#     7          6
#     8          -1
#     9          8
#   intervalfunc:
#   localtime:
#     0          1668745800
#     1          1668747900
#     10         1668765600
#     11         1668720600
#     2          1668749400
#     3          1668769200
#     4          1668751140
#     5          1668767400
#     6          1668769200
#     7          1668717000
#     8          1668769200
#     9          1668717000
#   readings:
#   realtime:
#     0          05:30:00
#     1          06:05:00
#     10         11:00:00
#     11         22:30:00
#     2          06:30:00
#     3          12:00:00
#     4          06:59:00
#     5          11:30:00
#     6          12:00:00
#     7          21:30:00
#     8          12:00:00
#     9          21:30:00
#   time:
#     0          05:30:00
#     1          06:05:00
#     10         11:00:00
#     11         22:30:00
#     2          06:30:00
#     3          12:00:00
#     4          06:59:00
#     5          11:30:00
#     6          12:00:00
#     7          21:30:00
#     8          12:00:00
#     9          21:30:00
#   timeCond:
#     0          0
#     1          0
#     10         1
#     11         1
#     2          0
#     3          0
#     4          0
#     5          0
#     6          1
#     7          1
#     8          1
#     9          1
#   timer:
#     0          0
#     1          0
#     10         0
#     11         0
#     2          0
#     3          0
#     4          0
#     5          0
#     6          0
#     7          0
#     8          0
#     9          0
#   timers:
#     0           0  1  2  3  4  5
#     1           6  7  8  9  10  11
#   trigger:
#   triggertime:
#     1668717000:
#       localtime  1668717000
#       hash:
#     1668720600:
#       localtime  1668720600
#       hash:
#     1668745800:
#       localtime  1668745800
#       hash:
#     1668747900:
#       localtime  1668747900
#       hash:
#     1668749400:
#       localtime  1668749400
#       hash:
#     1668751140:
#       localtime  1668751140
#       hash:
#     1668765600:
#       localtime  1668765600
#       hash:
#     1668767400:
#       localtime  1668767400
#       hash:
#     1668769200:
#       localtime  1668769200
#       hash:
#   uiState:
#   uiTable:
#
setstate Fest2 cmd_3
setstate Fest2 2022-11-17 15:04:04 Device Tageslicht
setstate Fest2 2022-11-17 15:04:04 cmd 3
setstate Fest2 2022-11-17 15:04:04 cmd_event Tageslicht
setstate Fest2 2022-11-17 15:04:04 cmd_nr 3
setstate Fest2 2022-11-17 15:04:04 e_Tageslicht_STATE hell
setstate Fest2 2022-11-17 14:58:57 mode enabled
setstate Fest2 2022-11-17 15:04:04 state cmd_3
setstate Fest2 2022-11-17 14:58:57 timer_01_c01 18.11.2022 05:30:00|12345
setstate Fest2 2022-11-17 14:58:57 timer_02_c01 18.11.2022 06:05:00|12345
setstate Fest2 2022-11-17 14:58:57 timer_03_c01 18.11.2022 06:30:00|6
setstate Fest2 2022-11-17 14:58:57 timer_04_c01 18.11.2022 12:00:00|6
setstate Fest2 2022-11-17 14:58:57 timer_05_c01 18.11.2022 06:59:00|So
setstate Fest2 2022-11-17 14:58:57 timer_06_c01 18.11.2022 11:30:00|So
setstate Fest2 2022-11-17 14:58:57 timer_07_c02 18.11.2022 12:00:00|12345
setstate Fest2 2022-11-17 14:58:57 timer_08_c02 17.11.2022 21:30:00|12345
setstate Fest2 2022-11-17 14:58:57 timer_09_c02 18.11.2022 12:00:00|6
setstate Fest2 2022-11-17 14:58:57 timer_10_c02 17.11.2022 21:30:00|6
setstate Fest2 2022-11-17 14:58:57 timer_11_c02 18.11.2022 11:00:00|So
setstate Fest2 2022-11-17 14:58:57 timer_12_c02 17.11.2022 22:30:00|So



Beste Grüße
FHEM auf Raspberry Pi und Proxmox und... und.... und....