TapHome

solvimus MBUS-GEM – M-Bus Heat Meter

Modbus TCP
Submitted by
Last updated: 11. 2026
solvimus MBUS-GEM – M-Bus Heat Meter

TapHome has no M-Bus interface of its own. Heat meters with a wired M-Bus (EN 13757) are connected through a gateway that translates M-Bus into Modbus, and TapHome then reads them as Modbus TCP devices. This community template uses the solvimus MBUS-GEM gateway (MBUS-GE20M, MBUS-GE80M, MBUS-GE125M, MBUS-GE250M, MBUS-GE500M): the gateway reads the meters on its M-Bus and serves their values as a Modbus TCP server on port 502.

The template reads one heat meter (or one combined heat and cooling meter): heat energy in kWh, heating water volume, thermal power, volume flow, and the flow and return temperatures. One imported module represents one meter; for each further meter the template is imported again. Heat energy is a plain variable, not an electricity meter, so TapHome never counts it as electricity consumption.

Community template — not yet tested with TapHome on a gateway. The template was written from the MBUS-GEM user manual and has not run against a gateway, a heat meter or a simulator. Its register numbers are placeholders that must be replaced with the numbers the gateway shows for your meter (see Configuration). Feedback from the field is welcome. Download the XML on this page, or get it from the TapHome portal: solvimus MBUS-GEM – M-Bus heat meter — community template, and import it as a new module.

What you need

  • solvimus MBUS-GEM gateway — MBUS-GE20M (20 unit loads), MBUS-GE80M (80), MBUS-GE125M (125), MBUS-GE250M (250) or MBUS-GE500M (500). One unit load is mostly one meter.
  • A heat meter with wired M-Bus (EN 13757) on the M-Bus of the gateway, or a combined heat and cooling meter.
  • The gateway and the TapHome Core in the same local network.

Hardware connection

The MBUS-GEM mounts on a 35 mm DIN rail. The M-Bus lines of the meters go to the M-Bus screw terminals of the gateway, the network to its RJ45 Ethernet port (10/100 Mbit/s). The gateway needs an external DC supply: 21.6–24.5 V DC for the MBUS-GE20M and MBUS-GE80M, 12–36 V DC for the MBUS-GE125M, MBUS-GE250M and MBUS-GE500M. It starts by itself when the supply is connected.

Configuration

Network address of the gateway

The MBUS-GEM ships with the static IP address 192.168.1.101 (subnet mask 255.255.255.0, gateway 192.168.1.254). Its configuration website opens at http://192.168.1.101/; at the first login the administrator has to change the password. The solvimus tool Netdiscover finds the gateway in the network and changes its IP address, subnet mask and gateway, or switches it to DHCP. With DHCP the address assigned to the gateway is found in the DHCP server by its MAC address, which Netdiscover also shows. Without a DHCP server the gateway picks an address from 169.254.x.x.

The template addresses the gateway by its IP address, so give it a static address or reserve its address in the DHCP server.

Gateway settings

In the configuration website, tab Server:

  1. Set Modbus mode to Modbus TCP and keep Modbus port at 502.
  2. Keep Modbus float only off. That mode removes the type and unit fields the template checks.
  3. Keep Modbus swap off. The template expects the default word order (most significant word first).
  4. Switch Modbus multi slave on (recommended). Every meter then becomes its own virtual Modbus slave with its own address (1–247), and the register numbering restarts for each meter, so meters of the same type get the same register numbers.

After switching multi slave on or off, the addresses in the Meter tab must be assigned again (context menu Allocate).

Meter list and readout cycle

The heat meter must be in the meter list of the gateway (tab Meter), scanned on the M-Bus or created by hand. The gateway reads the meters independently of Modbus requests, at the Readout cycle in the Configuration tab or at the per-meter Cycle (in seconds) in the Meter tab. These settings decide how fresh the values in TapHome are. Some battery-powered M-Bus meters allow only a limited number of readouts per day — check the meter datasheet before choosing a short cycle.

Template settings after import

The gateway has no fixed register table. It gives the meter entry and every meter value its own block of 10 holding registers, and shows the start of each block in the Register column of the Meter tab. The order of the values follows the order in which the meter sends its M-Bus records, so it depends on the meter model.

SettingWhat to enter
IP addressAddress of the gateway
SlaveIdWith multi slave: the number in the Register column of the meter row. Without multi slave: 255
RegMeterWith multi slave: 10 (the meter entry starts at 10 in every virtual slave). Without multi slave: the number in the Register column of the meter row
RegEnergy, RegVolume, RegPower, RegFlow, RegFlowTemp, RegReturnTempThe number in the Register column of the matching value row. The Description and Unit columns of the Meter tab show which row is which

The IP address and SlaveId are asked for during the import; the seven Reg… values are module variables. Their defaults (10, 20, 30 … 70) are placeholders: 10 and 20 match the test mode of the gateway, the others simply continue in steps of 10. Always overwrite them.

Every device checks the entry type and the unit of its block before it shows a value. A wrong number gives an error on the device that names the module variable, for example RegPower does not point to a power value … – copy the Register number of this value from the gateway Meter tab.

Connection check

With Modbus test switched on in the Server tab, the gateway serves static test data: the meter entry at register 10 and an energy value of 1234.5678 Wh at register 20. With the default module variables, Heat Energy then shows 1.2 kWh with a warning that the medium of the test meter is not heat (the test meter is an electricity meter). That proves the IP address, port, slave address, register numbers and word order are right. The other devices report errors because the test data has no further values. Switch the test mode off afterwards.

Device capabilities

DeviceUnitWhat it shows
Heat EnergykWhCumulative heat energy, converted from Wh or J and rounded to 0.1 kWh
Heating Water Volumem³Cumulative volume of heating water
Thermal PowerkWCurrent thermal power, converted from W or J/h
Volume Flowm³/hCurrent flow, converted from m³/min or m³/s when the meter sends those units
Flow Temperature°CSupply temperature of the heating circuit
Return Temperature°CReturn temperature of the heating circuit

Meter status

Heat Energy also watches the meter itself. It shows an error when RegMeter does not point to a meter entry or when the gateway could not read the meter in its last readout, and a warning when not all values were updated or when the medium of the meter is not heat or cooling. It carries two service attributes:

Service attributeDescription
Meter serial numberSerial number of the meter, to confirm that the module reads the right meter
Last meter readoutMinutes since the gateway last read the meter

All values change only at each readout of the gateway; the devices poll the gateway every 15 s.

Troubleshooting

No communication

Check that Modbus is enabled in the Server tab, that the port is 502 on both sides and that no firewall blocks it. TapHome and the gateway must be in the same subnet or have a working route; a ping to the gateway helps. Then use the connection check above.

Error that names a module variable

The number in that variable points to a block of another type or unit. Copy the Register number again from the Meter tab; with multi slave also check SlaveId.

Values do not change

Check the readout cycle of the gateway and the readout limit of the meter. The system time of the gateway must be correct (set by hand or via SNTP), otherwise the age of the last readout is wrong.

Small deviation from the value on the gateway website

The template reads the floating-point value, which has about 7 significant digits. Reload the Meter tab of the gateway before comparing.

Other Modbus clients on the same gateway

The gateway serves up to five Modbus TCP connections at the same time; when the limit is exceeded it closes the oldest one. Keep this in mind when a building management system or a display reads the same gateway.

Available devices

solvimus MBUS-GEM – heat meter Module
Custom Variables
RegMeter (numeric) = 10Start of the meter entry (serial number, readout time, read status) — 10 with Modbus multi slave, otherwise the Register number of the meter row in the Meter tab of the gateway
RegEnergy (numeric) = 20Start of the energy value (Wh or J) — the Register number of its row in the Meter tab of the gateway
RegVolume (numeric) = 30Start of the volume value (m³) — the Register number of its row in the Meter tab of the gateway
RegPower (numeric) = 40Start of the power value (W or J/h) — the Register number of its row in the Meter tab of the gateway
RegFlow (numeric) = 50Start of the volume flow value (m³/h, m³/min or m³/s) — the Register number of its row in the Meter tab of the gateway
RegFlowTemp (numeric) = 60Start of the flow temperature value (°C) — the Register number of its row in the Meter tab of the gateway
RegReturnTemp (numeric) = 70Start of the return temperature value (°C) — the Register number of its row in the Meter tab of the gateway
Heat Energy Variable Read-only

Cumulative heat energy of the meter in kWh; also reports when the gateway could not read the meter or the values are not up to date

Register: H:RegEnergy+4 Float Unit: kWh
Service Attributes
Meter serial numberSerial number of the meter, to confirm that the module reads the right meter
Last meter readoutMinutes since the gateway last read the meter

Heat Energy

Read
VAR info := MODBUSR(H, RegEnergy+7, UInt16);
VAR unit := GETBITS(info, 0, 8);
VAR factor := SWITCH(unit, 5, 1000, 6, 3600000, 0);
IF GETBITS(info, 8, 8) != 0 OR factor = 0
    ADDERROR(1, "RegEnergy does not point to an energy value (entry type " + TOSTRING(GETBITS(info, 8, 8)) + ", unit code " + TOSTRING(unit) + ") – copy the Register number of this value from the gateway Meter tab");
    RETURN(NaN);
END
RETURN(ROUND(MODBUSR(H, RegEnergy+4, Float) / factor * 10) / 10);
Read (module)
VAR meterInfo := MODBUSR(H, RegMeter+7, UInt16);
VAR medium := 0;
VAR flags := 0;
IF GETBITS(meterInfo, 8, 8) != 2
    ADDERROR(1, "RegMeter does not point to a meter entry (entry type " + TOSTRING(GETBITS(meterInfo, 8, 8)) + ") – set RegMeter to the start of the meter entry (10 with Modbus multi slave, otherwise the Register number of the meter row in the gateway Meter tab)");
ELSE
    medium := GETBITS(MODBUSR(H, RegMeter+3, UInt16), 0, 8);
    IF medium != 4 AND medium != 10 AND medium != 11 AND medium != 12 AND medium != 13
        ADDWARNING(2, "RegMeter points to a meter with medium code " + TOSTRING(medium) + ", which is not a heat meter – check that RegMeter and SlaveId belong to the heat meter");
    END
    flags := MODBUSR(H, RegMeter+8, UInt16);
    IF GETBIT(flags, 0)
        ADDERROR(3, "The gateway could not read the meter in its last readout – check the M-Bus wiring, the meter address and the meter list of the gateway");
    ELSEIF GETBIT(flags, 1)
        ADDWARNING(4, "Not all meter values were updated in the last gateway readout");
    END
END
Service Attributes
Meter serial number
TOSTRING(MODBUSR(H, RegMeter+0, UInt32))
Last meter readout
DATETIME t := NOW();
VAR ts := MODBUSR(H, RegMeter+4, UInt32);
IF(ts = 0, "No readout yet", TOSTRING(ROUND((t.UNIXTIME - ts) / 60)) + " min ago")
Heating Water Volume Variable Read-only

Cumulative volume of heating water that has passed the meter, in m³

Register: H:RegVolume+4 Float Unit: m³

Heating Water Volume

Read
VAR info := MODBUSR(H, RegVolume+7, UInt16);
VAR unit := GETBITS(info, 0, 8);
VAR factor := SWITCH(unit, 7, 1, 0);
IF GETBITS(info, 8, 8) != 0 OR factor = 0
    ADDERROR(1, "RegVolume does not point to a volume value in m³ (entry type " + TOSTRING(GETBITS(info, 8, 8)) + ", unit code " + TOSTRING(unit) + ") – copy the Register number of this value from the gateway Meter tab");
    RETURN(NaN);
END
RETURN(ROUND(MODBUSR(H, RegVolume+4, Float) * factor * 1000) / 1000);
Thermal Power Variable Read-only
Register: H:RegPower+4 Float Unit: kW

Thermal Power

Read
VAR info := MODBUSR(H, RegPower+7, UInt16);
VAR unit := GETBITS(info, 0, 8);
VAR factor := SWITCH(unit, 13, 1000, 14, 3600000, 0);
IF GETBITS(info, 8, 8) != 0 OR factor = 0
    ADDERROR(1, "RegPower does not point to a power value (entry type " + TOSTRING(GETBITS(info, 8, 8)) + ", unit code " + TOSTRING(unit) + ") – copy the Register number of this value from the gateway Meter tab");
    RETURN(NaN);
END
RETURN(MODBUSR(H, RegPower+4, Float) / factor);
Volume Flow Variable Read-only
Register: H:RegFlow+4 Float Unit: m³/h

Volume Flow

Read
VAR info := MODBUSR(H, RegFlow+7, UInt16);
VAR unit := GETBITS(info, 0, 8);
VAR factor := SWITCH(unit, 15, 1, 16, 60, 17, 3600, 0);
IF GETBITS(info, 8, 8) != 0 OR factor = 0
    ADDERROR(1, "RegFlow does not point to a volume flow value (entry type " + TOSTRING(GETBITS(info, 8, 8)) + ", unit code " + TOSTRING(unit) + ") – copy the Register number of this value from the gateway Meter tab");
    RETURN(NaN);
END
RETURN(MODBUSR(H, RegFlow+4, Float) * factor);
Flow Temperature Temperature Sensor Read-only

Supply temperature of the heating circuit measured by the meter

Register: H:RegFlowTemp+4 Float Unit: °C

Flow Temperature

Read temperature
VAR info := MODBUSR(H, RegFlowTemp+7, UInt16);
VAR unit := GETBITS(info, 0, 8);
VAR factor := SWITCH(unit, 19, 1, 0);
IF GETBITS(info, 8, 8) != 0 OR factor = 0
    ADDERROR(1, "RegFlowTemp does not point to a temperature value in °C (entry type " + TOSTRING(GETBITS(info, 8, 8)) + ", unit code " + TOSTRING(unit) + ") – copy the Register number of this value from the gateway Meter tab");
    RETURN(NaN);
END
RETURN(MODBUSR(H, RegFlowTemp+4, Float) * factor);
Return Temperature Temperature Sensor Read-only

Return temperature of the heating circuit measured by the meter

Register: H:RegReturnTemp+4 Float Unit: °C

Return Temperature

Read temperature
VAR info := MODBUSR(H, RegReturnTemp+7, UInt16);
VAR unit := GETBITS(info, 0, 8);
VAR factor := SWITCH(unit, 19, 1, 0);
IF GETBITS(info, 8, 8) != 0 OR factor = 0
    ADDERROR(1, "RegReturnTemp does not point to a temperature value in °C (entry type " + TOSTRING(GETBITS(info, 8, 8)) + ", unit code " + TOSTRING(unit) + ") – copy the Register number of this value from the gateway Meter tab");
    RETURN(NaN);
END
RETURN(MODBUSR(H, RegReturnTemp+4, Float) * factor);
Connection: Modbus TCP • Slave ID: $[SlaveId]
Possible improvements (6)
  • H:RegX+0 … H:RegX+3, H:RegX+6 Unscaled 64-bit meter value with scaling factor — The manual prefers the INT64 value with its power-of-ten scaling factor for exact billing; the template reads the FLOAT32 value (about 7 significant digits).
  • value block with unit K (code 20) Temperature difference — Many heat meters also send the temperature difference between flow and return; it would be one more value block.
  • second energy value block (combined heat/cooling meter, medium 13) Cooling energy — A combined heat/cooling meter sends a separate cooling energy value; the template reads one energy value.
  • value blocks with a storage number Historic meter values — Stored values such as the reading on the billing date appear as further value rows in the Meter tab.
  • H:RegX+8 Meter value timestamp — UNIX time the meter provides for each value (0 if none); the template uses the readout time of the meter entry instead.
  • H:0 … H:9 (slave 255) Gateway device entry — Serial number, software version and system time of the gateway itself.

Sources

  • solvimus MBUS-GEM User manual v1.31 (Modbus TCP server, network configuration)
  • solvimus MBUS-GEM datasheets (MBUS-GE20M/80M and MBUS-GE125M/250M/500M)

Found a problem with this device template?

Tell us what's wrong, what's missing, or how the template should behave. We rely on your feedback to keep the catalog accurate.

Community — unreviewed

Want to use this in your TapHome Core?

Open this template in the Customer Portal to apply it to one of your homes, or to draft a refinement and submit it back to the catalog.

Open in portal