Add support for delta accumulation property classification

XMLWordPrintable

    • Type: New Feature
    • Resolution: Unresolved
    • Priority: Major
    • Component/s: Datum Import, DB, SolarIn
    • None

      Sometimes when integrating with other systems or kinds of devices data is reported as a delta accumulation, such as a service reporting energy values like "3 kWh" for an implicit time period. Currently SolarNetwork supports absolute accumulation only, so when aggregating values into higher-level time-based rollups the overall result is taken as a difference between the readings included in the time period. Delta accumulation would work differently in the rollup: it would be a sum of the readings included in the time period.

      The tricky part here is knowing what the implicit time period is by each datum. Currently there is no way to indicate what the time period for the datum are. Maybe the datum must include that as an instantaneous or status property, like the number of milliseconds represented, like:

       

      { "energy" : 3000, "dt" : "60000" }
      

       

      could represent 3kWh of energy over 1 minute.

      Or, the time period could be derived from the previous datum time. That means the timestamp for a given datum would equal the ending time of the impicit time period, which is backwards to how aggregate times are handled in SolarNetwork where the timestamp of aggregate datum represents the start of the aggregate period but might still work out OK.

      Or, the time period could be described on stream metadata. That would only work for exactly regular time periods for all datum in the stream, but could still be appropriate for some situations, especially when integrating with other systems.

      Whatever the solution for determining the implicit time period is, I can imagine a new datum classification "delta time" where "d" stands in for the classifier, like:

      {
        "d" : {
          "energy" : 3000
        },
        "s" : {
          "dt" : "60000"
        }
      }
      

            Assignee:
            Unassigned
            Reporter:
            Matt Magoffin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: