Energy Monitoring

A phased map for measuring energy use, improving comfort, and validating savings.

Project Overview

This is a fully local, open-source home intelligence system built around two goals: minimize heating and cooling costs while maintaining measurable comfort. It integrates every layer of the home's HVAC stack — ventilation, heat pump, indoor air quality, and whole-home power monitoring — into a single data pipeline with a unified web dashboard.

The system uses two Broan ERV units connected via RS-485 to ESP32 microcontrollers running ESPHome, feeding ventilation metrics into an MQTT broker. Aqara temperature and humidity sensors provide per-room indoor conditions. A Mitsubishi Hyper Heat mini-split is controlled via its CN105 serial port, bypassing cloud dependencies entirely. Emporia Vue monitors per-circuit power consumption as an independent ground-truth validator. Open-Meteo provides free, no-key 48-hour weather forecasts used for proactive scheduling — pre-cooling before a heat wave, pre-heating before a cold front.

Everything is logged to SQLite, exposed through a Python FastAPI backend, and viewable through a local web dashboard. No subscriptions, no cloud accounts required after initial setup.

Emporia Vue 3
Power Monitoring
Broan ERV AI
Air Quality + ERV
Aqara Temp + Humidity
Room Sensors
Mitsubishi Hyper Heat
Conditioning
NUTS Monitoring
UPS Management
Kasa Smart Switches
Load Tracking

Automation layer handles pre-heat/pre-cool logic, ERV scheduling, and alerts when usage drifts.

HVAC details

Mitsubishi Hyper Heat system

Current nameplate details: outdoor condenser MXZ-SM36NLHZ, downstairs head MSZ-GX24NL, and upstairs head MSZ-GX09NL. The system is controlled through CN105 and validated with Emporia circuit data.

Equipment map

  • Outdoor: Mitsubishi MXZ-SM36NLHZ.
  • Downstairs: MSZ-GX24NL indoor head.
  • Upstairs: MSZ-GX09NL indoor head.

If it is not cooling well

  • Clean indoor head filters and confirm all returns/supplies are unobstructed.
  • Wash the outdoor coil and keep plants/debris away from the condenser.
  • Measure return-to-supply temperature split while cooling; a weak split points to airflow, charge, or control issues.
  • Have a tech verify refrigerant charge, line-set condition, fan speed, and that the system is not short-cycling.

Building shell priority

  • Air-seal attic penetrations before adding more insulation.
  • Check attic hatch, can lights, bath fans, duct chases, and top plates for leakage.
  • Confirm attic ventilation is not blocked by insulation.
  • ENERGY STAR guidance for this region generally points to attic insulation around R49-R60, depending on existing levels.

Phase 4 — Expansion Monitoring

Add NUTS UPS telemetry and Kasa switch power monitoring to extend reliability tracking and spot-load visibility. This phase layers onto the existing MQTT + SQLite pipeline.

Legacy Content

Full Notes

System overview

Hardware & data flow

SENSORS & HARDWARE Broan ERV ×2 RS-485 → ESP32-S3 Mitsubishi HP CN105 → ESP32-S3 Aqara Hub V3 Indoor temp + RH Emporia Vue Per-circuit watts Open-Meteo 48h free forecast BROKER LAYER Mosquitto MQTT Broker erv/# heatpump/# power/# aqara/# BACKEND Python FastAPI — erv_monitor.py MQTT subscriber · automation engine · SQLite logger · REST API · web UI server SQLite Database time-series · events · COP curve Web Dashboard local browser · charts · controls

Ventilation

Broan B210E75RT ERV ×2

Each unit communicates over RS-485 Modbus via a MAX485 module wired to an ESP32-S3 running ESPHome. Exposes intake/exhaust temperature, CFM, power draw, and filter life. Commands (Min / Med / Max / Turbo) are sent over MQTT. The automation engine adjusts fan mode based on outdoor conditions and indoor air quality.

Heating & Cooling

Mitsubishi Hyper Heat

Controlled via the CN105 serial port using the SwiCago ESPHome HeatPump component — fully local, no cloud. Exposes mode, setpoint, true outdoor temperature from the compressor sensor, compressor frequency, and defrost state. The pre-heat scheduler raises setpoint before high-efficiency windows close.

Indoor Conditions

Aqara Hub V3 + Sensors

Per-room temperature and humidity sensors on Zigbee, bridged to MQTT via Home Assistant, the Aqara Cloud API, or Zigbee2MQTT. Sensors placed in the main floor, upstairs landing, basement, and near the ERV supply-air outlet give the automation engine room-level comfort data.

Power Validation

Emporia Vue

Per-circuit watt monitoring polled every 60 seconds via the pyemvue library. Completely independent of what the CN105 reports — this is the ground-truth validator. If the heat pump draws power when it shouldn't, the watchdog detects it from the wire and re-issues the off command.

Weather Forecasting

Open-Meteo — 48-hour forecast, free, no API key

Polled every 15 minutes. Returns current outdoor temp and humidity plus 48 hourly data points including temperature, dewpoint, precipitation probability, and wind speed. The ERV automation uses forecast to ventilate aggressively before a cold front hits and close down when outdoor humidity spikes. The heat pump scheduler uses it to identify high-COP heating windows up to 12 hours ahead — pre-loading thermal mass when efficiency is best, letting the house coast when COP is worst.

Stated success goals

What done looks like

1

Both ERV units report live data over MQTT

Intake and exhaust temperature, CFM, power draw, and filter life for each Broan unit are visible in the SQLite database and web dashboard with no gaps longer than 60 seconds. ERV fan mode can be commanded from the dashboard and confirmed via RS-485 response.

2

ERV automation runs weather-aware decisions 24/7

The 7-rule priority engine runs every 5 minutes. Every decision is logged with a human-readable reason. Manual overrides expire after 2 hours and automation resumes. The system can be paused from the dashboard without modifying configuration files.

3

Heat pump controllable and validated locally

CN105 adapter reports mode, setpoint, compressor frequency, and outdoor temperature to MQTT. Every commanded change is confirmed against both CN105 state and Emporia wattage within 90 seconds. Three failed confirmations trigger an alert. No Kumo Cloud or internet connection required for any control function.

4

Real COP curve built from actual operating data

After two weeks of logging, a SQL query groups Emporia wattage by 5°F outdoor temperature buckets to produce the unit's actual efficiency curve. This replaces spec-sheet estimates and gives the scheduler accurate cost-per-hour values at every outdoor temperature the system will encounter.

5

Pre-heat and pre-cool scheduling is forecast-driven

The scheduler detects when outdoor temperature will drop more than 20°F within 8 hours and pre-loads thermal mass while COP is high. Before heat waves it drops setpoint during the overnight cool window. Every scheduled change is logged with the forecast that triggered it, so the rationale is always traceable.

6

30-day cost trend is visible and downward

The dashboard shows actual $/day heating and cooling cost derived from Emporia circuit data and the local electricity rate. After 30 days of COP-aware scheduling, measured cost-per-heating-degree-day is lower than the pre-automation baseline captured during the data-collection phase.

7

Everything runs without internet (except weather)

MQTT, ESPHome, SQLite, FastAPI, and the web dashboard all operate on the local network with no cloud dependencies. The only outbound call is to api.open-meteo.com every 15 minutes. The system degrades gracefully: if the weather API is unreachable, the automation falls back to the most recent cached forecast.

Implementation guides

Phase-by-phase + bonus documentation

Phase 1 of 3

ERV Integration,
Monitoring &
Weather Automation

Hardware to fully-automated air quality system. Both Broan units on MQTT, Aqara sensors feeding the pipeline, Open-Meteo forecasts driving ERV decisions, everything logged and dashboarded.

Covers

  • →RS-485 wiring and ESP32 firmware (ESPHome)
  • →Mosquitto MQTT broker setup
  • →Python FastAPI backend + SQLite
  • →Aqara sensor bridging (3 paths)
  • →Open-Meteo weather integration
  • →7-priority ERV automation engine
  • →Web dashboard and REST API
View guide

Phase 2 of 3

Heat Pump Intelligence
& Power
Validation

CN105 local control of the Mitsubishi Hyper Heat, Emporia Vue as independent power validator, real COP curve from your actual data, and forecast-driven pre-heat scheduling.

Covers

  • →CN105 adapter wiring + ESPHome config
  • →Emporia Vue per-circuit polling
  • →Validation watchdog and enforcement loop
  • →Real COP curve from SQLite data
  • →Forecast-driven pre-heat scheduler
  • →Dashboard: power, cost, planning horizon
  • →8-week rollout sequence
View guide

Phase 3 of 5

Visual House Model
& Unified
Dashboard

Floor-plan-first interface with live sensors, heat map overlays, equipment markers, and a single navigation system that surfaces Phase 1 and 2 data on demand.

Covers

  • →RoomSketcher floor plan export workflow
  • →Floor plan config JSON and sensor placement
  • →Heat map overlay with IDW interpolation
  • →Live equipment markers and popovers
  • →Unified navigation structure
  • →Phase 3 rollout sequence
View guide

Phase 4 of 5

Expansion Monitoring
& Reliability

Extend the core pipeline with UPS status and circuit-level satellites for load attribution and power-event visibility.

Covers

  • →NUTS UPS telemetry: line power, load %, runtime
  • →Kasa switch monitoring for satellite loads
  • →Power event tagging inside the dashboard
  • →UPS-aware automation guardrails

Phase 5 of 5

Solar Offset
& System
Sizing

A continuation layer that uses measured Emporia data to size a solar-first, grid-backed EG4 system and compare portable backup options.

Covers

  • →60.5 kWh/day measured average load
  • →EG4 FlexBOSS/GridBOSS phase-one plan
  • →9-12 kW starter PV sizing
  • →Pecron E3800 portable backup comparison
Open planner

Full stack at a glance

Every tool, library, and service involved

Layer Technology
Firmware ESPHome on ESP32-S3
Messaging Mosquitto MQTT
Backend Python + FastAPI + paho-mqtt
Storage SQLite + aiosqlite
Indoor sensors Aqara Hub V3 + Zigbee sensors
Power monitoring Emporia Vue + pyemvue
Weather Open-Meteo API
Infrastructure Debian LXC containers