Was stimmt mit diesem DOIF nicht ?

Begonnen von ms_steini, 25 Oktober 2018, 13:25:00

Vorheriges Thema - Nächstes Thema

ms_steini

Hallo zusammen,
irgendwie funktioniert ein DOIF nicht so wie es soll und ich weiß nicht warum.
Vieleicht kann mir wer helfen.

Das Problem ist das 3. DOELSEIF (cmd3), egal welche Zeit ich nehme, es schaltes sich nach ca: 30 Sekunden wieder aus.

Hier das DOIF:

defmod DOIF_EG_DekoLicht_Diele DOIF ([Brightness_Sensor:brightness] <= 12 and [19:00:00-23:59:59]) (set Sonoff_BASIC_1 on)
DOELSEIF ([Schichtplan:Schicht_Heute_Fruehdienst] == 1 and [04:20:00-05:10:00]) (set Sonoff_BASIC_1 on)
DOELSEIF ([Schichtplan:Schicht_Gestern_Nachtdienst] == 1 and [13:10:00-13:15:00]) (set Sonoff_BASIC_1 on)
DOELSEIF ([Brightness_Sensor:brightness] <= 100 and [06:15:00-08:15:00]) (set Sonoff_BASIC_1 on)
DOELSE (set Sonoff_BASIC_1 off)


event monito dazu: (in disem Fall ist es sogar 55 Sekunden an geblieben)

2018-10-25 13:09:38 MQTT MQTT_Broker connection: active
2018-10-25 13:10:00 MQTT_DEVICE Sonoff_BASIC_1 on
2018-10-25 13:10:00 MQTT_DEVICE Sonoff_BASIC_1 transmission-state: outgoing publish sent
2018-10-25 13:10:00 MQTT_DEVICE Sonoff_BASIC_1 transmission-state: incoming publish received
2018-10-25 13:10:38 MQTT MQTT_Broker connection: active
2018-10-25 13:10:55 MQTT_DEVICE Sonoff_BASIC_1 off
2018-10-25 13:10:55 MQTT_DEVICE Sonoff_BASIC_1 transmission-state: outgoing publish sent
2018-10-25 13:10:55 MQTT_DEVICE Sonoff_BASIC_1 transmission-state: incoming publish received
2018-10-25 13:11:38 MQTT MQTT_Broker connection: active
2018-10-25 13:12:38 MQTT MQTT_Broker connection: active


was kann das sein? Ich habe noch weitere DOIFS und Sonoff Komponente und da funktioniert es einwandfrei.
Die Sonoff Firmware ist (5.9.1) überall bzw. ist auf alle meinen Sonoff-Basic Modulen.

CoolTux

So kann man da gar nichts sehen und auch demzufolge schlecht helfen. Bitte mach einmal ein List vom DOIF Device.
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

ms_steini



Internals:
   DEF        ([Brightness_Sensor:brightness] <= 12 and [19:00:00-23:59:59]) (set Sonoff_BASIC_1 on)
DOELSEIF ([Schichtplan:Schicht_Heute_Fruehdienst] == 1 and [04:20:00-05:10:00]) (set Sonoff_BASIC_1 on)
DOELSEIF ([Schichtplan:Schicht_Gestern_Nachtdienst] == 1 and [13:10:00-13:15:00]) (set Sonoff_BASIC_1 on)
DOELSEIF ([Brightness_Sensor:brightness] <= 100 and [06:15:00-08:15:00]) (set Sonoff_BASIC_1 on)
DOELSE (set Sonoff_BASIC_1 off)
   MODEL      FHEM
   NAME       DOIF_EG_DekoLicht_Diele
   NR         39
   NTFY_ORDER 50-DOIF_EG_DekoLicht_Diele
   STATE      cmd_5
   TYPE       DOIF
   READINGS:
     2018-10-25 13:29:17   Device          Brightness_Sensor
     2018-10-25 13:10:55   cmd             5
     2018-10-25 13:10:55   cmd_event       Brightness_Sensor
     2018-10-25 13:10:55   cmd_nr          5
     2018-10-25 13:29:17   e_Brightness_Sensor_brightness 569.53
     2018-10-25 13:08:10   mode            enabled
     2018-10-25 13:10:55   state           cmd_5
     2018-10-25 13:08:10   timer_01_c01    25.10.2018 19:00:00
     2018-10-25 13:08:10   timer_02_c01    25.10.2018 23:59:59
     2018-10-25 13:08:10   timer_03_c02    26.10.2018 04:20:00
     2018-10-25 13:08:10   timer_04_c02    26.10.2018 05:10:00
     2018-10-25 13:15:00   timer_05_c03    26.10.2018 13:10:00
     2018-10-25 13:15:00   timer_06_c03    26.10.2018 13:15:00
     2018-10-25 13:08:10   timer_07_c04    26.10.2018 06:15:00
     2018-10-25 13:08:10   timer_08_c04    26.10.2018 08:15:00
   Regex:
   attr:
     cmdState:
     wait:
     waitdel:
   condition:
     0          ::ReadingValDoIf($hash,'Brightness_Sensor','brightness') <= 12 and ::DOIF_time($hash,0,1,$wday,$hms)
     1          ::ReadingValDoIf($hash,'Schichtplan','Schicht_Heute_Fruehdienst') == 1 and ::DOIF_time($hash,2,3,$wday,$hms)
     2          ::ReadingValDoIf($hash,'Schichtplan','Schicht_Gestern_Nachtdienst') == 1 and ::DOIF_time($hash,4,5,$wday,$hms)
     3          ::ReadingValDoIf($hash,'Brightness_Sensor','brightness') <= 100 and ::DOIF_time($hash,6,7,$wday,$hms)
   days:
   devices:
     0           Brightness_Sensor
     1           Schichtplan
     2           Schichtplan
     3           Brightness_Sensor
     all         Brightness_Sensor Schichtplan
   do:
     0:
       0          set Sonoff_BASIC_1 on
     1:
       0          set Sonoff_BASIC_1 on
     2:
       0          set Sonoff_BASIC_1 on
     3:
       0          set Sonoff_BASIC_1 on
     4:
       0          set Sonoff_BASIC_1 off
   helper:
     event      battery: ok,brightness: 569.53,B: 569.53
     globalinit 1
     last_timer 8
     sleeptimer -1
     timerdev   Brightness_Sensor
     timerevent battery: ok,brightness: 569.53,B: 569.53
     triggerDev Brightness_Sensor
     DOIF_eventas:
       cmd_nr: 5
       cmd: 5
       cmd_event: Brightness_Sensor
       state: cmd_5
     timerevents:
       battery: ok
       brightness: 569.53
       B: 569.53
     timereventsState:
       battery: ok
       brightness: 569.53
       state: B: 569.53
     triggerEvents:
       battery: ok
       brightness: 569.53
       B: 569.53
     triggerEventsState:
       battery: ok
       brightness: 569.53
       state: B: 569.53
   internals:
   interval:
     0          -1
     1          0
     2          -1
     3          2
     4          -1
     5          4
     6          -1
     7          6
   intervalfunc:
   intervaltimer:
   itimer:
   localtime:
     0          1540486800
     1          1540504799
     2          1540520400
     3          1540523400
     4          1540552200
     5          1540552500
     6          1540527300
     7          1540534500
   readings:
     0           Brightness_Sensor:brightness
     1           Schichtplan:Schicht_Heute_Fruehdienst
     2           Schichtplan:Schicht_Gestern_Nachtdienst
     3           Brightness_Sensor:brightness
     all         Brightness_Sensor:brightness Schichtplan:Schicht_Heute_Fruehdienst Schichtplan:Schicht_Gestern_Nachtdienst
   realtime:
     0          19:00:00
     1          23:59:59
     2          04:20:00
     3          05:10:00
     4          13:10:00
     5          13:15:00
     6          06:15:00
     7          08:15:00
   time:
     0          19:00:00
     1          23:59:59
     2          04:20:00
     3          05:10:00
     4          13:10:00
     5          13:15:00
     6          06:15:00
     7          08:15:00
   timeCond:
     0          0
     1          0
     2          1
     3          1
     4          2
     5          2
     6          3
     7          3
   timer:
     0          0
     1          0
     2          0
     3          0
     4          0
     5          0
     6          0
     7          0
   timers:
     0           0  1
     1           2  3
     2           4  5
     3           6  7
   trigger:
   triggertime:
     1540486800:
       localtime  1540486800
       hash:
     1540504799:
       localtime  1540504799
       hash:
     1540520400:
       localtime  1540520400
       hash:
     1540523400:
       localtime  1540523400
       hash:
     1540527300:
       localtime  1540527300
       hash:
     1540534500:
       localtime  1540534500
       hash:
     1540552200:
       localtime  1540552200
       hash:
     1540552500:
       localtime  1540552500
       hash:
   uiState:
   uiTable:
Attributes:
   DbLogExclude .*
   alias      DOIF EG Deko-Licht Diele
   devStateIcon cmd_1:general_an@#B3002B cmd_2:general_an@#B3002B cmd_3:general_an@#B3002B cmd_4:general_an@#B3002B cmd_5:general_aus
   event-on-change-reading .*
   group      Deko Licht
   icon       helper_doif
   room       Logik
   webCmd     :

CoolTux

Stimmt alles denke ich.
Keine der Bedingungen passt also wird in den DOELSE Zweig gewechselt


cmd             5
Device          Brightness_Sensor
cmd_event       Brightness_Sensor
e_Brightness_Sensor_brightness 569.53
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

ms_steini

verstehe ich nicht,
warum passt die Bedinung
DOELSEIF ([Schichtplan:Schicht_Gestern_Nachtdienst] == 1 and [13:10:00-13:15:00]) (set Sonoff_BASIC_1 on)
um 13:13:00 NICHT ??

Schichtplan:Schicht_Gestern_Nachtdienst steht auf 1

CoolTux

Zeig mal ein List von dem Schichtplan bitte
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

ms_steini

OK.


Internals:
   CHANGED   
   DEF        ical url http://XXXXXXXX.com/XXXXXXXX.ics 10800
   NAME       Schichtplan
   NOTIFYDEV  global
   NR         67
   NTFY_ORDER 50-Schichtplan
   STATE      Gerstern: Nachtdienst | Heute: Nachtdienst | Morgen: Nachtdienst
   TYPE       Calendar
   READINGS:
     2018-10-25 12:49:29   Schicht_Gestern Nachtdienst
     2018-10-25 12:49:29   Schicht_Gestern_Nachtdienst 1
     2018-10-25 12:49:29   Schicht_Heute   Nachtdienst
     2018-10-25 12:49:29   Schicht_Heute_Fruehdienst 0
     2018-10-25 12:49:29   Schicht_Morgen  Nachtdienst
     2018-10-25 13:07:41   lastUpdate      2018-10-25 13:07:40
     2018-09-12 13:59:21   modeAlarm       
     2018-10-25 05:45:00   modeAlarmOrStart
     2018-09-12 13:59:21   modeAlarmed     
     2018-10-25 05:53:26   modeChanged     
     2018-10-25 13:07:41   modeEnd         149_Urlaub;122_Urlaub;89_Nacht;76_Frueh;157_Spaet;69_Nacht;127_Urlaub;130_Urlaub;22_Frueh;43_Nacht;87_Nacht;131_Urlaub;27_Urlaub;161_Nacht;128_Urlaub;92_Urlaub;17_Krank;178_Nacht;170_Frueh;3_Nacht;49_Nacht;225_Event;80_Urlaub;37_Frueh;126_Urlaub;59_Frueh;40_Frueh;29_Nacht;50_Nacht;101_Frueh;124_Urlaub;108_Frueh;154_Frueh;118_Urlaub;47_Frueh;120_Urlaub;148_Spaet;7_Nacht;97_Frueh;169_Frueh;41_Nacht;174_Nacht;77_Frueh;167_Frueh;103_Frueh;153_Frueh;24_Spaet;64_Urlaub;113_Nacht;221_Meeting;166_Frueh;4_Nacht;135_Urlaub;19_Krank;129_Urlaub;156_Frueh;62_Frueh;56_Frueh;44_Nacht;58_Frueh;0_Nacht;165_Frueh;83_Nacht;121_Urlaub;42_Nacht;179_Nacht;33_Frueh;137_Spaet;123_Urlaub;25_Frueh;98_Frueh;48_Nacht;117_Urlaub;160_Frueh;158_Frueh;146_Spaet;52_Nacht;90_Nacht;71_Nacht;151_Frueh;36_Frueh;2_Nacht;134_Urlaub;105_Spaet;34_Frueh;30_Nacht;177_Frueh;32_Nacht;21_Krank;72_Nacht;112_Nacht;11_Nacht;182_Nacht;111_Nacht;138_Frueh;95_Frueh;14_Spaet;116_Urlaub;110_Urlaub;143_Nacht;82_Nacht;147_Spaet;45_Nacht;51_Nacht;10_Nacht;142_Nacht;15_Spaet;31_Nacht;9_Nacht;94_Frueh;5_Spaet;61_Frueh;70_Nacht;86_Nacht;60_Frueh;168_Frueh;176_Frueh;28_Urlaub;93_Spaet;224_Meeting;57_Frueh;78_Spaet;119_Urlaub;222_Meeting;109_Frueh;162_Nacht;133_Urlaub;145_Spaet;114_Nacht;172_Urlaub;125_Urlaub;16_Krank;20_Krank;91_Urlaub;6_Urlaub;152_Spaet;39_Frueh;13_Frueh;136_Frueh;79_Urlaub;68_Frueh;175_Nacht;54_Frueh;150_Frueh;144_Nacht;12_Spaet;74_Frueh;18_Krank;139_Frueh;26_Frueh;55_Frueh;67_Frueh;1_Nacht;155_Frueh;173_Nacht;46_Frueh;75_Frueh;8_Nacht;73_Frueh;180_Nacht;159_Frueh;104_Spaet;140_Nacht;35_Frueh;106_Frueh;164_Nacht;141_Nacht;163_Nacht;23_Frueh;96_Frueh;100_Spaet;99_Frueh;38_Frueh;81_Urlaub;53_Spaet;223_Event;85_Frueh;181_Nacht;102_Frueh;88_Nacht;84_Frueh;63_Urlaub;107_Frueh;65_Urlaub;132_Urlaub;171_Urlaub;66_Frueh;115_Urlaub
     2018-10-25 05:53:26   modeEnded       
     2018-10-25 05:45:00   modeStart       
     2018-10-24 20:53:26   modeStarted     
     2018-10-25 13:07:41   modeUpcoming    294_Spaet;186_Urlaub;314_Variable;349_Urlaub;373_Nacht;277_Variable;226_Meeting;264_Variable;260_Nacht;218_Spaet;356_Urlaub;184_Nacht;408_Frueh;200_Frueh;386_Nacht;283_Frueh;286_Nacht;280_Spaet;404_Frueh;230_Nacht;412_Nacht;403_Frueh;322_Frueh;275_Variable;196_Frueh;307_Nacht;279_Frueh;320_Spaet;332_Spaet;289_Nacht;376_Nacht;231_Nacht;361_Spaet;319_Spaet;346_Urlaub;342_Urlaub;318_Spaet;249_Nacht;236_Spaet;417_Frueh;242_Spaet;216_Nacht;215_Nacht;243_Spaet;340_Urlaub;316_Frueh;406_Spaet;195_Frueh;278_Frueh;362_Variable;365_Frueh;398_Spaet;262_Nacht;194_Urlaub;220_Nacht;338_Urlaub;331_Frueh;254_Frueh;333_Spaet;298_Nacht;213_Nacht;393_Nacht;358_Spaet;188_Urlaub;227_Event;189_Urlaub;247_Frueh;187_Urlaub;253_Frueh;284_Frueh;378_Frueh;339_Urlaub;241_Frueh;381_Spaet;394_Nacht;276_Variable;303_Nacht;369_Spaet;202_Frueh;384_Nacht;232_Spaet;380_Frueh;341_Urlaub;334_Urlaub;207_Urlaub;385_Nacht;337_Urlaub;371_Frueh;383_Nacht;360_Spaet;209_Frueh;266_Nacht;237_Variable;372_Frueh;261_Nacht;238_Variable;330_Frueh;192_Urlaub;315_Variable;219_Spaet;323_Frueh;185_Urlaub;326_Nacht;313_Variable;197_Spaet;308_Spaet;193_Urlaub;414_Nacht;269_Nacht;392_Nacht;350_Urlaub;246_Frueh;287_Nacht;235_Spaet;248_Nacht;300_Nacht;210_Frueh;409_Frueh;256_Spaet;418_Frueh;204_Nacht;419_Spaet;281_Spaet;379_Frueh;190_Urlaub;251_Nacht;288_Nacht;301_Variable;304_Nacht;296_Nacht;321_Frueh;191_Urlaub;415_Frueh;274_Spaet;413_Nacht;367_Spaet;344_Urlaub;272_Spaet;389_Variable;293_Frueh;198_Spaet;299_Nacht;310_Spaet;201_Frueh;327_Nacht;255_Frueh;208_Urlaub;199_Spaet;401_Variable;268_Nacht;353_Urlaub;335_Urlaub;357_Spaet;391_Nacht;364_Variable;343_Urlaub;352_Urlaub;258_Nacht;390_Nacht;399_Spaet;282_Spaet;382_Spaet;396_Spaet;317_Frueh;324_Nacht;217_Nacht;311_Spaet;240_Frueh;252_Frueh;292_Frueh;183_Nacht;271_Spaet;377_Frueh;363_Variable;375_Nacht;233_Spaet;228_Nacht;411_Nacht;263_Variable;257_Spaet;355_Urlaub;397_Spaet;265_Nacht;374_Nacht;388_Variable;368_Spaet;345_Urlaub;387_Nacht;407_Spaet;250_Nacht;325_Nacht;244_Spaet;205_Nacht;285_Frueh;348_Urlaub;400_Variable;336_Urlaub;370_Frueh;359_Spaet;295_Spaet;416_Frueh;206_Nacht;229_Nacht;395_Spaet;351_Urlaub;290_Frueh;270_Spaet;309_Spaet;410_Frueh;267_Nacht;239_Variable;329_Frueh;420_Spaet;245_Frueh;366_Frueh;291_Frueh;203_Nacht;405_Spaet;212_Spaet;305_Nacht;214_Nacht;306_Nacht;234_Spaet;354_Urlaub;297_Nacht;347_Urlaub;273_Spaet;211_Spaet;259_Nacht;402_Variable;328_Frueh;302_Variable;312_Spaet
     2018-10-25 13:07:41   nextUpdate      2018-10-25 16:07:40
     2018-10-25 13:07:41   nextWakeup      2018-10-25 16:07:40
     2018-10-25 13:07:41   state           triggered
Attributes:
   DbLogExclude .*
   event-on-change-reading modeStart
   group      Kalender
   icon       time_calendar@#2c8293
   room       Kalender
   stateFormat Gerstern: Schicht_Gestern | Heute: Schicht_Heute | Morgen: Schicht_Morgen

ms_steini

Die Readings im Schichtplan werden nachts um 1 Uhr durch ein "AT" gesetzt

CoolTux

2018-10-25 13:15:00   timer_05_c03    26.10.2018 13:10:00
     2018-10-25 13:15:00   timer_06_c03    26.10.2018 13:15:00


Da ist die Zeit wohl schon vorbei gewesen.
Was ist wenn Du da 13:30 - 15:00 einstellst. Nur zum testen.
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

ms_steini

habs mal von 14:03:00 bis 15:00:00 Uhr gestellt. geht nach 1 Minute und 49 Sekunden wieder aus?
DOELSEIF ([Schichtplan:Schicht_Gestern_Nachtdienst] == 1 and [14:03:00-15:00:00]) (set Sonoff_BASIC_1 on)
event monitor:

2018-10-25 14:03:00 MQTT_DEVICE Sonoff_BASIC_1 on
2018-10-25 14:04:49 MQTT_DEVICE Sonoff_BASIC_1 off


aber wie kann um 14:04:49 Uhr, 15:00:00 Uhr schon vorbei sein ?

kumue

vermute, da kam dann wohl um 14:04:49 ein event vom sensor...

CoolTux

Ich vermute Goldstaub auf dem Kaffeeschaum
So lange Du uns nicht wieder ein list vom DOIF gibst, und zwar einmal wenn das Licht angegangen ist und einmal wenn es ausgegangen ist können wir nicht wirklich helfen und nur vermuten.
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

ms_steini

okay:

ich habs jetzt mal auf die Uhrzeit reduziert, Schichtplan rausgenommen. Aber auch hier das gleiche, geht vor Ablauf bzw. vor Endezeit nach ca: 1 Minute wieder aus.

Internals:
   DEF        ([Brightness_Sensor:brightness] <= 12 and [19:00:00-23:59:59]) (set Sonoff_BASIC_1 on)
DOELSEIF ([Schichtplan:Schicht_Heute_Fruehdienst] == 1 and [04:20:00-05:10:00]) (set Sonoff_BASIC_1 on)
DOELSEIF ([14:14:00-15:00:00]) (set Sonoff_BASIC_1 on)
DOELSEIF ([Brightness_Sensor:brightness] <= 100 and [06:15:00-08:15:00]) (set Sonoff_BASIC_1 on)
DOELSE (set Sonoff_BASIC_1 off)
   MODEL      FHEM
   NAME       DOIF_EG_DekoLicht_Diele
   NR         39
   NTFY_ORDER 50-DOIF_EG_DekoLicht_Diele
   STATE      cmd_5
   TYPE       DOIF
   READINGS:
     2018-10-25 14:16:54   Device          Brightness_Sensor
     2018-10-25 14:14:32   cmd             5
     2018-10-25 14:14:32   cmd_event       Brightness_Sensor
     2018-10-25 14:14:32   cmd_nr          5
     2018-10-25 14:16:54   e_Brightness_Sensor_brightness 474.46
     2018-10-25 14:12:28   mode            enabled
     2018-10-25 14:14:32   state           cmd_5
     2018-10-25 14:12:28   timer_01_c01    25.10.2018 19:00:00
     2018-10-25 14:12:28   timer_02_c01    25.10.2018 23:59:59
     2018-10-25 14:12:28   timer_03_c02    26.10.2018 04:20:00
     2018-10-25 14:12:28   timer_04_c02    26.10.2018 05:10:00
     2018-10-25 14:12:28   timer_05_c03    25.10.2018 14:14:00
     2018-10-25 14:12:28   timer_06_c03    25.10.2018 15:00:00
     2018-10-25 14:12:28   timer_07_c04    26.10.2018 06:15:00
     2018-10-25 14:12:28   timer_08_c04    26.10.2018 08:15:00
   Regex:
   attr:
     cmdState:
     wait:
     waitdel:
   condition:
     0          ::ReadingValDoIf($hash,'Brightness_Sensor','brightness') <= 12 and ::DOIF_time($hash,0,1,$wday,$hms)
     1          ::ReadingValDoIf($hash,'Schichtplan','Schicht_Heute_Fruehdienst') == 1 and ::DOIF_time($hash,2,3,$wday,$hms)
     2          ::DOIF_time($hash,4,5,$wday,$hms)
     3          ::ReadingValDoIf($hash,'Brightness_Sensor','brightness') <= 100 and ::DOIF_time($hash,6,7,$wday,$hms)
   days:
   devices:
     0           Brightness_Sensor
     1           Schichtplan
     3           Brightness_Sensor
     all         Brightness_Sensor Schichtplan
   do:
     0:
       0          set Sonoff_BASIC_1 on
     1:
       0          set Sonoff_BASIC_1 on
     2:
       0          set Sonoff_BASIC_1 on
     3:
       0          set Sonoff_BASIC_1 on
     4:
       0          set Sonoff_BASIC_1 off
   helper:
     event      battery: ok,brightness: 474.46,B: 474.46
     globalinit 1
     last_timer 8
     sleeptimer -1
     timerdev   Brightness_Sensor
     timerevent battery: ok,brightness: 474.46,B: 474.46
     triggerDev Brightness_Sensor
     DOIF_eventas:
       cmd_nr: 5
       cmd: 5
       cmd_event: Brightness_Sensor
       state: cmd_5
     timerevents:
       battery: ok
       brightness: 474.46
       B: 474.46
     timereventsState:
       battery: ok
       brightness: 474.46
       state: B: 474.46
     triggerEvents:
       battery: ok
       brightness: 474.46
       B: 474.46
     triggerEventsState:
       battery: ok
       brightness: 474.46
       state: B: 474.46
   internals:
   interval:
     0          -1
     1          0
     2          -1
     3          2
     4          -1
     5          4
     6          -1
     7          6
   intervalfunc:
   intervaltimer:
   itimer:
   localtime:
     0          1540486800
     1          1540504799
     2          1540520400
     3          1540523400
     4          1540469640
     5          1540472400
     6          1540527300
     7          1540534500
   readings:
     0           Brightness_Sensor:brightness
     1           Schichtplan:Schicht_Heute_Fruehdienst
     3           Brightness_Sensor:brightness
     all         Brightness_Sensor:brightness Schichtplan:Schicht_Heute_Fruehdienst
   realtime:
     0          19:00:00
     1          23:59:59
     2          04:20:00
     3          05:10:00
     4          14:14:00
     5          15:00:00
     6          06:15:00
     7          08:15:00
   time:
     0          19:00:00
     1          23:59:59
     2          04:20:00
     3          05:10:00
     4          14:14:00
     5          15:00:00
     6          06:15:00
     7          08:15:00
   timeCond:
     0          0
     1          0
     2          1
     3          1
     4          2
     5          2
     6          3
     7          3
   timer:
     0          0
     1          0
     2          0
     3          0
     4          0
     5          0
     6          0
     7          0
   timers:
     0           0  1
     1           2  3
     2           4  5
     3           6  7
   trigger:
   triggertime:
     1540472400:
       localtime  1540472400
       hash:
     1540486800:
       localtime  1540486800
       hash:
     1540504799:
       localtime  1540504799
       hash:
     1540520400:
       localtime  1540520400
       hash:
     1540523400:
       localtime  1540523400
       hash:
     1540527300:
       localtime  1540527300
       hash:
     1540534500:
       localtime  1540534500
       hash:
   uiState:
   uiTable:
Attributes:
   DbLogExclude .*
   alias      DOIF EG Deko-Licht Diele
   devStateIcon cmd_1:general_an@#B3002B cmd_2:general_an@#B3002B cmd_3:general_an@#B3002B cmd_4:general_an@#B3002B cmd_5:general_aus
   event-on-change-reading .*
   group      Deko Licht
   icon       helper_doif
   room       Logik
   webCmd     :

ms_steini

also hier das list wenn Sonoff eingeschaltet wird:

Internals:
   DEF        ([Brightness_Sensor:brightness] <= 12 and [19:00:00-23:59:59]) (set Sonoff_BASIC_1 on)
DOELSEIF ([Schichtplan:Schicht_Heute_Fruehdienst] == 1 and [04:20:00-05:10:00]) (set Sonoff_BASIC_1 on)
DOELSEIF ([14:24:00-16:00:00]) (set Sonoff_BASIC_1 on)
DOELSEIF ([Brightness_Sensor:brightness] <= 100 and [06:15:00-08:15:00]) (set Sonoff_BASIC_1 on)
DOELSE (set Sonoff_BASIC_1 off)
   MODEL      FHEM
   NAME       DOIF_EG_DekoLicht_Diele
   NR         39
   NTFY_ORDER 50-DOIF_EG_DekoLicht_Diele
   STATE      cmd_3
   TYPE       DOIF
   READINGS:
     2018-10-25 14:24:00   cmd             3
     2018-10-25 14:24:00   cmd_event       timer_5
     2018-10-25 14:24:00   cmd_nr          3
     2018-10-25 14:22:12   mode            enabled
     2018-10-25 14:24:00   state           cmd_3
     2018-10-25 14:22:12   timer_01_c01    25.10.2018 19:00:00
     2018-10-25 14:22:12   timer_02_c01    25.10.2018 23:59:59
     2018-10-25 14:22:12   timer_03_c02    26.10.2018 04:20:00
     2018-10-25 14:22:12   timer_04_c02    26.10.2018 05:10:00
     2018-10-25 14:22:12   timer_05_c03    25.10.2018 14:24:00
     2018-10-25 14:22:12   timer_06_c03    25.10.2018 16:00:00
     2018-10-25 14:22:12   timer_07_c04    26.10.2018 06:15:00
     2018-10-25 14:22:12   timer_08_c04    26.10.2018 08:15:00
   Regex:
   attr:
     cmdState:
     wait:
     waitdel:
   condition:
     0          ::ReadingValDoIf($hash,'Brightness_Sensor','brightness') <= 12 and ::DOIF_time($hash,0,1,$wday,$hms)
     1          ::ReadingValDoIf($hash,'Schichtplan','Schicht_Heute_Fruehdienst') == 1 and ::DOIF_time($hash,2,3,$wday,$hms)
     2          ::DOIF_time($hash,4,5,$wday,$hms)
     3          ::ReadingValDoIf($hash,'Brightness_Sensor','brightness') <= 100 and ::DOIF_time($hash,6,7,$wday,$hms)
   days:
   devices:
     0           Brightness_Sensor
     1           Schichtplan
     3           Brightness_Sensor
     all         Brightness_Sensor Schichtplan
   do:
     0:
       0          set Sonoff_BASIC_1 on
     1:
       0          set Sonoff_BASIC_1 on
     2:
       0          set Sonoff_BASIC_1 on
     3:
       0          set Sonoff_BASIC_1 on
     4:
       0          set Sonoff_BASIC_1 off
   helper:
     event      timer_5
     globalinit 1
     last_timer 8
     sleeptimer -1
     timerdev   
     timerevent timer_5
     timereventsState
     triggerDev
     DOIF_eventas:
       cmd_nr: 3
       cmd: 3
       cmd_event: timer_5
       state: cmd_3
     timerevents:
       timer_5
     triggerEvents:
       timer_5
   internals:
   interval:
     0          -1
     1          0
     2          -1
     3          2
     4          -1
     5          4
     6          -1
     7          6
   intervalfunc:
   intervaltimer:
   itimer:
   localtime:
     0          1540486800
     1          1540504799
     2          1540520400
     3          1540523400
     4          1540470240
     5          1540476000
     6          1540527300
     7          1540534500
   readings:
     0           Brightness_Sensor:brightness
     1           Schichtplan:Schicht_Heute_Fruehdienst
     3           Brightness_Sensor:brightness
     all         Brightness_Sensor:brightness Schichtplan:Schicht_Heute_Fruehdienst
   realtime:
     0          19:00:00
     1          23:59:59
     2          04:20:00
     3          05:10:00
     4          14:24:00
     5          16:00:00
     6          06:15:00
     7          08:15:00
   time:
     0          19:00:00
     1          23:59:59
     2          04:20:00
     3          05:10:00
     4          14:24:00
     5          16:00:00
     6          06:15:00
     7          08:15:00
   timeCond:
     0          0
     1          0
     2          1
     3          1
     4          2
     5          2
     6          3
     7          3
   timer:
     0          0
     1          0
     2          0
     3          0
     4          0
     5          0
     6          0
     7          0
   timers:
     0           0  1
     1           2  3
     2           4  5
     3           6  7
   triggertime:
     1540476000:
       localtime  1540476000
       hash:
     1540486800:
       localtime  1540486800
       hash:
     1540504799:
       localtime  1540504799
       hash:
     1540520400:
       localtime  1540520400
       hash:
     1540523400:
       localtime  1540523400
       hash:
     1540527300:
       localtime  1540527300
       hash:
     1540534500:
       localtime  1540534500
       hash:
   uiState:
   uiTable:
Attributes:
   DbLogExclude .*
   alias      DOIF EG Deko-Licht Diele
   devStateIcon cmd_1:general_an@#B3002B cmd_2:general_an@#B3002B cmd_3:general_an@#B3002B cmd_4:general_an@#B3002B cmd_5:general_aus
   event-on-change-reading .*
   group      Deko Licht
   icon       helper_doif
   room       Logik
   webCmd     :



und hier wenns wieder ausgeschaltet wird:


Internals:
   DEF        ([Brightness_Sensor:brightness] <= 12 and [19:00:00-23:59:59]) (set Sonoff_BASIC_1 on)
DOELSEIF ([Schichtplan:Schicht_Heute_Fruehdienst] == 1 and [04:20:00-05:10:00]) (set Sonoff_BASIC_1 on)
DOELSEIF ([14:24:00-16:00:00]) (set Sonoff_BASIC_1 on)
DOELSEIF ([Brightness_Sensor:brightness] <= 100 and [06:15:00-08:15:00]) (set Sonoff_BASIC_1 on)
DOELSE (set Sonoff_BASIC_1 off)
   MODEL      FHEM
   NAME       DOIF_EG_DekoLicht_Diele
   NR         39
   NTFY_ORDER 50-DOIF_EG_DekoLicht_Diele
   STATE      cmd_5
   TYPE       DOIF
   READINGS:
     2018-10-25 14:24:41   Device          Brightness_Sensor
     2018-10-25 14:24:41   cmd             5
     2018-10-25 14:24:41   cmd_event       Brightness_Sensor
     2018-10-25 14:24:41   cmd_nr          5
     2018-10-25 14:24:41   e_Brightness_Sensor_brightness 574.08
     2018-10-25 14:22:12   mode            enabled
     2018-10-25 14:24:41   state           cmd_5
     2018-10-25 14:22:12   timer_01_c01    25.10.2018 19:00:00
     2018-10-25 14:22:12   timer_02_c01    25.10.2018 23:59:59
     2018-10-25 14:22:12   timer_03_c02    26.10.2018 04:20:00
     2018-10-25 14:22:12   timer_04_c02    26.10.2018 05:10:00
     2018-10-25 14:22:12   timer_05_c03    25.10.2018 14:24:00
     2018-10-25 14:22:12   timer_06_c03    25.10.2018 16:00:00
     2018-10-25 14:22:12   timer_07_c04    26.10.2018 06:15:00
     2018-10-25 14:22:12   timer_08_c04    26.10.2018 08:15:00
   Regex:
   attr:
     cmdState:
     wait:
     waitdel:
   condition:
     0          ::ReadingValDoIf($hash,'Brightness_Sensor','brightness') <= 12 and ::DOIF_time($hash,0,1,$wday,$hms)
     1          ::ReadingValDoIf($hash,'Schichtplan','Schicht_Heute_Fruehdienst') == 1 and ::DOIF_time($hash,2,3,$wday,$hms)
     2          ::DOIF_time($hash,4,5,$wday,$hms)
     3          ::ReadingValDoIf($hash,'Brightness_Sensor','brightness') <= 100 and ::DOIF_time($hash,6,7,$wday,$hms)
   days:
   devices:
     0           Brightness_Sensor
     1           Schichtplan
     3           Brightness_Sensor
     all         Brightness_Sensor Schichtplan
   do:
     0:
       0          set Sonoff_BASIC_1 on
     1:
       0          set Sonoff_BASIC_1 on
     2:
       0          set Sonoff_BASIC_1 on
     3:
       0          set Sonoff_BASIC_1 on
     4:
       0          set Sonoff_BASIC_1 off
   helper:
     event      battery: ok,brightness: 574.08,B: 574.08
     globalinit 1
     last_timer 8
     sleeptimer -1
     timerdev   Brightness_Sensor
     timerevent battery: ok,brightness: 574.08,B: 574.08
     triggerDev Brightness_Sensor
     DOIF_eventas:
       cmd_nr: 5
       cmd: 5
       cmd_event: Brightness_Sensor
       state: cmd_5
     timerevents:
       battery: ok
       brightness: 574.08
       B: 574.08
     timereventsState:
       battery: ok
       brightness: 574.08
       state: B: 574.08
     triggerEvents:
       battery: ok
       brightness: 574.08
       B: 574.08
     triggerEventsState:
       battery: ok
       brightness: 574.08
       state: B: 574.08
   internals:
   interval:
     0          -1
     1          0
     2          -1
     3          2
     4          -1
     5          4
     6          -1
     7          6
   intervalfunc:
   intervaltimer:
   itimer:
   localtime:
     0          1540486800
     1          1540504799
     2          1540520400
     3          1540523400
     4          1540470240
     5          1540476000
     6          1540527300
     7          1540534500
   readings:
     0           Brightness_Sensor:brightness
     1           Schichtplan:Schicht_Heute_Fruehdienst
     3           Brightness_Sensor:brightness
     all         Brightness_Sensor:brightness Schichtplan:Schicht_Heute_Fruehdienst
   realtime:
     0          19:00:00
     1          23:59:59
     2          04:20:00
     3          05:10:00
     4          14:24:00
     5          16:00:00
     6          06:15:00
     7          08:15:00
   time:
     0          19:00:00
     1          23:59:59
     2          04:20:00
     3          05:10:00
     4          14:24:00
     5          16:00:00
     6          06:15:00
     7          08:15:00
   timeCond:
     0          0
     1          0
     2          1
     3          1
     4          2
     5          2
     6          3
     7          3
   timer:
     0          0
     1          0
     2          0
     3          0
     4          0
     5          0
     6          0
     7          0
   timers:
     0           0  1
     1           2  3
     2           4  5
     3           6  7
   trigger:
   triggertime:
     1540476000:
       localtime  1540476000
       hash:
     1540486800:
       localtime  1540486800
       hash:
     1540504799:
       localtime  1540504799
       hash:
     1540520400:
       localtime  1540520400
       hash:
     1540523400:
       localtime  1540523400
       hash:
     1540527300:
       localtime  1540527300
       hash:
     1540534500:
       localtime  1540534500
       hash:
   uiState:
   uiTable:
Attributes:
   DbLogExclude .*
   alias      DOIF EG Deko-Licht Diele
   devStateIcon cmd_1:general_an@#B3002B cmd_2:general_an@#B3002B cmd_3:general_an@#B3002B cmd_4:general_an@#B3002B cmd_5:general_aus
   event-on-change-reading .*
   group      Deko Licht
   icon       helper_doif
   room       Logik
   webCmd     :

CoolTux

Ok ich kann das ganze in der Tat nachstellen in meiner Testumgebung. Aber wieso warum, das kann ich mir nicht erklären.
Verschiebe den Thread mal bitte nach Automatisierung  -> DOIF
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net