Configuring MBus Counters
Updated
by Nicolas
Unlike meters and other Modbus devices for which the gateway reads one specific data register at a time, MBus meters systematically send back all their registers in a single packet called a telegram.
We must then parse this telegram to keep only the values that interest us, namely the meter index (register of energy or volume consumed visible on the meter dial).
Standard configuration
Standard configuration is possible when the meters connected to the Gateway have a unique primary address and are of a model registered in the online portal.
Several standard models are registered such as the Integra Amtron S3U ( integra_heat
) and the Integra Saphir Modularis ( saphir_modularis
).
Example below of an Integra Amtron S3U heat meter ( integra_heat
) with unique primary address 1.

Advanced configuration
When the meter model is not saved and/or the primary addresses have not been defined, other elements must be configured manually.
Telegram analysis
First of all, we read and analyze the raw meter telegram via the Gateway configuration web server under Meters > MBus > Read MBus Meter
By connecting one meter at a time, the meter can be read with the default primary address 0
.
By default the baudrate is 2400
.

If the meter is correctly connected to the Gateway, we receive the raw telegram after a few seconds:

Primary address and secondary address
By default, an MBus counter has address 0 or 1. It is possible to edit the primary address between 1 and 250.
By connecting one meter at a time, you can change its primary address via the Gateway configuration webserver under Meters > MBus > Edit MBus Address.
We can also use the secondary address of the counter which is unique and which avoids configuring a primary address for each counter.
The secondary address is visible in the first line (no. 0) of the telegram. In the example above it is 20316513C5140004
"Secondary address: {manufacturer ID: EFE, device ID: 13653120, device version: 0, device type: HEAT_METER, as bytes: 20316513C5140004}"
The secondary address always has the same structure regardless of the model or manufacturer of the meter. It is composed of the following elements:
Serial number (inverted) | Manufacturer | Version | Kind |
20316513 | C5 14 | 00 | 04 |
To read the meter, it is possible to replace the "Manufacturer, Version, Type" elements with 8 consecutive "F" characters. Thus the secondary address of the example above can be constituted as follows: 20316513FFFFFFFF
We can thus easily find a secondary address by reversing the serial number of the meter. Generally, the serial number is engraved on the front of the meter.
Serial number (inverted) | Manufacturer | Version | Kind |
20316513 | FF FF | FF | FF |
Manual register selection
Once the secondary address is known, you must still select the counter index register.
In the example above, it appears on line # 3
(numbering starts at 0).
For a heating meter, we select the ENERGY
INST_VAL
element with the unit WATT_HOUR, Wh
For a water meter, we select the VOLUME
INST_VAL
element with the unit CUBIC_METRE, m\u00b3
Configuration in the online portal
We then configure the meter in the online portal to insert its secondary address and the position of the registers.
Edit the meter and select the model manual_heat_secondary_ad
for a thermal meter and manual_water_secondary_ad
for a hot or cold water meter.

Under additional parameters, we insert the “key-value” pairs secondary_ad
for the secondary address and reg
for the register.
For a heat meter we use heat_energy_kwh
for the meter index register.
For a cold meter we use cold_energy_kwh
and for a water meter vol_m3.
Here are the values for the heat meter example above:
|
|
|
|

Other registers
It is possible to collect other records for thermal meters (heat and cold) such as volume or probe temperatures. Here is the full list of registers for the example above:
{'flow_temp': 9, 'heat_energy_kwh': 3, 'power_kw': 5, 'return_temp': 10, 'vol_flow_m3_h': 7, 'vol_m3': 4, 'diff_temp': 11}
Other model
In the case, we would like to read an MBus meter which is neither a thermal meter nor a water meter as described above, we can use the generic_mbus
model.
You must then configure the registers by specifying the number of the telegram line as well as the name of the register. For example for an Mbus electric meter we specify the register en_im
for imported energy and possibly en_ex
for exported energy.
Example:
|
|