Hauptmenü

Problem mit DOELSEIF

Begonnen von Helmi55, 25 Juni 2016, 11:48:46

Vorheriges Thema - Nächstes Thema

Helmi55

Hallo
ich benötige bitte eure Hilfe.
Ich hatte folgendes DOIF zum Schalten meiner Solaranlage:
define di_Solar1 DOIF ([11:00-19:00] and [PoolMaster] eq "on" and [PoolPumpe] eq "on" and ([SolarDiff]>[Hysterese:state])) (set SolarPumpe on) DOELSE (set SolarPumpe off)
attr di_Solar1 room Poolsteuerung
attr di_Solar1 wait 0:180

Funktioniert ohne Probleme - zwischen 11 und 19 Uhr (Pumpenlaufzeit) schaltet die SolarPumpe für 180m Sek dazu wenn der eingestellte Hysterese Wert überschritten wird.

Nun steigen aber die Lufttemperaturen so an, dass das Polowasser zu "kochen" beginnt.
Jetzt wollte ich mit DOELSEIF steuern, dass wenn die PoolTemperatur >= 30 Grad ist, zwischen 11 und 19 Uhr nur mehr stündlich die Solarmatten gespült werden (damit diese nicht explodieren)
In dem Beispiel zum Testen nicht stündlich
Hier mein DOIF welches leider nicht will
define di_Solar1 DOIF ([11:00-19:00] and [PoolMaster] eq "on" and [PoolPumpe] eq "on" and ([SolarDiff]>[Hysterese:state])) (set SolarPumpe on) DOELSE (set SolarPumpe off) DOELSEIF ([11:00-19:00] and [PoolMaster] eq "on" and [PoolPumpe] eq "on" and ([PoolSensor]>=30) and ([11:36] or [11:56] or [12:16]) (set SolarPume on-for-timer 180)
attr di_Solar1 room Poolsteuerung
attr di_Solar1 wait 0:180


Wo habe ich hier den Fehler eingebaut?

Danke für eure Hilfe
Gruß
Helmut
System1 fhem 6.1 auf RPi 4B mit 4GB, HMUSBConfig, DS9490R-1Wire, Busware USB 868, Pool-Solarsteuerung mit FHEM. System2 fhem 6.1 auf RPi 4B mit 4GB (Bullseye) mit Busware USB 868 und 433 und HMUARTLGW für Haussteuerung

https://www.flickr.com/photos/canonhelmi/

Helmi55

#1
Moment habe gerade einen Schreibfehler in Solarium entdeckt
Nein - DOELSEIF greift nicht denn die Hysterie von 7 Grad hat die Solarpumpe soeben wieder eingeschaltet. PoolTemp ist über 30
System1 fhem 6.1 auf RPi 4B mit 4GB, HMUSBConfig, DS9490R-1Wire, Busware USB 868, Pool-Solarsteuerung mit FHEM. System2 fhem 6.1 auf RPi 4B mit 4GB (Bullseye) mit Busware USB 868 und 433 und HMUARTLGW für Haussteuerung

https://www.flickr.com/photos/canonhelmi/

Ellert

Wie lautet die Fehlermeldung des DEF-Editors?

Helmi55

Servus
ich bekomme keine Fehlermeldung. Obwohl die Temperatur des Polosensors über 30 ist
wird trotzdem von ersten Teil des DOIFS (Hysterese größer) geschaltet.
Nützt ein List des DOIFs
Internals:
   DEF        ([11:00-19:00] and [PoolMaster] eq "on" and [PoolPumpe] eq "on" and ([SolarDiff]>[Hysterese:state])) (set SolarPumpe on) DOELSE (set SolarPumpe off) DOELSEIF ([11:00-19:00] and [PoolMaster] eq "on" and [PoolPumpe] eq "on" and ([PoolSensor]>=30) and ([12:00] or [12:30] or [12:45]) (set SolarPumpe on-for-timer 180)
   NAME       di_Solar1
   NR         177
   NTFY_ORDER 50-di_Solar1
   STATE      cmd_1
   TYPE       DOIF
   Readings:
     2016-06-25 11:54:08   Device          SolarDiff
     2016-06-25 11:51:06   cmd             1
     2016-06-25 11:51:06   cmd_event       SolarDiff
     2016-06-25 11:51:06   cmd_nr          1
     2016-06-25 11:50:57   e_PoolPumpe_STATE on
     2016-06-25 11:54:08   e_SolarDiff_STATE 2.9
     2016-06-25 11:51:06   state           cmd_1
     2016-06-25 11:50:50   timer_1_c1      26.06.2016 11:00:00
     2016-06-25 11:50:50   timer_2_c1      25.06.2016 19:00:00
     2016-06-25 11:53:07   wait_timer      25.06.2016 11:56:07 cmd_2 SolarDiff
   Condition:
     0          DOIF_time($hash,$hash->{realtime}{0},$hash->{realtime}{1},$wday,$hms,"") and InternalDoIf($hash,'PoolMaster','STATE','','',AttrVal($hash->{NAME},'notexist',undef)) eq "on" and InternalDoIf($hash,'PoolPumpe','STATE','','',AttrVal($hash->{NAME},'notexist',undef)) eq "on" and (InternalDoIf($hash,'SolarDiff','STATE','','',AttrVal($hash->{NAME},'notexist',undef))>ReadingValDoIf($hash,'Hysterese','state','','',AttrVal($hash->{NAME},'notexist',undef)))
   Days:
   Devices:
     0           PoolMaster PoolPumpe SolarDiff Hysterese
     all         PoolMaster PoolPumpe SolarDiff Hysterese
   Do:
     0:
       0          set SolarPumpe on
     1:
       0          set SolarPumpe off
   Helper:
     event      2.875
     globalinit 1
     last_timer 2
     sleepdevice SolarDiff
     sleepsubtimer 0
     sleeptimer 1
     timerdev   SolarDiff
     timerevent 2.875
     triggerDev SolarDiff
     timerevents:
       2.875
     timereventsState:
       state: 2.875
     triggerEvents:
       2.875
     triggerEventsState:
       state: 2.875
   Internals:
     0           PoolMaster:STATE PoolPumpe:STATE SolarDiff:STATE
     all         PoolMaster:STATE PoolPumpe:STATE SolarDiff:STATE
   Interval:
     0          -1
     1          0
   Itimer:
   Localtime:
     0          1466931600
     1          1466874000
   Readings:
     0           Hysterese:state
     all         Hysterese:state
   Realtime:
     0          11:00:00
     1          19:00:00
   Regexp:
     0:
     All:
   State:
   Time:
     0          11:00:00
     1          19:00:00
   Timecond:
     0          0
     1          0
   Timer:
     0          0
     1          0
   Timers:
     0           0  1
   Trigger:
   Triggertime:
     1466874000:
       localtime  1466874000
       Hash:
     1466931600:
       localtime  1466931600
       Hash:
Attributes:
   room       Poolsteuerung
   wait       0:180
System1 fhem 6.1 auf RPi 4B mit 4GB, HMUSBConfig, DS9490R-1Wire, Busware USB 868, Pool-Solarsteuerung mit FHEM. System2 fhem 6.1 auf RPi 4B mit 4GB (Bullseye) mit Busware USB 868 und 433 und HMUARTLGW für Haussteuerung

https://www.flickr.com/photos/canonhelmi/

kumue

was mir auf den ersten Blick auffällt ist das DOELSE mittendrin...
Sollte ein DOELSE nicht am Ende stehen ?

Helmi55

#5
Servus
jetzt bekomme ich die Fehlermeldung
perl error in condition: DOIF_time($hash,$hash->{realtime}{2},$hash->{realtime}{3},$wday,$hms,"") and InternalDoIf($hash,'PoolMaster','STATE','','',AttrVal($hash->{NAME},'notexist',undef)) eq "on" and InternalDoIf($hash,'PoolPumpe','STATE','','',AttrVal($hash->{NAME},'notexist',undef)) eq "on" and (InternalDoIf($hash,'PoolSensor','STATE','','',AttrVal($hash->{NAME},'notexist',undef))>=30) and (DOIF_time_once($hash,$hash->{timer}{4},$wday,"") or DOIF_time_once($hash,$hash->{timer}{5},$wday,"") or DOIF_time_once($hash,$hash->{timer}{6},$wday,"")) (set SolarPumpe on-for-timer 180) DOELSE (set SolarPumpe off): syntax error at (eval 141601) line 1, near ") ("

wenn ich das DOELSE an den Schluss setzte ->

define di_Solar1 DOIF ([11:00-19:00] and [PoolMaster] eq "on" and [PoolPumpe] eq "on" and ([SolarDiff]>[Hysterese:state])) (set SolarPumpe on) DOELSEIF ([11:00-19:00] and [PoolMaster] eq "on" and [PoolPumpe] eq "on" and ([PoolSensor]>=30) and ([12:40] or [13:00] or [13:30]) (set SolarPumpe on-for-timer 180) DOELSE (set SolarPumpe off))



Habe jetzt noch  die Abfrage auf den Poolwert geändert: ([PoolSensore:state]>=30)
System1 fhem 6.1 auf RPi 4B mit 4GB, HMUSBConfig, DS9490R-1Wire, Busware USB 868, Pool-Solarsteuerung mit FHEM. System2 fhem 6.1 auf RPi 4B mit 4GB (Bullseye) mit Busware USB 868 und 433 und HMUARTLGW für Haussteuerung

https://www.flickr.com/photos/canonhelmi/

kumue

([11:00-19:00] and [PoolMaster] eq "on" and [PoolPumpe] eq "on" and ([SolarDiff]>[Hysterese:state])) (set SolarPumpe on)
DOELSEIF ([11:00-19:00] and [PoolMaster] eq "on" and [PoolPumpe] eq "on" and ([PoolSensor]>=30) and ([12:40] or [13:00] or [13:30])) (set SolarPumpe on-for-timer 180)
DOELSE (set SolarPumpe off)


Klammersetzung...

Helmi55

Danke das dürfte es gewesen sein

define di_Solar1 DOIF ([11:00-19:00] and [PoolMaster] eq "on" and [PoolPumpe] eq "on" and ([SolarDiff]>[Hysterese:state])) (set SolarPumpe on) DOELSEIF ([11:00-19:00] and [PoolMaster] eq "on" and [PoolPumpe] eq "on" and ([PoolSensor:state]>=30) and ([12:40] or [13:00] or [13:30])) (set SolarPumpe on-for-timer 180) DOELSE (set SolarPumpe off)


Lass es mal laufen und werde es so beobachten

DANKE
System1 fhem 6.1 auf RPi 4B mit 4GB, HMUSBConfig, DS9490R-1Wire, Busware USB 868, Pool-Solarsteuerung mit FHEM. System2 fhem 6.1 auf RPi 4B mit 4GB (Bullseye) mit Busware USB 868 und 433 und HMUARTLGW für Haussteuerung

https://www.flickr.com/photos/canonhelmi/

Helmi55

#8
Hallo
nein so geht es nicht. Habe jetzt noch folgende Veränderungen vorgenommen nur >30 und habe im ersten Teil ein on-for-timer gesetzt. Damit, glaube ich, erspare ich mir das DOELSE (set off).
Wie muss hier aber der richtige Befehl lauten für folgende Umsetzung
Wasser >30 dann schalte immer um 12,13,14,15 Uhr usw... (zwischen 11und19 Uhr) die Solarpumpe für 180 Sekunden ein.

Das hier funktioniert nicht
define di_Solar1 DOIF ([11:00-19:00] and [PoolMaster] eq "on" and [PoolPumpe] eq "on" and ([SolarDiff]>[Hysterese:state])) (set SolarPumpe on-for-timer 240) DOELSEIF ([11:00-19:00] and [PoolMaster] eq "on" and [PoolPumpe] eq "on" and ([PoolSensor:state:d]>30) and ([14:15] or [14:30] or [15:00])) (set SolarPumpe on-for-timer 500)
attr di


Sobald der Wert der hysterese erreicht wird schaltet die SolarPumpe ???   Ich dachte ein DOELSEIF bedeutet wenn größer 30 dann mach diese Angaben????


Dieses DOIF
define di_Solar1 DOIF ([11:00-19:00] and [PoolMaster] eq "on" and [PoolPumpe] eq "on" and ([SolarDiff]>[Hysterese:state])) (set SolarPumpe on-for-timer 240) DOELSEIF ([11:00-19:00] and [PoolMaster] eq "on" and [PoolPumpe] eq "on" and ([PoolSensor:state:d]>30) and ([14:35] or [14:55] or [15:15])) (set SolarPumpe on-for-timer 500) DOELSE


schaltet jetzt wenn Hysterie erreicht     UND     zu den angegebenen Zeiten
Wobei im Log sogar zweimal geschaltet wird???

2016.06.25 15:03:10 3: CUL_HM set SolarPumpe on-for-timer 240
2016.06.25 15:03:11 1: General 100-0
2016.06.25 15:03:11 1: General 100-0
2016.06.25 15:04:13 3: CUL_HM set SolarPumpe on-for-timer 240
2016.06.25 15:04:13 1: General 100-0
2016.06.25 15:04:13 1: General 100-0


Ja, FHEM ist aktuell.......

Danke
Helmut
System1 fhem 6.1 auf RPi 4B mit 4GB, HMUSBConfig, DS9490R-1Wire, Busware USB 868, Pool-Solarsteuerung mit FHEM. System2 fhem 6.1 auf RPi 4B mit 4GB (Bullseye) mit Busware USB 868 und 433 und HMUARTLGW für Haussteuerung

https://www.flickr.com/photos/canonhelmi/

Helmi55

So, etwas die CommandRef studiert - werde es morgen so probieren
([11:00-19:00] and [PoolMaster] eq "on" and [PoolPumpe] eq "on" and ([SolarDiff]>[Hysterese:state]) and ([PoolSensor:state:d]<29.9)) (set SolarPumpe on-for-timer 240) DOELSEIF ([11:00-19:00] and [PoolMaster] eq "on" and [PoolPumpe] eq "on" and ([PoolSensor:state:d]>30) and ([11:35] or [12:00] or [12:30])) (set SolarPumpe on-for-timer 500)

Muss da am Schluss noch ein DOELSE dran?
System1 fhem 6.1 auf RPi 4B mit 4GB, HMUSBConfig, DS9490R-1Wire, Busware USB 868, Pool-Solarsteuerung mit FHEM. System2 fhem 6.1 auf RPi 4B mit 4GB (Bullseye) mit Busware USB 868 und 433 und HMUARTLGW für Haussteuerung

https://www.flickr.com/photos/canonhelmi/

Helmi55

NEIN
ich bekomme das nicht hin
([11:00-19:00] and [PoolMaster] eq "on" and [PoolPumpe] eq "on" and ([SolarDiff]>[Hysterese:state]) and ([PoolSensor:state:d]<29.9)) (set SolarPumpe on-for-timer 240) DOELSEIF ([11:00-19:00] and [PoolMaster] eq "on" and [PoolPumpe] eq "on" and ([PoolSensor:state:d]>30) and ([15:00] or [16:00] or [17:00])) (set SolarPumpe on-for-timer 60) DOELSE



wenn die Temperatur unter 29.9 ist schaltet die Pumpe laut Log mehrmals???

2016.06.26 14:07:49 3: CUL_HM set SolarPumpe on-for-timer 240
2016.06.26 14:07:50 1: General 100-0
2016.06.26 14:07:50 1: General 100-0
2016.06.26 14:08:06 3: CUL_HM set SolarPumpe on-for-timer 240
2016.06.26 14:08:07 3: CUL_HM set SolarPumpe on-for-timer 240
2016.06.26 14:08:07 1: General 100-0
2016.06.26 14:08:07 1: General 100-0
2016.06.26 14:08:08 1: General 100-0
2016.06.26 14:08:08 1: General 100-0
2016.06.26 14:08:50 3: CUL_HM set SolarPumpe on-for-timer 240
2016.06.26 14:08:50 1: General 100-0
2016.06.26 14:08:50 1: General 100-0
2016.06.26 14:09:07 3: CUL_HM set SolarPumpe on-for-timer 240
2016.06.26 14:09:08 3: CUL_HM set SolarPumpe on-for-timer 240
2016.06.26 14:09:08 1: General 100-0
2016.06.26 14:09:08 1: General 100-0
2016.06.26 14:09:08 1: General 100-0
2016.06.26 14:09:08 1: General 100-0
2016.06.26 14:13:13 1: General 0-0
2016.06.26 14:13:13 1: General 0-0
2016.06.26 14:16:56 3: CUL_HM set SolarPumpe on-for-timer 240
2016.06.26 14:16:58 1: General 100-0
2016.06.26 14:16:58 1: General 100-0
2016.06.26 14:17:16 3: CUL_HM set SolarPumpe on-for-timer 240
2016.06.26 14:17:17 3: CUL_HM set SolarPumpe on-for-timer 240
2016.06.26 14:17:17 1: General 100-0
2016.06.26 14:17:17 1: General 100-0
2016.06.26 14:17:17 1: General 100-0
2016.06.26 14:17:17 1: General 100-0
2016.06.26 14:17:56 3: CUL_HM set SolarPumpe on-for-timer 240
2016.06.26 14:17:57 1: General 100-0
2016.06.26 14:17:57 1: General 100-0
2016.06.26 14:18:17 3: CUL_HM set SolarPumpe on-for-timer 240
2016.06.26 14:18:18 3: CUL_HM set SolarPumpe on-for-timer 240
2016.06.26 14:18:18 1: General 100-0
2016.06.26 14:18:18 1: General 100-0
2016.06.26 14:18:18 1: General 100-0
2016.06.26 14:18:18 1: General 100-0
2016.06.26 14:22:21 1: General 0-0
2016.06.26 14:22:21 1: General 0-0


Warum wird hier doppelt geschalten?

Und ist die Temperatur über 30 Grad wird nur um 15 Uhr geschaltet??
Wollte das eigentlich nach diesem Beispiel aufbauen:
Zeitsteuerung mit mehreren Zeitschaltpunkten:

define di_light DOIF ([08:00] or [10:00] or [20:00]) (set switch on) DOELSEIF ([09:00] or [11:00] or [00:00]) (set switch off)


Habe wieder mein altes funktionierendes DOIF ohne Temperaturbegrenzung im Einsatz (heute gar nicht da Dauerregen ohne Sonne

([11:00-19:00] and [PoolMaster] eq "on" and [PoolPumpe] eq "on" and ([SolarDiff]>[Hysterese:state])) (set SolarPumpe on) DOELSE (set SolarPumpe off)


Schönen Tag
Helmut
System1 fhem 6.1 auf RPi 4B mit 4GB, HMUSBConfig, DS9490R-1Wire, Busware USB 868, Pool-Solarsteuerung mit FHEM. System2 fhem 6.1 auf RPi 4B mit 4GB (Bullseye) mit Busware USB 868 und 433 und HMUARTLGW für Haussteuerung

https://www.flickr.com/photos/canonhelmi/