Hauptmenü

Push Nachricht alle 3 std

Begonnen von jostmario, 28 Oktober 2014, 23:09:19

Vorheriges Thema - Nächstes Thema

jostmario

Hallo

Kann mir jemand sagen was hier in der fhem.cfg falsch ist.
im Log kommt:
2014.10.28 23:05:31 3: warnlampe_bei_untertemperatur return value: syntax error at (eval 550119) line 9, at EOF

und so hab ichs in der fhem.cfg. geschrieben.

define warnlampe_bei_untertemperatur notify myuvr_messuebersicht:UVR1611.* {\
     fhem(Log 1, "$EVTPART1");;\
           if ($EVTPART1 < 68.6) {\
               fhem(Log 1, "$EVTPART1");;\
               fhem("set Steckdose on");;\
                      if(("%" !~ m/dry/) && (time > $main::NewMailtime)) {\
          DebianMail('xxxxxxxe187d576b23236e0e7c1b3964442@api.prowlapp.com',$EVTPART1,$EVTPART1);;\
         DebianMail('xxxxxxxxe97c78bda7332a407548d52b935@api.prowlapp.com',$EVTPART1,$EVTPART1);;\
         $main::NewMailtime = time + 5000;;\ }\
}\
}\


Gruß Josty
Raspberry Pi  ---  HM-LAN ---  8X HM_HM_CC_RT_DN --- OWL+USB Strommesser    UVR1611

Puschel74

Hallo,

fast hätt ich geschrieben
bitte Code-tags verwenden und
Finger weg von der fhem.cfg - aber letzteres ist ja pöse.

Der Fehlermeldung nach würde ich so salopp sagen du hast einen Fehler in deinem notify  ;)
Erstmal alles "unnötige" aus dem Code verbannen und Log-Einträge einbauen.
An irgendeiner Stelle kommst du dann drauf das du einen Schreibfehler drinnen hast - und den dann ausbessern und dein Code klappt.

Grüße

P.S.: Ich bin dennoch davon überzeugt das es einfacher ist NICHT in der fhem.cfg zu arbeiten aber das darf natürlich jeder so machen wie er das besser findet.
Zotac BI323 als Server mit DBLog
CUNO für FHT80B, 3 HM-Lan per vCCU, RasPi mit CUL433 für Somfy-Rollo (F2F), RasPi mit I2C(LM75) (F2F), RasPi für Panstamp+Vegetronix +SONOS(F2F)
Ich beantworte keine Supportanfragen per PM! Bitte im Forum suchen oder einen Beitrag erstellen.

jostmario

Hallo

ja weis nicht wie man das einbaut ohne die fhem.cfg.

Gruß Josty
Raspberry Pi  ---  HM-LAN ---  8X HM_HM_CC_RT_DN --- OWL+USB Strommesser    UVR1611

jostmario

Hallo

meinst du das so mit den Logs
hab es im DEF abschnitt so stehen
Zitat
myuvr_messuebersicht:UVR1611.* {
     fhem(Log 1, "$EVTPART1");
       fhem(Log 1, "1111");
           if ($EVTPART1 < 68.6) {
               fhem(Log 1, "2222");
               fhem(Log 1, "$EVTPART1");
               fhem("set Steckdose on");
                      if(("%" !~ m/dry/) && (time > $main::NewMailtime)) {
               fhem(Log 1, "3333");
          DebianMail('xxxxxx5b3990e187d576b23236e0e7c1b3964442@api.prowlapp.com',$EVTPART1,$EVTPART1);
         DebianMail('xxxxxxxxe97c78bda7332a407548d52b935@api.prowlapp.com',$EVTPART1,$EVTPART1);
         $main::NewMailtime = time + 5000; }\
}
}



ok hab es im DEF bereich gefunden es war wohl der Backslash in der zeile   $main::NewMailtime = time + 5000; }\

allerdings meldet er jetzt noch ein fehler:

Zitat2014.10.28 23:41:14 1: 63.6
2014.10.28 23:41:14 1: PERL WARNING: Use of uninitialized value $cmd in pattern match (m//) at fhem.pl line 831.
2014.10.28 23:41:14 1: 1111
2014.10.28 23:41:14 1: PERL WARNING: Use of uninitialized value $cmd in pattern match (m//) at fhem.pl line 831.
2014.10.28 23:41:14 1: 2222
2014.10.28 23:41:14 1: PERL WARNING: Use of uninitialized value $cmd in pattern match (m//) at fhem.pl line 831.
2014.10.28 23:41:14 1: 63.6
2014.10.28 23:41:14 1: PERL WARNING: Use of uninitialized value $cmd in pattern match (m//) at fhem.pl line 831.
2014.10.28 23:41:14 3: CUL_HM set Steckdose on
2014.10.28 23:41:14 1: PERL WARNING: Use of uninitialized value $NewMailtime in numeric gt (>) at (eval 550797) line 8.
2014.10.28 23:41:14 3: eval: my $EVTPART7='50.4';my $EVTPART4='39.7';my $EVTPART13='21.4';my $EVTPART10='4.2';my $EVTPART5='38.2';my $EVTPART6='30.5';my $EVTPART16='1';my $EVTPART11='44.9';my $EVTPART0='UVR1611:';my $EVTPART9='18.8';my $EVENT='UVR1611:  63.6  50.5  38.6  39.7  38.2  30.5  50.4  23.2  18.8   4.2  44.9 -  21.4   3.6  20.8 1';my $EVTPART3='38.6';my $EVTPART1='63.6';my $EVTPART12='-';my $EVTPART2='50.5';my $NAME='myuvr_messuebersicht';my $EVTPART14='3.6';my $TYPE='UVRm';my $EVTPART15='20.8';my $EVTPART8='23.2';{
     fhem(Log 1, "$EVTPART1");
       fhem(Log 1, "1111");
           if ($EVTPART1 < 68.6) {
               fhem(Log 1, "2222");
               fhem(Log 1, "$EVTPART1");
               fhem("set Steckdose on");
                      if(("%" !~ m/dry/) && (time > $main::NewMailtime)) {
               fhem(Log 1, "3333");
          DebianMail('xxxxxx187d576b23236e0e7c1b3964442@api.prowlapp.com',$EVTPART1,$EVTPART1);
         DebianMail('xxxxxx8bda7332a407548d52b935@api.prowlapp.com',$EVTPART1,$EVTPART1);
         $main::NewMailtime = time + 5000; }
}
}
2014.10.28 23:41:14 1: 3333
2014.10.28 23:41:14 1: PERL WARNING: Use of uninitialized value $cmd in pattern match (m//) at fhem.pl line 831.



NewMailtime hab ich ja in der 99_myUtils.pm definiert:

ZitatmyUtils_Initialize($$)
{
my ($hash) = @_;
my $NewMailtime = time;
}

hmmmm

Gruß Josty
Gruß Josty
Raspberry Pi  ---  HM-LAN ---  8X HM_HM_CC_RT_DN --- OWL+USB Strommesser    UVR1611

Puschel74

#4
Hallo,

Zitatja weis nicht wie man das einbaut ohne die fhem.cfg.
Dann wirf mal rechts oben die SuFu an - puschel74 in der Detailsuche und du findest jede Menge Beiträge.

Wie schon geschrieben - wirf alles unnötige raus und schau wo es hackt.
Mit "alles unnötige" mein ich den ganzen Code soweit abspecken das es keine Fehler mehr gibt sondern nur noch sinnvolle Logeinträge.
Und dann weiter schauen

Grüße
Zotac BI323 als Server mit DBLog
CUNO für FHT80B, 3 HM-Lan per vCCU, RasPi mit CUL433 für Somfy-Rollo (F2F), RasPi mit I2C(LM75) (F2F), RasPi für Panstamp+Vegetronix +SONOS(F2F)
Ich beantworte keine Supportanfragen per PM! Bitte im Forum suchen oder einen Beitrag erstellen.

herrmannj

Hi,

sind "nur" warnings, keine Fehler. aber berechtigt weil: "NewMailtime" wird in der define deklariert und gilt nur dort (scope). Die Tatsache das er dich trotzdem weitermachen läßt liest sich für mich so als hättest Du "NewMailtime" nochmal im global scope definiert. Dann wäre das "my" in zuviel.

vg
jörg