(GELÖST)Deckenfluter eingeschaltet lassen...? DOIF und Dummy Frage

Begonnen von misux, 02 April 2018, 14:32:10

Vorheriges Thema - Nächstes Thema

misux

HI!

Ich habe einen Deckenfluter der mit mehreren DOIFS verbunden ist und soweit seinen Dienst Tut.

Nun habe ich einen dummy erstellt der PartyTime heißt und den Status on:off hat.

Gibt es eine Möglichkeit diesen Deckenfluter solange der dummy "on" ist eingeschaltet zu lassen EGAL was die DOIFS sagen? Ich kann die DOIFS nicht auf deactivate setzen weil da noch mehr dran hängt... Müsste es irgendwie anders lösen...

Vielen Dank!

HIer ein List vom Deckenfluter DOIF was funktioniert. PartyTime"on" soll den Deckenfluter eingeschaltet lassen, egal was dieses DOIF sagt.

Internals:
   DEF        ([Tageslicht_indoor] eq "Nacht" and [16:00-01:00]) (set Deckenfluter on)
DOELSEIF
([TVTime] eq "off" and [22:30|So Mo Di Mi Do]) (set Deckenfluter off)
DOELSEIF
([TVTime] eq "off" and [23:00|So Mo Di Mi Do Fr Sa]) (set Deckenfluter off)
DOELSEIF
([TVTime] eq "off" and [23:15|So Mo Di Mi Do Fr Sa]) (set Deckenfluter off)
DOELSEIF
([TVTime] eq "off" and [23:30|So Mo Di Mi Do Fr Sa]) (set Deckenfluter off)
DOELSEIF
([TVTime] eq "off" and [23:45|So Mo Di Mi Do Fr Sa]) (set Deckenfluter off)
DOELSEIF
([TVTime] eq "off" and [00:00|So Mo Di Mi Do Fr Sa]) (set Deckenfluter off)
DOELSEIF
([TVTime] eq "off" and [00:15|So Mo Di Mi Do Fr Sa]) (set Deckenfluter off)
DOELSEIF
([TVTime] eq "off" and [00:30|So Mo Di Mi Do Fr Sa]) (set Deckenfluter off)
DOELSE
(set Deckenfluter off)
   NAME       DOIFDeckenfluter
   NR         106
   NTFY_ORDER 50-DOIFDeckenfluter
   STATE      cmd_10
   TYPE       DOIF
   READINGS:
     2018-04-02 14:21:24   cmd             10
     2018-04-02 14:21:24   cmd_event       DOIFDeckenfluter
     2018-04-02 14:21:24   cmd_nr          10
     2018-04-02 14:21:06   last_cmd        cmd_10
     2018-04-02 14:21:23   mode            enabled
     2018-04-02 14:21:24   state           cmd_10
     2018-04-02 14:07:26   timer_01_c01    02.04.2018 16:00:00
     2018-04-02 14:07:26   timer_02_c01    03.04.2018 01:00:00
     2018-04-02 14:07:26   timer_03_c02    02.04.2018 22:30:00|SoMoDiMiDo
     2018-04-02 14:07:26   timer_04_c03    02.04.2018 23:00:00|SoMoDiMiDoFrSa
     2018-04-02 14:07:26   timer_05_c04    02.04.2018 23:15:00|SoMoDiMiDoFrSa
     2018-04-02 14:07:26   timer_06_c05    02.04.2018 23:30:00|SoMoDiMiDoFrSa
     2018-04-02 14:07:26   timer_07_c06    02.04.2018 23:45:00|SoMoDiMiDoFrSa
     2018-04-02 14:07:26   timer_08_c07    03.04.2018 00:00:00|SoMoDiMiDoFrSa
     2018-04-02 14:07:26   timer_09_c08    03.04.2018 00:15:00|SoMoDiMiDoFrSa
     2018-04-02 14:07:26   timer_10_c09    03.04.2018 00:30:00|SoMoDiMiDoFrSa
   Regex:
   condition:
     0          InternalDoIf($hash,'Tageslicht_indoor','STATE') eq "Nacht" and DOIF_time($hash,0,1,$wday,$hms)
     1          InternalDoIf($hash,'TVTime','STATE') eq "off" and DOIF_time_once($hash,2,$wday,"SoMoDiMiDo")
     2          InternalDoIf($hash,'TVTime','STATE') eq "off" and DOIF_time_once($hash,3,$wday,"SoMoDiMiDoFrSa")
     3          InternalDoIf($hash,'TVTime','STATE') eq "off" and DOIF_time_once($hash,4,$wday,"SoMoDiMiDoFrSa")
     4          InternalDoIf($hash,'TVTime','STATE') eq "off" and DOIF_time_once($hash,5,$wday,"SoMoDiMiDoFrSa")
     5          InternalDoIf($hash,'TVTime','STATE') eq "off" and DOIF_time_once($hash,6,$wday,"SoMoDiMiDoFrSa")
     6          InternalDoIf($hash,'TVTime','STATE') eq "off" and DOIF_time_once($hash,7,$wday,"SoMoDiMiDoFrSa")
     7          InternalDoIf($hash,'TVTime','STATE') eq "off" and DOIF_time_once($hash,8,$wday,"SoMoDiMiDoFrSa")
     8          InternalDoIf($hash,'TVTime','STATE') eq "off" and DOIF_time_once($hash,9,$wday,"SoMoDiMiDoFrSa")
   days:
     2          SoMoDiMiDo
     3          SoMoDiMiDoFrSa
     4          SoMoDiMiDoFrSa
     5          SoMoDiMiDoFrSa
     6          SoMoDiMiDoFrSa
     7          SoMoDiMiDoFrSa
     8          SoMoDiMiDoFrSa
     9          SoMoDiMiDoFrSa
   devices:
     0           Tageslicht_indoor
     1           TVTime
     2           TVTime
     3           TVTime
     4           TVTime
     5           TVTime
     6           TVTime
     7           TVTime
     8           TVTime
     all         Tageslicht_indoor TVTime
   do:
     0:
       0          set Deckenfluter on
     1:
       0          set Deckenfluter off
     2:
       0          set Deckenfluter off
     3:
       0          set Deckenfluter off
     4:
       0          set Deckenfluter off
     5:
       0          set Deckenfluter off
     6:
       0          set Deckenfluter off
     7:
       0          set Deckenfluter off
     8:
       0          set Deckenfluter off
     9:
       0          set Deckenfluter off
   helper:
     DOIF_Readings_events
     DOIF_eventas
     globalinit 1
     last_timer 10
     sleeptimer -1
     timerdev   
     timerevent
     timerevents
     timereventsState
     triggerDev
   internals:
     0           Tageslicht_indoor:STATE
     1           TVTime:STATE
     2           TVTime:STATE
     3           TVTime:STATE
     4           TVTime:STATE
     5           TVTime:STATE
     6           TVTime:STATE
     7           TVTime:STATE
     8           TVTime:STATE
     all         Tageslicht_indoor:STATE TVTime:STATE
   interval:
     0          -1
     1          0
   itimer:
   localtime:
     0          1522677600
     1          1522710000
     2          1522701000
     3          1522702800
     4          1522703700
     5          1522704600
     6          1522705500
     7          1522706400
     8          1522707300
     9          1522708200
   readings:
   realtime:
     0          16:00:00
     1          01:00:00
     2          22:30:00
     3          23:00:00
     4          23:15:00
     5          23:30:00
     6          23:45:00
     7          00:00:00
     8          00:15:00
     9          00:30:00
   time:
     0          16:00:00
     1          01:00:00
     2          22:30:00
     3          23:00:00
     4          23:15:00
     5          23:30:00
     6          23:45:00
     7          00:00:00
     8          00:15:00
     9          00:30:00
   timeCond:
     0          0
     1          0
     2          1
     3          2
     4          3
     5          4
     6          5
     7          6
     8          7
     9          8
   timer:
     0          0
     1          0
     2          0
     3          0
     4          0
     5          0
     6          0
     7          0
     8          0
     9          0
   timers:
     0           0  1
     1           2
     2           3
     3           4
     4           5
     5           6
     6           7
     7           8
     8           9
   triggertime:
     1522677600:
       localtime  1522677600
       hash:
     1522701000:
       localtime  1522701000
       hash:
     1522702800:
       localtime  1522702800
       hash:
     1522703700:
       localtime  1522703700
       hash:
     1522704600:
       localtime  1522704600
       hash:
     1522705500:
       localtime  1522705500
       hash:
     1522706400:
       localtime  1522706400
       hash:
     1522707300:
       localtime  1522707300
       hash:
     1522708200:
       localtime  1522708200
       hash:
     1522710000:
       localtime  1522710000
       hash:
   uiState:
   uiTable:
Attributes:
   room       2 DOIF

TomLee

Wenn ich's richtig verstanden habe, einfach den Dummy zuerst abfragen:


([?PartyTime] eq "on") (set Deckenfluter on)
DOELSEIF
([TVTime] eq "off" and [22:30|So Mo Di Mi Do]) (set Deckenfluter off)
DOELSEIF
([TVTime] eq "off" and [23:00|So Mo Di Mi Do Fr Sa]) (set Deckenfluter off)
DOELSEIF
([TVTime] eq "off" and [23:15|So Mo Di Mi Do Fr Sa]) (set Deckenfluter off)
DOELSEIF
([TVTime] eq "off" and [23:30|So Mo Di Mi Do Fr Sa]) (set Deckenfluter off)
DOELSEIF
([TVTime] eq "off" and [23:45|So Mo Di Mi Do Fr Sa]) (set Deckenfluter off)
DOELSEIF
([TVTime] eq "off" and [00:00|So Mo Di Mi Do Fr Sa]) (set Deckenfluter off)
DOELSEIF
([TVTime] eq "off" and [00:15|So Mo Di Mi Do Fr Sa]) (set Deckenfluter off)
DOELSEIF
([TVTime] eq "off" and [00:30|So Mo Di Mi Do Fr Sa]) (set Deckenfluter off)
DOELSE
(set Deckenfluter off)

misux

In deinem Beispiel würde der Deckenfluter NUR an gehen wenn PartyTime on ist... Er soll aber NICHT AUS gehen wenn PartyTime on ist...
On soll er schon so an gehen wie meine Definition ist...

Zitat von: TomLee am 02 April 2018, 15:44:39
Wenn ich's richtig verstanden habe, einfach den Dummy zuerst abfragen:


([?PartyTime] eq "on") (set Deckenfluter on)
DOELSEIF
([TVTime] eq "off" and [22:30|So Mo Di Mi Do]) (set Deckenfluter off)
DOELSEIF
([TVTime] eq "off" and [23:00|So Mo Di Mi Do Fr Sa]) (set Deckenfluter off)
DOELSEIF
([TVTime] eq "off" and [23:15|So Mo Di Mi Do Fr Sa]) (set Deckenfluter off)
DOELSEIF
([TVTime] eq "off" and [23:30|So Mo Di Mi Do Fr Sa]) (set Deckenfluter off)
DOELSEIF
([TVTime] eq "off" and [23:45|So Mo Di Mi Do Fr Sa]) (set Deckenfluter off)
DOELSEIF
([TVTime] eq "off" and [00:00|So Mo Di Mi Do Fr Sa]) (set Deckenfluter off)
DOELSEIF
([TVTime] eq "off" and [00:15|So Mo Di Mi Do Fr Sa]) (set Deckenfluter off)
DOELSEIF
([TVTime] eq "off" and [00:30|So Mo Di Mi Do Fr Sa]) (set Deckenfluter off)
DOELSE
(set Deckenfluter off)


Otto123

Ich würde in die DOELSEIF einfach überall and [?PartyTime] eq "off" hinzufügen.
Viele Grüße aus Leipzig  ⇉  nächster Stammtisch an der Lindennaundorfer Mühle
RaspberryPi B B+ B2 B3 B3+ ZeroW,HMLAN,HMUART,Homematic,Fritz!Box 7590,WRT3200ACS-OpenWrt,Sonos,VU+,Arduino nano,ESP8266,MQTT,Zigbee,deconz

misux

Otto123  ;D

Als du geschrieben hast hatte ich auch den Einfall!

Denke so sollte es klappen...

([Tageslicht_indoor] eq "Nacht" and [16:00-01:00]) (set Deckenfluter on)
DOELSEIF
([TVTime] eq "off" and [22:30|So Mo Di Mi Do] and [?PartyTime] eq "off") (set Deckenfluter off)
DOELSEIF
([TVTime] eq "off" and [23:00|So Mo Di Mi Do Fr Sa] and [?PartyTime] eq "off") (set Deckenfluter off)
DOELSEIF
([TVTime] eq "off" and [23:15|So Mo Di Mi Do Fr Sa] and [?PartyTime] eq "off") (set Deckenfluter off)
DOELSEIF
([TVTime] eq "off" and [23:30|So Mo Di Mi Do Fr Sa] and [?PartyTime] eq "off") (set Deckenfluter off)
DOELSEIF
([TVTime] eq "off" and [23:45|So Mo Di Mi Do Fr Sa] and [?PartyTime] eq "off") (set Deckenfluter off)
DOELSEIF
([TVTime] eq "off" and [00:00|So Mo Di Mi Do Fr Sa] and [?PartyTime] eq "off") (set Deckenfluter off)
DOELSEIF
([TVTime] eq "off" and [00:15|So Mo Di Mi Do Fr Sa] and [?PartyTime] eq "off") (set Deckenfluter off)
DOELSEIF
([TVTime] eq "off" and [00:30|So Mo Di Mi Do Fr Sa] and [?PartyTime] eq "off") (set Deckenfluter off)
DOELSEIF
([?PartyTime] eq "off") (set Deckenfluter off)

misux

Kann man den Code irgendwie entschlacken?

Also einschalten soll er schon wie geplant...

([Tageslicht_indoor] eq "Nacht" and [16:00-01:00]) (set Deckenfluter on)

aber ausschalten wäre cool wenn er ausgeht wenn:

[TVTime] eq "off" and [?PartyTime] eq "off" 15Minuten später! aber nicht vor 22:30 doch spätestens 01:00.

Dann könnte ich mir die ganzen Zeiten sparen....

Damian

Zitat von: misux am 02 April 2018, 17:50:08
Kann man den Code irgendwie entschlacken?

Also einschalten soll er schon wie geplant...

([Tageslicht_indoor] eq "Nacht" and [16:00-01:00]) (set Deckenfluter on)

aber ausschalten wäre cool wenn er ausgeht wenn:

[TVTime] eq "off" and [?PartyTime] eq "off" 15Minuten später! aber nicht vor 22:30.

Dann könnte ich mir die ganzen Zeiten sparen....
z. B.
([TVTime] eq "off" and [?PartyTime] eq "off" and [22:30-01:00] or [01:00])

attr wait 900

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

misux


Otto123

Aber mit dem Vorschlag von Damian ist dann die Party 1:00 Uhr aus egal was sonst noch ist :)
Das or setzt sich durch!

Und er ursprüngliche Unterschied zwischen WE und Woche ist dann auch nicht mehr.

(.... and ([22:30|8] or [23:00-01:00]))Wäre mein optionaler Vorschlag :)
Viele Grüße aus Leipzig  ⇉  nächster Stammtisch an der Lindennaundorfer Mühle
RaspberryPi B B+ B2 B3 B3+ ZeroW,HMLAN,HMUART,Homematic,Fritz!Box 7590,WRT3200ACS-OpenWrt,Sonos,VU+,Arduino nano,ESP8266,MQTT,Zigbee,deconz

misux

 :o

okay, Wo oder WE wäre in dem Fall egal!

Wichtig wäre das

1. das Licht NICHT aus geht wenn PartyTime "on" ist
2. das Licht 15min nach [TVTime] eq "off" wenn PartyTime natürlich schon "off" ist


([Tageslicht_indoor] eq "Nacht" (set Deckenfluter on)
DOELSEIF
([TVTime] eq "off" and [?PartyTime] eq "off" and [22:30-01:00])
(set Deckenfluter off)

attr wait 900


Wenn jetzt aber nehmen wir an das PartyTime erst um 01:25 "off" geht, schaltet sich dann der Deckenfluter 15Min später auch aus?

Otto123

Jede Deiner drei Bedingungen dominiert wenn sie einzeln wahr sind.
and -> immer unwahr wenn eine Bedingung unwahr ist.
Viele Grüße aus Leipzig  ⇉  nächster Stammtisch an der Lindennaundorfer Mühle
RaspberryPi B B+ B2 B3 B3+ ZeroW,HMLAN,HMUART,Homematic,Fritz!Box 7590,WRT3200ACS-OpenWrt,Sonos,VU+,Arduino nano,ESP8266,MQTT,Zigbee,deconz

misux

Dann müsste ja das ? vor PartyTime weg damit es auch darauf reagiert wenns nach 01Uhr ist, richtig?

Ach und das attr wait 900.... bezieht sich das auch auf den einschaltpunkt? Das soll es ja nicht... es soll sich nur der ausschatzeitpunkt um 15min verzögern...

Otto123

Viele Grüße aus Leipzig  ⇉  nächster Stammtisch an der Lindennaundorfer Mühle
RaspberryPi B B+ B2 B3 B3+ ZeroW,HMLAN,HMUART,Homematic,Fritz!Box 7590,WRT3200ACS-OpenWrt,Sonos,VU+,Arduino nano,ESP8266,MQTT,Zigbee,deconz

misux

Okay!  :D

Also so:


([Tageslicht_indoor] eq "Nacht") (set Deckenfluter on)
DOELSEIF
([TVTime] eq "off" and [PartyTime] eq "off" and [22:30-01:00])
(set Deckenfluter off)

attr wait 0:900


Junge wenn das funktioniert dann frage ich mich warum ich so ein mordsdingen vorher geschrieben habe... ;D

Das im Reading wait_timer jetzt no timer steht ist normal nehme ich an... der wird erst gesetzt wenn der "off" befehl kommt, richtig?

Otto123

Viele Grüße aus Leipzig  ⇉  nächster Stammtisch an der Lindennaundorfer Mühle
RaspberryPi B B+ B2 B3 B3+ ZeroW,HMLAN,HMUART,Homematic,Fritz!Box 7590,WRT3200ACS-OpenWrt,Sonos,VU+,Arduino nano,ESP8266,MQTT,Zigbee,deconz

misux