OzWrapper.OzAnomaly.detector.AnomalyResult

class OzWrapper.OzAnomaly.detector.AnomalyResult

Structured output of a single detector run.

Variables:
  • device_id – Device that produced the data.

  • device_type – InfluxDB-style measurement name (DUSTROID etc.).

  • timestamp – Unix epoch in milliseconds (when the run completed).

  • fields – Merged map of anomaly keys (e1..``e10`` and their per-parameter variants) to their numeric values. Empty dict means “no anomalies detected”.

to_influx_point() Dict[str, Any]

Shape the result like the old cloud service’s db_input() output.

The is_production tag is intentionally not emitted — the production-vs-non-production distinction is deferred until we settle on how the device identifies itself as production.

Returns:

A dict with measurement, fields, tags, and timestamp (epoch ms) suitable for an InfluxDB line-protocol writer.

device_id: str
device_type: str
fields: Dict[str, Any]
timestamp: int