diff --git a/fhem/FHEM/93_DbRep.pm b/fhem/FHEM/93_DbRep.pm index 546c19e33..c4edad9a3 100644 --- a/fhem/FHEM/93_DbRep.pm +++ b/fhem/FHEM/93_DbRep.pm @@ -10236,7 +10236,8 @@ return;

-
  • deviceRename - renames the device name of a device inside the connected database (Internal DATABASE). +
  • deviceRename <old_name>,<new_name> - + renames the device name of a device inside the connected database (Internal DATABASE). The devicename will allways be changed in the entire database. Possibly set time limits or restrictions by attributes device and/or reading will not be considered.

    @@ -10730,6 +10731,89 @@ return; is operating in asynchronous mode to avoid FHEMWEB from blocking.


  • + +
  • reduceLog [average[=day]]
    + Reduces historical records within the limits given by the "time.*"-attributes to one record + (the 1st) each hour per device & reading. + At least one of the "time.*"-attributes must be set (pls. see table below). + Each of missing time limit will be calculated by the module itself in this case. +

    + + With the optional argument 'average' not only the records will be reduced, but all numerical + values of an hour will be reduced to a single average. + With option 'average=day' all numerical values of a day are reduced to a single average + (implies 'average').

    + + By setting attributes "device" and/or "reading" the records to be considered could be included + respectively excluded. Both containments delimit the selected data from database and may + reduce the system RAM load. + The reading "reduceLogState" contains the result of the last executed reducelog run.

    + + The relevant attributes for this function are:

    + + +
    + + For compatibility reasons the reducelog command can optionally be completed with supplements "EXCLUDE" + respectively "INCLUDE" to exclude and/or include device/reading combinations from reducelog:

    + + This declaration is evaluated as Regex and overwrites the attributes "device" and "reading", + which won't be considered in this case.

    + + + + Note:
    + Even though the function itself is non-blocking, you have to set the attached DbLog device into + the asynchronous mode (attr asyncMode = 1) to avoid a blocking situation of FHEM !.
    + It is strongly recommended to check if the default INDEX 'Search_Idx' exists on the table + 'history'!

    +

  • repairSQLite - repairs a corrupted SQLite database.
    A corruption is usally existent when the error message "database disk image is malformed" @@ -12232,8 +12316,8 @@ sub bdump {

    -
  • deviceRename - benennt den Namen eines Device innerhalb der angeschlossenen Datenbank (Internal - DATABASE) um. +
  • deviceRename <old_name>,<new_name> - + benennt den Namen eines Device innerhalb der angeschlossenen Datenbank (Internal DATABASE) um. Der Gerätename wird immer in der gesamten Datenbank umgesetzt. Eventuell gesetzte Zeitgrenzen oder Beschränkungen durch die Attribute Device bzw. Reading werden nicht berücksichtigt.

    @@ -12786,9 +12870,9 @@ sub bdump { reduziert.

    - attr <name> timeOlderThan = d:200
    - set <name> reduceLog
    - # Datensätze die älter als 200 Tage sind, werden auf den ersten Eintrag pro Stunde je Device & Reading + attr <name> timeDiffToNow = d:200
    + set <name> reduceLog average=day
    + # Datensätze die neuer als 200 Tage sind, werden auf einen Eintrag pro Tag je Device & Reading reduziert.