Tim's blah blah blah

Nibe Heatpump Home Automation - WIP

I have an F1255 Nibe heatpump in my home which I’d like to read out and possibly automate/optimize. Here I document my approach.

Goal

  1. Show live performance of the heatpump (e.g. power/COP) during both heating and cooling
  2. Optimize consumption to either low electricity price (via epexspot (epexspot.com)) or low carbon intensity (via co2signal (co2signal.com)?)
  3. Optimize electricity consumption / COP by tuning parameters

Todo

  1. Why is the Triple Solar cooling module running almost always?
  2. What is the difference between HW load and HW top? –> seems to be the location of the temperature sensor, one more at the bottom (load), one more at the top (top).
  3. What is the optimal amount of degree minutes to trigger heating on? –> Now: -60DM and +100DM.
  4. How can I measure the COP? (existing methods scale the theoretical COP based on specification & ambient temperatures)
  5. What is a reasonable 12h idle temperature reduction for the 180L boiler? (How) can I reduce this?
  6. How can I set passive cooling to start at lower temp than active cooling? –> dont use, not useful
  7. How can I reduce the internal heating element power to improve self-consumption or battery consumption (which have capped power)?
  8. How/what energy use can I adjust to optimize low-cost energy? E.g. 60 degree cycle on specific day?

Get heatpump logic from Keje/Github Get ‘Heat medium flow’ temp Get dump of nibe settings Explain filtertime Check which PM2.5 source used –> https://aqicn.org/station/@367963/de// (aqicn.org) + https://aqicn.org/station/@373501/de/ (aqicn.org) https://community.home-assistant.io/t/openaq-air-quality-data/597059/2 (home-assistant.io) // https://explore.openaq.org/#12/52.10131/5.12819 (openaq.org) https://community.home-assistant.io/t/air-quality-meters/147655 (home-assistant.io)

Setting up hardware

Hardware setup

There’s a few (hardware) options for reading out the heatpump. I chose a pre-built LilyGO T-CAN485 ESP board (opencircuit.nl) with esphome-nibe (github.com). Other options are listed below

Raspberri Pi with Modbus

Hardware (total: 52 EUR):

Software: nibepi (github.com) OR using nibe (github.com) and nibe-mqtt (github.com) libraries

Arduino/ESP32 with Modbus (preferred)

Hardware (total: 17-36 EUR):

OR a combined board:

Software: esphome-nibe (github.com)

Pre-built PRODINo

See here (kmpelectronics.eu) or here (web-engineering.info)

Installation

For details, read the installer manual (nibe.eu). First remove the front panel of the heat pump with the two TX25 Torx screws at the bottom, then tilt the panel and lift up (see page 8 of the installer manual (nibe.eu)). See page 12 for the location of the distribution boxes, and page 20 on how to open it (specifically: box AA3). Below a few pictures of my setup

Removing front panel from NIBE F1255 heatpump

Removing front panel from NIBE F1255 heatpump

NIBE heatpump with front cover removed

NIBE heatpump with front cover removed

Distribution box AA3 opening latch

Distribution box AA3 opening latch

An overview of electrical diagrams is available here (nibe.eu) (Dutch). here, you can see you need to connect 9-10-11-12 (GND-B-A-12V) on print AA3 rail X4. Alternatively, see the Nibe Modbus moduledocumentation (nibe.eu), or this topic (energiesparhaus.at). In my case there was already a wire connected to the pins (blue/yellow/green/orange wires to 9/10/11/12 = GND/B/A/12V), but it was not connected on the other side (?). I used this to connect my LilyGo.

Distribution box AA3 opened, showing the connector rails X6 (left) and X4 (top)

Distribution box AA3 opened, showing the connector rails X6 (left) and X4 (top)

Connection scheme for the MODBUS40 accessory, using pins 9-10-11-12 to GND-B-A-12V on MODBUS. I used the blue/yellow/green/orange wires that were already available.

Connection scheme for the MODBUS40 accessory, using pins 9-10-11-12 to GND-B-A-12V on MODBUS. I used the blue/yellow/green/orange wires that were already available.

Connection to LilyGO-T CAN485 ESP board.

Connection to LilyGO-T CAN485 ESP board.

Software setup

For the LilyGO T-CAN485 ESP board with esphome-nibe combination I chose, I combined the default esphome config template with the LilyGO example (github.com) config of esphome-nibe. This connects to the heatpump via modbus and sets up a UDP daemon for interfacing, which can be read out via nibe_heatpump (home-assistant.io) integration on Home Assistant.

Reading out diagnostics

Determining diagnostics

Once you have a hardware setup for modbus, you can read out certain ‘coils’ which are diagnostics parameters, see e.g. this list of parameters (github.com) (F1155/F1255 (github.com) specifics). In my case many of the >100 parameters were not active. You can plug in a USB stick as well which prints a log file and allows you to

Translation tables

Translation table for eb100_ep14_pca_base_relays_43514:

Separating hot water & heating energy

Not possible in InfluxDB (stackoverflow.com), as data are spread across two measurements.

SELECT state,energy FROM
  (select first(value) as energy from energyv3 where source='nibe' and uniqueid='compr_in_energy_43141' group by time(30m)),
  (select value as state from systemv3 where quantity='eb100_ep14_pca_base_relays_43514')
  WHERE time>now()-1d GROUP BY TIME(30m)

Post-processing in Python

# Approach one: grouped
energy = select first(energy) group by time(5m)

mask_hw = (pca == 15)
mask_heat = (pca == 7)

energy

Calibration of power usage

There are two sensors giving power:

  1. compr_in_power_43141: heat pump compressor power
  2. int_el_add_power_43084: resistive heater

Using a Riemann integration sensor in Home Assistant gives me energy use (ensure to use left integration, although trapezoidal should work better it doesn’t).

Automating / optimizing

There’s a few ways to optimize a heatpump

  1. Heating curves - determining heating circuit temperature depending on outside temperature
  2. Timing - optimize consumption by price / CO2 intensity / PV production
  3. Calibrating heating circuit (‘Waterzijdig inregelen’) - ensuring optimal heat transfer of the heating circuit

Optimizing curves

TODO

By electricity price / CO2 intensity

Rationale: consume depending on electricity price

  1. Use the built-in smart price adaptation (nibe.eu)
  2. Use hard-coded schedule based on average electricity prices over the day
  3. Use dynamic control via e.g. Home Assistant

By PV production

Rationale: consume depending on local electricity production. This is close to the above, except less at night and more during the day.

Sources

  1. NIBE L/W warmtepomp optimalisatie (tweakers.net)
  2. Haal meer uit je NIBE warmtepomp met nibepi (tweakers.net)
  3. COP berekening voor Nibe warmtepompen (tweakers.net) – NB this is not really COP, but COP scaled from specs based on working point.

#ESP8266 #Heating #Home-Improvement #Linux #Server #Smarthome #Unix