[GELÖST] Statistics Modul: regelmäßige PERL Warnings im Logfile

Begonnen von MSP, 14 November 2019, 23:06:32

Vorheriges Thema - Nächstes Thema

MSP

Hallo zusammen,

ich verwende das Statisticsmodul um mir Zimmertemperaturen vor einer Stunde, bzw. vor 24 Stunden zu erzeugen. Dies scheint soweit gut zu funktionieren. Allerdings werden jetzt stündlich 5 Sekunden (hängt wohl mit day change zusammen ??) vor der vollen Stunde für jede definierte Statistik PERL Warnungen erzeugt. Kann mir jemand den genauen Grund sagen, bzw. was in meiner Konfiguration geändert muss, damit die Warnungen verschwinden?
Oder müsste ggfs. etwas am Modul geändert/erweitert werden.

Logfile:
2019.11.14 21:59:55 1: PERL WARNING: Use of uninitialized value in numeric eq (==) at ./FHEM/98_statistics.pm line 914.
2019.11.14 21:59:55 1: stacktrace:
2019.11.14 21:59:55 1:     main::__ANON__                      called by ./FHEM/98_statistics.pm (914)
2019.11.14 21:59:55 1:     main::statistics_doStatisticSpecialPeriod2 called by ./FHEM/98_statistics.pm (782)
2019.11.14 21:59:55 1:     main::statistics_doStatisticDelta   called by ./FHEM/98_statistics.pm (461)
2019.11.14 21:59:55 1:     main::statistics_DoStatistics       called by ./FHEM/98_statistics.pm (396)
2019.11.14 21:59:55 1:     main::statistics_DoStatisticsAll    called by ./FHEM/98_statistics.pm (380)
2019.11.14 21:59:55 1:     main::statistics_PeriodChange       called by fhem.pl (3297)
2019.11.14 21:59:55 1:     main::HandleTimeout                 called by fhem.pl (677)
2019.11.14 21:59:55 1: PERL WARNING: Use of uninitialized value in numeric eq (==) at ./FHEM/98_statistics.pm line 914.
2019.11.14 21:59:55 1: stacktrace:
2019.11.14 21:59:55 1:     main::__ANON__                      called by ./FHEM/98_statistics.pm (914)
2019.11.14 21:59:55 1:     main::statistics_doStatisticSpecialPeriod2 called by ./FHEM/98_statistics.pm (782)
2019.11.14 21:59:55 1:     main::statistics_doStatisticDelta   called by ./FHEM/98_statistics.pm (461)
2019.11.14 21:59:55 1:     main::statistics_DoStatistics       called by ./FHEM/98_statistics.pm (396)
2019.11.14 21:59:55 1:     main::statistics_DoStatisticsAll    called by ./FHEM/98_statistics.pm (380)
2019.11.14 21:59:55 1:     main::statistics_PeriodChange       called by fhem.pl (3297)
2019.11.14 21:59:55 1:     main::HandleTimeout                 called by fhem.pl (677)
2019.11.14 21:59:55 1: PERL WARNING: Use of uninitialized value in numeric eq (==) at ./FHEM/98_statistics.pm line 914.
2019.11.14 21:59:55 1: stacktrace:
2019.11.14 21:59:55 1:     main::__ANON__                      called by ./FHEM/98_statistics.pm (914)
2019.11.14 21:59:55 1:     main::statistics_doStatisticSpecialPeriod2 called by ./FHEM/98_statistics.pm (782)
2019.11.14 21:59:55 1:     main::statistics_doStatisticDelta   called by ./FHEM/98_statistics.pm (461)
2019.11.14 21:59:55 1:     main::statistics_DoStatistics       called by ./FHEM/98_statistics.pm (396)
2019.11.14 21:59:55 1:     main::statistics_DoStatisticsAll    called by ./FHEM/98_statistics.pm (380)
2019.11.14 21:59:55 1:     main::statistics_PeriodChange       called by fhem.pl (3297)
2019.11.14 21:59:55 1:     main::HandleTimeout                 called by fhem.pl (677)
2019.11.14 21:59:55 1: PERL WARNING: Use of uninitialized value in numeric eq (==) at ./FHEM/98_statistics.pm line 914.
2019.11.14 21:59:55 1: stacktrace:
2019.11.14 21:59:55 1:     main::__ANON__                      called by ./FHEM/98_statistics.pm (914)
2019.11.14 21:59:55 1:     main::statistics_doStatisticSpecialPeriod2 called by ./FHEM/98_statistics.pm (782)
2019.11.14 21:59:55 1:     main::statistics_doStatisticDelta   called by ./FHEM/98_statistics.pm (461)
2019.11.14 21:59:55 1:     main::statistics_DoStatistics       called by ./FHEM/98_statistics.pm (396)
2019.11.14 21:59:55 1:     main::statistics_DoStatisticsAll    called by ./FHEM/98_statistics.pm (380)
2019.11.14 21:59:55 1:     main::statistics_PeriodChange       called by fhem.pl (3297)
2019.11.14 21:59:55 1:     main::HandleTimeout                 called by fhem.pl (677)
2019.11.14 21:59:55 1: PERL WARNING: Use of uninitialized value in numeric eq (==) at ./FHEM/98_statistics.pm line 914.
2019.11.14 21:59:55 1: stacktrace:
2019.11.14 21:59:55 1:     main::__ANON__                      called by ./FHEM/98_statistics.pm (914)
2019.11.14 21:59:55 1:     main::statistics_doStatisticSpecialPeriod2 called by ./FHEM/98_statistics.pm (782)
2019.11.14 21:59:55 1:     main::statistics_doStatisticDelta   called by ./FHEM/98_statistics.pm (461)
2019.11.14 21:59:55 1:     main::statistics_DoStatistics       called by ./FHEM/98_statistics.pm (396)
2019.11.14 21:59:55 1:     main::statistics_DoStatisticsAll    called by ./FHEM/98_statistics.pm (380)
2019.11.14 21:59:55 1:     main::statistics_PeriodChange       called by fhem.pl (3297)
2019.11.14 21:59:55 1:     main::HandleTimeout                 called by fhem.pl (677)
2019.11.14 21:59:55 1: PERL WARNING: Use of uninitialized value in numeric eq (==) at ./FHEM/98_statistics.pm line 914.
2019.11.14 21:59:55 1: stacktrace:
2019.11.14 21:59:55 1:     main::__ANON__                      called by ./FHEM/98_statistics.pm (914)
2019.11.14 21:59:55 1:     main::statistics_doStatisticSpecialPeriod2 called by ./FHEM/98_statistics.pm (782)
2019.11.14 21:59:55 1:     main::statistics_doStatisticDelta   called by ./FHEM/98_statistics.pm (461)
2019.11.14 21:59:55 1:     main::statistics_DoStatistics       called by ./FHEM/98_statistics.pm (396)
2019.11.14 21:59:55 1:     main::statistics_DoStatisticsAll    called by ./FHEM/98_statistics.pm (380)
2019.11.14 21:59:55 1:     main::statistics_PeriodChange       called by fhem.pl (3297)
2019.11.14 21:59:55 1:     main::HandleTimeout                 called by fhem.pl (677)
2019.11.14 21:59:55 1: PERL WARNING: Use of uninitialized value in numeric eq (==) at ./FHEM/98_statistics.pm line 914.
2019.11.14 21:59:55 1: stacktrace:
2019.11.14 21:59:55 1:     main::__ANON__                      called by ./FHEM/98_statistics.pm (914)
2019.11.14 21:59:55 1:     main::statistics_doStatisticSpecialPeriod2 called by ./FHEM/98_statistics.pm (782)
2019.11.14 21:59:55 1:     main::statistics_doStatisticDelta   called by ./FHEM/98_statistics.pm (461)
2019.11.14 21:59:55 1:     main::statistics_DoStatistics       called by ./FHEM/98_statistics.pm (396)
2019.11.14 21:59:55 1:     main::statistics_DoStatisticsAll    called by ./FHEM/98_statistics.pm (380)
2019.11.14 21:59:55 1:     main::statistics_PeriodChange       called by fhem.pl (3297)
2019.11.14 21:59:55 1:     main::HandleTimeout                 called by fhem.pl (677)
2019.11.14 21:59:55 1: PERL WARNING: Use of uninitialized value in numeric eq (==) at ./FHEM/98_statistics.pm line 914.
2019.11.14 21:59:55 1: stacktrace:
2019.11.14 21:59:55 1:     main::__ANON__                      called by ./FHEM/98_statistics.pm (914)
2019.11.14 21:59:55 1:     main::statistics_doStatisticSpecialPeriod2 called by ./FHEM/98_statistics.pm (782)
2019.11.14 21:59:55 1:     main::statistics_doStatisticDelta   called by ./FHEM/98_statistics.pm (461)
2019.11.14 21:59:55 1:     main::statistics_DoStatistics       called by ./FHEM/98_statistics.pm (396)
2019.11.14 21:59:55 1:     main::statistics_DoStatisticsAll    called by ./FHEM/98_statistics.pm (380)
2019.11.14 21:59:55 1:     main::statistics_PeriodChange       called by fhem.pl (3297)
2019.11.14 21:59:55 1:     main::HandleTimeout                 called by fhem.pl (677)
2019.11.14 21:59:55 1: PERL WARNING: Use of uninitialized value in numeric eq (==) at ./FHEM/98_statistics.pm line 914.
2019.11.14 21:59:55 1: stacktrace:
2019.11.14 21:59:55 1:     main::__ANON__                      called by ./FHEM/98_statistics.pm (914)
2019.11.14 21:59:55 1:     main::statistics_doStatisticSpecialPeriod2 called by ./FHEM/98_statistics.pm (782)
2019.11.14 21:59:55 1:     main::statistics_doStatisticDelta   called by ./FHEM/98_statistics.pm (461)
2019.11.14 21:59:55 1:     main::statistics_DoStatistics       called by ./FHEM/98_statistics.pm (396)
2019.11.14 21:59:55 1:     main::statistics_DoStatisticsAll    called by ./FHEM/98_statistics.pm (380)
2019.11.14 21:59:55 1:     main::statistics_PeriodChange       called by fhem.pl (3297)
2019.11.14 21:59:55 1:     main::HandleTimeout                 called by fhem.pl (677)
2019.11.14 21:59:55 1: PERL WARNING: Use of uninitialized value in numeric eq (==) at ./FHEM/98_statistics.pm line 914.
2019.11.14 21:59:55 1: stacktrace:
2019.11.14 21:59:55 1:     main::__ANON__                      called by ./FHEM/98_statistics.pm (914)
2019.11.14 21:59:55 1:     main::statistics_doStatisticSpecialPeriod2 called by ./FHEM/98_statistics.pm (782)
2019.11.14 21:59:55 1:     main::statistics_doStatisticDelta   called by ./FHEM/98_statistics.pm (461)
2019.11.14 21:59:55 1:     main::statistics_DoStatistics       called by ./FHEM/98_statistics.pm (396)
2019.11.14 21:59:55 1:     main::statistics_DoStatisticsAll    called by ./FHEM/98_statistics.pm (380)
2019.11.14 21:59:55 1:     main::statistics_PeriodChange       called by fhem.pl (3297)
2019.11.14 21:59:55 1:     main::HandleTimeout                 called by fhem.pl (677)
2019.11.14 21:59:55 1: PERL WARNING: Use of uninitialized value in numeric eq (==) at ./FHEM/98_statistics.pm line 914.
2019.11.14 21:59:55 1: stacktrace:
2019.11.14 21:59:55 1:     main::__ANON__                      called by ./FHEM/98_statistics.pm (914)
2019.11.14 21:59:55 1:     main::statistics_doStatisticSpecialPeriod2 called by ./FHEM/98_statistics.pm (782)
2019.11.14 21:59:55 1:     main::statistics_doStatisticDelta   called by ./FHEM/98_statistics.pm (461)
2019.11.14 21:59:55 1:     main::statistics_DoStatistics       called by ./FHEM/98_statistics.pm (396)
2019.11.14 21:59:55 1:     main::statistics_DoStatisticsAll    called by ./FHEM/98_statistics.pm (380)
2019.11.14 21:59:55 1:     main::statistics_PeriodChange       called by fhem.pl (3297)
2019.11.14 21:59:55 1:     main::HandleTimeout                 called by fhem.pl (677)


statistics list:
Internals:
   DEF        Bad_Ist_Temperatur
   DEV_REGEXP Bad_Ist_Temperatur
   FUUID      5dcb3fa1-f33f-d47e-1e72-f8a673c6ab20ce6c
   NAME       Stat_Bad_Temp
   NOTIFYDEV  global,Bad_Ist_Temperatur
   NR         910
   NTFY_ORDER 10-Stat_Bad_Temp
   PREFIX     stat
   STATE      Updated stats for: Bad_Ist_Temperatur
   TYPE       statistics
   READINGS:
     2019-11-14 00:37:23   monitoredDevicesKNX Bad_Ist_Temperatur
     2019-11-14 22:59:56   nextPeriodChangeCalc 2019-11-14 23:59:55 (Day Change)
     2019-11-14 22:59:56   state           Updated stats for: Bad_Ist_Temperatur
   fhem:
     modulVersion $Date: 2018-03-18 19:51:57 +0100 (Sun, 18 Mar 2018) $
     nextPeriodChangeTime 1573772395
Attributes:
   deltaReadings Badtemperatur
   ignoreDefaultAssignments 1
   room       Bad
   specialDeltaPeriods Bad_Ist_Temperatur:Badtemperatur:Hour:01:24


list device
Internals:
   DEF        6/5/1:dpt9.001 6/6/1:dpt9.001
   DEVNAME    Bad_Ist_Temperatur
   FIRSTGADNAME g1
   FUUID      5dcb3fa1-f33f-d47e-284b-b3b5fa4e8bd7f0f6
   GETSTRING  g2:noArg g1:noArg
   IODev      KNX
   KNX_MSGCNT 103
   KNX_RAWMSG C01333w065010c90
   KNX_TIME   2019-11-14 22:53:00
   LASTInputDev KNX
   MSGCNT     103
   NAME       Bad_Ist_Temperatur
   NR         908
   NTFY_ORDER 50-Bad_Ist_Temperatur
   SETSTRING  g2:slider,-670760,13415,670760 g1:slider,-670760,13415,670760
   STATE      23.36 °C
   TYPE       KNX
   GADDETAILS:
     g1:
       CODE       06501
       GROUP      6/5/1
       MODEL      dpt9.001
       NO         1
       OPTION     
       RDNAMEGET  getG1
       RDNAMEPUT  putG1
       RDNAMESET  setG1
       SETLIST    :slider,-670760,13415,670760
     g2:
       CODE       06601
       GROUP      6/6/1
       MODEL      dpt9.001
       NO         2
       OPTION     
       RDNAMEGET  getG2
       RDNAMEPUT  putG2
       RDNAMESET  setG2
       SETLIST    :slider,-670760,13415,670760
   GADTABLE:
     06501      g1
     06601      g2
   READINGS:
     2019-11-14 22:59:56   Badsolltemperatur 23.50 °C
     2019-11-14 22:59:56   Badtemperatur   23.36 °C
     2019-11-14 22:59:56   Badtemperatur_1h 23.48 °C
     2019-11-14 22:59:56   Badtemperatur_24h 23.74 °C
     2019-11-14 22:53:00   getG1           23.36 °C
     2019-11-14 00:37:16   getG2           23.50 °C
     2019-11-14 22:53:00   last-sender     1/3/51
     2019-11-14 22:59:56   statBadtemperatur Hour: 0.00 Day: -0.26 Month: -0.26 Year: -0.26 (since: 2019-11-14 )
     2019-11-14 22:59:56   statBadtemperaturHour01 -0.12
     2019-11-14 22:59:56   statBadtemperaturHour24 -0.38
     2019-11-14 22:59:56   statBadtemperaturLast Hour: -0.12 Day: -0.14 Month: - Year: - (since: 2019-11-13_00:38:01 )
     2019-11-14 22:53:00   state           23.36 °C
   helper:
     _98_statistics Stat_Bad_Temp
Attributes:
   IODev      KNX
   room       Raumtemperaturen,Bad
   stateFormat {sprintf('%.2f',ReadingsNum($name,'getG1',0))." °C"}
   userReadings Badtemperatur {sprintf("%.2f",ReadingsNum("Bad_Ist_Temperatur","getG1",0))." °C"},
Badsolltemperatur {sprintf("%.2f",ReadingsNum("Bad_Ist_Temperatur","getG2",0))." °C"},
Badtemperatur_1h {sprintf("%.2f",(ReadingsNum("Bad_Ist_Temperatur","getG1",0)-ReadingsNum("Bad_Ist_Temperatur","statBadtemperaturHour01",0)))." °C"},
Badtemperatur_24h {sprintf("%.2f",(ReadingsNum("Bad_Ist_Temperatur","getG1",0)-ReadingsNum("Bad_Ist_Temperatur","statBadtemperaturHour24",0)))." °C"}
   widgetOverride g2:slider,20.0,0.1,24.0,1 g1:slider off


Danke & Gruß
Markus

KölnSolar

Hi Namensvetter,
ich nutze specialdeltaperiods nicht, aber meines Erachtens hast Du dort einen Definitionsfehler, da Du den devicename des statistics-devices eingebaut hast. Im Beispiel in der commandref ist dort nur das zu "überwachende" device benannt.

Grüße Markus
RPi3/2 buster/stretch-SamsungAV_E/N-RFXTRX-IT-RSL-NC5462-Oregon-CUL433-GT-TMBBQ-01e-CUL868-FS20-EMGZ-1W(GPIO)-DS18B20-CO2-USBRS232-USBRS422-Betty_Boop-EchoDot-OBIS(Easymeter-Q3/EMH-KW8)-PCA301(S'duino)-Deebot(mqtt2)-zigbee2mqtt

MSP

Hallo Markus,

ich habe die Statisticsdefinition von "define Stat_Bad_Temp statistics Bad_Ist_Temperatur" auf "define Stat_Bad_Temp statistics Stat_Bad_Temp" geändert. Die Warnungen erscheinen jetzt nicht mehr.

Vielen Dank und Gruß
Markus