Tiza Group

Home / Guides / Testing, commissioning and faults

Duplicate Meter Readings in the Database: Causes

Duplicate meter readings in the database: retries, overlapping windows, two collectors and clock changes, with checks and fixes. We configure it remotely.

By Shadai García, CEO and protection engineer at Tiza Group.

Short answer

Duplicate readings almost never start in the meter: they appear when the system reads the same interval twice (retry, gap re-reading, two collectors) and the database has no key to prevent it. Separate identical duplicates from rows with the same instant but different values, which point to the clock or to meter identification.

Symptom

In the readings database, or in the reports built on it, one meter has two or more records for the same instant and quantity. It shows up as unexplained consumption rises, curves with double peaks, interval totals larger than the cumulative register, or a loading job that fails on repeated rows. Sometimes they are exact copies; other times the same timestamp carries different values.

For how a meter reading session is built, see IEC 61107: meter reading protocol. What follows also applies to DLMS/COSEM, Modbus or DNP3 reading: what you investigate is the path from the reading to the row.

Likely causes, from most to least likely

CauseHow to recognize itWhat confirms or rules it out
Retry of a session that had already delivered dataWhole blocks repeated, load times separated by the retry delayCollector log: dropped or unclosed session followed by a new one
Gap re-reading with overlapping windowsIntervals repeat at the edges of each windowCompare the ranges requested in two consecutive reads
Two collectors reading the same meterTwo different load sources for the same readingSource field or logs of both servers
File re-import or reprocessingMany meters duplicated with the same load timeImport log
Meter clock set back or seasonal time changeSame timestamp with different valuesClock adjustment events in the meter
Two meters under one identifierInterleaved series with different scalesSerial number and address on each reading
Events resent by the protocol after a lost confirmationRepeats only after link dropsTraffic capture and master log
Badly built table join in the reportThe base table has no repeats, the report doesCount rows before and after the join

How to diagnose it

1. Count in the raw table. Group by meter, quantity and instant and list groups with more than one row. If the raw table is clean and the report is not, the problem is the report or the view that joins tables.

2. Classify. Split the groups into identical values and different values or flags. The first indicates a repeated load; the second a clock, identification or later-correction problem.

3. Compare load time with reading time. If your system stores when each row was inserted, the distance between copies reveals the mechanism: seconds or minutes suggest a retry; a daily pattern, a scheduled re-read; a single instant for thousands of rows, a re-import.

4. Look at the pattern by meter and period. All meters at once points to the server; a few, to their link or device; repeats clustered on a time-change day, to time zone handling.

5. Review collector logs. Look for sessions ended by timeout, automatic retries and a second active server, for example a standby that is also reading.

6. Check against the meter. For one meter and one day, read its load profile again and compare interval by interval. Also compare the sum of intervals with the difference of the cumulative register between start and end of day.

7. Check the clock. Look for time adjustments in the meter event log, and confirm whether the database stores UTC or local time.

Field checklist

  • Are the repeats in the raw table or only in the report?
  • Is there a unique key by meter, quantity and instant?
  • Are repeats identical or different?
  • How many load sources appear?
  • Do they coincide with retries or link drops?
  • Does gap filling overlap periods?
  • Were there clock adjustments on those dates?
  • Do two devices share an identifier?

Illustrative example

A generic case with invented figures. A meter records 15-minute intervals, 96 per day, with a flat 12 kWh per interval: 96 × 12 = 1,152 kWh a day. A session drops after delivering 8 intervals and the collector repeats it in full. The database holds 104 rows and the sum rises to 1,248 kWh, 96 kWh more, an 8.3% excess. The meter cumulative register still shows a difference of 1,152 kWh between the two midnights, and that contrast proves the error is in the database, not in the measurement.

What to do

  • Unique key: define meter, channel and instant as the identifier, and make loading repeatable: if the row exists and is equal, do not insert it; if it differs, store it as a correction with its source instead of silently overwriting.
  • Retries: make the retry request from the last confirmed interval, or let the unique key absorb the overlap.
  • Two collectors: leave one owner per meter; the standby takes over only when the primary fails.
  • Time: store in a reference without jumps, such as UTC, and convert only for display. Synchronize clocks and record adjustments.
  • Identification: use the serial number as well as the address; see two meters answering to the same address.
  • Clean-up: back up, verify the backup, flag surplus rows in a separate table and review a sample before deleting.
  • Billing: if the data were already used for billing or settlement, tell whoever runs that process and redo the calculations, recording what was corrected.

All of this is data and configuration work; it does not require touching the meter or opening panels.

What not to do

  • Do not delete rows without a tested backup.
  • Do not remove duplicates only in the report with a filter: the cause keeps loading data.
  • Do not pick “the highest” or “the latest” without understanding why they differ.
  • Do not adjust a revenue meter clock without the applicable procedure and authorization.
  • Do not break seals or open a meter cover to investigate a database problem.

When to call us

Call us if duplicates return after cleaning, if there are several collectors or gateways in the chain, or if you need to redesign loading so it is safe against retries. We review logs, traffic and reading configuration with you. We configure it remotely. Contact us.

References

  • IEC 62056-21, Electricity metering – Data exchange for meter reading, tariff and load control – Part 21: Direct local data exchange.
  • IEC 62056-6-1, Electricity metering data exchange – The DLMS/COSEM suite – Part 6-1: Object Identification System (OBIS).
  • IEC 62056-6-2, Electricity metering data exchange – The DLMS/COSEM suite – Part 6-2: COSEM interface classes.

Frequently asked questions

Why does the same reading appear twice?

Because it was inserted twice: the session dropped after delivering the data and was repeated, gap filling requested a period already stored, two servers read the same meter or a file was imported again. Without a unique key the database accepts both.

Can I just delete the duplicates?

Not without a backup and without knowing which one is good. Identical rows can be consolidated by rule; rows that differ in value or quality must be compared with the meter before discarding any.

Does a unique key solve the problem?

It stops the repetition, but the key must include meter, quantity and instant in an unambiguous time reference. If the meter clock jumps, you also need to keep the data quality.

WhatsApp