Quick overview
This workflow runs hourly (or manually) to pull recent smart meter readings from a metering API, detect abnormal consumption patterns (spikes, drops, leakage, and stuck meters), and prepare either a critical escalation payload or a standard log payload for downstream alerting.
How it works
- Runs every hour on a cron schedule or starts manually for a test run.
- Sets the metering API URL, meter group, lookback window, and anomaly detection thresholds.
- Calls the smart meter API to fetch recent readings for the configured meter group and waits briefly for aggregation.
- Calculates a per-meter baseline (mean and standard deviation), checks for spikes, drops, off-hours continuous flow, and low-variance “stuck” patterns, and assigns an anomaly score.
- Filters out meters with no anomaly detected and outputs a no-action note.
- Classifies each detected anomaly into a category and severity and builds a structured alert payload.
- Routes critical anomalies through a short cooldown wait and marks them ready for critical dispatch, while non-critical anomalies are marked ready for standard logging.
Setup
- Add an HTTP Header Auth credential for the HTTP Request node to authenticate to your metering API.
- Update the metering API base URL, meter group ID, and lookback window in the configuration step to match your environment.
- Adjust detection thresholds (z-score limits, off-hours window, minimum flow, variance threshold, and critical score cutoff) to match your meter population.
- Ensure your metering API response matches the expected shape:
{ meters: [ { meterId, address, readings: [ { timestamp, value }, ... ] } ] }.
- Connect the “critical” and “standard” outputs to your notification or ticketing system (for example Slack, PagerDuty, email, or Jira) using the
dispatchChannel and readyForDispatch fields.