an creDomBus31 pdc vmc

This article shows how to manage the heat pump and ventilation system (HVAC) with Domoticz open-source software installed on a Rock PI S or Raspberry PI (but any other hardware should be OK), to use the most energy from renewable sources (photovoltaic system in this case) reducing the electricity bill.

First, a smart building should not have thermostats to regulate room temperature, because they usually are not so smart as a domotic controller. It's preferred to have a temperature (and humidity) sensor in some rooms and modify the outlet water temperature to get the best comfort and power consumption.

Controlling a building with radiating system, heat pump and photovoltaic on the roof is a bit complex, because several items must be kept into account:

  • outdoor min and max temperature

  • room temperatures (called diff, difference from set point and room temperature)

  • variation of diff with the time (derivative of diff on time)

  • current power from grid (if negative, some extra power is available from solar photovoltaic, and it's better to use it increasing heat pump power)

  • and finally, maybe you want to reduce power consumption during the peak hours (usually 7-9 in the morning, and 18-21 in the evening) to contribute to the electricity grid stability!

The goal is to get a comfortable temperature in all rooms, maybe reducing the temperature when rooms are not used, and  overheat the building, during winter, when extra power from photovoltaic is available: if setpoint is 21°C but extra power from photovoltaic is available, setpoint can be dinamically raised to 21.5 or 22°C for example.
For this reason thermostats are not a smart solution, if they don't know the current building power consumption! It's better to have temperature/humidity sensors in some rooms and let the home automation system decide what to do!

Domoticz supports several scripting languages, and LUA script has been chosen in this case because very clear so it's easy to learn, use and customize.

Two different methods were used with the heat pump EMMETI Mirai SMI EH1018DC : in the first section it's explained how to control the heat pump by Modbus, changing the water temperature and compressor power, and then a rough control using their ON/OFF inputs (as an example for other heat pumps that have not a bus to control them).

Controlling the heat pump by ModBus

The heat pump has one input to select half power or full power: it's mainly used during the night to reduce noise, limiting the compressor and fan frequency to 50% or so (the compressor frequency/power can be selected from 0 to 100%).

Heat pump managed by a LUA script to overheat in case of extra power from photovoltaic

Water temperature is a good solution to maximize the house comfort, while compressor frequency is perfect to control the usage power.

By default the heat pump has an algorithm to compute the outlet water temperature based on current outdoor temperature, and regulate the compressor frequency (power) proportially to the difference between the computed temperature and current water temperature.

The idea is to implement a better control of the outlet water temperature based on:

  1. difference between room setpoint and current temperature diffTemp
  2. derivative of diffTemp (it's important to know if the difference between setpoin and temperature is decreasing or increasing!)
  3. minimum (maximum in the Summer) outdoor temperature
  4. current power from the photovoltaic system (to improve own consumption)
  5. peak power of the electrical grid, to reduce power consumption in the peak hours (in the early morning and late afternoon): this is used only to help the electrical network to avoid peak power and high energy prices.

The control algorithm is implemented, in a LUA script that computes the right value of outlet water temperature and compressor frequency (power), using the command mbpoll to set the parameters to the heat pump control by Modbus (RS485).

Heatpump RS485 is connected to the domotic controller (RaspberryPI in this case) by a RS485/USB adapter; also the DomBus31 module is used to control heat pump inputs (thermostat on/off, coil/radiant temperature, heating/cooling and full power/half power.

Actually, heat pump is always configured in "night mode", and lua script controls both

  1. outled fluid temperature needed to have the right comfort in the house
  2. compressor power percentage, to regulate power

During the night, both fluid temperature and power are reduced to limit power consumption and fan/compressor noise.

During the day both fluid temperature and power are increased, with the exception of the peak hours 9-10 and 18-21 where it's a good practice to reduce consumptions for a better electricity grid stability.

If there is an extra production from photovoltaic (energy exported to the grid), fluid temperature and power are increased to consume all available energy from photovoltaic. Also, room setpoints are automatically increased in case of extra power from photovoltaic, to reduce the power consumed in the evening or in the night.

The files script_time_heatpump_emmeti.lua and config_heatpump_emmeti.lua are available in the Github

Import energy in a house with optimized heat pump management


Smart heat pump control by Domoticz to minimize power consumption

Domoticz plugin to manage Emmeti Mirai SMI heat pump

A plugin for Domoticz that manages heat pumps made by Emmeti is available at 

Screenshot of main Emmeti Mirai SMI heat pump parameters managed by Domoticz

Screenshot of main Emmeti Mirai SMI heat pump parameters managed by Domoticz