Skip to content
Harson
(Case) Energy

Meter errors caught before they reach a bill A streaming platform and an anomaly model for 2 million smart meters, so that analysts see a faulty reading within hours instead of weeks.

Merivo Energia
Client
Merivo Energia
Industry
Energy
Duration
11 months
Team
7 people
Scope
Data and AI, Backend and integrations, Cloud and DevOps, QA and test automation, Maintenance and development (SLA)
Technology
Apache Kafka, Kafka Streams, ClickHouse, PostgreSQL, Python, LightGBM, MLflow, React, Kubernetes, Grafana

Situation

Merivo Energia is an electricity distribution system operator in central Poland, with its head office and network dispatch centre in Kielce. It has about 3,800 employees and serves about 2.3 million connection points, 2 million of which got smart meters between 2019 and 2024. Each smart meter sends a reading every 15 minutes, which adds up to 192 million readings a day. Errors in that stream reached customers' bills: a wrong multiplier after a meter swap, a meter clock that drifted, a gap filled with an estimate. Customers found them before Merivo did. In 2024 Merivo received about 2,300 complaints about bills a month, and its six analysts saw the problems weeks later, through those complaints. The readings came from the head-end systems of three meter manufacturers and went on into the meter data management system.

Challenge

Merivo wanted to see a bad reading within hours and stop it before an invoice went out. That meant checking 192 million readings a day from the head-end systems of three manufacturers and spotting meters that behave oddly against their own history. It all had to run on premises. Meter data and grid topology fall under the operator's security rules, Merivo is an essential service under the national cybersecurity act, and nothing was to leave the building. The six analysts would stay in charge, so a model could flag a meter but not decide about it, and every decision had to be logged with a reason. Billing needed a way to hold the invoice of one flagged meter without delaying everyone else's. The dispatch centre also needed the same anomalies grouped by substation and feeder.

What we did

  1. Kafka in the data centre

    Discovery in October 2024 covered data from the head-end systems of the three manufacturers, the meter data management system and a year of complaints. In November we set up a Kafka cluster in Merivo's data centre and connected all three head-end systems. Kafka keeps a long archive, so any change to a rule or a model can be replayed on real history before it goes live. In December readings went into ClickHouse, and meter and grid metadata into PostgreSQL, all on Kubernetes and all on premises.

  2. Rules first, then a model

    In January we wrote data quality rules for gaps, duplicates, negative consumption and multiplier changes, as Kafka Streams services in Java. In February we trained the anomaly model on 2023 and 2024 history: LightGBM on seasonal profiles per meter, tracked in MLflow. The model flags and the analysts decide; each decision is logged with a reason and becomes a training label. We also built a prototype of the analysts' panel in React, and on 10 March the system started in shadow mode.

  3. The hour that did not exist

    Poland switched to summer time on 30 March. The first weekly review, on 7 April, showed that from 31 March to 6 April the model had flagged 31,800 anomalies, and 34% of them came from the clock change. Meters from one manufacturer stored local time without an offset and reported 30 March as a day of 92 intervals with an hour missing. Meters from another switched their own clocks, some of them up to 40 minutes late. The model saw a missing hour and a shifted daily profile, and flagged both groups.

  4. UTC at ingestion

    The fix took three weeks. Every timestamp is now converted to UTC at ingestion, with a clock profile per meter manufacturer and firmware version, and the clock-change dates became a feature of the model. From the Kafka archive we replayed the March and October changes of 2023 and 2024 and kept them as regression tests. Model v2 went live on 5 May, and the analysts got their panel the same day, three weeks after the planned 14 April.

  5. A billing hold and a view for dispatch

    In June billing got a hold: a meter with an open anomaly is held before invoices are generated, which holds the bills of about 1,100 meters a month. In July the dispatch centre got its own view, with anomalies grouped by substation and feeder, while Grafana covers the platform itself. In August we handed over to a maintenance team of two under an SLA. On 26 October 2025 the switch back to winter time passed without a false spike, as the SLA team checked.

Results

complaints about bills, September 2025 to February 2026 against the same months two years earlier
−41%
median time from reading to the analysts' panel, instead of weeks
3 h
readings a day from 2 million meters, every 15 minutes
192M
meters a month held before a bill goes out
1,100

Our analysts now find a broken meter before the customer does. The week after the clock change was unpleasant for both sides, and it taught all of us to test on history before anything goes live.

Director of metering · Merivo Energia

Related articles