How to Configure M-Bus TCP Data Collection

How to Configure M-Bus TCP Data Collection

Document Version: V1.0

Revision History

Version

Date

Description

V1.0

2026-10-30

Initial release

1. Protocol Overview

  • Protocol Description: M-Bus TCP is the data collection method used when the M-Bus metering bus is connected to Ethernet. It is commonly used for centralized polling collection of slave devices such as water meters, heat meters, electricity meters, and gas meters through an M-Bus master converter or the M-Bus interface of the gateway. This protocol still uses master polling and slave passive response for communication. The only difference is that the platform establishes a connection with the upstream M-Bus TCP gateway over the network and then accesses the downstream M-Bus slave devices.
  • Application Scenario: This protocol is suitable for projects where on-site meters are dispersed and need to be centrally accessed over a network, such as building energy management, central heating metering, and tenant sub-metering. For meters that have already been aggregated through an M-Bus TCP gateway, this method reduces the limitations of direct on-site serial connections and facilitates unified management and remote maintenance.
  • Support Status: In E2C Trinity, this protocol is supported only by the E2C Facility product. As the M-Bus master, E2C Facility supports manually adding M-Bus TCP devices and auto-searching for tags.

Software Platform

E2C Facility

E2C Factory

E2C Field

Supported Gateway Model

LG5120

/

/

Firmware Requirement (RobustOS Pro version)

≥2.5.1

/

/

2. Preparation

Before you start, make sure the following items are ready:

  • Network Connection
  • Confirm that the E2C Trinity gateway and the target M-Bus TCP gateway can communicate over the network.
  • Confirm that the target M-Bus TCP gateway has been correctly connected to the downstream M-Bus bus, and that the slave devices are powered on and working normally.
  • If switches, firewalls, or routers exist on site, confirm in advance that the target 【IP Address】 and 【Port Number】 can be accessed normally.
  • Communication Parameters
  • Prepare the 【IP Address】 and 【Port Number】 of the target M-Bus TCP gateway.
  • If there are no special requirements from the manufacturer, first confirm whether the device uses the default 【Port Number】 2400.
  • Device Parameters
  • Prepare the 【Primary Address】 or 【Secondary Address】 of the target M-Bus slave device.
  • If multiple slave devices are connected under one channel, confirm in advance that the addresses are unique to avoid address conflicts that may cause collection failures.

3. Configuration Steps

In actual projects, you can choose different configuration methods according to the on-site scenario:

  • Option One: Add a device for the first time. This option is suitable for scenarios where the target device or its channel does not exist in the system yet. It consists of 2 steps. See 3.1 and 3.2.
  • Option Two: Copy a point table across devices. This option is suitable when devices of the same model or same protocol need to quickly reuse an existing point table configuration. It consists of 3 steps. See 3.1, 3.3, and 3.4. If the target device has already been created, you can start directly from 3.3.

3.1 Step 1: Add a Device and Configure a Channel

  1. Log in to the E2C Trinity management interface and go to Data Collection under Wired Devices.
  2. Click Add Device at the top of the list.
  3. In the dialog box, select M-Bus for 【Driver】 and select M-Bus TCP for the secondary option.
  4. For the first configuration, click Channel Management next to the 【Channel】 field, add a channel, and fill in the following parameters.

Figure 3-1 Add M-Bus TCP Channel

Parameter

Description

Example

【Name】

Channel name. 1-100 characters, unique within the same gateway.

Energy Gateway-MBUS Channel 1

【Driver】

Must select M-Bus TCP.

M-Bus TCP

【IP Address】

The network address of the target M-Bus TCP gateway. Required when configuring the channel.

192.168.0.68

【Port Number】

The service port of the target M-Bus TCP gateway. Required when configuring the channel. The default value is 2400.

2400

【Polling Cycle】

The default polling cycle for all devices under this channel. Unit: seconds.

10

【Collection Timeout】

Configured in Advanced Settings. The timeout for waiting for a slave response. Unit: milliseconds.

4000

【Retry Count】

Configured in Advanced Settings. The number of retries after a failure.

1

【Communication Interval】

Configured in Advanced Settings. The wait time between two consecutive command transmissions. Unit: milliseconds.

50

  1. Return to the Add Device dialog box, select the newly created 【Channel】, and continue filling in the device information. If a usable channel already exists on site, you can also select an existing channel directly.

Figure 3-2 Add M-Bus TCP Device

Parameter

Description

Example

【Name】

Device name. 1-100 characters, unique within the same channel.

Heat Supply Main Pipe-Ultrasonic Heat Meter 01

【Driver】

Select M-Bus as the primary option and M-Bus TCP as the secondary option.

M-Bus TCP

【Channel】

Select the M-Bus channel to which the current device belongs.

Energy Gateway-MBUS Channel 1

【Addressing Mode】

Select the addressing mode of the device. Primary Address or Secondary Address is supported.

Primary Address

【Primary Address】

Required when Addressing Mode is Primary Address. The range is 1-250 and must be unique within the same connection channel.

12

【Secondary Address】

Required when Addressing Mode is Secondary Address. Enter a 16-digit hexadecimal address.

-

【Description】

Supplementary description of the device, to help identify it on site.

Inlet heat meter of the main heat supply pipe

  1. Click Save to complete device creation.

3.2 Step 2: Auto Search and Add Tags

After completing device creation in Option One, you need to add tags through Auto Search. M-Bus device tags do not support manual addition, and Auto Search is the main way to obtain tags.

  1. In the device list, click the newly created M-Bus device to open the tag table on the right.
  2. Click Auto Search in the upper-right corner of the list. The system starts reading the device's tag records.
  3. During the scan, the system will prompt that reading may take some time. Please wait patiently.
  4. After the scan completes, the dialog box lists the tag information currently recognizable on the device.
  5. Select the tags to collect, confirm them, and click Save at the bottom to add the selected tags to the device in batches.
  6. After all tags are added or modified, click Publish in the upper-right corner of the page to apply the configuration.

Figure 3-3 Auto Search Tag Results

Item

Description

Example

【Name】

The system automatically generates an initial name based on the English name of the 【Physical Quantity】. You can modify it as needed.

Energy

【Physical Quantity】

Returned by the device scan and used to identify the physical meaning of the tag.

Energy

【Latest Value】

The latest collected value returned by the device.

1256.32

【Unit】

The engineering unit of the tag.

kWh

【Data Type】

Automatically inferred from the scan result. double or string is common.

double

【Decimal Places】

When 【Data Type】 is double, the system defaults this to 2.

2

【Length】

When 【Data Type】 is string, the system automatically fills it based on the actual length of the current value.

16

Description:

  • If a scan result duplicates a tag that already exists in the current device, the system automatically identifies it as an existing tag, and that row cannot be selected for addition.
  • Auto Search only supports adding new tags and does not overwrite the tags that already exist under the current device.
  • If multiple tags with the same 【Physical Quantity】 name are scanned, the system automatically appends a suffix to avoid duplicate default names. You can also adjust them manually before saving.

3.3 Step 2: Export the Source Device Point Table

Option Two is suitable for copying a point table across devices. After the source device's point table has been configured, first export the existing point table.

  1. On the source device's tag table page, click Export Point Table in the upper-right corner to download the Excel file.
  2. Open the exported file and modify the business fields such as 【Name】, 【Associated Group】, 【Order】, and 【Description】 as needed.

Note: The 【Physical Quantity】, 【Unit Code】, 【Function Code】, 【Storage Number】, 【Tariff Number】, 【Subunit】, and 【Data Type】 fields in the exported file are underlying identification information and cannot be modified.

3.4 Step 3: Import the Target Device Point Table

After the export is complete, you can import the prepared point table into the target device to quickly copy the configuration across devices.

  1. Go to the target device's tag table page and click Import in the upper-right corner.
  2. Upload the prepared Excel file. The system will automatically verify and match the data.
  3. In the import preview, confirm that the update, addition, and deletion lists are correct, and then click Confirm to complete the import.
  4. Click Publish in the upper-right corner of the page to apply the configuration.

The system processes the imported data as follows:

  • For tags whose underlying identification information is the same, the system treats them as updates and only updates the business fields such as 【Name】, 【Associated Group】, 【Order】, and 【Description】.
  • For tags that do not exist in the current device, the system treats them as additions.
  • For tags that exist in the current device but are not in the imported file, the system treats them as deletion candidates and prompts for confirmation in the preview.

Note: The M-Bus protocol does not provide a separate import template. Please upload the file obtained and organized through the Export Point Table function.

4. Verification

  1. Device Status: In the device list on the left, confirm that the online status indicator of the M-Bus device is normal.
  2. Data Collection: On the tag table page on the right, check the 【Latest Value】 column to confirm that the values are refreshed normally according to the configured polling cycle and match the on-site meter readings.
  3. Tag Status: Confirm that the 【Status】 in the first column of the tag table is normal and that there are no persistent errors.

Figure 4-1 Tag Collection Results

5. Troubleshooting

  • Issue: What should I do if the device goes offline or the tag collection fails? Possible Cause: The configured 【IP Address】 or 【Port Number】 is incorrect; the network between the E2C Trinity gateway and the target M-Bus TCP gateway is unreachable; the device 【Primary Address】 or 【Secondary Address】 is filled in incorrectly; the 【Collection Timeout】 or 【Communication Interval】 is set unreasonably; or the downstream M-Bus bus or slave device is abnormal. Solution: First check the network connectivity and confirm that the target gateway is reachable, then verify whether the address configuration matches the nameplate on the meter. If the communication is still unstable, increase 【Collection Timeout】 or 【Communication Interval】 appropriately and test again.
  • Issue: Why is the 【Connection Channel】 field fixed and cannot be changed? Possible Cause: The M-Bus protocol uses a fixed M-Bus channel resource in the system. This field is only used to display the connection channel bound to the current protocol and does not support manual switching by the user. Solution: This is normal system design and no action is required. For the M-Bus TCP scenario, focus on verifying whether the 【IP Address】, 【Port Number】, and device address are correctly configured.
  • Issue: What should I do if Auto Search cannot find any tags? Possible Cause: The target device does not respond normally; the target gateway is reachable but the downstream slave is offline; there is an address conflict on the bus; or the device parameters or wiring are abnormal. Solution: Confirm that the target gateway is online, check the power supply and bus connection status of the downstream M-Bus slave devices, verify that the device addresses are unique, and run Auto Search again.
  • Issue: What should I do if importing a point table fails? Possible Cause: The underlying identification fields were modified in the Excel file, or the business fields in the imported file contain invalid values. Solution: First check whether 【Name】 is empty or duplicated, and confirm that the underlying fields such as 【Physical Quantity】, 【Unit Code】, 【Function Code】, and 【Storage Number】 have not been modified, then import again.
  • Issue: Where can I view related logs when data collection is abnormal? Possible Cause: Further confirmation is needed for bus communication, import execution results, or device error messages. Solution: Go to DebugLogs to view the logs, and locate the problem together with the device status and error messages.

Figure 5-1 Debug Logs Page