FHEM Forum

FHEM => Automatisierung => DOIF => Thema gestartet von: RidcuIIy am 16 Dezember 2017, 14:10:56

Titel: DOIF Dewpoint [gelöst]
Beitrag von: RidcuIIy am 16 Dezember 2017, 14:10:56
Hallo,

ich habe hier irgendeinen Bug mit dem ich nicht klarkomme:


Hier soll eine Lüftung abhängig vom Dummy Sommer und dem aus zwei Quellen ermittelten Wert dewpoint gesteuert werden.
Aus welchem Grund auch immer löst die Kondition 1 ([EnO_FFA7C812:dewpoint] le [WuWeather:dewpoint]) (set ug_wakue_Lueftung AI) aus, obwohl der Wert Dewpoint aus [EnO_FFA7C812:dewpoint] höher ist als [WuWeather:dewpoint]

Dies wird auch in den Readings des DOIF so angezeigt und die Werte sind aktuell:

e_EnO_FFA7C812_dewpoint 12.7
   
2017-12-16 14:04:02

e_WuWeather_dewpoint 2
2017-12-16 14:03:10

Hat jemand einen Tip?



([EnO_FFA7C812:dewpoint] le [WuWeather:dewpoint]) (set ug_wakue_Lueftung AI)
DOELSEIF ([sommer] eq "on" and ([wz_hygrostat_Weather:temperature] gt "23.0" and [wz_hygrostat_Weather:temperature] gt [WuWeather:temp_c])) ({fhem "set ug_wakue_Lueftung B0"})
DOELSEIF ([sommer] eq "on" and [EnO_FFA7C812:humidity] le "60") ({fhem "set ug_wakue_Lueftung AI"})
DOELSEIF ([sommer] eq "on" and [EnO_FFA7C812:humidity] gt "60" and [EnO_FFA7C812:humidity] le "65") ({fhem "set ug_wakue_Lueftung A0"})
DOELSEIF ([sommer] eq "on" and [EnO_FFA7C812:humidity] gt "65") ({fhem "set ug_wakue_Lueftung B0"})
DOELSEIF ([sommer] eq "off" and [EnO_FFA7C812:humidity] gt "50") ({fhem "set ug_wakue_Lueftung B0"})
DOELSEIF ([sommer] eq "off" and [EnO_FFA7C812:humidity] le "50") ({fhem "set ug_wakue_Lueftung AI"})



Titel: Antw:DOIF Dewpoint
Beitrag von: Otto123 am 16 Dezember 2017, 14:15:39
Hi,

Das ist Deine DEF?
Du hast da Leerzeilen am Anfang? Wenn ja, mach die mal weg.

Zahlen würde ich nicht mit le vergleichen -> http://perldoc.perl.org/perlop.html#Operator-Precedence-and-Associativity
ZitatBinary "<" returns true if the left argument is numerically less than the right argument.
Binary ">" returns true if the left argument is numerically greater than the right argument.
Binary "<=" returns true if the left argument is numerically less than or equal to the right argument.
Binary ">=" returns true if the left argument is numerically greater than or equal to the right argument.
Binary "lt" returns true if the left argument is stringwise less than the right argument.
Binary "gt" returns true if the left argument is stringwise greater than the right argument.
Binary "le" returns true if the left argument is stringwise less than or equal to the right argument.
Binary "ge" returns true if the left argument is stringwise greater than or equal to the right argument.
Die anderen Vergleiche funktionieren, die machst Du (unnötigerweise) mit Strings -> "<Zahl>"

Das {fhem " bla bla "} ist auch unnötig. Bla Bla reicht völlig  ;D
Ich weiß manche mögen das.  :-X

Gruß Otto
Titel: Antw:DOIF Dewpoint
Beitrag von: RidcuIIy am 16 Dezember 2017, 14:37:35
Danke für die schnelle Hilfe Otto,

das scheint geholfen zu haben. Ich hatte wegen eines anderen Problems alle Operatoren auf String umgestellt, das passt zeitlich mit dem Auftreten der Probleme zusammen.
Leerzeilen hatte ich keine am Anfang. Und das {fhem mag ich einfach ;)

Stefan