Statistics Modul - specialDeltaPeriod

Begonnen von Nobby1805, 20 Mai 2024, 11:16:18

Vorheriges Thema - Nächstes Thema

Nobby1805

Hallo und guten Morgen,

ich verstehe irgendwie das Attribut specialDeltaPeriods nicht, bzw. genauer ich finde die Ergebnisse nicht. Ich möchte für eine Temperaturwert, Wassertemperatur des Aquariums, das Minimum und Maximum der letzten 8 bzw. 14 Tage haben und habe dafür das Attribut AquaTemp:Temp:Day:8:14 gesetzt. Aber ich finde in den Readings nichts anderes als schon vorher, als das Attribut noch nicht gesetzt war.

hier ein List der Statistics und des "Gerätes" wo die Temperatur herkommt
Internals:
   DEF        AquaTemp
   DEV_REGEXP AquaTemp
   FUUID      66334a64-f33f-092f-b946-e8475be6af935052
   NAME       STATISTICSAqua
   NOTIFYDEV  global,AquaTemp
   NR         321
   NTFY_ORDER 10-STATISTICSAqua
   PREFIX     stat
   STATE      Updated stats for: AquaTemp
   TYPE       statistics
   eventCount 906
   READINGS:
     2024-05-15 18:37:11   monitoredDevicesHTTPMOD AquaTemp
     2024-05-20 10:59:55   nextPeriodChangeCalc 2024-05-20 11:59:55
     2024-05-20 11:07:31   state           Updated stats for: AquaTemp
   fhem:
     modulVersion $Date: 2023-10-22 16:27:28 +0200 (Sun, 22 Oct 2023) $
     nextPeriodChangeTime 1716199195
   hmccu:
Attributes:
   minAvgMaxReadings Temp
   specialDeltaPeriods AquaTemp:Temp:Day:8:14
   verbose    5
Internals:
   BUSY       0
   DEF        http://192.168.1.12/state 600
   FUUID      63f79f35-f33f-092f-f1b1-d38772e9bbc69a4a
   Interval   600
   MainURL    http://192.168.1.12/state
   ModuleVersion 4.1.16 - 4.4.2023
   NAME       AquaTemp
   NOTIFYDEV  global
   NR         188
   NTFY_ORDER 50-AquaTemp
   STATE      22.4
   TYPE       HTTPMOD
   eventCount 791
   value     
   CompiledRegexes:
   HttpUtils:
     NAME       
     addr       http://192.168.1.12:80
     auth       0
     buf       
     code       200
     compress   1
     conn       
     data       
     displayurl http://192.168.1.12/state
     header     
     host       192.168.1.12
     httpheader HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Type: application/x-msgpack
Cache-Control: public, max-age=0
Server: SunRiser8/0.940 (https://github.com/LEDaquaristik/sunriser)
Connection: close
Content-Length: 176
     httpversion 1.0
     hu_blocking 0
     hu_filecount 1
     hu_port    80
     hu_portSfx
     ignoreredirects 1
     loglevel   4
     path       /state
     protocol   http
     redirects  0
     timeout    2
     url        http://192.168.1.12/state
     sslargs:
   QUEUE:
   READINGS:
     2024-05-20 11:07:31   ATemp           22.4
     2024-05-20 11:07:31   BTemp           22.4
     2024-05-20 11:07:31   CTemp           22.4
     2024-05-20 11:07:31   ChartMax        24
     2024-05-20 11:07:31   ChartMin        21.5
     2024-05-20 11:07:31   OTemp           224
     2024-05-20 11:07:31   Sensor2         
     2024-05-20 11:07:31   Temp            22.4
     2024-05-20 11:07:31   VTemp           22.4
     2024-05-20 11:07:31   sensor          �
     2024-05-20 11:07:31   statTempDay     Min: 22.4 Avg: 22.6 Max: 22.8
     2024-05-19 23:59:55   statTempDayLast Min: 21.7 Avg: 22.0 Max: 23.1
     2024-05-20 11:07:31   statTempHour    Min: 22.4 Avg: 22.4 Max: 22.4
     2024-05-20 10:59:55   statTempHourLast Min: 22.4 Avg: 22.4 Max: 22.5
     2024-05-20 11:07:31   statTempMonth   Min: 21.7 Avg: 22.7 Max: 23.3 (since: 2024-05-02_10:13:59 )
     2024-05-20 11:07:31   statTempYear    Min: 21.7 Avg: 22.7 Max: 23.3 (since: 2024-05-02_10:13:59 )
   REQUEST:
     context    reading
     data       
     header     
     ignoreredirects 0
     num        unknown
     retryCount 0
     type       update
     url        http://192.168.1.12/state
   defptr:
     readingBase:
       Sensor2    reading
       sensor     reading
     readingNum:
       Sensor2    02
       sensor     01
     readingOutdated:
     requestReadings:
       update:
         Sensor2    reading 02
         sensor     reading 01
   helper:
     _98_statistics STATISTICSAqua
   hmccu:
Attributes:
   comment    ��time�d���tick�d��Z�uptime���{�service_mode��logsize��2��errsize�I���pwms��1�␁w�2�␂ѡ3�␂ѡ4��5�␁w�6��7��8��sensors��b500000cce343d28��␁�␁

   disable    0
   event-on-update-reading .*
   getURL     http://192.168.1.12/state
   preProcessRegex s/.*(sensor)s.*3d28.{10}(.)/$1 $2/g
   reading01Encode none
   reading01Name sensor
   reading01Regex sensor.(.)
   reading02Encode none
   reading02Name Sensor2
   reading02Regex sensor(.)
   room       _Aquarium
   stateFormat {sprintf("%.1f",ord(ReadingsVal("AquaTemp","sensor",0))/10.)}
   userReadings OTemp {my $wert = ord(ReadingsVal("AquaTemp","sensor",0))},
ATemp {my $wert = ord(ReadingsVal("AquaTemp","sensor",0))/10.},
BTemp {my $wert = ReadingsVal("AquaTemp","ATemp",0); ($wert<5)?$wert+25.6:$wert},
CTemp {my $wert = ReadingsVal("AquaTemp","BTemp",0); ($wert<15)?ReadingsVal("AquaTemp","VTemp",0):$wert},
Temp  {my $wertx = (ReadingsVal("AquaTemp","CTemp",0)>ReadingsVal("AquaTemp","VTemp",0)+1.6)?ReadingsVal("AquaTemp","VTemp",0):ReadingsVal("AquaTemp","CTemp",0)},
VTemp {my $wertv = ReadingsVal("AquaTemp","Temp",0)},
ChartMin {my $wertv = 21.5},
ChartMax {my $wertv = 24}

   verbose    3

Danke für jeden Tipp

Grüße Nobby
FHEM-Featurelevel: 6.2   (fhem.pl:28227/2023-11-29) auf Windows 10 Pro mit Strawberry Perl 5.32.1.1-32bit
TabletUI: 2.7.15
IO: 2xHMLAN(0.965)|HMUSB2(0.967)