[gelöst] unerwartete Ergebnisse bei DBrep diffvalue

Begonnen von Nighthawk, 01 Dezember 2022, 13:48:37

Vorheriges Thema - Nächstes Thema

Nighthawk

Hallo,

ich versuch gerade eine Übersicht über die Monats und Jahresverbräuche aufzubauen.
Dazu wollte ich mir die Monats, bzw. Jahresverbräuche mit DBrep berechnen lassen, leider bekomme ich dabei aber nicht das Ergebnis was ich erwarte.

Hier ein Beispiel:

Folgendes ist in der Datenbank:

+---------------------+--------------+------+----------------------------------+-------------------+---------------+------+
| TIMESTAMP           | DEVICE       | TYPE | EVENT                            | READING           | VALUE         | UNIT |
+---------------------+--------------+------+----------------------------------+-------------------+---------------+------+
| 2017-11-30 00:00:12 | Stromzaehler | OBIS | total_consumption: 22047.5792124 | total_consumption | 22047.5792124 |      |
.
.
.
.
| 2017-11-30 23:59:59 | Stromzaehler | OBIS | total_consumption: 22059.6079391 | total_consumption | 22059.6079391 |      |
+-


Hier noch das DBrep Device:

Internals:
   DATABASE   fhem_long
   DEF        logdb_long
   FUUID      5cb5702d-f33f-357a-dac7-0da64b8c7661b076
   FVERSION   93_DbRep.pm:v8.50.4-s26650/2022-11-04
   LASTCMD    diffValue display
   MODEL      Client
   NAME       Dbrep_long
   NOTIFYDEV  global,Dbrep_long
   NR         195
   NTFY_ORDER 50-Dbrep_long
   ROLE       Client
   STATE      done
   TYPE       DbRep
   UTF8       1
   eventCount 8
   HELPER:
     DBLOGDEVICE logdb_long
     GRANTS     USAGE,INSERT,UPDATE,DELETE,SELECT
     IDRETRIES  2
     MINTS      2016-12-26 23:33:00
     PACKAGE    main
     VERSION    8.50.4
     CV:
       aggregation day
       aggsec     86400
       destr      2022-11-30
       dsstr      2022-11-01
       epoch_seconds_end 1669849199
       mestr      11
       msstr      11
       testr      23:59:59
       tsstr      00:00:00
       wdadd     
       yestr      2022
       ysstr      2022
     DBREPCOL:
       COLSET     1
       DEVICE     64
       EVENT      512
       READING    64
       TYPE       64
       UNIT       32
       VALUE      128
   OLDREADINGS:
   READINGS:
     2022-12-01 12:17:33   2022-11-01_23-59-58__Stromzaehler__total_consumption__DIFF__2022-11-01 0.0000
     2022-12-01 12:17:33   2022-11-02_23-59-59__Stromzaehler__total_consumption__DIFF__2022-11-02 0.0007
     2022-12-01 12:17:33   2022-11-03_23-59-56__Stromzaehler__total_consumption__DIFF__2022-11-03 0.0006
     2022-12-01 12:17:33   2022-11-04_23-59-59__Stromzaehler__total_consumption__DIFF__2022-11-04 0.0006
     2022-12-01 12:17:33   2022-11-05_23-59-58__Stromzaehler__total_consumption__DIFF__2022-11-05 0.0007
     2022-12-01 12:17:33   2022-11-06_23-59-59__Stromzaehler__total_consumption__DIFF__2022-11-06 0.0008
     2022-12-01 12:17:33   2022-11-07_23-59-56__Stromzaehler__total_consumption__DIFF__2022-11-07 0.0006
     2022-12-01 12:17:33   2022-11-08_23-59-59__Stromzaehler__total_consumption__DIFF__2022-11-08 0.0005
     2022-12-01 12:17:33   2022-11-09_23-59-56__Stromzaehler__total_consumption__DIFF__2022-11-09 0.0007
     2022-12-01 12:17:33   2022-11-10_23-59-58__Stromzaehler__total_consumption__DIFF__2022-11-10 0.0005
     2022-12-01 12:17:33   2022-11-11_23-59-56__Stromzaehler__total_consumption__DIFF__2022-11-11 0.0005
     2022-12-01 12:17:33   2022-11-12_23-59-55__Stromzaehler__total_consumption__DIFF__2022-11-12 0.0004
     2022-12-01 12:17:33   2022-11-13_23-59-58__Stromzaehler__total_consumption__DIFF__2022-11-13 0.0007
     2022-12-01 12:17:33   2022-11-14_23-59-40__Stromzaehler__total_consumption__DIFF__2022-11-14 0.0006
     2022-12-01 12:17:33   2022-11-15_23-59-59__Stromzaehler__total_consumption__DIFF__2022-11-15 0.0014
     2022-12-01 12:17:33   2022-11-16_23-59-57__Stromzaehler__total_consumption__DIFF__2022-11-16 0.0005
     2022-12-01 12:17:33   2022-11-17_23-59-56__Stromzaehler__total_consumption__DIFF__2022-11-17 0.0007
     2022-12-01 12:17:33   2022-11-18_23-59-59__Stromzaehler__total_consumption__DIFF__2022-11-18 0.0006
     2022-12-01 12:17:33   2022-11-19_23-59-56__Stromzaehler__total_consumption__DIFF__2022-11-19 0.0005
     2022-12-01 12:17:33   2022-11-20_23-59-59__Stromzaehler__total_consumption__DIFF__2022-11-20 0.0006
     2022-12-01 12:17:33   2022-11-21_23-59-59__Stromzaehler__total_consumption__DIFF__2022-11-21 0.0007
     2022-12-01 12:17:33   2022-11-22_23-59-59__Stromzaehler__total_consumption__DIFF__2022-11-22 0.0006
     2022-12-01 12:17:33   2022-11-23_23-59-59__Stromzaehler__total_consumption__DIFF__2022-11-23 0.0007
     2022-12-01 12:17:33   2022-11-24_23-59-56__Stromzaehler__total_consumption__DIFF__2022-11-24 0.0006
     2022-12-01 12:17:33   2022-11-25_23-59-59__Stromzaehler__total_consumption__DIFF__2022-11-25 0.0006
     2022-12-01 12:17:33   2022-11-26_23-59-55__Stromzaehler__total_consumption__DIFF__2022-11-26 0.0005
     2022-12-01 12:17:33   2022-11-27_23-59-56__Stromzaehler__total_consumption__DIFF__2022-11-27 0.0006
     2022-12-01 12:17:33   2022-11-28_23-59-57__Stromzaehler__total_consumption__DIFF__2022-11-28 0.0007
     2022-12-01 12:17:33   2022-11-29_23-59-58__Stromzaehler__total_consumption__DIFF__2022-11-29 0.0005
     2022-12-01 12:17:33   2022-11-30_23-59-55__Stromzaehler__total_consumption__DIFF__2022-11-30 0.0005
     2022-12-01 12:17:33   background_processing_time 11.7581
     2022-12-01 12:17:33   sql_processing_time 6.7730
     2022-12-01 12:17:33   state           done
   hmccu:
Attributes:
   DbLogExclude .*
   aggregation day
   allowDeletion 1
   devStateIcon connected:10px-kreis-gelb .*disconnect:10px-kreis-rot .*done:10px-kreis-gruen
   device     Stromzaehler
   group      Datenbank
   reading    total_consumption
   room       90_Datenbank
   showproctime 1
   sortby     27
   timestamp_begin previous_month_begin
   timestamp_end previous_month_end


Wie man hier erkennt, bekomme ich bei Diffvalue als Ergebnis für den 30.11.22 den Wert 0.0005, erwartet hätte ich den Wert 12,0287267.
Was mache ich falsch, oder verstehe ich die Funktion von Diffvalue falsch?

300P

Zufällig gesehen und....

Du vergleichst hier Zahlen vom 30.11.22 mit den Einträgen vom 30.11.2017  :-X ???
FHEM 6.3 - Raspberry Pi 3 / Pi 4 - VControl300 mit VITOVALOR 300P - SMAEM - SMAInverter - DbLog/DbRep - MariaDB/QNAP - div. HTTPMOD - div. Modbus ser+TCP - SolarForecast - Tibber + Ladung mit SMA-SBS25

Nighthawk

Das Thema hier war leider im falschen Unterforum gepostet.
Im Richtigen Bereich wurde das Problem schnell gelöst: https://forum.fhem.de/index.php/topic,130697.msg1249931.html#msg1249931