{"slug": "who-called-me-about-a-faulty-meter-validating-an-identifier-is-not-verifying-it", "title": "Who called me about a faulty meter? Validating an identifier is not verifying it", "summary": "A developer published a Python sketch showing how to validate a UK electricity MPAN's check digit using the published prime-weighting algorithm, while stressing that a well-formed identifier is not proof of ownership. The code normalises input to the final 13 digits, validates the check digit, and compares the offered value against the number on file, returning a match only as consistency rather than authentication. The piece was prompted by a reported scam call in which a caller claiming to be from British Gas failed to supply the household's correct MPAN.", "body_md": "A caller says your meter is faulty. Did they know which meter is yours? A call lookup can add context about the number, at best. The meter question is a data question, and it has a clean engineering answer: a value can be well-formed without being yours.\n\n**Affiliation and AI note:** This is promotional editorial from the website whocallme.co.uk, drafted with AI assistance. The code below is an illustrative sketch that was run locally only to confirm it executes. It is not a product, and no real meter numbers were used.\n\nThe number page for 020 3917 8878 lists a landline, allocation hint Gamma Telecom Holdings Limited, numbering area London. Those labels describe a number range, not a caller. Caller ID can be spoofed, and the page does not identify who holds the number.\n\nWhen fetched for this post the page showed nine searches, one user report and a \"first seen: 6 days ago\" page label. That label is not the date of the note. The note is imported and its original publication date is unknown. The visitor filed it as Scam/Fraud. That is their category, not an established fact.\n\nThe visitor wrote that the caller presented as \"our supposed energy supplier British Gas\" and said the household had \"a faulty meter\" that was \"not giving accurate readings\". The visitor asked for the meter's MPAN, and the caller \"gave totally wrong number\". The visitor pointed out that they submit readings online and that bills were being issued without a problem. They added: \"This is the 3rd call in a 7days.\"\n\nNothing beyond that text is assumed here. Whether the caller had any link with the supplier named is unknown.\n\nLook at the direction of the question. The visitor did not read their MPAN out. They asked the caller to supply it, then compared the answer with what they already knew.\n\nThat is the right shape for this kind of check:\n\nThe reverse shape, where you recite your own identifier \"so they can find the account\", turns you into the lookup service. Any value you speak is now theirs.\n\nAn MPAN (Meter Point Administration Number) identifies an electricity supply point in Great Britain. Its last 13 digits are the core, and the final digit of the core is a check digit.\n\nThat gives us two separate tests, and it is worth keeping them apart in code:\n\nA failed validation means the caller's number could not be a real MPAN core as stated. A passed validation means very little on its own, because any well-formed number passes. Only verification against your own record says anything about your meter. And even a match is not authentication, since the number is printed on bills and is not a secret.\n\nGas supply points use a different identifier (the MPRN), so a check like this applies to electricity numbers only.\n\nThe published algorithm multiplies the first 12 digits of the core by the primes 3, 5, 7, 13, 17, 19, 23, 29, 31, 37, 41 and 43 (11 is skipped). Sum the products, take the result modulo 11, then modulo 10. The answer should equal the 13th digit.\n\nHere is a standard-library version with a comparison step:\n\n``` python\nPRIMES = (3, 5, 7, 13, 17, 19, 23, 29, 31, 37, 41, 43)\n\ndef normalise(raw: str) -> str:\n    \"\"\"Keep digits only; the core is the final 13 digits.\"\"\"\n    digits = \"\".join(ch for ch in raw if ch.isdigit())\n    return digits[-13:]\n\ndef is_well_formed(core: str) -> bool:\n    if len(core) != 13 or not core.isdigit():\n        return False\n    total = sum(int(d) * p for d, p in zip(core[:12], PRIMES))\n    return total % 11 % 10 == int(core[12])\n\ndef compare(offered: str, on_file: str) -> str:\n    o, f = normalise(offered), normalise(on_file)\n    if not is_well_formed(o):\n        return \"mismatch: offered value is not a well-formed core\"\n    if o != f:\n        return \"mismatch: well-formed, but not the value on your bill\"\n    return \"match: consistent, still not proof of identity\"\n```\n\nAnd a run with made-up values. The distributor prefix 99 is used deliberately so nothing here resembles a real supply point:\n\n```\non_file = \"99 0000 0123 454\"               # typed from your own bill\nprint(compare(\"9900000123455\", on_file))   # bad check digit\nprint(compare(\"9900000678906\", on_file))   # well-formed, different\nprint(compare(\"S 01 801 101 99 0000 0123 454\", on_file))\n```\n\nOutput:\n\n```\nmismatch: offered value is not a well-formed core\nmismatch: well-formed, but not the value on your bill\nmatch: consistent, still not proof of identity\n```\n\nNotice that the first two results lead to the same decision. Whether the offered number is malformed or simply belongs to someone else, it does not match your meter. The distinction is useful for logging, not for trusting.\n\nIt is tempting to treat the third branch as \"verified\". Resist that. An identifier that appears on every paper bill can be known by many people. A correct value raises the chance that a caller has some data about you. It does not show that they are your supplier.\n\nSo the decision table stays one-sided:\n\n| Result | What it tells you | What to do | \n|---|---|---|\n| malformed | caller's value can't be an MPAN core | end the call, record it | \n| well-formed, different | not your meter | end the call, record it | \n| match | caller has data you also have | still contact the supplier via your own account | \n\nEvery branch ends in the same safe action: any real meter issue is raised through a channel you open yourself.\n\nThe visitor's last line, three calls in seven days, is a data point that usually gets lost. A minimal record keeps it:\n\n```\n- reviewed_on: 2026-11-21        # the day you wrote this, not a call date\n  number_shown: \"020 3917 8878\"\n  claim: \"faulty meter, inaccurate readings\"\n  identifier_requested_from_caller: MPAN\n  identifier_check: mismatch   # the note does not say which kind\n  disclosed_by_me: none\n  calls_in_window: {count: 3, days: 7}\n  follow_up: \"raise any meter question via own supplier login\"\n```\n\nKeep `disclosed_by_me` honest. If it ever reads anything other than \"none\", the next step is to contact the supplier through your own login.\n\nThe number page is context for the `claim` field. The [visitor note about a faulty-meter call](https://www.whocallme.co.uk/phone/02039178878) shows that one other person heard this pitch from the displayed number. It is anonymous and unverified, and it does not tie the line to any supplier.\n\nIf you log calls like this regularly, a [quick reference of UK numbers with visitor reports](https://www.whocallme.co.uk/) can help fill in context before you write a record. The rule from the code still holds. Ask the caller for the value, compare it locally, and give nothing back.", "url": "https://wpnews.pro/news/who-called-me-about-a-faulty-meter-validating-an-identifier-is-not-verifying-it", "canonical_source": "https://dev.to/whocallmeuknotes/who-called-me-about-a-faulty-meter-validating-an-identifier-is-not-verifying-it-56m4", "published_at": "2026-11-21 01:07:45+00:00", "updated_at": "2026-11-21 01:12:04.228025+00:00", "lang": "en", "topics": ["developer-tools"], "entities": ["British Gas", "Gamma Telecom Holdings Limited", "whocallme.co.uk"], "also_reported_by": [], "takeaway": "Validate an offered MPAN's check digit with the prime-weighting algorithm (3,5,7,13,17,19,23,29,31,37,41,43, skipping 11, then mod 11 mod 10), but treat a pass as only well-formedness and a match against your own record as consistency, not authentication.", "recommendation": {"advice": "When a caller claims to represent a supplier, ask them to state your identifier and validate its check digit before comparing it to your own record, rather than reading your number out to them.", "playbook": "output-verification", "playbook_url": "https://wpnews.pro/playbooks/output-verification"}, "alternates": {"html": "https://wpnews.pro/news/who-called-me-about-a-faulty-meter-validating-an-identifier-is-not-verifying-it", "markdown": "https://wpnews.pro/news/who-called-me-about-a-faulty-meter-validating-an-identifier-is-not-verifying-it.md", "text": "https://wpnews.pro/news/who-called-me-about-a-faulty-meter-validating-an-identifier-is-not-verifying-it.txt", "jsonld": "https://wpnews.pro/news/who-called-me-about-a-faulty-meter-validating-an-identifier-is-not-verifying-it.jsonld"}}