Connecting my heatpump „iDM Terra ML Complete HGL“ to OpenHAB 2 using MODBUS via node-red

For some time now I have been using OpenHAB at home for the central control of my house. In OpenHAB, for example, I manage shading, control some lamps, measure and visualize the energy consumption of certain consumers such as refrigerators or washing machines.

The biggest consumer in the house I have not connected yet, my heating. This is a Terra ML Complete HGL heat pump from iDM.

A little research on theire website has shown that the key figures of the machine can be read out via TCP (i. e. Ethernet) via the MODBUS protocol.

Since I didn’t find more detailed information on the internet about how to read the data, I would like to document this on this page.

Necessary tools/software

  • OpenHAB 2
  • node-red
  • node-red module node-red-contrib-modbus
  • node-red module node-red-contrib-openhab2

OpenHAB

First you have to create items in OpenHAB in which the values of the heat pump will be stored in the future:

 

I tried to read out the machine directly via the MODBUS binding of OpenHAB, but unfortunately I failed. Therefore I use the detour via node-red.

node-red

In node-red I created the following flow:

„Modbus Read“ reads the data in hex format from the heat pump, this module is configured as follows:

The server (in my case „IDM Heizung“) must also be configured:

In the second step I pass the data to the function „decode Buffer“. This function converts the 4* 8bit hex values into a 32bit float value. The source code of the function is as follows:

Via the „change“ module (set msg. payload) I distribute the information to the individual OpenHAB outputs:

For example, such an OpenHAB Outpust is configured as follows:

Now every 30 seconds the data of the heat pump are written to the items previously created in OpenHAB.

InfluxDB & Grafana

This data can then be persisted in an Influx database and visualized via Grafana. This tutorial shows how to do this:

https://community.openhab.org/t/influxdb-grafana-persistence-and-graphing/13761

For me, for example, the result looks like this:

I hope you enjoyed the guide.