Integrate Heat Pump Monitoring with Home Assistant on Raspberry Pi 2025
Why Monitor Your Heat Pump System with Home Assistant
With heat pump sales surging 17% across Europe in 2025 as energy costs climb, homeowners are investing in efficient heating systems but often lack visibility into their performance. Home Assistant running on a Raspberry Pi offers a cost-effective, privacy-first solution to monitor heat pump efficiency, track energy consumption, and automate heating schedules without relying on proprietary cloud platforms.
This guide walks you through integrating your heat pump into Home Assistant on Raspberry Pi, enabling real-time monitoring of COP (Coefficient of Performance), energy usage, and operational metrics that matter for optimizing your system.
Prerequisites and Hardware Setup
Before starting, ensure you have:
- Raspberry Pi 4 (2GB+ RAM) or Pi 5 running Home Assistant OS
- Network access to your heat pump (WiFi or Modbus/TCP connection)
- Home Assistant 2024.12 or later
- MQTT broker (optional but recommended for reliability)
- Python 3.10+ for custom integrations
If your heat pump doesn't have built-in WiFi, you'll need a compatible gateway adapter. Popular European manufacturers like Nibe, Daikin, and Stiebel Eltron offer Modbus TCP or HTTP-based APIs.
Step 1: Identify Your Heat Pump's Communication Protocol
First, determine how your system communicates. Check your heat pump's documentation or control panel:
# SSH into your Raspberry Pi
ssh root@homeassistant.local
# Scan your local network for Modbus TCP devices
nmap -p 502 192.168.1.0/24
Common protocols by region:
- Modbus TCP: Nibe, Stiebel Eltron, most commercial systems
- HTTP REST API: Daikin, Mitsubishi, LG
- MQTT: Newer systems with direct integration
- Proprietary: Requires third-party bridge (e.g., Modbus gateway)
Step 2: Install the Appropriate Integration
For Modbus TCP Heat Pumps
In Home Assistant, add the Modbus integration:
# configuration.yaml
modbus:
- name: heat_pump_modbus
type: tcp
host: 192.168.1.100
port: 502
sensors:
- name: "Heat Pump Supply Temperature"
address: 0
input_type: holding
unit_of_measurement: "°C"
scale: 0.1
offset: 0
- name: "Heat Pump Return Temperature"
address: 1
input_type: holding
unit_of_measurement: "°C"
scale: 0.1
- name: "Heat Pump Power Output"
address: 100
input_type: holding
unit_of_measurement: "kW"
scale: 0.01
- name: "Heat Pump Power Input"
address: 101
input_type: holding
unit_of_measurement: "kW"
scale: 0.01
For HTTP API Heat Pumps (Daikin/Mitsubishi)
# configuration.yaml
rest_sensor:
- name: "Daikin Heat Pump Status"
unique_id: daikin_heatpump_status
resource: "http://192.168.1.105/api/heatpump/status"
method: GET
authentication: digest
username: admin
password: !secret daikin_password
json_attributes:
- supply_temp
- return_temp
- cop_current
- energy_today
value_template: "{{ value_json.status }}"
unit_of_measurement: "status"
scan_interval: 60
Step 3: Calculate and Track COP (Efficiency Metric)
The Coefficient of Performance is critical for understanding heat pump efficiency. Create a template sensor to calculate real-time COP:
# automations.yaml or template sensors
template:
- sensor:
- name: "Heat Pump Real-Time COP"
unique_id: heat_pump_cop_realtime
unit_of_measurement: "ratio"
state_class: measurement
state: |
{% set power_output = state_attr('sensor.heat_pump_power_output', 'value') | float(0) %}
{% set power_input = state_attr('sensor.heat_pump_power_input', 'value') | float(0) %}
{% if power_input > 0.1 %}
{{ (power_output / power_input) | round(2) }}
{% else %}
unavailable
{% endif %}
Step 4: Set Up Energy Dashboard Integration
Create utility meter entities to track daily/weekly energy consumption:
utility_meter:
heat_pump_daily_energy:
source: sensor.heat_pump_energy_consumed
cycle: daily
net_consumption: true
heat_pump_weekly_energy:
source: sensor.heat_pump_energy_consumed
cycle: weekly
net_consumption: true
Add these to your Energy Dashboard:
- Go to Settings → Dashboards → Energy
- Click Add Electric Grid Consumption
- Select
sensor.heat_pump_daily_energyas the meter - Optionally add cost tracking based on European energy tariffs
Step 5: Create Automation Rules for Optimization
Implement smart scheduling based on energy prices and outdoor temperature:
# automations.yaml
automation:
- alias: "Optimize Heat Pump During Peak Hours"
trigger:
platform: time
at: "06:00:00"
condition:
- condition: state
entity_id: input_boolean.heat_pump_optimization
state: "on"
action:
- service: climate.set_temperature
target:
entity_id: climate.heat_pump_main
data:
temperature: "{{ state_attr('climate.heat_pump_main', 'current_temperature') + 0.5 }}"
- service: notify.mobile_app
data:
message: "Heat pump optimization active - COP: {{ states('sensor.heat_pump_real_time_cop') }}"
- alias: "Alert on Low COP Performance"
trigger:
platform: numeric_state
entity_id: sensor.heat_pump_real_time_cop
below: 2.5
for:
minutes: 15
action:
- service: notify.persistent_notification
data:
title: "Heat Pump Efficiency Alert"
message: "COP dropped to {{ states('sensor.heat_pump_real_time_cop') }}. Check outdoor temperature and defrost cycles."
Comparison: Home Assistant vs. Proprietary Monitoring
| Feature | Home Assistant (Raspberry Pi) | Manufacturer App | Third-Party Cloud | |---------|-------------------------------|------------------|-------------------| | Initial Cost | €50-100 (Pi + SD card) | Free | €5-15/month | | Data Privacy | Local, on-premise | Cloud-dependent | Cloud-dependent | | Real-time COP | Yes, automatic calculation | Limited visibility | Variable | | Custom Automation | Full programmability | Preset schedules only | Limited rules | | Energy Integration | Full Home Assistant ecosystem | Isolated app | Limited | | Historical Data | Unlimited (SD card limited) | 12 months typical | 6-12 months | | Offline Operation | Partial (local control) | None | None |
Troubleshooting Common Issues
Heat Pump Not Responding to Modbus Queries
Verify network connectivity and Modbus settings:
# Check if device is reachable
ping 192.168.1.100
# Test Modbus TCP connection (requires modbus-cli)
python3 -m pip install pymodbus
python3 -c "from pymodbus.client import ModbusTcpClient; c = ModbusTcpClient('192.168.1.100'); print(c.read_holding_registers(0, 10))"
COP Calculation Showing Unrealistic Values
- Verify scaling factors match your heat pump's documentation
- Ensure power output and input sensors are correctly mapped
- Check timestamp synchronization (sensor lag can cause spikes)
- Account for defrost cycles where COP temporarily drops
High RAM/CPU Usage on Raspberry Pi
Reduce Modbus polling frequency:
modbus:
- name: heat_pump_modbus
host: 192.168.1.100
scan_interval: 120 # Increase from default 30s
Conclusion
Monitoring your European heat pump system through Home Assistant on Raspberry Pi provides granular control over energy efficiency without vendor lock-in. With the 17% surge in heat pump adoption across Europe, having real-time COP tracking and automated optimization can reduce energy bills by 10-15% annually while maintaining comfort.
Start with basic temperature and power monitoring, then expand to energy pricing integration as your setup matures. The combination of cost-effective hardware and open-source software makes this approach ideal for developers and technical homeowners seeking advanced heat pump intelligence.