Skip to content

Observation Analytics: Add Numeric Value Summaries #47

Description

@Dumdart

Priority

P3 — add only after activity summaries and real payload examples validate the need.

Depends on

Problem

Numeric MQTT topics such as temperature, battery, power, and signal strength benefit from bounded summaries, but payload parsing must remain explicit and honest about ignored samples.

Scope

For payloads that conform to the initial supported numeric format, calculate:

  • Numeric sample count.
  • Minimum, maximum, and average.
  • Latest numeric value.
  • Latest change and change across the selected window.
  • Explicit ignored, malformed, truncated, and nonnumeric sample counts.
  • Optional fixed time buckets with bounded bucket counts.

Start with complete scalar UTF-8 numeric payloads. Design result models so JSON-field extraction can be added later without changing current semantics.

Acceptance criteria

  • Parsing rules for integers, decimals, whitespace, non-finite values, units, and encodings are documented.
  • Truncated payloads are never parsed as valid numeric samples.
  • Ignored and malformed counts accompany every result.
  • Time ranges, topic matches, result topics, and buckets have hard bounds.
  • Aggregation does not silently mix incompatible payload formats.
  • Tests cover negative values, decimals, malformed payloads, nonnumeric samples, truncation, and empty windows.
  • MCP exposure, if included, preserves completeness and retention-horizon metadata.

Out of scope

  • Arbitrary JSONPath extraction.
  • Unit conversion.
  • Forecasting, alerting, and automatic anomaly detection.
  • User-authored scripts.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions