FHEM Forum

FHEM => Automatisierung => Thema gestartet von: grappa24 am 12 Juni 2013, 00:12:08

Titel: notify: was stimmt hier nicht ?
Beitrag von: grappa24 am 12 Juni 2013, 00:12:08
hier mein erstes "komplexes" notify, was in Abhängigkeit des Status von ug_rolloautomatik einen at-Befehl enablen oder disablen soll ...

(ug_rolloautomatik)
{
     if ($EVENT eq "on")
     {
           attr AlleRollosHoch disable 0;
     }
     else
     {
           attr AlleRollosHoch disable 1;
     }
}
Titel: Aw: notify: was stimmt hier nicht ?
Beitrag von: rudolfkoenig am 12 Juni 2013, 09:50:23
Ist eigentlich eine Anfaengerfrage, siehe Link (http://forum.fhem.de/index.php?topic=13092.msg80067#msg80067)

Sonst:
attr ist keine Perl-Funktion, sondern eins von FHEM, man muss es also in Perl-Skripten mit
fhem("attr ....");
aufrufen.
Die Regexp am Anfang kann man zwar in Klammer einschliessen, man kann es aber in diesem Fall auch lassen, sonst fangen Andere auch damit an, das zu kopieren.
Titel: Aw: notify: was stimmt hier nicht ?
Beitrag von: grappa24 am 12 Juni 2013, 22:48:59
Dankesehr ...

ug_rolloautomatik
{
     if ($EVENT eq "on") {    
        fhem ("attr AlleRollosHoch disable 0");
     }
     else {
         fhem ("attr AlleRollosHoch disable 1");
     }
}