DOIF auf Kalender oder Datum abfragen..

Begonnen von moonsorrox, 30 September 2015, 17:53:46

Vorheriges Thema - Nächstes Thema

satprofi

Hallo nochmals.

Irgendwie schein es nicht zu klappen.
heute wurde das kommando abgesetzt, obwohl ja nicht der 1.3. ist.

DOELSEIF (($month = 3 and $mday = 1) and [06:00]) (set ....)


why?

m.f.g.
gruss
-----------------------------------------------------------------------
beelink miniPC - Fhem 6.x CUL 868, FS20, NetIO230 CUL 433
HMLAN, HM-CC-RT-DN,Homematic Actoren,LD382A,Telegram

kumue

DOELSEIF ($month == 3 and $mday == 1 and [06:00]) (set ....)

so sollte es am 1.3. 6Uhr schalten...

satprofi

achso, aber bei "and" sollte doch alle bedingungen erfüllt sein, egal ob in oder ausser klammer.

trotzdem danke.
gruss
-----------------------------------------------------------------------
beelink miniPC - Fhem 6.x CUL 868, FS20, NetIO230 CUL 433
HMLAN, HM-CC-RT-DN,Homematic Actoren,LD382A,Telegram

kumue

es funktioniert auch so.. also die Datumsabfrage extra in ()
DOELSEIF (($month == 3 and $mday == 1) and [06:00]) (set ....)

wichtig ist == statt =

satprofi

Hallo.
Habe Problem mit folgendem DOIF

(($month > 10 and $month < 3) and [Ladestatus] < 2 and [Ueberschuss:state:d] > 100 and [07:45-19:00] and [Absorbtionsphase] eq "Closed" and [Netz_Schuetz_aus] eq "off") (set Batterielader_aus off)
DOELSEIF (($month > 10 and $month < 3) and [Ladestatus] < 3 and [Ueberschuss:state:d] > 200 and [07:00-18:00] and [Absorbtionsphase] eq "Closed" and [Netz_Schuetz_aus] eq "off") (set Batterielader_aus off)
DOELSEIF (($month > 10 and $month < 3) and [Ladestatus] < 4 and [Ueberschuss:state:d] > 300 and [07:45-18:00] and [Netz_Schuetz_aus] eq "off") (set Batterielader_aus off)
DOELSEIF (($month > 10 and $month < 3) and [Ladestatus] < 5 and [Ueberschuss:state:d] > 400 and [07:00-18:00] and [Netz_Schuetz_aus] eq "off") (set Batterielader_aus off)
DOELSEIF (($month > 10 and $month < 3) and [Ladestatus] >= 5 and [Ueberschuss:state:d] > 500 and [06:45-18:00] and [Netz_Schuetz_aus] eq "off") (set Batterielader_aus off)
DOELSEIF (($month > 2 and $month < 11) and [Ladestatus] < 2 and [Ueberschuss:state:d] > 200 and [07:45-19:00] and [Absorbtionsphase] eq "Closed" and [Netz_Schuetz_aus] eq "off") (set Batterielader_aus off)
DOELSEIF (($month > 2 and $month < 11) and [Ladestatus] < 3 and [Ueberschuss:state:d] > 400 and [07:00-18:00] and [Absorbtionsphase] eq "Closed" and [Netz_Schuetz_aus] eq "off") (set Batterielader_aus off)
DOELSEIF (($month > 2 and $month < 11) and [Ladestatus] < 4 and [Ueberschuss:state:d] > 600 and [07:45-18:00] and [Netz_Schuetz_aus] eq "off") (set Batterielader_aus off)
DOELSEIF (($month > 2 and $month < 11) and [Ladestatus] < 5 and [Ueberschuss:state:d] > 800 and [07:00-18:00] and [Netz_Schuetz_aus] eq "off") (set Batterielader_aus off)
DOELSEIF (($month > 2 and $month < 11) and [Ladestatus] >= 5 and [Ueberschuss:state:d] > 1000 and [06:45-18:00] and [Netz_Schuetz_aus] eq "off") (set Batterielader_aus off)
DOELSEIF ([Ueberschuss:state:d] < 1 or [Netz_Schuetz_aus] eq "on") (set Batterielader_aus on)


eigentlich sollte die Ladung starten, aber cmd steht auf 11.

[readings]
cmd_event
   
Ueberschuss
   
2016-02-13 15:39:07      cmd_nr    11
   
2016-02-13 15:39:07     e_Absorbtionsphase_STATE  Open
   
2016-02-20 10:03:47     e_Ladestatus_STATE    5
   
2016-02-20 10:06:39     e_Netz_Schuetz_aus_STATE  off
   
2016-02-20 07:59:01     e_Ueberschuss_state  2010
   
2016-02-20 10:06:31    state   cmd_11

[/code]

was passt jetzt wieder nicht? :grr:
gruss
-----------------------------------------------------------------------
beelink miniPC - Fhem 6.x CUL 868, FS20, NetIO230 CUL 433
HMLAN, HM-CC-RT-DN,Homematic Actoren,LD382A,Telegram

satprofi

Fehler gefunden. habe mich nach Damians Beispiel gehalten ( $month >10 and $month <3 ) , das ist aber ein fehler , weil nie zutreffend.

so passts:

DOELSEIF (($month >10 or $month <3) and [Ladestatus] < 3 and [Ueberschuss:state:d] > 200 and [07:00-18:00] and [Absorbtionsphase] eq "Closed" and [Netz_Schuetz_aus] eq "off") (set Batterielader_aus off)


man beachte : ($month >10 or $month <3)
oder : ($month <11 and $month >2)
gruss
-----------------------------------------------------------------------
beelink miniPC - Fhem 6.x CUL 868, FS20, NetIO230 CUL 433
HMLAN, HM-CC-RT-DN,Homematic Actoren,LD382A,Telegram

satprofi

Zitat von: Damian am 02 Oktober 2015, 15:46:41
Bei DOIF kannst du die Datumsabfrage mit Triggern oder mit Zeit kombinieren:

z. B. Heizung zur bestimmten Jahreszeit morgens um 5:00 Uhr einschalten:

($month > 10 and $month <5 and [05:00]) (set heating on)

Gruß

Damian

das kann nie zutreffen, muss ($month > 10 or $month <5 and [05:00])   heissen.
gruss
-----------------------------------------------------------------------
beelink miniPC - Fhem 6.x CUL 868, FS20, NetIO230 CUL 433
HMLAN, HM-CC-RT-DN,Homematic Actoren,LD382A,Telegram