Modul 93_DbRep - Reporting und Management von Datenbankinhalten (DbLog)

Begonnen von DS_Starter, 19 Mai 2016, 22:52:13

Vorheriges Thema - Nächstes Thema

alkazaa

Hallo Christian,
Zitat von: ch.eick am 03 Januar 2023, 16:38:23
Eigentlich sollte es aber wie hier angesprochen funktionieren.
Ja, es funktioniert. (Hab erst jetzt die Contrib Version geladen)
Beim Rumspielen mit meinem 1. Query aus dem Wiki bekomme ich aber eine Fehlermeldung, wenn sqlFormatService= https://sqlformat.org gesetzt ist:
DBD::mysql::st execute failed: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'val*(to_seconds(nextavgtim)-to_seconds(tim)))/ (to_seconds(nextavgtim)-to_sec...' at line 1 at ./FHEM/93_DbRep.pm line 10880.
Mit sqlFormatService=none läuft es korrekt.

Wenn ich das gesamte Query vorher 'manuell' auf sqlformat.org formatieren lasse und dann in FHEM einsetze und ausführe, läuft es witzigerweise auch korrekt. Ist also kein 'kaputt-formatieren' auf sqlformat.org (Die SET statements waren dabei immer in sqlCmdVars untergebracht).

Ist wohl eher was für Heiko?

Gruß
Franz

EDIT:
Ich glaub, ich hab's gefunden:
Mit verbose5 kriegt man das SQL, das bei der automatischen Formatierung genutzt wird, hier ein Auszug:
          CASE
              WHEN avgtim!=preavgtim THEN CASE @weighted
                                              WHEN "yes" THEN CASE
                                                                  WHEN avgtim!=nextavgtim THEN (preval*(to_seconds(tim)-to_seconds(avgtim)) val*(to_seconds(nextavgtim)-to_seconds(tim)))/ (to_seconds(nextavgtim)-to_seconds(avgtim))
                                                                  ELSE (preval*(to_seconds(tim)-to_seconds(avgtim)) val*(to_seconds(nexttim)-to_seconds(tim)))/ (to_seconds(nexttim)-to_seconds(avgtim))
                                                              END
                                              ELSE val
                                          END
              ELSE val
          END AS val

Die 'manuelle' Formatierung auf sqlformat.org liefert an dieser Stelle das korrekte Ergebnis ohne die + Zeichen vor val  zu verschlucken:
          CASE
              WHEN avgtim!=preavgtim THEN CASE @weighted
                                              WHEN "yes" THEN CASE
                                                                  WHEN avgtim!=nextavgtim THEN (preval*(to_seconds(tim)-to_seconds(avgtim)) + val*(to_seconds(nextavgtim)-to_seconds(tim)))/ (to_seconds(nextavgtim)-to_seconds(avgtim))
                                                                  ELSE (preval*(to_seconds(tim)-to_seconds(avgtim)) + val*(to_seconds(nexttim)-to_seconds(tim)))/ (to_seconds(nexttim)-to_seconds(avgtim))
                                                              END
                                              ELSE val
                                          END
              ELSE val
          END AS val

DS_Starter

Zitat
Die 'manuelle' Formatierung auf sqlformat.org liefert an dieser Stelle das korrekte Ergebnis ohne die + Zeichen vor val  zu verschlucken:

Das war mein Fehler. Hatte die Daten nicht urlEncoded/Decoded.
Sollte jetzt passen. (contrib)


Zitat
Ich habe aber noch ein anderes Problem: Da ich keine Ahnung habe, wie ich auf das Resultat des nonBlocking sqlCmd in einem externen Modul (konkret: 99_fronthemUtils.pm) zugreifen kann, benutze ich sqlCmdBlocking.
Und das kann nur Queries mit einem ";"
....
Ich habe sqlCmdBlocking wohl etwas vernachlässigt.
Werde mir das anschauen und auf das Level von sqlCmd heben.
Proxmox+Debian+MariaDB, PV: SMA, Victron MPII+Pylontech+CerboGX
Maintainer: SSCam, SSChatBot, SSCal, SSFile, DbLog/DbRep, Log2Syslog, SolarForecast,Watches, Dashboard, PylonLowVoltage
Kaffeekasse: https://www.paypal.me/HMaaz
Contrib: https://svn.fhem.de/trac/browser/trunk/fhem/contrib/DS_Starter

DS_Starter

Habe sqlCmdBlocking ausgebaut und verarbeitet jetzt MySQL Session Variablen, PRAGMA wie sqlCmd.
-> contrib.
Proxmox+Debian+MariaDB, PV: SMA, Victron MPII+Pylontech+CerboGX
Maintainer: SSCam, SSChatBot, SSCal, SSFile, DbLog/DbRep, Log2Syslog, SolarForecast,Watches, Dashboard, PylonLowVoltage
Kaffeekasse: https://www.paypal.me/HMaaz
Contrib: https://svn.fhem.de/trac/browser/trunk/fhem/contrib/DS_Starter

RalfRog

Ich muss mal in die Niederungen der SQL Novizen absteigen.

Ich wollte mit DBRep und set <name> changeValue old="<alter String>" new="<neuer String>" Änderungen im Feld UNIT vornehmen.
Dabei fiel mir auf, dass die CommandRef und Modul-Hilfe einen kleinen Fehler in den Beispielen enthalten.

In den Beispielen fehlt überall old= und new=  ::) (ohne sieht zwar schöner aus, klappt aber nicht).
Ein per Copy-Paste testhalber verwendetes set <name> changeValue "OL","12 OL" endet mit einer (aussagekräftigen) Fehlermeldung:
           Both entries old="old string" new="new string" are needed

Bei Gelegenheit.....

ZitatchangeValue - ändert den gespeicherten Wert eines Readings. Ist die Selektion auf bestimmte Device/Reading-Kombinationen durch die Attribute device bzw. reading beschränkt, werden sie genauso berücksichtigt wie gesetzte Zeitgrenzen (Attribute time.*).
Fehlen diese Beschränkungen, wird die gesamte Datenbank durchsucht und der angegebene Wert geändert.

    Syntax:
    set <name> changeValue old="<alter String>" new="<neuer String>"

    "String" kann sein:
    <alter String> :    
    ein einfacher String mit/ohne Leerzeichen, z.B. "OL 12"
    ein String mit Verwendung von SQL-Wildcard, z.B. "%OL%"
       
    <neuer String> :    
    ein einfacher String mit/ohne Leerzeichen, z.B. "12 kWh"
    Perl Code eingeschlossen in {"..."} inkl. Quotes, z.B. {"($VALUE,$UNIT) = split(" ",$VALUE)"}
       Dem Perl-Ausdruck werden die Variablen $VALUE und $UNIT übergeben. Sie können innerhalb
       des Perl-Code geändert werden. Der zurückgebene Wert von $VALUE und $UNIT wird in dem Feld
       VALUE bzw. UNIT des Datensatzes gespeichert.


    Beispiele:
    set <name> changeValue "OL","12 OL"
    # der alte Feldwert "OL" wird in "12 OL" geändert.

    set <name> changeValue "%OL%","12 OL"
    # enthält das Feld VALUE den Teilstring "OL", wird es in "12 OL" geändert.

....usw.
   
FHEM auf Proxmox VM Bookworm (Futro S740) - nanoCUL, HM-MOD-RPI-PCB und MAX!Cube über LAN
HM- Fensterkontakte, UP-Schalter, Bewegungsmelder und ein Rauchmelder sowie Shelly 3EM, 1PM, PlugS und IT Schaltsteckdosen

DS_Starter

#1774
Moin,

danke Ralf.
Bin ja gerade am bauen ... erledige ich gleich mit.

EDIT: ist drin -> contrib

LG
Proxmox+Debian+MariaDB, PV: SMA, Victron MPII+Pylontech+CerboGX
Maintainer: SSCam, SSChatBot, SSCal, SSFile, DbLog/DbRep, Log2Syslog, SolarForecast,Watches, Dashboard, PylonLowVoltage
Kaffeekasse: https://www.paypal.me/HMaaz
Contrib: https://svn.fhem.de/trac/browser/trunk/fhem/contrib/DS_Starter

RalfRog

Noch was..     zum FVERSION 93_DbRep.pm:v8.50.4-s26650/2022-11-04

Ich will Daten reduzieren und Mittelwerte bilden. "set RepDevice reduceLog average" bildet ja nur ein arith. Mittel.

Daher habe ich mir mal zum Test mit "set RepDevice averageValue display" die Sache angesehen (Auswahl für einen Tag).
(mit aggregation=hour und averageCalcForm=avgArithmeticMean / avgTimeWeightMean)

"avgArithmeticMean" liefert in den Readings ein Ergebnis. "avgTimeWeightMean" einfach nur "done".

Log vom "avgTimeWeightMean"
2023.01.05 17:59:21.438 4: DbRep DBRep2_MT - -------- New selection ---------
2023.01.05 17:59:21.439 4: DbRep DBRep2_MT - Command: averageValue display
2023.01.05 17:59:21.441 4: DbRep DBRep2_MT - FullDay option: 0
2023.01.05 17:59:21.442 4: DbRep DBRep2_MT - Timestamp begin human readable: 2022-06-16 00:00:00
2023.01.05 17:59:21.443 4: DbRep DBRep2_MT - Timestamp end human readable: 2022-06-16 23:59:59
2023.01.05 17:59:21.456 4: DbRep DBRep2_MT - Aggregation: hour
2023.01.05 17:59:21.704 4: DbRep DBRep2_MT - Database connect - user: fhemuser, UTF-8 option set: yes
2023.01.05 17:59:21.712 4: DbRep DBRep2_MT - averageValue calculation sceme: avgTimeWeightMean
2023.01.05 17:59:21.722 2: DbRep DBRep2_MT -


Log vom "avgArithmeticMean" sieht gut aus
2023.01.05 17:58:13.976 4: DbRep DBRep2_MT - -------- New selection ---------
2023.01.05 17:58:13.977 4: DbRep DBRep2_MT - Command: averageValue display
2023.01.05 17:58:13.979 4: DbRep DBRep2_MT - FullDay option: 0
2023.01.05 17:58:13.980 4: DbRep DBRep2_MT - Timestamp begin human readable: 2022-06-16 00:00:00
2023.01.05 17:58:13.981 4: DbRep DBRep2_MT - Timestamp end human readable: 2022-06-16 23:59:59
2023.01.05 17:58:13.993 4: DbRep DBRep2_MT - Aggregation: hour
2023.01.05 17:58:14.215 4: DbRep DBRep2_MT - Database connect - user: fhemuser, UTF-8 option set: yes
2023.01.05 17:58:14.224 4: DbRep DBRep2_MT - averageValue calculation sceme: avgArithmeticMean
2023.01.05 17:58:14.227 4: DbRep DBRep2_MT - SQL execute: SELECT AVG(VALUE) FROM history where ( DEVICE = 'MQTT2_ESP_2' ) AND ( READING = 'MT691_power' ) AND TIMESTAMP >= '2022-06-16 00:00:00' AND TIMESTAMP < '2022-06-16 01' ;
2023.01.05 17:58:14.233 4: DbRep DBRep2_MT - SQL execute: SELECT AVG(VALUE) FROM history where ( DEVICE = 'MQTT2_ESP_2' ) AND ( READING = 'MT691_power' ) AND TIMESTAMP >= '2022-06-16 01' AND TIMESTAMP < '2022-06-16 02' ;
2023.01.05 17:58:14.239 4: DbRep DBRep2_MT - SQL execute: SELECT AVG(VALUE) FROM history where ( DEVICE = 'MQTT2_ESP_2' ) AND ( READING = 'MT691_power' ) AND TIMESTAMP >= '2022-06-16 02' AND TIMESTAMP < '2022-06-16 03' ;
2023.01.05 17:58:14.245 4: DbRep DBRep2_MT - SQL execute: SELECT AVG(VALUE) FROM history where ( DEVICE = 'MQTT2_ESP_2' ) AND ( READING = 'MT691_power' ) AND TIMESTAMP >= '2022-06-16 03' AND TIMESTAMP < '2022-06-16 04' ;
2023.01.05 17:58:14.251 4: DbRep DBRep2_MT - SQL execute: SELECT AVG(VALUE) FROM history where ( DEVICE = 'MQTT2_ESP_2' ) AND ( READING = 'MT691_power' ) AND TIMESTAMP >= '2022-06-16 04' AND TIMESTAMP < '2022-06-16 05' ;
2023.01.05 17:58:14.257 4: DbRep DBRep2_MT - SQL execute: SELECT AVG(VALUE) FROM history where ( DEVICE = 'MQTT2_ESP_2' ) AND ( READING = 'MT691_power' ) AND TIMESTAMP >= '2022-06-16 05' AND TIMESTAMP < '2022-06-16 06' ;
2023.01.05 17:58:14.263 4: DbRep DBRep2_MT - SQL execute: SELECT AVG(VALUE) FROM history where ( DEVICE = 'MQTT2_ESP_2' ) AND ( READING = 'MT691_power' ) AND TIMESTAMP >= '2022-06-16 06' AND TIMESTAMP < '2022-06-16 07' ;
2023.01.05 17:58:14.269 4: DbRep DBRep2_MT - SQL execute: SELECT AVG(VALUE) FROM history where ( DEVICE = 'MQTT2_ESP_2' ) AND ( READING = 'MT691_power' ) AND TIMESTAMP >= '2022-06-16 07' AND TIMESTAMP < '2022-06-16 08' ;
2023.01.05 17:58:14.275 4: DbRep DBRep2_MT - SQL execute: SELECT AVG(VALUE) FROM history where ( DEVICE = 'MQTT2_ESP_2' ) AND ( READING = 'MT691_power' ) AND TIMESTAMP >= '2022-06-16 08' AND TIMESTAMP < '2022-06-16 09' ;
2023.01.05 17:58:14.280 4: DbRep DBRep2_MT - SQL execute: SELECT AVG(VALUE) FROM history where ( DEVICE = 'MQTT2_ESP_2' ) AND ( READING = 'MT691_power' ) AND TIMESTAMP >= '2022-06-16 09' AND TIMESTAMP < '2022-06-16 10' ;
2023.01.05 17:58:14.285 4: DbRep DBRep2_MT - SQL execute: SELECT AVG(VALUE) FROM history where ( DEVICE = 'MQTT2_ESP_2' ) AND ( READING = 'MT691_power' ) AND TIMESTAMP >= '2022-06-16 10' AND TIMESTAMP < '2022-06-16 11' ;
2023.01.05 17:58:14.291 4: DbRep DBRep2_MT - SQL execute: SELECT AVG(VALUE) FROM history where ( DEVICE = 'MQTT2_ESP_2' ) AND ( READING = 'MT691_power' ) AND TIMESTAMP >= '2022-06-16 11' AND TIMESTAMP < '2022-06-16 12' ;
2023.01.05 17:58:14.295 4: DbRep DBRep2_MT - SQL execute: SELECT AVG(VALUE) FROM history where ( DEVICE = 'MQTT2_ESP_2' ) AND ( READING = 'MT691_power' ) AND TIMESTAMP >= '2022-06-16 12' AND TIMESTAMP < '2022-06-16 13' ;
2023.01.05 17:58:14.301 4: DbRep DBRep2_MT - SQL execute: SELECT AVG(VALUE) FROM history where ( DEVICE = 'MQTT2_ESP_2' ) AND ( READING = 'MT691_power' ) AND TIMESTAMP >= '2022-06-16 13' AND TIMESTAMP < '2022-06-16 14' ;
2023.01.05 17:58:14.306 4: DbRep DBRep2_MT - SQL execute: SELECT AVG(VALUE) FROM history where ( DEVICE = 'MQTT2_ESP_2' ) AND ( READING = 'MT691_power' ) AND TIMESTAMP >= '2022-06-16 14' AND TIMESTAMP < '2022-06-16 15' ;
2023.01.05 17:58:14.310 4: DbRep DBRep2_MT - SQL execute: SELECT AVG(VALUE) FROM history where ( DEVICE = 'MQTT2_ESP_2' ) AND ( READING = 'MT691_power' ) AND TIMESTAMP >= '2022-06-16 15' AND TIMESTAMP < '2022-06-16 16' ;
2023.01.05 17:58:14.315 4: DbRep DBRep2_MT - SQL execute: SELECT AVG(VALUE) FROM history where ( DEVICE = 'MQTT2_ESP_2' ) AND ( READING = 'MT691_power' ) AND TIMESTAMP >= '2022-06-16 16' AND TIMESTAMP < '2022-06-16 17' ;
2023.01.05 17:58:14.320 4: DbRep DBRep2_MT - SQL execute: SELECT AVG(VALUE) FROM history where ( DEVICE = 'MQTT2_ESP_2' ) AND ( READING = 'MT691_power' ) AND TIMESTAMP >= '2022-06-16 17' AND TIMESTAMP < '2022-06-16 18' ;
2023.01.05 17:58:14.325 4: DbRep DBRep2_MT - SQL execute: SELECT AVG(VALUE) FROM history where ( DEVICE = 'MQTT2_ESP_2' ) AND ( READING = 'MT691_power' ) AND TIMESTAMP >= '2022-06-16 18' AND TIMESTAMP < '2022-06-16 19' ;
2023.01.05 17:58:14.330 4: DbRep DBRep2_MT - SQL execute: SELECT AVG(VALUE) FROM history where ( DEVICE = 'MQTT2_ESP_2' ) AND ( READING = 'MT691_power' ) AND TIMESTAMP >= '2022-06-16 19' AND TIMESTAMP < '2022-06-16 20' ;
2023.01.05 17:58:14.335 4: DbRep DBRep2_MT - SQL execute: SELECT AVG(VALUE) FROM history where ( DEVICE = 'MQTT2_ESP_2' ) AND ( READING = 'MT691_power' ) AND TIMESTAMP >= '2022-06-16 20' AND TIMESTAMP < '2022-06-16 21' ;
2023.01.05 17:58:14.339 4: DbRep DBRep2_MT - SQL execute: SELECT AVG(VALUE) FROM history where ( DEVICE = 'MQTT2_ESP_2' ) AND ( READING = 'MT691_power' ) AND TIMESTAMP >= '2022-06-16 21' AND TIMESTAMP < '2022-06-16 22' ;
2023.01.05 17:58:14.344 4: DbRep DBRep2_MT - SQL execute: SELECT AVG(VALUE) FROM history where ( DEVICE = 'MQTT2_ESP_2' ) AND ( READING = 'MT691_power' ) AND TIMESTAMP >= '2022-06-16 22' AND TIMESTAMP < '2022-06-16 23' ;
2023.01.05 17:58:14.349 4: DbRep DBRep2_MT - SQL execute: SELECT AVG(VALUE) FROM history where ( DEVICE = 'MQTT2_ESP_2' ) AND ( READING = 'MT691_power' ) AND TIMESTAMP >= '2022-06-16 23' AND TIMESTAMP <= '2022-06-16 23:59:59' ;
FHEM auf Proxmox VM Bookworm (Futro S740) - nanoCUL, HM-MOD-RPI-PCB und MAX!Cube über LAN
HM- Fensterkontakte, UP-Schalter, Bewegungsmelder und ein Rauchmelder sowie Shelly 3EM, 1PM, PlugS und IT Schaltsteckdosen

DS_Starter

"avgTimeWeightMean" benötigt pro aggregation-Periode (also pro Stunde bei dir) mindestens zwei Messpunkte.
Ist das gegeben ?

verbose = 5 zeigt die die Details wie ein Beispiel von mir:

2023.01.05 18:23:41.452 4: DbRep Rep.CPU - -------- New selection ---------
2023.01.05 18:23:41.452 4: DbRep Rep.CPU - Command: averageValue display
2023.01.05 18:23:41.453 4: DbRep Rep.CPU - timeDiffToNow - year: , day: , hour: 4, min: , sec:
2023.01.05 18:23:41.453 4: DbRep Rep.CPU - startMonth: 0 endMonth: 0 lastleapyear: 0 baseYear: 2023 diffdaylight:0 isdaylight:0
2023.01.05 18:23:41.454 4: DbRep Rep.CPU - FullDay option: 0
2023.01.05 18:23:41.454 4: DbRep Rep.CPU - Time difference to current time for calculating Timestamp begin: 14401 sec
2023.01.05 18:23:41.455 5: DbRep Rep.CPU - Timestamp begin epocheseconds: 1672925020.45493
2023.01.05 18:23:41.455 4: DbRep Rep.CPU - Timestamp begin human readable: 2023-01-05 14:23:40
2023.01.05 18:23:41.456 5: DbRep Rep.CPU - Timestamp end epocheseconds: 1672939421
2023.01.05 18:23:41.456 4: DbRep Rep.CPU - Timestamp end human readable: 2023-01-05 18:23:41
...........
2023.01.05 18:23:41.460 4: DbRep Rep.CPU - Aggregation: hour
2023.01.05 18:23:41.470 5: DbRep Rep.CPU - BlockingCall with PID "13694" started
2023.01.05 18:23:41.479 4: DbRep Rep.CPU - Database connect - user: fhemtest, UTF-8 option set: yes
2023.01.05 18:23:41.482 4: DbRep Rep.CPU - averageValue calculation sceme: avgTimeWeightMean
............
............
............
2023.01.05 18:23:41.490 4: DbRep Rep.CPU - SQL execute: SELECT TIMESTAMP,VALUE FROM history where ( DEVICE = 'SMA_Energymeter' ) AND ( READING = 'Einspeisung_Wirkleistung' ) AND TIMESTAMP >= '2023-01-05 14:23:40' AND TIMESTAMP < '2023-01-05 15' ORDER BY TIMESTAMP ASC;
2023.01.05 18:23:41.492 5: DbRep Rep.CPU - data element: 2023-01-05 14:25:12_ESC_0.0
2023.01.05 18:23:41.493 5: DbRep Rep.CPU - time sum: 2133, delta time: 61, value: 0.0, twm: 0
2023.01.05 18:23:41.493 5: DbRep Rep.CPU - data element: 2023-01-05 14:26:13_ESC_0.0
2023.01.05 18:23:41.494 5: DbRep Rep.CPU - time sum: 2133, delta time: 61, value: 0.0, twm: 0
2023.01.05 18:23:41.494 5: DbRep Rep.CPU - data element: 2023-01-05 14:27:14_ESC_0.0
2023.01.05 18:23:41.494 5: DbRep Rep.CPU - time sum: 2133, delta time: 61, value: 0.0, twm: 0
2023.01.05 18:23:41.495 5: DbRep Rep.CPU - data element: 2023-01-05 14:28:15_ESC_0.0
2023.01.05 18:23:41.495 5: DbRep Rep.CPU - time sum: 2133, delta time: 61, value: 0.0, twm: 0
2023.01.05 18:23:41.496 5: DbRep Rep.CPU - data element: 2023-01-05 14:29:16_ESC_0.0
2023.01.05 18:23:41.496 5: DbRep Rep.CPU - time sum: 2133, delta time: 61, value: 0.0, twm: 0
2023.01.05 18:23:41.496 5: DbRep Rep.CPU - data element: 2023-01-05 14:30:17_ESC_0.0
2023.01.05 18:23:41.497 5: DbRep Rep.CPU - time sum: 2133, delta time: 61, value: 0.0, twm: 0
2023.01.05 18:23:41.497 5: DbRep Rep.CPU - data element: 2023-01-05 14:31:18_ESC_0.0
2023.01.05 18:23:41.497 5: DbRep Rep.CPU - time sum: 2133, delta time: 61, value: 0.0, twm: 0
2023.01.05 18:23:41.498 5: DbRep Rep.CPU - data element: 2023-01-05 14:32:19_ESC_0.0
2023.01.05 18:23:41.498 5: DbRep Rep.CPU - time sum: 2133, delta time: 61, value: 0.0, twm: 0
2023.01.05 18:23:41.499 5: DbRep Rep.CPU - data element: 2023-01-05 14:33:20_ESC_0.0
2023.01.05 18:23:41.499 5: DbRep Rep.CPU - time sum: 2133, delta time: 61, value: 0.0, twm: 0
2023.01.05 18:23:41.499 5: DbRep Rep.CPU - data element: 2023-01-05 14:34:21_ESC_0.0
2023.01.05 18:23:41.500 5: DbRep Rep.CPU - time sum: 2133, delta time: 61, value: 0.0, twm: 0
2023.01.05 18:23:41.500 5: DbRep Rep.CPU - data element: 2023-01-05 14:35:22_ESC_0.0
2023.01.05 18:23:41.501 5: DbRep Rep.CPU - time sum: 2133, delta time: 61, value: 0.0, twm: 0
2023.01.05 18:23:41.501 5: DbRep Rep.CPU - data element: 2023-01-05 14:36:23_ESC_1920.2
2023.01.05 18:23:41.501 5: DbRep Rep.CPU - time sum: 2133, delta time: 61, value: 1920.2, twm: 54.9142991092358
2023.01.05 18:23:41.502 5: DbRep Rep.CPU - data element: 2023-01-05 14:37:24_ESC_331.8
2023.01.05 18:23:41.502 5: DbRep Rep.CPU - time sum: 2133, delta time: 61, value: 331.8, twm: 9.48888888888889
2023.01.05 18:23:41.503 5: DbRep Rep.CPU - data element: 2023-01-05 14:38:25_ESC_1885.3
2023.01.05 18:23:41.503 5: DbRep Rep.CPU - time sum: 2133, delta time: 61, value: 1885.3, twm: 53.9162212845757
2023.01.05 18:23:41.503 5: DbRep Rep.CPU - data element: 2023-01-05 14:39:26_ESC_1849.5
2023.01.05 18:23:41.504 5: DbRep Rep.CPU - time sum: 2133, delta time: 61, value: 1849.5, twm: 52.8924050632911
2023.01.05 18:23:41.504 5: DbRep Rep.CPU - data element: 2023-01-05 14:40:27_ESC_1833.4
2023.01.05 18:23:41.505 5: DbRep Rep.CPU - time sum: 2133, delta time: 61, value: 1833.4, twm: 52.4319737458978
2023.01.05 18:23:41.505 5: DbRep Rep.CPU - data element: 2023-01-05 14:41:28_ESC_1550.3
2023.01.05 18:23:41.505 5: DbRep Rep.CPU - time sum: 2133, delta time: 61, value: 1550.3, twm: 44.3358180965776
2023.01.05 18:23:41.506 5: DbRep Rep.CPU - data element: 2023-01-05 14:42:29_ESC_1880.8
2023.01.05 18:23:41.506 5: DbRep Rep.CPU - time sum: 2133, delta time: 61, value: 1880.8, twm: 53.7875293014534
2023.01.05 18:23:41.507 5: DbRep Rep.CPU - data element: 2023-01-05 14:43:30_ESC_1809.1
2023.01.05 18:23:41.507 5: DbRep Rep.CPU - time sum: 2133, delta time: 61, value: 1809.1, twm: 51.737037037037
2023.01.05 18:23:41.507 5: DbRep Rep.CPU - data element: 2023-01-05 14:44:30_ESC_1061.8
2023.01.05 18:23:41.508 5: DbRep Rep.CPU - time sum: 2133, delta time: 60, value: 1061.8, twm: 29.8677918424754
2023.01.05 18:23:41.508 5: DbRep Rep.CPU - data element: 2023-01-05 14:45:31_ESC_1612.3
2023.01.05 18:23:41.509 5: DbRep Rep.CPU - time sum: 2133, delta time: 61, value: 1612.3, twm: 46.108907641819
.........


Ich ergänze die Hilfe zu dem Attribut.
Proxmox+Debian+MariaDB, PV: SMA, Victron MPII+Pylontech+CerboGX
Maintainer: SSCam, SSChatBot, SSCal, SSFile, DbLog/DbRep, Log2Syslog, SolarForecast,Watches, Dashboard, PylonLowVoltage
Kaffeekasse: https://www.paypal.me/HMaaz
Contrib: https://svn.fhem.de/trac/browser/trunk/fhem/contrib/DS_Starter

RalfRog

Das check ich mal.
Wenn nur ein Teil der Intervalle zwei oder mehr Messpunkte hat, läuft das dann korrekt durch (nur für die Intervalle mit weniger MPs nicht)?

Gruß Ralf

Edit ja sind genug Werte da:

2022-06-16_00__MQTT2_ESP_2__MT691_power__AVGAM__2022-06-16_00 - 2023-01-05 17:46:12 0 Werte
2022-06-16_01__MQTT2_ESP_2__MT691_power__AVGAM__2022-06-16_01 82 2023-01-05 17:46:12 4 Werte
2022-06-16_02__MQTT2_ESP_2__MT691_power__AVGAM__2022-06-16_02 83 2023-01-05 17:46:12 8 Werte
2022-06-16_03__MQTT2_ESP_2__MT691_power__AVGAM__2022-06-16_03 83 2023-01-05 17:46:12 6 Werte
2022-06-16_04__MQTT2_ESP_2__MT691_power__AVGAM__2022-06-16_04 83 2023-01-05 17:46:12 8 Werte
2022-06-16_05__MQTT2_ESP_2__MT691_power__AVGAM__2022-06-16_05 83 2023-01-05 17:46:12 ....
2022-06-16_06__MQTT2_ESP_2__MT691_power__AVGAM__2022-06-16_06 83 2023-01-05 17:46:12
2022-06-16_07__MQTT2_ESP_2__MT691_power__AVGAM__2022-06-16_07 83 2023-01-05 17:46:12
2022-06-16_08__MQTT2_ESP_2__MT691_power__AVGAM__2022-06-16_08 82 2023-01-05 17:46:12
2022-06-16_09__MQTT2_ESP_2__MT691_power__AVGAM__2022-06-16_09 80 2023-01-05 17:46:12
2022-06-16_10__MQTT2_ESP_2__MT691_power__AVGAM__2022-06-16_10 67 2023-01-05 17:46:12
2022-06-16_11__MQTT2_ESP_2__MT691_power__AVGAM__2022-06-16_11 - 2023-01-05 17:46:12
2022-06-16_12__MQTT2_ESP_2__MT691_power__AVGAM__2022-06-16_12 54 2023-01-05 17:46:12
2022-06-16_13__MQTT2_ESP_2__MT691_power__AVGAM__2022-06-16_13 - 2023-01-05 17:46:12
2022-06-16_14__MQTT2_ESP_2__MT691_power__AVGAM__2022-06-16_14 - 2023-01-05 17:46:12
2022-06-16_15__MQTT2_ESP_2__MT691_power__AVGAM__2022-06-16_15 - 2023-01-05 17:46:12
2022-06-16_16__MQTT2_ESP_2__MT691_power__AVGAM__2022-06-16_16 - 2023-01-05 17:46:12
2022-06-16_17__MQTT2_ESP_2__MT691_power__AVGAM__2022-06-16_17 - 2023-01-05 17:46:12
2022-06-16_18__MQTT2_ESP_2__MT691_power__AVGAM__2022-06-16_18 677 2023-01-05 17:46:12
2022-06-16_19__MQTT2_ESP_2__MT691_power__AVGAM__2022-06-16_19 - 2023-01-05 17:46:12
2022-06-16_20__MQTT2_ESP_2__MT691_power__AVGAM__2022-06-16_20 - 2023-01-05 17:46:12
2022-06-16_21__MQTT2_ESP_2__MT691_power__AVGAM__2022-06-16_21 - 2023-01-05 17:46:12
2022-06-16_22__MQTT2_ESP_2__MT691_power__AVGAM__2022-06-16_22 - 2023-01-05 17:46:12
2022-06-16_23__MQTT2_ESP_2__MT691_power__AVGAM__2022-06-16_23 - 2023-01-05 17:46:12
state done

FHEM auf Proxmox VM Bookworm (Futro S740) - nanoCUL, HM-MOD-RPI-PCB und MAX!Cube über LAN
HM- Fensterkontakte, UP-Schalter, Bewegungsmelder und ein Rauchmelder sowie Shelly 3EM, 1PM, PlugS und IT Schaltsteckdosen

DS_Starter

Zitat
Wenn nur ein Teil der Intervalle zwei oder mehr Messpunkte hat, läuft das dann korrekt durch (nur für die Intervalle mit weniger MPs nicht)?
Ja, genau.
Proxmox+Debian+MariaDB, PV: SMA, Victron MPII+Pylontech+CerboGX
Maintainer: SSCam, SSChatBot, SSCal, SSFile, DbLog/DbRep, Log2Syslog, SolarForecast,Watches, Dashboard, PylonLowVoltage
Kaffeekasse: https://www.paypal.me/HMaaz
Contrib: https://svn.fhem.de/trac/browser/trunk/fhem/contrib/DS_Starter

RalfRog

FHEM auf Proxmox VM Bookworm (Futro S740) - nanoCUL, HM-MOD-RPI-PCB und MAX!Cube über LAN
HM- Fensterkontakte, UP-Schalter, Bewegungsmelder und ein Rauchmelder sowie Shelly 3EM, 1PM, PlugS und IT Schaltsteckdosen

DS_Starter

Lass doch mal mit verbose 5 laufen wie in meinem Beispiel.
Proxmox+Debian+MariaDB, PV: SMA, Victron MPII+Pylontech+CerboGX
Maintainer: SSCam, SSChatBot, SSCal, SSFile, DbLog/DbRep, Log2Syslog, SolarForecast,Watches, Dashboard, PylonLowVoltage
Kaffeekasse: https://www.paypal.me/HMaaz
Contrib: https://svn.fhem.de/trac/browser/trunk/fhem/contrib/DS_Starter

RalfRog

Ein Versuch um 1:10 Uhr zu starten (also ein Intervall mit 4 Werten) bringt keine Änderung.
FHEM auf Proxmox VM Bookworm (Futro S740) - nanoCUL, HM-MOD-RPI-PCB und MAX!Cube über LAN
HM- Fensterkontakte, UP-Schalter, Bewegungsmelder und ein Rauchmelder sowie Shelly 3EM, 1PM, PlugS und IT Schaltsteckdosen

alkazaa

Mir ist als vermutlicher bug schon früher aufgefallen (Sorry, dass ich's noch nicht gemeldet hatte, schlicht und einfach vergessen):
Wenn bei aggragation period = hour der timestamp_end auf volle Stunde gesetzt ist, passiert nix.

Setz mal auf hh:59:59 statt hh:00:00

-Franz

RalfRog

Der Einwand von Franz triff m.M. nicht zu.

Hier mein Ergebnis

=> erster Versuch 1:10 Uhr bis 23:59 Uhr, kein Ergebnis, ich hoffe der Log ist nicht zu lang
=> zweiter Versuch 1:10 Uhr bis 04:59 Uhr, mit Ergebnis, alle da Intervalle mit Daten

2. Versuch

2023.01.05 19:26:34.176 4: DbRep DBRep2_MT - -------- New selection ---------
2023.01.05 19:26:34.177 4: DbRep DBRep2_MT - Command: averageValue display
2023.01.05 19:26:34.179 4: DbRep DBRep2_MT - FullDay option: 0
2023.01.05 19:26:34.180 5: DbRep DBRep2_MT - Timestamp begin epocheseconds: 1655334300
2023.01.05 19:26:34.180 4: DbRep DBRep2_MT - Timestamp begin human readable: 2022-06-16 01:05:00
2023.01.05 19:26:34.181 5: DbRep DBRep2_MT - Timestamp end epocheseconds: 1655348340
2023.01.05 19:26:34.181 4: DbRep DBRep2_MT - Timestamp end human readable: 2022-06-16 04:59:00
2023.01.05 19:26:34.182 5: DbRep DBRep2_MT - weekday start for selection: Do  ->  wdadd: 345600
2023.01.05 19:26:34.183 5: DbRep DBRep2_MT - Daylight savings changed: 0 (from "Thu Jun 16 01:05:00 2022" to "Thu Jun 16 02:05:00 2022")
2023.01.05 19:26:34.184 5: DbRep DBRep2_MT - Daylight savings changed: 0 (from "Thu Jun 16 02:05:00 2022" to "Thu Jun 16 03:05:00 2022")
2023.01.05 19:26:34.185 5: DbRep DBRep2_MT - Daylight savings changed: 0 (from "Thu Jun 16 03:05:00 2022" to "Thu Jun 16 04:05:00 2022")
2023.01.05 19:26:34.186 5: DbRep DBRep2_MT - Daylight savings changed: 0 (from "Thu Jun 16 04:05:00 2022" to "Thu Jun 16 05:05:00 2022")
2023.01.05 19:26:34.187 4: DbRep DBRep2_MT - Aggregation: hour
2023.01.05 19:26:34.213 5: DbRep DBRep2_MT - BlockingCall with PID "1755" started
2023.01.05 19:26:34.420 4: DbRep DBRep2_MT - Database connect - user: fhemuser, UTF-8 option set: yes
2023.01.05 19:26:34.428 4: DbRep DBRep2_MT - averageValue calculation sceme: avgTimeWeightMean
2023.01.05 19:26:34.429 5: DbRep DBRep2_MT - IsTimeSet: 1, IsAggrSet: 1
2023.01.05 19:26:34.430 5: DbRep DBRep2_MT - Timestamp-Array:
2022-06-16_01#2022-06-16 01:05:00#2022-06-16 02 2022-06-16_02#2022-06-16 02#2022-06-16 03 2022-06-16_03#2022-06-16 03#2022-06-16 04 2022-06-16_04#2022-06-16 04#2022-06-16 04:59:00
2023.01.05 19:26:34.431 5: DbRep DBRep2_MT - Devices for operation -
included (1): MQTT2_ESP_2
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:26:34.432 5: DbRep DBRep2_MT - Readings for operation -
included (1): MT691_power
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:26:34.433 5: DbRep DBRep2_MT - Devices for operation -
included (1): MQTT2_ESP_2
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:26:34.434 5: DbRep DBRep2_MT - Readings for operation -
included (1): MT691_power
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:26:34.444 5: DbRep DBRep2_MT - Devices for operation -
included (1): MQTT2_ESP_2
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:26:34.445 5: DbRep DBRep2_MT - Readings for operation -
included (1): MT691_power
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:26:34.446 4: DbRep DBRep2_MT - SQL execute: SELECT TIMESTAMP,VALUE FROM history where ( DEVICE = 'MQTT2_ESP_2' ) AND ( READING = 'MT691_power' ) AND TIMESTAMP >= '2022-06-16 01:05:00' AND TIMESTAMP < '2022-06-16 02' ORDER BY TIMESTAMP ASC;
2023.01.05 19:26:34.451 5: DbRep DBRep2_MT - data element: 2022-06-16 01:44:05_ESC_83
2023.01.05 19:26:34.451 5: DbRep DBRep2_MT - time sum: 1200, delta time: 600, value: 83, twm: 41.5
2023.01.05 19:26:34.452 5: DbRep DBRep2_MT - data element: 2022-06-16 01:49:05_ESC_82
2023.01.05 19:26:34.452 5: DbRep DBRep2_MT - time sum: 1200, delta time: 300, value: 82, twm: 20.5
2023.01.05 19:26:34.453 5: DbRep DBRep2_MT - data element: 2022-06-16 01:54:05_ESC_83
2023.01.05 19:26:34.453 5: DbRep DBRep2_MT - time sum: 1200, delta time: 300, value: 83, twm: 20.75
2023.01.05 19:26:34.455 5: DbRep DBRep2_MT - Devices for operation -
included (1): MQTT2_ESP_2
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:26:34.455 5: DbRep DBRep2_MT - Readings for operation -
included (1): MT691_power
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:26:34.456 5: DbRep DBRep2_MT - Devices for operation -
included (1): MQTT2_ESP_2
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:26:34.457 5: DbRep DBRep2_MT - Readings for operation -
included (1): MT691_power
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:26:34.465 5: DbRep DBRep2_MT - Devices for operation -
included (1): MQTT2_ESP_2
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:26:34.466 5: DbRep DBRep2_MT - Readings for operation -
included (1): MT691_power
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:26:34.466 4: DbRep DBRep2_MT - SQL execute: SELECT TIMESTAMP,VALUE FROM history where ( DEVICE = 'MQTT2_ESP_2' ) AND ( READING = 'MT691_power' ) AND TIMESTAMP >= '2022-06-16 02' AND TIMESTAMP < '2022-06-16 03' ORDER BY TIMESTAMP ASC;
2023.01.05 19:26:34.471 5: DbRep DBRep2_MT - data element: 2022-06-16 02:24:05_ESC_83
2023.01.05 19:26:34.472 5: DbRep DBRep2_MT - time sum: 3300, delta time: 1200, value: 83, twm: 30.1818181818182
2023.01.05 19:26:34.472 5: DbRep DBRep2_MT - data element: 2022-06-16 02:29:05_ESC_82
2023.01.05 19:26:34.473 5: DbRep DBRep2_MT - time sum: 3300, delta time: 300, value: 82, twm: 7.45454545454546
2023.01.05 19:26:34.473 5: DbRep DBRep2_MT - data element: 2022-06-16 02:34:05_ESC_83
2023.01.05 19:26:34.474 5: DbRep DBRep2_MT - time sum: 3300, delta time: 300, value: 83, twm: 7.54545454545455
2023.01.05 19:26:34.475 5: DbRep DBRep2_MT - data element: 2022-06-16 02:39:05_ESC_82
2023.01.05 19:26:34.475 5: DbRep DBRep2_MT - time sum: 3300, delta time: 300, value: 82, twm: 7.45454545454546
2023.01.05 19:26:34.476 5: DbRep DBRep2_MT - data element: 2022-06-16 02:44:05_ESC_83
2023.01.05 19:26:34.476 5: DbRep DBRep2_MT - time sum: 3300, delta time: 300, value: 83, twm: 7.54545454545455
2023.01.05 19:26:34.477 5: DbRep DBRep2_MT - data element: 2022-06-16 02:54:05_ESC_82
2023.01.05 19:26:34.477 5: DbRep DBRep2_MT - time sum: 3300, delta time: 600, value: 82, twm: 14.9090909090909
2023.01.05 19:26:34.478 5: DbRep DBRep2_MT - data element: 2022-06-16 02:59:05_ESC_84
2023.01.05 19:26:34.478 5: DbRep DBRep2_MT - time sum: 3300, delta time: 300, value: 84, twm: 7.63636363636364
2023.01.05 19:26:34.479 5: DbRep DBRep2_MT - Devices for operation -
included (1): MQTT2_ESP_2
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:26:34.480 5: DbRep DBRep2_MT - Readings for operation -
included (1): MT691_power
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:26:34.480 5: DbRep DBRep2_MT - Devices for operation -
included (1): MQTT2_ESP_2
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:26:34.481 5: DbRep DBRep2_MT - Readings for operation -
included (1): MT691_power
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:26:34.489 5: DbRep DBRep2_MT - Devices for operation -
included (1): MQTT2_ESP_2
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:26:34.490 5: DbRep DBRep2_MT - Readings for operation -
included (1): MT691_power
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:26:34.490 4: DbRep DBRep2_MT - SQL execute: SELECT TIMESTAMP,VALUE FROM history where ( DEVICE = 'MQTT2_ESP_2' ) AND ( READING = 'MT691_power' ) AND TIMESTAMP >= '2022-06-16 03' AND TIMESTAMP < '2022-06-16 04' ORDER BY TIMESTAMP ASC;
2023.01.05 19:26:34.495 5: DbRep DBRep2_MT - data element: 2022-06-16 03:24:05_ESC_82
2023.01.05 19:26:34.496 5: DbRep DBRep2_MT - time sum: 3300, delta time: 1200, value: 82, twm: 29.8181818181818
2023.01.05 19:26:34.496 5: DbRep DBRep2_MT - data element: 2022-06-16 03:29:05_ESC_83
2023.01.05 19:26:34.497 5: DbRep DBRep2_MT - time sum: 3300, delta time: 300, value: 83, twm: 7.54545454545455
2023.01.05 19:26:34.497 5: DbRep DBRep2_MT - data element: 2022-06-16 03:34:05_ESC_82
2023.01.05 19:26:34.498 5: DbRep DBRep2_MT - time sum: 3300, delta time: 300, value: 82, twm: 7.45454545454546
2023.01.05 19:26:34.498 5: DbRep DBRep2_MT - data element: 2022-06-16 03:44:05_ESC_83
2023.01.05 19:26:34.499 5: DbRep DBRep2_MT - time sum: 3300, delta time: 600, value: 83, twm: 15.0909090909091
2023.01.05 19:26:34.499 5: DbRep DBRep2_MT - data element: 2022-06-16 03:59:05_ESC_84
2023.01.05 19:26:34.500 5: DbRep DBRep2_MT - time sum: 3300, delta time: 900, value: 84, twm: 22.9090909090909
2023.01.05 19:26:34.501 5: DbRep DBRep2_MT - Devices for operation -
included (1): MQTT2_ESP_2
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:26:34.501 5: DbRep DBRep2_MT - Readings for operation -
included (1): MT691_power
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:26:34.502 5: DbRep DBRep2_MT - Devices for operation -
included (1): MQTT2_ESP_2
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:26:34.503 5: DbRep DBRep2_MT - Readings for operation -
included (1): MT691_power
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:26:34.512 5: DbRep DBRep2_MT - Devices for operation -
included (1): MQTT2_ESP_2
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:26:34.513 5: DbRep DBRep2_MT - Readings for operation -
included (1): MT691_power
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:26:34.514 4: DbRep DBRep2_MT - SQL execute: SELECT TIMESTAMP,VALUE FROM history where ( DEVICE = 'MQTT2_ESP_2' ) AND ( READING = 'MT691_power' ) AND TIMESTAMP >= '2022-06-16 04' AND TIMESTAMP <= '2022-06-16 04:59:00' ORDER BY TIMESTAMP ASC;
2023.01.05 19:26:34.520 5: DbRep DBRep2_MT - data element: 2022-06-16 04:24:05_ESC_82
2023.01.05 19:26:34.521 5: DbRep DBRep2_MT - time sum: 2701, delta time: 900, value: 82, twm: 27.3232136245835
2023.01.05 19:26:34.522 5: DbRep DBRep2_MT - data element: 2022-06-16 04:29:05_ESC_84
2023.01.05 19:26:34.522 5: DbRep DBRep2_MT - time sum: 2701, delta time: 300, value: 84, twm: 9.32987782302851
2023.01.05 19:26:34.523 5: DbRep DBRep2_MT - data element: 2022-06-16 04:39:06_ESC_83
2023.01.05 19:26:34.523 5: DbRep DBRep2_MT - time sum: 2701, delta time: 601, value: 83, twm: 18.4683450573862
2023.01.05 19:26:34.524 5: DbRep DBRep2_MT - data element: 2022-06-16 04:44:06_ESC_84
2023.01.05 19:26:34.525 5: DbRep DBRep2_MT - time sum: 2701, delta time: 300, value: 84, twm: 9.32987782302851
2023.01.05 19:26:34.526 5: DbRep DBRep2_MT - data element: 2022-06-16 04:49:06_ESC_82
2023.01.05 19:26:34.526 5: DbRep DBRep2_MT - time sum: 2701, delta time: 300, value: 82, twm: 9.10773787486116
2023.01.05 19:26:34.527 5: DbRep DBRep2_MT - data element: 2022-06-16 04:54:06_ESC_85
2023.01.05 19:26:34.527 5: DbRep DBRep2_MT - time sum: 2701, delta time: 300, value: 85, twm: 9.44094779711218
2023.01.05 19:26:34.551 5: DbRep DBRep2_MT - BlockingCall PID "1755" finished



1. Versuch

2023.01.05 19:23:34.035 4: DbRep DBRep2_MT - -------- New selection ---------
2023.01.05 19:23:34.036 4: DbRep DBRep2_MT - Command: averageValue display
2023.01.05 19:23:34.038 4: DbRep DBRep2_MT - FullDay option: 0
2023.01.05 19:23:34.039 5: DbRep DBRep2_MT - Timestamp begin epocheseconds: 1655334600
2023.01.05 19:23:34.039 4: DbRep DBRep2_MT - Timestamp begin human readable: 2022-06-16 01:10:00
2023.01.05 19:23:34.040 5: DbRep DBRep2_MT - Timestamp end epocheseconds: 1655416799
2023.01.05 19:23:34.040 4: DbRep DBRep2_MT - Timestamp end human readable: 2022-06-16 23:59:59
2023.01.05 19:23:34.041 5: DbRep DBRep2_MT - weekday start for selection: Do  ->  wdadd: 345600
2023.01.05 19:23:34.042 5: DbRep DBRep2_MT - Daylight savings changed: 0 (from "Thu Jun 16 01:10:00 2022" to "Thu Jun 16 02:10:00 2022")
2023.01.05 19:23:34.043 5: DbRep DBRep2_MT - Daylight savings changed: 0 (from "Thu Jun 16 02:10:00 2022" to "Thu Jun 16 03:10:00 2022")
2023.01.05 19:23:34.043 5: DbRep DBRep2_MT - Daylight savings changed: 0 (from "Thu Jun 16 03:10:00 2022" to "Thu Jun 16 04:10:00 2022")
2023.01.05 19:23:34.044 5: DbRep DBRep2_MT - Daylight savings changed: 0 (from "Thu Jun 16 04:10:00 2022" to "Thu Jun 16 05:10:00 2022")
2023.01.05 19:23:34.045 5: DbRep DBRep2_MT - Daylight savings changed: 0 (from "Thu Jun 16 05:10:00 2022" to "Thu Jun 16 06:10:00 2022")
2023.01.05 19:23:34.046 5: DbRep DBRep2_MT - Daylight savings changed: 0 (from "Thu Jun 16 06:10:00 2022" to "Thu Jun 16 07:10:00 2022")
2023.01.05 19:23:34.047 5: DbRep DBRep2_MT - Daylight savings changed: 0 (from "Thu Jun 16 07:10:00 2022" to "Thu Jun 16 08:10:00 2022")
2023.01.05 19:23:34.047 5: DbRep DBRep2_MT - Daylight savings changed: 0 (from "Thu Jun 16 08:10:00 2022" to "Thu Jun 16 09:10:00 2022")
2023.01.05 19:23:34.048 5: DbRep DBRep2_MT - Daylight savings changed: 0 (from "Thu Jun 16 09:10:00 2022" to "Thu Jun 16 10:10:00 2022")
2023.01.05 19:23:34.049 5: DbRep DBRep2_MT - Daylight savings changed: 0 (from "Thu Jun 16 10:10:00 2022" to "Thu Jun 16 11:10:00 2022")
2023.01.05 19:23:34.050 5: DbRep DBRep2_MT - Daylight savings changed: 0 (from "Thu Jun 16 11:10:00 2022" to "Thu Jun 16 12:10:00 2022")
2023.01.05 19:23:34.050 5: DbRep DBRep2_MT - Daylight savings changed: 0 (from "Thu Jun 16 12:10:00 2022" to "Thu Jun 16 13:10:00 2022")
2023.01.05 19:23:34.051 5: DbRep DBRep2_MT - Daylight savings changed: 0 (from "Thu Jun 16 13:10:00 2022" to "Thu Jun 16 14:10:00 2022")
2023.01.05 19:23:34.052 5: DbRep DBRep2_MT - Daylight savings changed: 0 (from "Thu Jun 16 14:10:00 2022" to "Thu Jun 16 15:10:00 2022")
2023.01.05 19:23:34.053 5: DbRep DBRep2_MT - Daylight savings changed: 0 (from "Thu Jun 16 15:10:00 2022" to "Thu Jun 16 16:10:00 2022")
2023.01.05 19:23:34.053 5: DbRep DBRep2_MT - Daylight savings changed: 0 (from "Thu Jun 16 16:10:00 2022" to "Thu Jun 16 17:10:00 2022")
2023.01.05 19:23:34.054 5: DbRep DBRep2_MT - Daylight savings changed: 0 (from "Thu Jun 16 17:10:00 2022" to "Thu Jun 16 18:10:00 2022")
2023.01.05 19:23:34.055 5: DbRep DBRep2_MT - Daylight savings changed: 0 (from "Thu Jun 16 18:10:00 2022" to "Thu Jun 16 19:10:00 2022")
2023.01.05 19:23:34.056 5: DbRep DBRep2_MT - Daylight savings changed: 0 (from "Thu Jun 16 19:10:00 2022" to "Thu Jun 16 20:10:00 2022")
2023.01.05 19:23:34.057 5: DbRep DBRep2_MT - Daylight savings changed: 0 (from "Thu Jun 16 20:10:00 2022" to "Thu Jun 16 21:10:00 2022")
2023.01.05 19:23:34.058 5: DbRep DBRep2_MT - Daylight savings changed: 0 (from "Thu Jun 16 21:10:00 2022" to "Thu Jun 16 22:10:00 2022")
2023.01.05 19:23:34.058 5: DbRep DBRep2_MT - Daylight savings changed: 0 (from "Thu Jun 16 22:10:00 2022" to "Thu Jun 16 23:10:00 2022")
2023.01.05 19:23:34.059 5: DbRep DBRep2_MT - Daylight savings changed: 0 (from "Thu Jun 16 23:10:00 2022" to "Fri Jun 17 00:10:00 2022")
2023.01.05 19:23:34.060 4: DbRep DBRep2_MT - Aggregation: hour
2023.01.05 19:23:34.087 5: DbRep DBRep2_MT - BlockingCall with PID "1640" started
2023.01.05 19:23:34.294 4: DbRep DBRep2_MT - Database connect - user: fhemuser, UTF-8 option set: yes
2023.01.05 19:23:34.304 4: DbRep DBRep2_MT - averageValue calculation sceme: avgTimeWeightMean
2023.01.05 19:23:34.305 5: DbRep DBRep2_MT - IsTimeSet: 1, IsAggrSet: 1
2023.01.05 19:23:34.307 5: DbRep DBRep2_MT - Timestamp-Array:
2022-06-16_01#2022-06-16 01:10:00#2022-06-16 02 2022-06-16_02#2022-06-16 02#2022-06-16 03 2022-06-16_03#2022-06-16 03#2022-06-16 04 2022-06-16_04#2022-06-16 04#2022-06-16 05 2022-06-16_05#2022-06-16 05#2022-06-16 06 2022-06-16_06#2022-06-16 06#2022-06-16 07 2022-06-16_07#2022-06-16 07#2022-06-16 08 2022-06-16_08#2022-06-16 08#2022-06-16 09 2022-06-16_09#2022-06-16 09#2022-06-16 10 2022-06-16_10#2022-06-16 10#2022-06-16 11 2022-06-16_11#2022-06-16 11#2022-06-16 12 2022-06-16_12#2022-06-16 12#2022-06-16 13 2022-06-16_13#2022-06-16 13#2022-06-16 14 2022-06-16_14#2022-06-16 14#2022-06-16 15 2022-06-16_15#2022-06-16 15#2022-06-16 16 2022-06-16_16#2022-06-16 16#2022-06-16 17 2022-06-16_17#2022-06-16 17#2022-06-16 18 2022-06-16_18#2022-06-16 18#2022-06-16 19 2022-06-16_19#2022-06-16 19#2022-06-16 20 2022-06-16_20#2022-06-16 20#2022-06-16 21 2022-06-16_21#2022-06-16 21#2022-06-16 22 2022-06-16_22#2022-06-16 22#2022-06-16 23 2022-06-16_23#2022-06-16 23#2022-06-16 23:59:59
2023.01.05 19:23:34.308 5: DbRep DBRep2_MT - Devices for operation -
included (1): MQTT2_ESP_2
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:23:34.309 5: DbRep DBRep2_MT - Readings for operation -
included (1): MT691_power
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:23:34.310 5: DbRep DBRep2_MT - Devices for operation -
included (1): MQTT2_ESP_2
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:23:34.310 5: DbRep DBRep2_MT - Readings for operation -
included (1): MT691_power
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:23:34.320 5: DbRep DBRep2_MT - Devices for operation -
included (1): MQTT2_ESP_2
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:23:34.321 5: DbRep DBRep2_MT - Readings for operation -
included (1): MT691_power
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:23:34.322 4: DbRep DBRep2_MT - SQL execute: SELECT TIMESTAMP,VALUE FROM history where ( DEVICE = 'MQTT2_ESP_2' ) AND ( READING = 'MT691_power' ) AND TIMESTAMP >= '2022-06-16 01:10:00' AND TIMESTAMP < '2022-06-16 02' ORDER BY TIMESTAMP ASC;
2023.01.05 19:23:34.327 5: DbRep DBRep2_MT - data element: 2022-06-16 01:44:05_ESC_83
2023.01.05 19:23:34.327 5: DbRep DBRep2_MT - time sum: 1200, delta time: 600, value: 83, twm: 41.5
2023.01.05 19:23:34.328 5: DbRep DBRep2_MT - data element: 2022-06-16 01:49:05_ESC_82
2023.01.05 19:23:34.328 5: DbRep DBRep2_MT - time sum: 1200, delta time: 300, value: 82, twm: 20.5
2023.01.05 19:23:34.329 5: DbRep DBRep2_MT - data element: 2022-06-16 01:54:05_ESC_83
2023.01.05 19:23:34.329 5: DbRep DBRep2_MT - time sum: 1200, delta time: 300, value: 83, twm: 20.75
2023.01.05 19:23:34.330 5: DbRep DBRep2_MT - Devices for operation -
included (1): MQTT2_ESP_2
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:23:34.331 5: DbRep DBRep2_MT - Readings for operation -
included (1): MT691_power
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:23:34.332 5: DbRep DBRep2_MT - Devices for operation -
included (1): MQTT2_ESP_2
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:23:34.332 5: DbRep DBRep2_MT - Readings for operation -
included (1): MT691_power
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:23:34.340 5: DbRep DBRep2_MT - Devices for operation -
included (1): MQTT2_ESP_2
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:23:34.341 5: DbRep DBRep2_MT - Readings for operation -
included (1): MT691_power
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:23:34.342 4: DbRep DBRep2_MT - SQL execute: SELECT TIMESTAMP,VALUE FROM history where ( DEVICE = 'MQTT2_ESP_2' ) AND ( READING = 'MT691_power' ) AND TIMESTAMP >= '2022-06-16 02' AND TIMESTAMP < '2022-06-16 03' ORDER BY TIMESTAMP ASC;
2023.01.05 19:23:34.347 5: DbRep DBRep2_MT - data element: 2022-06-16 02:24:05_ESC_83
2023.01.05 19:23:34.347 5: DbRep DBRep2_MT - time sum: 3300, delta time: 1200, value: 83, twm: 30.1818181818182
2023.01.05 19:23:34.348 5: DbRep DBRep2_MT - data element: 2022-06-16 02:29:05_ESC_82
2023.01.05 19:23:34.348 5: DbRep DBRep2_MT - time sum: 3300, delta time: 300, value: 82, twm: 7.45454545454546
2023.01.05 19:23:34.349 5: DbRep DBRep2_MT - data element: 2022-06-16 02:34:05_ESC_83
2023.01.05 19:23:34.349 5: DbRep DBRep2_MT - time sum: 3300, delta time: 300, value: 83, twm: 7.54545454545455
2023.01.05 19:23:34.350 5: DbRep DBRep2_MT - data element: 2022-06-16 02:39:05_ESC_82
2023.01.05 19:23:34.350 5: DbRep DBRep2_MT - time sum: 3300, delta time: 300, value: 82, twm: 7.45454545454546
2023.01.05 19:23:34.351 5: DbRep DBRep2_MT - data element: 2022-06-16 02:44:05_ESC_83
2023.01.05 19:23:34.351 5: DbRep DBRep2_MT - time sum: 3300, delta time: 300, value: 83, twm: 7.54545454545455
2023.01.05 19:23:34.352 5: DbRep DBRep2_MT - data element: 2022-06-16 02:54:05_ESC_82
2023.01.05 19:23:34.352 5: DbRep DBRep2_MT - time sum: 3300, delta time: 600, value: 82, twm: 14.9090909090909
2023.01.05 19:23:34.353 5: DbRep DBRep2_MT - data element: 2022-06-16 02:59:05_ESC_84
2023.01.05 19:23:34.353 5: DbRep DBRep2_MT - time sum: 3300, delta time: 300, value: 84, twm: 7.63636363636364
2023.01.05 19:23:34.354 5: DbRep DBRep2_MT - Devices for operation -
included (1): MQTT2_ESP_2
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:23:34.355 5: DbRep DBRep2_MT - Readings for operation -
included (1): MT691_power
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:23:34.355 5: DbRep DBRep2_MT - Devices for operation -
included (1): MQTT2_ESP_2
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:23:34.356 5: DbRep DBRep2_MT - Readings for operation -
included (1): MT691_power
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:23:34.364 5: DbRep DBRep2_MT - Devices for operation -
included (1): MQTT2_ESP_2
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:23:34.365 5: DbRep DBRep2_MT - Readings for operation -
included (1): MT691_power
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:23:34.365 4: DbRep DBRep2_MT - SQL execute: SELECT TIMESTAMP,VALUE FROM history where ( DEVICE = 'MQTT2_ESP_2' ) AND ( READING = 'MT691_power' ) AND TIMESTAMP >= '2022-06-16 03' AND TIMESTAMP < '2022-06-16 04' ORDER BY TIMESTAMP ASC;
2023.01.05 19:23:34.370 5: DbRep DBRep2_MT - data element: 2022-06-16 03:24:05_ESC_82
2023.01.05 19:23:34.371 5: DbRep DBRep2_MT - time sum: 3300, delta time: 1200, value: 82, twm: 29.8181818181818
2023.01.05 19:23:34.372 5: DbRep DBRep2_MT - data element: 2022-06-16 03:29:05_ESC_83
2023.01.05 19:23:34.372 5: DbRep DBRep2_MT - time sum: 3300, delta time: 300, value: 83, twm: 7.54545454545455
2023.01.05 19:23:34.373 5: DbRep DBRep2_MT - data element: 2022-06-16 03:34:05_ESC_82
2023.01.05 19:23:34.374 5: DbRep DBRep2_MT - time sum: 3300, delta time: 300, value: 82, twm: 7.45454545454546
2023.01.05 19:23:34.375 5: DbRep DBRep2_MT - data element: 2022-06-16 03:44:05_ESC_83
2023.01.05 19:23:34.375 5: DbRep DBRep2_MT - time sum: 3300, delta time: 600, value: 83, twm: 15.0909090909091
2023.01.05 19:23:34.376 5: DbRep DBRep2_MT - data element: 2022-06-16 03:59:05_ESC_84
2023.01.05 19:23:34.377 5: DbRep DBRep2_MT - time sum: 3300, delta time: 900, value: 84, twm: 22.9090909090909
2023.01.05 19:23:34.378 5: DbRep DBRep2_MT - Devices for operation -
included (1): MQTT2_ESP_2
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:23:34.379 5: DbRep DBRep2_MT - Readings for operation -
included (1): MT691_power
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:23:34.380 5: DbRep DBRep2_MT - Devices for operation -
included (1): MQTT2_ESP_2
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:23:34.380 5: DbRep DBRep2_MT - Readings for operation -
included (1): MT691_power
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:23:34.389 5: DbRep DBRep2_MT - Devices for operation -
included (1): MQTT2_ESP_2
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:23:34.390 5: DbRep DBRep2_MT - Readings for operation -
included (1): MT691_power
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:23:34.391 4: DbRep DBRep2_MT - SQL execute: SELECT TIMESTAMP,VALUE FROM history where ( DEVICE = 'MQTT2_ESP_2' ) AND ( READING = 'MT691_power' ) AND TIMESTAMP >= '2022-06-16 04' AND TIMESTAMP < '2022-06-16 05' ORDER BY TIMESTAMP ASC;
2023.01.05 19:23:34.396 5: DbRep DBRep2_MT - data element: 2022-06-16 04:24:05_ESC_82
2023.01.05 19:23:34.396 5: DbRep DBRep2_MT - time sum: 3001, delta time: 900, value: 82, twm: 24.5918027324225
2023.01.05 19:23:34.397 5: DbRep DBRep2_MT - data element: 2022-06-16 04:29:05_ESC_84
2023.01.05 19:23:34.398 5: DbRep DBRep2_MT - time sum: 3001, delta time: 300, value: 84, twm: 8.39720093302233
2023.01.05 19:23:34.398 5: DbRep DBRep2_MT - data element: 2022-06-16 04:39:06_ESC_83
2023.01.05 19:23:34.399 5: DbRep DBRep2_MT - time sum: 3001, delta time: 601, value: 83, twm: 16.622125958014
2023.01.05 19:23:34.400 5: DbRep DBRep2_MT - data element: 2022-06-16 04:44:06_ESC_84
2023.01.05 19:23:34.400 5: DbRep DBRep2_MT - time sum: 3001, delta time: 300, value: 84, twm: 8.39720093302233
2023.01.05 19:23:34.401 5: DbRep DBRep2_MT - data element: 2022-06-16 04:49:06_ESC_82
2023.01.05 19:23:34.402 5: DbRep DBRep2_MT - time sum: 3001, delta time: 300, value: 82, twm: 8.19726757747418
2023.01.05 19:23:34.402 5: DbRep DBRep2_MT - data element: 2022-06-16 04:54:06_ESC_85
2023.01.05 19:23:34.403 5: DbRep DBRep2_MT - time sum: 3001, delta time: 300, value: 85, twm: 8.4971676107964
2023.01.05 19:23:34.404 5: DbRep DBRep2_MT - data element: 2022-06-16 04:59:06_ESC_83
2023.01.05 19:23:34.404 5: DbRep DBRep2_MT - time sum: 3001, delta time: 300, value: 83, twm: 8.29723425524825
2023.01.05 19:23:34.405 5: DbRep DBRep2_MT - Devices for operation -
included (1): MQTT2_ESP_2
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:23:34.406 5: DbRep DBRep2_MT - Readings for operation -
included (1): MT691_power
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:23:34.407 5: DbRep DBRep2_MT - Devices for operation -
included (1): MQTT2_ESP_2
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:23:34.407 5: DbRep DBRep2_MT - Readings for operation -
included (1): MT691_power
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:23:34.416 5: DbRep DBRep2_MT - Devices for operation -
included (1): MQTT2_ESP_2
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:23:34.417 5: DbRep DBRep2_MT - Readings for operation -
included (1): MT691_power
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:23:34.418 4: DbRep DBRep2_MT - SQL execute: SELECT TIMESTAMP,VALUE FROM history where ( DEVICE = 'MQTT2_ESP_2' ) AND ( READING = 'MT691_power' ) AND TIMESTAMP >= '2022-06-16 05' AND TIMESTAMP < '2022-06-16 06' ORDER BY TIMESTAMP ASC;
2023.01.05 19:23:34.423 5: DbRep DBRep2_MT - data element: 2022-06-16 05:14:06_ESC_83
2023.01.05 19:23:34.423 5: DbRep DBRep2_MT - time sum: 3300, delta time: 600, value: 83, twm: 15.0909090909091
2023.01.05 19:23:34.425 5: DbRep DBRep2_MT - data element: 2022-06-16 05:19:06_ESC_84
2023.01.05 19:23:34.425 5: DbRep DBRep2_MT - time sum: 3300, delta time: 300, value: 84, twm: 7.63636363636364
2023.01.05 19:23:34.426 5: DbRep DBRep2_MT - data element: 2022-06-16 05:29:06_ESC_85
2023.01.05 19:23:34.426 5: DbRep DBRep2_MT - time sum: 3300, delta time: 600, value: 85, twm: 15.4545454545455
2023.01.05 19:23:34.427 5: DbRep DBRep2_MT - data element: 2022-06-16 05:34:06_ESC_83
2023.01.05 19:23:34.427 5: DbRep DBRep2_MT - time sum: 3300, delta time: 300, value: 83, twm: 7.54545454545455
2023.01.05 19:23:34.428 5: DbRep DBRep2_MT - data element: 2022-06-16 05:39:06_ESC_82
2023.01.05 19:23:34.428 5: DbRep DBRep2_MT - time sum: 3300, delta time: 300, value: 82, twm: 7.45454545454546
2023.01.05 19:23:34.429 5: DbRep DBRep2_MT - data element: 2022-06-16 05:44:06_ESC_83
2023.01.05 19:23:34.429 5: DbRep DBRep2_MT - time sum: 3300, delta time: 300, value: 83, twm: 7.54545454545455
2023.01.05 19:23:34.430 5: DbRep DBRep2_MT - data element: 2022-06-16 05:54:06_ESC_84
2023.01.05 19:23:34.430 5: DbRep DBRep2_MT - time sum: 3300, delta time: 600, value: 84, twm: 15.2727272727273
2023.01.05 19:23:34.430 5: DbRep DBRep2_MT - data element: 2022-06-16 05:59:06_ESC_82
2023.01.05 19:23:34.431 5: DbRep DBRep2_MT - time sum: 3300, delta time: 300, value: 82, twm: 7.45454545454546
2023.01.05 19:23:34.432 5: DbRep DBRep2_MT - Devices for operation -
included (1): MQTT2_ESP_2
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:23:34.432 5: DbRep DBRep2_MT - Readings for operation -
included (1): MT691_power
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:23:34.433 5: DbRep DBRep2_MT - Devices for operation -
included (1): MQTT2_ESP_2
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:23:34.434 5: DbRep DBRep2_MT - Readings for operation -
included (1): MT691_power
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:23:34.441 5: DbRep DBRep2_MT - Devices for operation -
included (1): MQTT2_ESP_2
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:23:34.442 5: DbRep DBRep2_MT - Readings for operation -
included (1): MT691_power
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:23:34.443 4: DbRep DBRep2_MT - SQL execute: SELECT TIMESTAMP,VALUE FROM history where ( DEVICE = 'MQTT2_ESP_2' ) AND ( READING = 'MT691_power' ) AND TIMESTAMP >= '2022-06-16 06' AND TIMESTAMP < '2022-06-16 07' ORDER BY TIMESTAMP ASC;
2023.01.05 19:23:34.447 5: DbRep DBRep2_MT - data element: 2022-06-16 06:09:06_ESC_84
2023.01.05 19:23:34.448 5: DbRep DBRep2_MT - time sum: 3000, delta time: 300, value: 84, twm: 8.4
2023.01.05 19:23:34.449 5: DbRep DBRep2_MT - data element: 2022-06-16 06:14:06_ESC_81
2023.01.05 19:23:34.449 5: DbRep DBRep2_MT - time sum: 3000, delta time: 300, value: 81, twm: 8.1
2023.01.05 19:23:34.450 5: DbRep DBRep2_MT - data element: 2022-06-16 06:19:06_ESC_82
2023.01.05 19:23:34.450 5: DbRep DBRep2_MT - time sum: 3000, delta time: 300, value: 82, twm: 8.2
2023.01.05 19:23:34.451 5: DbRep DBRep2_MT - data element: 2022-06-16 06:24:06_ESC_86
2023.01.05 19:23:34.451 5: DbRep DBRep2_MT - time sum: 3000, delta time: 300, value: 86, twm: 8.6
2023.01.05 19:23:34.452 5: DbRep DBRep2_MT - data element: 2022-06-16 06:29:06_ESC_84
2023.01.05 19:23:34.452 5: DbRep DBRep2_MT - time sum: 3000, delta time: 300, value: 84, twm: 8.4
2023.01.05 19:23:34.453 5: DbRep DBRep2_MT - data element: 2022-06-16 06:34:06_ESC_83
2023.01.05 19:23:34.453 5: DbRep DBRep2_MT - time sum: 3000, delta time: 300, value: 83, twm: 8.3
2023.01.05 19:23:34.454 5: DbRep DBRep2_MT - data element: 2022-06-16 06:49:06_ESC_84
2023.01.05 19:23:34.454 5: DbRep DBRep2_MT - time sum: 3000, delta time: 900, value: 84, twm: 25.2
2023.01.05 19:23:34.455 5: DbRep DBRep2_MT - data element: 2022-06-16 06:54:06_ESC_83
2023.01.05 19:23:34.455 5: DbRep DBRep2_MT - time sum: 3000, delta time: 300, value: 83, twm: 8.3
2023.01.05 19:23:34.456 5: DbRep DBRep2_MT - Devices for operation -
included (1): MQTT2_ESP_2
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:23:34.457 5: DbRep DBRep2_MT - Readings for operation -
included (1): MT691_power
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:23:34.458 5: DbRep DBRep2_MT - Devices for operation -
included (1): MQTT2_ESP_2
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:23:34.458 5: DbRep DBRep2_MT - Readings for operation -
included (1): MT691_power
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:23:34.466 5: DbRep DBRep2_MT - Devices for operation -
included (1): MQTT2_ESP_2
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:23:34.467 5: DbRep DBRep2_MT - Readings for operation -
included (1): MT691_power
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:23:34.467 4: DbRep DBRep2_MT - SQL execute: SELECT TIMESTAMP,VALUE FROM history where ( DEVICE = 'MQTT2_ESP_2' ) AND ( READING = 'MT691_power' ) AND TIMESTAMP >= '2022-06-16 07' AND TIMESTAMP < '2022-06-16 08' ORDER BY TIMESTAMP ASC;
2023.01.05 19:23:34.472 5: DbRep DBRep2_MT - data element: 2022-06-16 07:09:06_ESC_85
2023.01.05 19:23:34.473 5: DbRep DBRep2_MT - time sum: 3300, delta time: 300, value: 85, twm: 7.72727272727273
2023.01.05 19:23:34.473 5: DbRep DBRep2_MT - data element: 2022-06-16 07:14:06_ESC_82
2023.01.05 19:23:34.474 5: DbRep DBRep2_MT - time sum: 3300, delta time: 300, value: 82, twm: 7.45454545454546
2023.01.05 19:23:34.475 5: DbRep DBRep2_MT - data element: 2022-06-16 07:19:06_ESC_83
2023.01.05 19:23:34.475 5: DbRep DBRep2_MT - time sum: 3300, delta time: 300, value: 83, twm: 7.54545454545455
2023.01.05 19:23:34.476 5: DbRep DBRep2_MT - data element: 2022-06-16 07:34:06_ESC_84
2023.01.05 19:23:34.477 5: DbRep DBRep2_MT - time sum: 3300, delta time: 900, value: 84, twm: 22.9090909090909
2023.01.05 19:23:34.478 5: DbRep DBRep2_MT - data element: 2022-06-16 07:39:06_ESC_83
2023.01.05 19:23:34.478 5: DbRep DBRep2_MT - time sum: 3300, delta time: 300, value: 83, twm: 7.54545454545455
2023.01.05 19:23:34.479 5: DbRep DBRep2_MT - data element: 2022-06-16 07:44:06_ESC_82
2023.01.05 19:23:34.480 5: DbRep DBRep2_MT - time sum: 3300, delta time: 300, value: 82, twm: 7.45454545454546
2023.01.05 19:23:34.481 5: DbRep DBRep2_MT - data element: 2022-06-16 07:54:06_ESC_84
2023.01.05 19:23:34.482 5: DbRep DBRep2_MT - time sum: 3300, delta time: 600, value: 84, twm: 15.2727272727273
2023.01.05 19:23:34.483 5: DbRep DBRep2_MT - data element: 2022-06-16 07:59:06_ESC_81
2023.01.05 19:23:34.484 5: DbRep DBRep2_MT - time sum: 3300, delta time: 300, value: 81, twm: 7.36363636363636
2023.01.05 19:23:34.486 5: DbRep DBRep2_MT - Devices for operation -
included (1): MQTT2_ESP_2
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:23:34.487 5: DbRep DBRep2_MT - Readings for operation -
included (1): MT691_power
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:23:34.488 5: DbRep DBRep2_MT - Devices for operation -
included (1): MQTT2_ESP_2
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:23:34.488 5: DbRep DBRep2_MT - Readings for operation -
included (1): MT691_power
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:23:34.497 5: DbRep DBRep2_MT - Devices for operation -
included (1): MQTT2_ESP_2
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:23:34.498 5: DbRep DBRep2_MT - Readings for operation -
included (1): MT691_power
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:23:34.498 4: DbRep DBRep2_MT - SQL execute: SELECT TIMESTAMP,VALUE FROM history where ( DEVICE = 'MQTT2_ESP_2' ) AND ( READING = 'MT691_power' ) AND TIMESTAMP >= '2022-06-16 08' AND TIMESTAMP < '2022-06-16 09' ORDER BY TIMESTAMP ASC;
2023.01.05 19:23:34.503 5: DbRep DBRep2_MT - data element: 2022-06-16 08:09:06_ESC_82
2023.01.05 19:23:34.503 5: DbRep DBRep2_MT - time sum: 3000, delta time: 300, value: 82, twm: 8.2
2023.01.05 19:23:34.504 5: DbRep DBRep2_MT - data element: 2022-06-16 08:19:06_ESC_81
2023.01.05 19:23:34.505 5: DbRep DBRep2_MT - time sum: 3000, delta time: 600, value: 81, twm: 16.2
2023.01.05 19:23:34.505 5: DbRep DBRep2_MT - data element: 2022-06-16 08:24:06_ESC_82
2023.01.05 19:23:34.506 5: DbRep DBRep2_MT - time sum: 3000, delta time: 300, value: 82, twm: 8.2
2023.01.05 19:23:34.506 5: DbRep DBRep2_MT - data element: 2022-06-16 08:49:06_ESC_81
2023.01.05 19:23:34.507 5: DbRep DBRep2_MT - time sum: 3000, delta time: 1500, value: 81, twm: 40.5
2023.01.05 19:23:34.507 5: DbRep DBRep2_MT - data element: 2022-06-16 08:54:06_ESC_82
2023.01.05 19:23:34.508 5: DbRep DBRep2_MT - time sum: 3000, delta time: 300, value: 82, twm: 8.2
2023.01.05 19:23:34.508 5: DbRep DBRep2_MT - Devices for operation -
included (1): MQTT2_ESP_2
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:23:34.509 5: DbRep DBRep2_MT - Readings for operation -
included (1): MT691_power
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:23:34.510 5: DbRep DBRep2_MT - Devices for operation -
included (1): MQTT2_ESP_2
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:23:34.510 5: DbRep DBRep2_MT - Readings for operation -
included (1): MT691_power
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:23:34.518 5: DbRep DBRep2_MT - Devices for operation -
included (1): MQTT2_ESP_2
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:23:34.519 5: DbRep DBRep2_MT - Readings for operation -
included (1): MT691_power
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:23:34.520 4: DbRep DBRep2_MT - SQL execute: SELECT TIMESTAMP,VALUE FROM history where ( DEVICE = 'MQTT2_ESP_2' ) AND ( READING = 'MT691_power' ) AND TIMESTAMP >= '2022-06-16 09' AND TIMESTAMP < '2022-06-16 10' ORDER BY TIMESTAMP ASC;
2023.01.05 19:23:34.524 5: DbRep DBRep2_MT - data element: 2022-06-16 09:24:06_ESC_82
2023.01.05 19:23:34.525 5: DbRep DBRep2_MT - time sum: 2700, delta time: 600, value: 82, twm: 18.2222222222222
2023.01.05 19:23:34.526 5: DbRep DBRep2_MT - data element: 2022-06-16 09:29:06_ESC_79
2023.01.05 19:23:34.526 5: DbRep DBRep2_MT - time sum: 2700, delta time: 300, value: 79, twm: 8.77777777777778
2023.01.05 19:23:34.527 5: DbRep DBRep2_MT - data element: 2022-06-16 09:34:06_ESC_82
2023.01.05 19:23:34.527 5: DbRep DBRep2_MT - time sum: 2700, delta time: 300, value: 82, twm: 9.11111111111111
2023.01.05 19:23:34.528 5: DbRep DBRep2_MT - data element: 2022-06-16 09:39:06_ESC_79
2023.01.05 19:23:34.528 5: DbRep DBRep2_MT - time sum: 2700, delta time: 300, value: 79, twm: 8.77777777777778
2023.01.05 19:23:34.528 5: DbRep DBRep2_MT - data element: 2022-06-16 09:44:06_ESC_80
2023.01.05 19:23:34.529 5: DbRep DBRep2_MT - time sum: 2700, delta time: 300, value: 80, twm: 8.88888888888889
2023.01.05 19:23:34.529 5: DbRep DBRep2_MT - data element: 2022-06-16 09:49:06_ESC_81
2023.01.05 19:23:34.530 5: DbRep DBRep2_MT - time sum: 2700, delta time: 300, value: 81, twm: 9
2023.01.05 19:23:34.530 5: DbRep DBRep2_MT - data element: 2022-06-16 09:59:06_ESC_80
2023.01.05 19:23:34.531 5: DbRep DBRep2_MT - time sum: 2700, delta time: 600, value: 80, twm: 17.7777777777778
2023.01.05 19:23:34.532 5: DbRep DBRep2_MT - Devices for operation -
included (1): MQTT2_ESP_2
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:23:34.532 5: DbRep DBRep2_MT - Readings for operation -
included (1): MT691_power
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:23:34.533 5: DbRep DBRep2_MT - Devices for operation -
included (1): MQTT2_ESP_2
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:23:34.534 5: DbRep DBRep2_MT - Readings for operation -
included (1): MT691_power
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:23:34.542 5: DbRep DBRep2_MT - Devices for operation -
included (1): MQTT2_ESP_2
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:23:34.542 5: DbRep DBRep2_MT - Readings for operation -
included (1): MT691_power
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:23:34.543 4: DbRep DBRep2_MT - SQL execute: SELECT TIMESTAMP,VALUE FROM history where ( DEVICE = 'MQTT2_ESP_2' ) AND ( READING = 'MT691_power' ) AND TIMESTAMP >= '2022-06-16 10' AND TIMESTAMP < '2022-06-16 11' ORDER BY TIMESTAMP ASC;
2023.01.05 19:23:34.548 5: DbRep DBRep2_MT - data element: 2022-06-16 10:09:06_ESC_82
2023.01.05 19:23:34.548 5: DbRep DBRep2_MT - time sum: 1500, delta time: 300, value: 82, twm: 16.4
2023.01.05 19:23:34.549 5: DbRep DBRep2_MT - data element: 2022-06-16 10:14:06_ESC_80
2023.01.05 19:23:34.549 5: DbRep DBRep2_MT - time sum: 1500, delta time: 300, value: 80, twm: 16
2023.01.05 19:23:34.550 5: DbRep DBRep2_MT - data element: 2022-06-16 10:19:06_ESC_81
2023.01.05 19:23:34.550 5: DbRep DBRep2_MT - time sum: 1500, delta time: 300, value: 81, twm: 16.2
2023.01.05 19:23:34.551 5: DbRep DBRep2_MT - data element: 2022-06-16 10:24:06_ESC_80
2023.01.05 19:23:34.551 5: DbRep DBRep2_MT - time sum: 1500, delta time: 300, value: 80, twm: 16
2023.01.05 19:23:34.552 5: DbRep DBRep2_MT - data element: 2022-06-16 10:29:06_ESC_0
2023.01.05 19:23:34.552 5: DbRep DBRep2_MT - time sum: 1500, delta time: 300, value: 0, twm: 0
2023.01.05 19:23:34.553 5: DbRep DBRep2_MT - Devices for operation -
included (1): MQTT2_ESP_2
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:23:34.554 5: DbRep DBRep2_MT - Readings for operation -
included (1): MT691_power
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:23:34.554 5: DbRep DBRep2_MT - Devices for operation -
included (1): MQTT2_ESP_2
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:23:34.555 5: DbRep DBRep2_MT - Readings for operation -
included (1): MT691_power
included with wildcard: 
excluded (0): 
excluded with wildcard:
2023.01.05 19:23:34.561 2: DbRep DBRep2_MT -
2023.01.05 19:23:34.569 5: DbRep DBRep2_MT - BlockingCall PID "1640" finished

FHEM auf Proxmox VM Bookworm (Futro S740) - nanoCUL, HM-MOD-RPI-PCB und MAX!Cube über LAN
HM- Fensterkontakte, UP-Schalter, Bewegungsmelder und ein Rauchmelder sowie Shelly 3EM, 1PM, PlugS und IT Schaltsteckdosen

DS_Starter

Den Hinweis von Franz konnte ich bei mir nachvollziehen.
Das werde ich erstmal fixen. Dann schauen wir nochmal.
Proxmox+Debian+MariaDB, PV: SMA, Victron MPII+Pylontech+CerboGX
Maintainer: SSCam, SSChatBot, SSCal, SSFile, DbLog/DbRep, Log2Syslog, SolarForecast,Watches, Dashboard, PylonLowVoltage
Kaffeekasse: https://www.paypal.me/HMaaz
Contrib: https://svn.fhem.de/trac/browser/trunk/fhem/contrib/DS_Starter