Back to Portfolio
Live in ProductionEnergy / Smart Building
⚡

Smart Energy Metering IoT System — Sub-Metering for Commercial Buildings

An IoT sub-metering system installed across a 20-floor commercial tower, tracking energy consumption per tenant and floor in real time — reducing the building's total energy bill by 21% in 6 months.

21%
Energy Saved
40%
HVAC Runtime↓
20
Floors

⚠The Problem

The owner of a 20-floor commercial office tower received a single monthly utility bill with no visibility into which tenants or floors consumed the most energy. Tenant billing was estimated from square footage, creating disputes. HVAC was running at full capacity 24/7, including nights and weekends. Energy waste was estimated at 30–35% of total consumption.

💡Our Solution

We installed current transformer clamps at each floor's distribution board (no electrical rewiring), connected to PZEM-004T 3-phase meters via RS485, aggregated through ESP32 Modbus gateways, and published to AWS IoT Core. InfluxDB stores per-circuit energy at 1-minute intervals. A Lambda function calculates monthly tenant bills based on actual consumption and generates PDF invoices. An anomaly detection model flags circuits consuming energy outside business hours. The HVAC control integration automatically reduces setpoints on floors with no occupancy detected (via PIR sensor input).

🔗System Architecture

CT Clamps → PZEM Meters → ESP32 Modbus GW → MQTT → AWS IoT Core → InfluxDB → Lambda → React Dashboard

Tech Stack

Hardware
  • 3-phase smart meter (PZEM-004T)
  • ESP32 Modbus gateway
  • Current transformers (CTs) per circuit
  • Power factor meter
  • RS485 bus wiring
  • DIN-rail enclosures
Communication
  • Modbus RTU → ESP32
  • MQTT to cloud via Ethernet
  • InfluxDB Line Protocol
Cloud
  • AWS IoT Core
  • InfluxDB (energy time-series)
  • Lambda (billing calculations)
  • SES (automated tenant reports)
Frontend
  • React energy dashboard
  • Per-tenant energy usage heatmap
  • Demand forecasting charts

Key Features

Per-circuit, per-floor, per-tenant energy monitoring
Real-time demand tracking with peak demand alerts
Automated tenant billing based on actual metered consumption
Anomaly detection for out-of-hours energy waste
HVAC setpoint integration for occupancy-based scheduling
Carbon footprint reporting (kgCO₂ per kWh)
Demand forecasting for utility tariff optimization
Historical benchmarking: month-over-month, year-over-year

Results Delivered

  • 21% reduction in total building energy consumption in 6 months
  • Tenant billing disputes reduced to zero (metered actuals)
  • 40% reduction in HVAC runtime via occupancy-based scheduling
  • Peak demand charges reduced by identifying and shifting loads
  • Carbon footprint reporting enabled ESG compliance for tenants

Technologies

ESP32ModbusMQTTReactInfluxDBAWSEnergy Analytics

Who This Is For

Commercial building owners, facilities managers, energy management companies, utilities

Need a similar solution?

We've built production IoT systems like this across 15+ countries. Let's talk about yours.

Frequently Asked Questions

What technology does this smart energy metering iot system use?+

Smart Energy Metering IoT System — Sub-Metering for Commercial Buildings is built on ESP32, Modbus, MQTT, React, InfluxDB. The stack was chosen for real-world reliability in a production deployment — full details are in the tech stack section.

Can CodeCaracal build a similar system for us?+

Yes. The same team that designed and deployed this energy / smart building system takes on new projects across the stack — firmware, connectivity, cloud and dashboards. Tell us your requirements and we will architect a solution for your environment.

Is this case study a real deployed system?+

Yes — every case study on this site describes a production system we designed and shipped. The problem, architecture, features and metrics are from the actual deployment.

Let's Build Together

Got an IoT challenge?
We've shipped it.

Whether you need a fleet to track, a factory to monitor, or a farm to automate — our team has done it before and we'd love to build it with you. Typical response time: under 24 hours.

No upfront commitment99.9% uptime SLANDA on requestFixed-price options