From 2c6f024eaddfe19d2e823fab405c3545525fc7e2 Mon Sep 17 00:00:00 2001 From: borisneubert <> Date: Sun, 25 Jan 2015 17:37:12 +0000 Subject: [PATCH] commandref: documentation for event-aggregator added git-svn-id: https://svn.fhem.de/fhem/trunk@7718 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/docs/commandref_frame.html | 55 +++++++++++++++++++++++++++++- fhem/docs/commandref_frame_DE.html | 48 ++++++++++++++++++++++++++ 2 files changed, 102 insertions(+), 1 deletion(-) diff --git a/fhem/docs/commandref_frame.html b/fhem/docs/commandref_frame.html index 1da373a9e..4cfa42529 100644 --- a/fhem/docs/commandref_frame.html +++ b/fhem/docs/commandref_frame.html @@ -450,6 +450,7 @@ attribute list if you want to know if a device supports these attributes.
this attribute is enclused in {}, then it is evaluated. This attribute is evaluated each time a reading is updated. +

  • event-on-update-reading
    @@ -459,7 +460,8 @@ attribute list if you want to know if a device supports these attributes.
    expressions in that list. If set, only updates of the listed readings create events.
  • - +

    +

  • event-on-change-reading
    The attribute takes a comma-separated list of readings. You may use regular @@ -479,6 +481,56 @@ attribute list if you want to know if a device supports these attributes.
    reading creates an event no matter whether the reading is also listed in event-on-change-reading.
  • +

    + + +

  • event-aggregator
  • + The primary uses of this attribute are to calculate (time-weighted) averages of + readings over time periods and to throttle the update rate of readings and thus + the amount of data written to the logs.

    + + This attribute takes a comma-separated list of reading:interval:method:function + quadruples. You may use regular expressions for reading. If set, updates for the + listed readings are ignored and associated events are suppressed for a black-out period of at + least interval seconds. After the black-out period has expired, the reading is + updated with a value that is calculated from the values and timestamps of the previously ignored + updates within the black-out period as follows: + + + + + + + + + +
    functiondescription
    vthe last value encountered
    v0the first value encountered
    minthe smallest value encountered
    maxthe largest value encountered
    meanthe arithmetic mean of all values
    sdthe standard deviation from the mean
    +

    + + If method is none, then that's all there is. If method + is const or linear, the time-weighted series of values is taken into + account instead. The weight is the timespan between two subsequent updates. + With the const method, the value is the value of the reading at the beginning of + the timespan; with the linear method, the value is the arithmetic average of + the values at the beginning and the end of the timespan. + Rollovers of black-out periods are handled as one would expect it.

    + + One would typically use the linear method with the mean function for + quantities continuously varying over time like electric power consumption, temperature or speed. + For cumulative quantities like energy consumed, rain fallen or distance covered, + the none method with the v function is used. The constant + method is for discrete quantities that stay constant until the corresponding reading is updated, + e.g. counters, switches and the like.

    + + The event aggregator only takes into consideration those updates that remain after preprocessing + according to the event-on-update-reading and event-on-change-reading + directives. Besides which, any update of a reading that occurs within a timespan from the preceding + update that is smaller than the resolution of FHEM's time granularity is ditched.

    + + Example:
    + attr myPowerMeter event-aggregator EP_POWER_METER:300:linear:mean,EP_ENERGY_METER:300:none:v + +

  • event-min-interval
    @@ -487,6 +539,7 @@ attribute list if you want to know if a device supports these attributes.
    generated, if at least minInterval seconds elapsed since the last reading of the matched type.
  • +

  • userReadings
    diff --git a/fhem/docs/commandref_frame_DE.html b/fhem/docs/commandref_frame_DE.html index 437b86c61..2304ae4cc 100644 --- a/fhem/docs/commandref_frame_DE.html +++ b/fhem/docs/commandref_frame_DE.html @@ -505,6 +505,54 @@ Gerät dokumentiert. "reading" auch in event-on-change-reading aufgelistet ist.
  • + +
  • event-aggregator
  • + The primary uses of this attribute are to calculate (time-weighted) averages of + readings over time periods and to throttle the update rate of readings and thus + the amount of data written to the logs.

    + + This attribute takes a comma-separated list of reading:interval:method:function + quadruples. You may use regular expressions for reading. If set, updates for the + listed readings are ignored and associated events are suppressed for a black-out period of at + least interval seconds. After the black-out period has expired, the reading is + updated with a value that is calculated from the values and timestamps of the previously ignored + updates within the black-out period as follows: + + + + + + + + + +
    functiondescription
    vthe last value encountered
    v0the first value encountered
    minthe smallest value encountered
    maxthe largest value encountered
    meanthe arithmetic mean of all values
    sdthe standard deviation from the mean
    +

    + + If method is none, then that's all there is. If method + is const or linear, the time-weighted series of values is taken into + account instead. The weight is the timespan between two subsequent updates. + With the const method, the value is the value of the reading at the beginning of + the timespan; with the linear method, the value is the arithmetic average of + the values at the beginning and the end of the timespan. + Rollovers of black-out periods are handled as one would expect it.

    + + One would typically use the linear method with the mean function for + quantities continuously varying over time like electric power consumption, temperature or speed. + For cumulative quantities like energy consumed, rain fallen or distance covered, + the none method with the v function is used. The constant + method is for discrete quantities that stay constant until the corresponding reading is updated, + e.g. counters, switches and the like.

    + + The event aggregator only takes into consideration those updates that remain after preprocessing + according to the event-on-update-reading and event-on-change-reading + directives. Besides which, any update of a reading that occurs within a timespan from the preceding + update that is smaller than the resolution of FHEM's time granularity is ditched.

    + + Example:
    + attr myPowerMeter event-aggregator EP_POWER_METER:300:linear:mean,EP_ENERGY_METER:300:none:v + +

  • event-min-interval
    Dieses Attribut enthält eine durch Kommata getrennte Liste von