Hauptmenü

Fehlermeldung Allgmemein

Begonnen von choetzu, 10 April 2017, 22:02:24

Vorheriges Thema - Nächstes Thema

choetzu

Hallo

ich beobachte mein Logfile relativ intensiv. Und wenn ein Fehler auftaucht, möchte ich dies natürlich sofort beheben, jedoch am Liebsten ohne die Forumgemeinschaft zu belästigen.;) Als Laie ist dies aber nicht wirklich so einfach.. Deshalb meine Frage: Wie kann man bei Fehlern die sich z.B. auf eine Zeile in der fhem.pl beziehen vorgehen, um den Uebeltäter zu finden...

Beispiel: Z.Z. erhalte ich im 5Minuten-Takt die Meldung

[Mon Apr 10 21:57:25 2017] fhem.pl: Use of uninitialized value $s in pattern match (m//) at fhem.pl line 1677.

Wenn ich nun in der fhem.pl auf der Zeile nachschaue, dann steht dort

if($s =~ /:d|:r|:i/ && $val =~ /(-?\d+(\.\d+)?)/) {

Hmm, die fehlermeldung sagt doch, dass der Wert der Variable $s nicht initialisiert werden konnte wegen m// . Doch ich finde in der Zeile kein m//

Also für einen Laien nicht ganz einfach.. Aber ich möchte ja wachsen.. Wie kann ich solche Sachen angehen und beheben?

Lg c
Raspi3, EnOcean, Zwave, Homematic

franky08

Debian Bookworm auf HUNSN / Debian Bullseye auf 2.ter HUNSN F2F an 2x RaspiB
mit FHEM aktuell
22Zoll ViewSonic als Infodislay (WVC)
3xHMLAN mit vccu, raspmatic_rpi3, HMIP-HCU1

choetzu

danke frank

dann werde ich mich mal in stacktrace und SuFu einlesen und hoffen, dass es kein Fehler sondern ein Hinweis ist.. ;)

Mit Verbose 5 spickt es mir folgendes mit raus:

2017.04.10 22:19:45 5: Starting notify loop for Werte_Palme, 4 event(s), first is cmd_nr: 3
2017.04.10 22:19:45 5: statistics Statistik: Notify.266 Notification of 'Werte_Palme' received. Device not monitored.
2017.04.10 22:19:45 5: End notify loop for Werte_Palme
2017.04.10 22:19:45 5: Starting notify loop for Werte_Pool, 4 event(s), first is cmd_nr: 3
2017.04.10 22:19:45 5: statistics Statistik: Notify.266 Notification of 'Werte_Pool' received. Device not monitored.
2017.04.10 22:19:45 5: End notify loop for Werte_Pool
2017.04.10 22:19:45 5: Triggering notify_Palme_Temp
2017.04.10 22:19:45 4: notify_Palme_Temp exec setreading Palme_Temp temperature [PoolController:Pool_Aussen_Num]
2017.04.10 22:19:45 5: Cmd: >setreading Palme_Temp temperature [PoolController:Pool_Aussen_Num]<
[b][Mon Apr 10 22:19:45 2017] fhem.pl: Use of uninitialized value $s in pattern match (m//) at fhem.pl line 1677.[/b]
2017.04.10 22:19:45 5: Starting notify loop for Palme_Temp, 1 event(s), first is temperature: 15.12
2017.04.10 22:19:45 4: statistics Statistik: doStatisticMinMax.511 Calculating min/avg/max statistics for 'Palme_Temp:temperature = 15.12'
2017.04.10 22:19:45 5: statistics Statistik: doStatisticMinMaxSingle.577 Set 'statTemperatureDay'='Min: 7.19 Avg: 16.76 Max: 29.69'
2017.04.10 22:19:45 5: statistics Statistik: storeSingularReadings.1071 Set statTemperatureDayMin = 7.19
2017.04.10 22:19:45 5: statistics Statistik: storeSingularReadings.1071 Set statTemperatureDayAvg = 16.76
2017.04.10 22:19:45 5: statistics Statistik: storeSingularReadings.1071 Set statTemperatureDayMax = 29.69
2017.04.10 22:19:45 5: statistics Statistik: doStatisticMinMaxSingle.597 Set '.Palme_Temp:temperatureDay'='Sum: 1347518.01 Time: 80390 LastValue: 15.12 LastTime: 1491855585 ShowDate: 0 DecPlaces: 2'
2017.04.10 22:19:45 5: statistics Statistik: doStatisticMinMaxSingle.577 Set 'statTemperatureMonth'='Min: 4.62 Avg: 13.00 Max: 29.69 (since: 2017-04-04_16:48:15 )'
2017.04.10 22:19:45 5: statistics Statistik: storeSingularReadings.1071 Set statTemperatureMonthMin = 4.62
2017.04.10 22:19:45 5: statistics Statistik: storeSingularReadings.1071 Set statTemperatureMonthAvg = 13.00
2017.04.10 22:19:45 5: statistics Statistik: storeSingularReadings.1071 Set statTemperatureMonthMax = 29.69
2017.04.10 22:19:45 5: statistics Statistik: doStatisticMinMaxSingle.597 Set '.Palme_Temp:temperatureMonth'='Sum: 6999412.65 Time: 538289 LastValue: 15.12 LastTime: 1491855585 ShowDate: 1 DecPlaces: 2'
2017.04.10 22:19:45 5: statistics Statistik: doStatisticMinMaxSingle.577 Set 'statTemperatureYear'='Min: 4.62 Avg: 13.00 Max: 29.69 (since: 2017-04-04_16:48:15 )'
2017.04.10 22:19:45 5: statistics Statistik: storeSingularReadings.1071 Set statTemperatureYearMin = 4.62
2017.04.10 22:19:45 5: statistics Statistik: storeSingularReadings.1071 Set statTemperatureYearAvg = 13.00
2017.04.10 22:19:45 5: statistics Statistik: storeSingularReadings.1071 Set statTemperatureYearMax = 29.69
2017.04.10 22:19:45 5: statistics Statistik: doStatisticMinMaxSingle.597 Set '.Palme_Temp:temperatureYear'='Sum: 6999421.46 Time: 538290 LastValue: 15.12 LastTime: 1491855585 ShowDate: 1 DecPlaces: 2'
2017.04.10 22:19:45 5: Starting notify loop for Statistik, 1 event(s), first is Updated stats for: Palme_Temp
2017.04.10 22:19:45 5: statistics Statistik: Notify.259 Notifications of myself received.
2017.04.10 22:19:45 5: End notify loop for Statistik
2017.04.10 22:19:45 5: statistics Statistik: Notify.282 Notification of 'Palme_Temp' received. Update statistics.
2017.04.10 22:19:45 5: End notify loop for Palme_Temp
2017.04.10 22:19:45 5: End notify loop for PoolController
Raspi3, EnOcean, Zwave, Homematic

franky08

Setze stacktrace auf 1 und verbose auf 5, beides unter global, dann solltest du der Meldung auf den Grund kommen.

VG
Frank
Debian Bookworm auf HUNSN / Debian Bullseye auf 2.ter HUNSN F2F an 2x RaspiB
mit FHEM aktuell
22Zoll ViewSonic als Infodislay (WVC)
3xHMLAN mit vccu, raspmatic_rpi3, HMIP-HCU1

choetzu

Danke frank, da krieg ich die selben logeinträge wie oben...
Raspi3, EnOcean, Zwave, Homematic

franky08

Hast du mal gewartet bis die Meldung wie in deinem ersten Post kommt?

P.S. kann aber sein das stacktrace da nichts bringt
Debian Bookworm auf HUNSN / Debian Bullseye auf 2.ter HUNSN F2F an 2x RaspiB
mit FHEM aktuell
22Zoll ViewSonic als Infodislay (WVC)
3xHMLAN mit vccu, raspmatic_rpi3, HMIP-HCU1

Thorsten Pferdekaemper

Hi,
meiner Meinung nach bringt das alles in so einem Fall nichts. Am besten, Du postest mal auch noch die 20 Zeilen oberhalb und unterhalb der problematischen Zeile. Dann kann man u.U. relativ schnell sehen, was da schief läuft. ...vielleicht aber auch nicht.
Das m// steht wahrscheinlich für irgend eine Regex, in dem Fall für das /:d|:r|:i/.
Gruß,
    Thorsten
FUIP

Ralf W.

Hallo,

seit 08.04.2017 erhalte ich die Meldung auch. Allerdings nicht regelmäßig, sondern jeweils 17 mal immer zwischen 11:30 und 12:00 Uhr und zwischen 23:30 und 24:00 Uhr.

Die Einträge vorher sind immer unterschiedlich.

Am 08.04.2017 um ca. 10:00 Uhr habe ich ein Device vom Type monitoring angelegt. Ich habe das mal wieder gelöscht. Mal sehen, ob das in einem Zusammenhang steht. Melde mich nach 12:00 Uhr wieder.

MfG
Proxmox Nipogi AM16, FHEM:RaspberryMatic:DE ConBee II, diverse Sensoren und Aktoren.

Ralf W.

#8
Das war es nicht. Suche weiter ...

MfG

<EDIT>
Suche eingestellt. Sh. https://forum.fhem.de/index.php/topic,22392.msg157650.html#msg157650 . Hatte ich übersehen.
</EDIT>
Proxmox Nipogi AM16, FHEM:RaspberryMatic:DE ConBee II, diverse Sensoren und Aktoren.

choetzu

Zitat von: Thorsten Pferdekaemper am 10 April 2017, 23:15:23
Hi,
meiner Meinung nach bringt das alles in so einem Fall nichts. Am besten, Du postest mal auch noch die 20 Zeilen oberhalb und unterhalb der problematischen Zeile. Dann kann man u.U. relativ schnell sehen, was da schief läuft. ...vielleicht aber auch nicht.
Das m// steht wahrscheinlich für irgend eine Regex, in dem Fall für das /:d|:r|:i/.
Gruß,
    Thorsten

danke. ich habe mal ein paar Zeilen dazu gepackt. Danke für die Hilfe...

#####################################
sub
ReplaceSetMagic($$@)       # Forum #38276
{
  my $hash = shift;
  my $nsplit = shift;
  my $a = join(" ", @_);
  my $oa = $a;

  sub
  rsmVal($$$$$)
  {
    my ($all, $t, $d, $n, $s, $val) = @_;
    my $hash = $defs{$d};
    return $all if(!$hash);
    if(!$t || $t eq "r:") {
      my $r = $hash->{READINGS};
      if($s && ($s eq ":t" || $s eq ":sec")) {
        return $all if (!$r || !$r->{$n});
        $val = $r->{$n}{TIME};
        $val = time() - time_str2num($val) if($s eq ":sec");
        return $val;
      }
      $val = $r->{$n}{VAL} if($r && $r->{$n});
    }
    $val = $hash->{$n}   if(!defined($val) && (!$t || $t eq "i:"));
    $val = $attr{$d}{$n} if(!defined($val) && (!$t || $t eq "a:") && $attr{$d});
    return $all if(!defined($val));

    if($s =~ /:d|:r|:i/ && $val =~ /(-?\d+(\.\d+)?)/) {
      $val = $1;
      $val = int($val) if ( $s eq ":i" );
      $val = round($val, defined($1) ? $1 : 1) if($s =~ /^:r(\d)?/);
    }
    return $val;
  }

  $a =~s/(\[([ari]:)?([a-zA-Z\d._]+):([a-zA-Z\d._\/-]+)(:(t|sec|i|d|r|r\d))?\])/
         rsmVal($1,$2,$3,$4,$5)/eg;

  $evalSpecials->{'%DEV'} = $hash->{NAME};
  $a =~ s/{\((.*?)\)}/AnalyzePerlCommand($hash->{CL},$1,1)/egs;

  return (undef, @_) if($oa eq $a);
  return (undef, split(/ /, $a, $nsplit));
}

#####################################
Raspi3, EnOcean, Zwave, Homematic

Thorsten Pferdekaemper

Hi,
das hat irgendwas damit zu tun, was hier diskutiert wird:
https://forum.fhem.de/index.php/topic,38276.0.html
...allerdings ist mir nicht klar, was genau. Hast Du irgendwo etwas im Format [device:reading] benutzt?
Gruß,
   Thorsten
FUIP

choetzu

Zitat von: Thorsten Pferdekaemper am 11 April 2017, 20:26:31
Hi,
das hat irgendwas damit zu tun, was hier diskutiert wird:
https://forum.fhem.de/index.php/topic,38276.0.html
...allerdings ist mir nicht klar, was genau. Hast Du irgendwo etwas im Format [device:reading] benutzt?
Gruß,
   Thorsten

Hallo, danke dass du dir die Zeit nimmst...

ui, die Post ist harte Hausmannskost.. Ich muss die 6 Seiten im Post vermutlich noch ein paar Mal lesen, bis ich das annähernd entziffern kann ;)

Ja, ich benutze device:reading öfters, auch in Zusammenhang mit notify

Im Logfile oberhalb der "Fehlermeldung" steht

2017.04.10 22:19:45 5: Cmd: >setreading Palme_Temp temperature [PoolController:Pool_Aussen_Num]<

dies kommt vom notify
PoolController:Pool_Aussen_Num:.* setreading Palme_Temp temperature [PoolController:Pool_Aussen_Num]

Ich habe Palme_Temp (dummy) gemacht, damit ich das Reading temperature erstellen kann, um von Homekit gemappt zu werden.
Ist da evtl. was falsch?

Raspi3, EnOcean, Zwave, Homematic

Thorsten Pferdekaemper

Hi,
ich glaube momentan nicht, dass Du da was falsch gemacht hast. Kannst Du trotzdem mal probieren, ob sich das Problem beheben lässt, wenn Du es so schreibst:

[PoolController:Pool_Aussen_Num:d]

Gruß,
   Thorsten
FUIP

choetzu

Du Teufelskerl, das wars!!!

Herzlichen Dank!

Werde mich trotzdem noch durch den Post kämpfen um zu lernen :)
Raspi3, EnOcean, Zwave, Homematic

Thorsten Pferdekaemper

Zitat von: choetzu am 11 April 2017, 22:57:57
Du Teufelskerl, das wars!!!
Nein, das war's nicht. Es sollte nämlich nicht notwendig sein, das :d dranzuhängen. Ich nehme mal an, dass Du im Developer-Forum nicht schreiben kannst. Ich habe das mal übernommen:
https://forum.fhem.de/index.php/topic,38276.msg619274.html#msg619274
Gruß,
   Thorsten
FUIP