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

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

Vorheriges Thema - Nächstes Thema

DS_Starter

Ok.

Jetzt kannst du im Prinzip das Verzeichnis /opt/temp und die Devices Rep.tempSQLITE und tempSQLITE (DbLog) löschen. Kannst es natürlich auch behalten um noch etwas zu üben und damit zu spielen.

Wir verwenden jetzt wieder dein DbRep Rep.Report was wir anfangs kopiert hatten. Hieß das so ?

Zeig mir bitte nochmal ein List von dem Rep ...
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

dk3572

CFGFN     
   DATABASE   /opt/fhem/fhem.db
   DEF        logdb
   FUUID      5ec26a8e-f33f-cd72-b513-8c4f195609a12cf4
   FVERSION   93_DbRep.pm:v8.40.0-s21546/2020-03-30
   LASTCMD    fetchrows history
   MODEL      Client
   NAME       Rep.Report
   NOTIFYDEV  global,Rep.Report
   NR         33412
   NTFY_ORDER 50-Rep.Report
   ROLE       Client
   STATE      done
   TYPE       DbRep
   UTF8       0
   HELPER:
     DBLOGDEVICE logdb
     IDRETRIES  3
     MINTS      2020-04-13 21:54:39
     PACKAGE    main
     UEFN_REGEXP .*:.*
     USEREXITFN setDumEnergy
     VERSION    8.40.0
     CV:
       aggregation no
       aggsec     1
       destr      2020-05-15
       dsstr      2020-03-25
       epoch_seconds_end 1589525914.87634
       mestr      05
       msstr      03
       testr      08:58:34
       tsstr      08:58:34
       wdadd      432000
       yestr      2020
       ysstr      2020
     DBREPCOL:
       COLSET     1
       DEVICE     64
       EVENT      512
       READING    64
       TYPE       64
       UNIT       32
       VALUE      128
     DELENTRIES:
       Rep.Report
       delEntries
       2020-05-18
       04:55:24
   Helper:
     DBLOG:
       state:
         logdb:
           TIME       1589871515.9789
           VALUE      done
   OLDREADINGS:
   READINGS:
     2020-05-19 08:58:35   2020-05-14_16-50-55__1__SMA_Wechselrichter__etotal 325.952
     2020-05-19 08:58:35   2020-05-14_16-51-56__1__SMA_Wechselrichter__etotal 325.985
     2020-05-19 08:58:35   2020-05-14_16-52-57__1__SMA_Wechselrichter__etotal 326.032
     2020-05-19 08:58:35   2020-05-14_16-53-58__1__SMA_Wechselrichter__etotal 326.079
     2020-05-19 08:58:35   2020-05-14_16-54-59__1__SMA_Wechselrichter__etotal 326.124
     2020-05-19 08:58:35   2020-05-14_16-56-00__1__SMA_Wechselrichter__etotal 326.168
.
.
.
     2020-05-19 08:58:35   2020-05-15_08-54-28__1__SMA_Wechselrichter__etotal 331.904
     2020-05-19 08:58:35   2020-05-15_08-55-29__1__SMA_Wechselrichter__etotal 331.917
     2020-05-19 08:58:35   2020-05-15_08-56-30__1__SMA_Wechselrichter__etotal 331.929
     2020-05-19 08:58:35   2020-05-15_08-57-31__1__SMA_Wechselrichter__etotal 331.943
     2020-05-19 08:58:35   2020-05-15_08-58-32__1__SMA_Wechselrichter__etotal 331.961
     2020-05-19 08:58:35   background_processing_time 0.0135
     2020-05-19 08:58:35   number_fetched_rows 334
     2020-05-19 08:58:35   sql_processing_time 0.0109
     2020-05-19 08:58:35   state           done
Attributes:
   aggregation no
   allowDeletion 0
   devStateIcon connected:10px-kreis-gelb .*disconnect:10px-kreis-rot .*done:10px-kreis-gruen
   device     SMA_Wechselrichter
   event-on-update-reading state
   reading    etotal
   room       Photovoltaik
   showproctime 1
   timeout    180
   timestamp_begin current_month_begin
   timestamp_end current_month_end
   userExitFn setDumEnergy .*:.*
   verbose    3

DS_Starter

#1172
Das sieht doch schonmal gut aus, deine alten Daten sind mit drin.
Wenn du ein neues fetchrows ausführst, sollten alle Daten zu finden sein.

EDIT: Lösche dort mal das Attribut userExitFn. Hat in diesem Device nichts zu suchen, ist nur für die PV-Auswertung.
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

dk3572


DS_Starter

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

dk3572

die Daten ab 15.05.
1000 an der Zahl, dann ist Schluss.

done - Warning: present rows exceed specified limit, adjust attribute limit

DS_Starter

sehr gut  :)

Jatzt müssen wir noch den Datensatz löschen.
Die Warnung in den Auswertungsreps kommt doch noch ?
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

dk3572

ja, noch da

diff_overrun_limit_20    2020-05-17 20:57:41 0.0010 -> 2020-05-18 04:55:24 4294511.3370 ||

DS_Starter

Ok, jetzt Attribute setzen

timestamp_begin 2020-05-18 00:00:00
timestamp_end   2020-05-18 05:00:00

Und wieder ein fetchrows ... was kommt ?
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

dk3572


DS_Starter

Kannst du ein List zeigen, das kann ich fast nicht glauben....
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

dk3572

CFGFN     
   DATABASE   /opt/fhem/fhem.db
   DEF        logdb
   FUUID      5ec26a8e-f33f-cd72-b513-8c4f195609a12cf4
   FVERSION   93_DbRep.pm:v8.40.0-s21546/2020-03-30
   LASTCMD    fetchrows history
   MODEL      Client
   NAME       Rep.Report
   NOTIFYDEV  global,Rep.Report
   NR         33412
   NTFY_ORDER 50-Rep.Report
   ROLE       Client
   STATE      <html>done - Warning: present rows exceed specified limit, adjust attribute <a href='https://fhem.de/commandref_DE.html#limit' target='_blank'>limit</a></html>
   TYPE       DbRep
   UTF8       0
   HELPER:
     DBLOGDEVICE logdb
     IDRETRIES  3
     MINTS      2020-04-13 21:54:39
     PACKAGE    main
     VERSION    8.40.0
     CV:
       aggregation no
       aggsec     1
       destr      2020-05-15
       dsstr      2020-03-25
       epoch_seconds_end 1589559193.7198
       mestr      05
       msstr      03
       testr      18:13:13
       tsstr      18:13:13
       wdadd      432000
       yestr      2020
       ysstr      2020
     DBREPCOL:
       COLSET     1
       DEVICE     64
       EVENT      512
       READING    64
       TYPE       64
       UNIT       32
       VALUE      128
     DELENTRIES:
       Rep.Report
       delEntries
       2020-05-18
       04:55:24
   Helper:
     DBLOG:
       state:
         logdb:
           TIME       1589904794.84027
           VALUE      <html>done - Warning
   OLDREADINGS:
   READINGS:
     2020-05-19 18:13:14   2020-05-15_09-21-54__1__SMA_Wechselrichter__etotal 332.546
     2020-05-19 18:13:14   2020-05-15_09-21-54__2__SMA_Wechselrichter__etotal 332.546
     2020-05-19 18:13:14   2020-05-15_09-22-56__1__SMA_Wechselrichter__etotal 332.593
     2020-05-19 18:13:14   2020-05-15_09-22-56__2__SMA_Wechselrichter__etotal 332.593
     2020-05-19 18:13:14   2020-05-15_09-24-57__1__SMA_Wechselrichter__etotal 332.748
     2020-05-19 18:13:14   2020-05-15_09-24-57__2__SMA_Wechselrichter__etotal 332.748
     2020-05-19 18:13:14   2020-05-15_09-26-59__1__SMA_Wechselrichter__etotal 332.892
     2020-05-19 18:13:14   2020-05-15_09-26-59__2__SMA_Wechselrichter__etotal 332.892
     2020-05-19 18:13:14   2020-05-15_09-28-00__1__SMA_Wechselrichter__etotal 332.961
     2020-05-19 18:13:14   2020-05-15_09-28-00__2__SMA_Wechselrichter__etotal 332.961
     2020-05-19 18:13:14   2020-05-15_09-29-01__1__SMA_Wechselrichter__etotal 333.001
     2020-05-19 18:13:14   2020-05-15_09-29-01__2__SMA_Wechselrichter__etotal 333.001
     2020-05-19 18:13:14   2020-05-15_09-30-02__1__SMA_Wechselrichter__etotal 333.048
     2020-05-19 18:13:14   2020-05-15_09-30-02__2__SMA_Wechselrichter__etotal 333.048
     2020-05-19 18:13:14   2020-05-15_09-31-03__1__SMA_Wechselrichter__etotal 333.104
     2020-05-19 18:13:14   2020-05-15_09-31-03__2__SMA_Wechselrichter__etotal 333.104
.
.
.
     2020-05-19 18:13:14   2020-05-15_18-09-25__1__SMA_Wechselrichter__etotal 367.983
     2020-05-19 18:13:14   2020-05-15_18-09-25__2__SMA_Wechselrichter__etotal 367.983
     2020-05-19 18:13:14   2020-05-15_18-10-26__1__SMA_Wechselrichter__etotal 367.991
     2020-05-19 18:13:14   2020-05-15_18-10-26__2__SMA_Wechselrichter__etotal 367.991
     2020-05-19 18:13:14   2020-05-15_18-11-27__1__SMA_Wechselrichter__etotal 367.999
     2020-05-19 18:13:14   2020-05-15_18-11-27__2__SMA_Wechselrichter__etotal 367.999
     2020-05-19 18:13:14   2020-05-15_18-12-28__1__SMA_Wechselrichter__etotal 368.007
     2020-05-19 18:13:14   2020-05-15_18-12-28__2__SMA_Wechselrichter__etotal 368.007
     2020-05-19 18:13:14   background_processing_time 0.0242
     2020-05-19 18:13:14   number_fetched_rows 1000
     2020-05-19 18:13:14   sql_processing_time 0.0213
     2020-05-19 18:13:14   state           <html>done - Warning: present rows exceed specified limit, adjust attribute <a href='https://fhem.de/commandref_DE.html#limit' target='_blank'>limit</a></html>
Attributes:
   aggregation no
   allowDeletion 0
   devStateIcon connected:10px-kreis-gelb .*disconnect:10px-kreis-rot .*done:10px-kreis-gruen
   device     SMA_Wechselrichter
   event-on-update-reading state
   reading    etotal
   room       Photovoltaik
   showproctime 1
   timeout    180
   timestamp_begin 2020-05-18 00:00:00
   timestamp_end 2020-05-18 05:00:00
   verbose    3

DS_Starter

#1182
Ok, ich sehe es ... du müsstest dein FHEM mal restarten.
Save vorher nicht vergessen damit die Einstellung der Attribute bleibt.

Da ist etwas von gestern übrig geblieben:

     DELENTRIES:
       Rep.Report
       delEntries
       2020-05-18
       04:55:24


Der Eintrag versaut uns die Datumeingrenzung. Hattest du delEntries gestern mit dem Zusatz " 2020-05-18 04:55:24" gestartet ?
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

dk3572

geht doch  ;)

2020-05-18_04-55-24__1__SMA_Wechselrichter__etotal     4294967.295     2020-05-19 18:25:06

DS_Starter

Jepp  :)

Jetzt ein

set Rep.Report sqlCmd select * from history where DEVICE='SMA_Wechselrichter' and READING='etotal' and VALUE='4294967.295';
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