DEV Community

DP PHONG
DP PHONG

Posted on

How I Engineered a Hyper-Local Water Hardness & Appliance Calibration Tool for 9,000+ UK Postcodes

Over 60% of homes in the UK suffer from hard or aggressively hard tap water. If you live in London, East Anglia, or the South East, dissolved calcium carbonate ($CaCO_3$) wrecks kettle elements, scales combi boiler heat exchangers, and clouds glassware.

Most homeowners only find out their water hardness when a new appliance (like a Bosch or Miele dishwasher) asks for manual hardness calibration (H:00 to H:07) or salt dosage settings.

To solve this, I built WaterHardness.uk — an independent data platform and utility engine mapping water hardness metrics across 9,000+ UK postcode sectors.

Here is a breakdown of the technical challenges, data normalization, and appliance calibration logic behind the project.


1. The Core Architecture & Data Challenge

The hardest part of building hyper-local utilities in the UK isn't the UI — it's geographical and data reconciliation:

  • Non-Standard Catchments: UK water suppliers (Thames Water, Severn Trent, Anglian Water, Scottish Water) do not supply water strictly by municipal boundaries; their water supply zones (WSZs) overlap across arbitrary boundaries.
  • Unit Standardization: Different water companies and appliance manuals report hardness using different scales: PPM ($mg/L\ CaCO_3$), English Clark degrees (°e), German degrees (°dH), or French degrees (°f).
  • Data Sources: We aggregated public disclosures from the Drinking Water Inspectorate (DWI) and major regional utilities, cross-referencing outcode and sector coordinates to normalize hardness values into a unified relational schema.

2. Solving Appliance Calibration: The Dishwasher Salt Logic

One feature users requested most was automated salt setting lookups. Most modern dishwashers rely on an internal ion-exchange resin tank that must be regenerated using coarse granular salt.

Instead of flipping through paper manuals, we built dedicated logic matching regional PPM to manufacturer steps. For example:

  • Bosch / Siemens / Neff: Hardness calibrated from H:00 (<50 PPM) to `H:07` (>380 PPM).
  • Beko: Calibrated from r1 to r5.
  • Consumption Modeling: Factoring average wash frequency to estimate monthly salt consumption in kilograms.

You can test the implementation on our UK Dishwasher Salt Setting Calculator.


3. Tech Stack & Performance Tuning

For this project, the priority was sub-second page loads and near-instant local lookups:

  • Frontend: Modern statically-optimized architecture with localized outcode routing.
  • DNS & Edge: Proxied through Cloudflare edge caching for low-latency delivery across the UK.
  • Schema Markup: Implemented rich JSON-LD structured data (Dataset, TechArticle, LocalBusiness/Service) to make geographical datasets machine-readable for modern AI and search crawlers.

What's Next?

We are currently expanding the calculation engine to include:

  1. Coffee machine descaling interval estimators (DeLonghi, Sage/Breville).
  2. Whole-house water softener capacity calculators based on household size and cubic meter water usage.

I would love to hear feedback from fellow engineers on data structuring, edge performance, or additional utility calculations that would be useful!

👉 Live project: WaterHardness.uk

Top comments (0)